combine: Do not throw away unneeded arms of parallels (PR83156)
[gcc.git] / gcc / ChangeLog
1 2017-11-29 Segher Boessenkool <segher@kernel.crashing.org>
2
3 PR rtl-optimization/83156
4 PR rtl-optimization/82621
5 * combine.c (try_combine): Don't split an I2 if one of the dests is
6 set again before I3. Allow unused dests.
7
8 2017-11-29 Segher Boessenkool <segher@kernel.crashing.org>
9
10 * config/rs6000/rs6000.md (*add<mode>3_carry_in_internal2): New.
11
12 2017-11-29 Vladimir Makarov <vmakarov@redhat.com>
13
14 PR rtl-optimization/80818
15 * lra.c (collect_non_operand_hard_regs): New arg insn. Pass it
16 recursively. Use insn code for clobber.
17 (lra_set_insn_recog_data): Pass the new arg to
18 collect_non_operand_hard_regs.
19 (add_regs_to_insn_regno_info): Pass insn instead of uid. Use insn
20 code for clobber.
21 (lra_update_insn_regno_info): Pass insn to
22 add_regs_to_insn_regno_info.
23
24 2017-11-29 Jim Wilson <jimw@sifive.com>
25 Andrew Waterman <andrew@sifive.com>
26
27 * config/riscv/riscv.c (SINGLE_SHIFT_COST): New.
28 (riscv_rtx_costs): Case ZERO_EXTRACT, match new pattern, and return
29 SINGLE_SHIFT_COST. Case LT and ZERO_EXTEND, likewise. Case ASHIFT,
30 use SINGLE_SHIFT_COST.
31 * config/riscv/riscv.md (lshrsi3_zero_extend_1): New.
32 (lshrsi3_zero_extend_2, lshrsi3_zero_extend_3): New.
33
34 2017-11-29 Julia Koval <julia.koval@intel.com>
35
36 * config/i386/avx512vbmi2intrin.h (_mm512_shldv_epi16,
37 _mm512_mask_shldv_epi16, _mm512_maskz_shldv_epi16, _mm512_shldv_epi32,
38 _mm512_mask_shldv_epi32, _mm512_maskz_shldv_epi32, _mm512_shldv_epi64,
39 _mm512_mask_shldv_epi64, _mm512_maskz_shldv_epi64): New intrinsics.
40 * config/i386/avx512vbmi2vlintrin.h (_mm256_shldv_epi16,
41 _mm256_mask_shldv_epi16, _mm256_maskz_shldv_epi16, _mm256_shldv_epi32,
42 _mm256_mask_shldv_epi32, _mm256_maskz_shldv_epi32, _mm256_shldv_epi64,
43 _mm256_mask_shldv_epi64, _mm256_maskz_shldv_epi64, _mm_shldv_epi16,
44 _mm_mask_shldv_epi16, _mm_maskz_shldv_epi16, _mm_shldv_epi32,
45 _mm_mask_shldv_epi32, _mm_maskz_shldv_epi32, _mm_shldv_epi64,
46 _mm_mask_shldv_epi64, _mm_maskz_shldv_epi64): Ditto.
47 * config/i386/i386-builtin.def (__builtin_ia32_vpshldv_v32hi,
48 __builtin_ia32_vpshldv_v32hi_mask, __builtin_ia32_vpshldv_v32hi_maskz,
49 __builtin_ia32_vpshldv_v16hi, __builtin_ia32_vpshldv_v16hi_mask,
50 __builtin_ia32_vpshldv_v16hi_maskz, __builtin_ia32_vpshldv_v8hi,
51 __builtin_ia32_vpshldv_v8hi_mask, __builtin_ia32_vpshldv_v8hi_maskz,
52 __builtin_ia32_vpshldv_v16si, __builtin_ia32_vpshldv_v16si_mask,
53 __builtin_ia32_vpshldv_v16si_maskz, __builtin_ia32_vpshldv_v8si,
54 __builtin_ia32_vpshldv_v8si_mask, __builtin_ia32_vpshldv_v8si_maskz,
55 __builtin_ia32_vpshldv_v4si, __builtin_ia32_vpshldv_v4si_mask,
56 __builtin_ia32_vpshldv_v4si_maskz, __builtin_ia32_vpshldv_v8di,
57 __builtin_ia32_vpshldv_v8di_mask, __builtin_ia32_vpshldv_v8di_maskz,
58 __builtin_ia32_vpshldv_v4di, __builtin_ia32_vpshldv_v4di_mask,
59 __builtin_ia32_vpshldv_v4di_maskz, __builtin_ia32_vpshldv_v2di,
60 __builtin_ia32_vpshldv_v2di_mask,
61 __builtin_ia32_vpshldv_v2di_maskz): New builtins.
62 * config/i386/sse.md (vpshldv_<mode>, vpshldv_<mode>_mask,
63 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): New patterns.
64
65 2017-11-29 Julia Koval <julia.koval@intel.com>
66
67 * config/i386/avx512vbmi2intrin.h (_mm512_shrdv_epi16,
68 _mm512_mask_shrdv_epi16, _mm512_maskz_shrdv_epi16, _mm512_shrdv_epi32,
69 _mm512_mask_shrdv_epi32, _mm512_maskz_shrdv_epi32, _mm512_shrdv_epi64,
70 _mm512_mask_shrdv_epi64, _mm512_maskz_shrdv_epi64): New intrinsics.
71 * config/i386/avx512vbmi2vlintrin.h (_mm256_shrdv_epi16,
72 _mm256_mask_shrdv_epi16, _mm256_maskz_shrdv_epi16, _mm256_shrdv_epi32,
73 _mm256_mask_shrdv_epi32, _mm256_maskz_shrdv_epi32, _mm256_shrdv_epi64,
74 _mm256_mask_shrdv_epi64, _mm256_maskz_shrdv_epi64, _mm_shrdv_epi16,
75 _mm_mask_shrdv_epi16, _mm_maskz_shrdv_epi16, _mm_shrdv_epi32,
76 _mm_mask_shrdv_epi32, _mm_maskz_shrdv_epi32, _mm_shrdv_epi64,
77 _mm_mask_shrdv_epi64, _mm_maskz_shrdv_epi64): Ditto.
78 * config/i386/i386-builtin-types.def (V32HI_FTYPE_V32HI_V32HI_V32HI,
79 V32HI_FTYPE_V32HI_V32HI_V32HI_INT, V16HI_FTYPE_V16HI_V16HI_V16HI_INT,
80 V8HI_FTYPE_V8HI_V8HI_V8HI_INT, V8SI_FTYPE_V8SI_V8SI_V8SI_INT,
81 V4SI_FTYPE_V4SI_V4SI_V4SI_INT, V8DI_FTYPE_V8DI_V8DI_V8DI,
82 V8DI_FTYPE_V8DI_V8DI_V8DI_INT, V4DI_FTYPE_V4DI_V4DI_V4DI_INT,
83 V16SI_FTYPE_V16SI_V16SI_V16SI, V16SI_FTYPE_V16SI_V16SI_V16SI_INT,
84 V2DI_FTYPE_V2DI_V2DI_V2DI_INT): New types.
85 * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
86 * config/i386/sse.md (vpshrdv_<mode>, vpshrdv_<mode>_mask,
87 vpshrdv_<mode>_maskz, vpshrdv_<mode>_maskz_1): New pattern.
88
89 2017-11-29 Daniel Cederman <cederman@gaisler.com>
90
91 * config/sparc/sparc.c (sparc_do_work_around_errata): Treat the
92 movsi_pic_gotdata_op instruction as a load for the UT699 errata
93 workaround.
94
95 2017-11-29 Martin Aberg <maberg@gaisler.com>
96
97 * config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length
98 to prevent b2bst errata sequence.
99 (sqrtdf2_fix): Likewise.
100
101 2017-11-29 Daniel Cederman <cederman@gaisler.com>
102
103 * config/sparc/sparc.c (fpop_reg_depend_p): New function.
104 (div_sqrt_insn_p): New function.
105 (sparc_do_work_around_errata): Insert NOP instructions to
106 prevent sequences that could trigger the TN-0013 errata for
107 certain LEON3 processors.
108 (pass_work_around_errata::gate): Also test sparc_fix_lost_divsqrt.
109 (sparc_option_override): Set sparc_fix_lost_divsqrt appropriately.
110 * config/sparc/sparc.md (fix_lost_divsqrt): New attribute.
111 (in_branch_delay): Prevent div and sqrt in delay slot if
112 fix_lost_divsqrt.
113 * config/sparc/sparc.opt (sparc_fix_lost_divsqrt): New variable.
114
115 2017-11-29 Daniel Cederman <cederman@gaisler.com>
116
117 * config/sparc/sparc.c (atomic_insn_p): New function.
118 (sparc_do_work_around_errata): Insert NOP instructions to
119 prevent sequences that could trigger the TN-0010 errata for
120 UT700.
121 * config/sparc/sync.md (atomic_compare_and_swap_leon3_1): Make
122 instruction referable in atomic_insns_p.
123
124 2017-11-29 Daniel Cederman <cederman@gaisler.com>
125
126 * config/sparc/sync.md (swapsi): 16-byte align if sparc_fix_gr712rc.
127 (atomic_compare_and_swap_leon3_1): Likewise.
128 (ldstub): Likewise.
129
130 2017-11-29 Daniel Cederman <cederman@gaisler.com>
131
132 * config/sparc/sparc.c (fpop_insn_p): New function.
133 (sparc_do_work_around_errata): Insert NOP instructions to
134 prevent sequences that could trigger the TN-0012 errata for
135 GR712RC.
136 (pass_work_around_errata::gate): Also test sparc_fix_gr712rc.
137 * config/sparc/sparc.md (fix_gr712rc): New attribute.
138 (in_branch_annul_delay): Prevent floating-point instructions
139 in delay slot of annulled integer branch.
140
141 2017-11-29 Richard Biener <rguenther@suse.de>
142
143 PR tree-optimization/83202
144 * tree-vect-slp.c (scalar_stmts_set_t): New typedef.
145 (bst_fail): Use it.
146 (vect_analyze_slp_cost_1): Add visited set, do not account SLP
147 nodes vectorized to the same stmts multiple times.
148 (vect_analyze_slp_cost): Allocate a visited set and pass it down.
149 (vect_analyze_slp_instance): Adjust.
150 (scalar_stmts_to_slp_tree_map_t): New typedef.
151 (vect_schedule_slp_instance): Add a map recording the SLP node
152 representing the vectorized stmts for a set of scalar stmts.
153 Avoid code-generating redundancies.
154 (vect_schedule_slp): Allocate map and pass it down.
155
156 2017-11-29 Nathan Sidwell <nathan@acm.org>
157
158 PR c++/83187
159 * tree.c (build_complex_type): Fix canonicalization. Only fill in
160 type if it is new.
161
162 2017-11-29 Wilco Dijkstra <wdijkstr@arm.com>
163
164 * config/aarch64/aarch64.c (aarch64_print_operand): Add new
165 cases for printing LDP/STP memory addresses.
166 (aarch64_print_address_internal): Renamed from
167 aarch64_print_operand_address, added parameter, add Pmode check.
168 (aarch64_print_ldpstp_address): New function for LDP/STP addresses.
169 (aarch64_print_operand_address): Indirect to
170 aarch64_print_address_internal.
171 * config/aarch64/aarch64-simd.md (store_pair_lanes): Use new
172 'y' operand output specifier.
173
174 2017-11-29 Jakub Jelinek <jakub@redhat.com>
175
176 PR middle-end/83185
177 * tree.c (build_simple_mem_ref_loc): Handle
178 get_addr_base_and_unit_offset returning a MEM_REF.
179
180 PR middle-end/80929
181 * rtlanal.c (seq_cost): For non-single_set insns try to use insn_cost.
182
183 PR target/80819
184 * config/i386/sse.md (vec_concatv2di): Remove * from (=Yr,0,*rm)
185 alternative.
186
187 2017-11-28 David Malcolm <dmalcolm@redhat.com>
188
189 * diagnostic-show-locus.c (layout::print_trailing_fixits): Handle
190 m_x_offset.
191 (layout::move_to_column): Likewise.
192
193 2017-11-28 Jakub Jelinek <jakub@redhat.com>
194
195 PR sanitizer/81275
196 * tree.c (block_may_fallthru): Return false if SWITCH_ALL_CASES_P
197 is set on SWITCH_EXPR and !block_may_fallthru (SWITCH_BODY ()).
198
199 2017-11-28 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
200 Martin Jambor <mjambor@suse.cz>
201
202 PR ipa/82808
203 * tree.h (expr_type_first_operand_type_p): Declare
204 * tree.c (expr_type_first_operand_type_p): New function.
205 * ipa-prop.h (ipa_get_type): Allow i to be out of bounds.
206 (ipa_value_from_jfunc): Adjust declaration.
207 * ipa-cp.c (ipa_get_jf_pass_through_result): New parameter RES_TYPE.
208 Use it as result type for arithmetics, unless it is NULL in which case
209 be more conservative.
210 (ipa_value_from_jfunc): New parameter PARM_TYPE, pass it to
211 ipa_get_jf_pass_through_result.
212 (propagate_vals_across_pass_through): Likewise.
213 (propagate_scalar_across_jump_function): New parameter PARM_TYPE, pass
214 is to propagate_vals_across_pass_through.
215 (propagate_constants_across_call): Pass PARM_TYPE to
216 propagate_scalar_across_jump_function.
217 (find_more_scalar_values_for_callers_subset): Pass parameter type to
218 ipa_value_from_jfunc.
219 (cgraph_edge_brings_all_scalars_for_node): Likewise.
220 * ipa-fnsummary.c (evaluate_properties_for_edge): Renamed parms_info
221 to caller_parms_info, pass parameter type to ipa_value_from_jfunc.
222 * ipa-prop.c (try_make_edge_direct_simple_call): New parameter
223 target_type, pass it to ipa_value_from_jfunc.
224 (update_indirect_edges_after_inlining): Pass parameter type to
225 try_make_edge_direct_simple_call.
226
227 2017-11-28 Jeff Law <law@redhat.com>
228
229 * gimple-ssa-evrp-analyze.c
230 (evrp_range_analyzer::record_ranges_from_phis): Only use SCEV to
231 refine ranges if scev_initialized_p returns true.
232 * vr-values.c (vr_values::extract_range_from_phi_node): Likewise.
233
234 2017-11-28 Julia Koval <julia.koval@intel.com>
235
236 * config/i386/avx512vbmi2intrin.h (_mm512_shrdi_epi16,
237 _mm512_mask_shrdi_epi16, _mm512_maskz_shrdi_epi16, _mm512_shrdi_epi32,
238 _mm512_mask_shrdi_epi32, _mm512_maskz_shrdi_epi32, _mm512_shrdi_epi64,
239 _mm512_mask_shrdi_epi64, _mm512_maskz_shrdi_epi64): New intrinsics.
240 * config/i386/avx512vbmi2vlintrin.h (_mm256_shrdi_epi16,
241 _mm256_mask_shrdi_epi16, _mm256_maskz_shrdi_epi16,
242 _mm256_mask_shrdi_epi32, _mm256_maskz_shrdi_epi32, _mm256_shrdi_epi32,
243 _mm256_mask_shrdi_epi64, _mm256_maskz_shrdi_epi64, _mm256_shrdi_epi64,
244 _mm_mask_shrdi_epi16, _mm_maskz_shrdi_epi16, _mm_shrdi_epi16,
245 _mm_mask_shrdi_epi32, _mm_maskz_shrdi_epi32, _mm_shrdi_epi32,
246 _mm_mask_shrdi_epi64, _mm_maskz_shrdi_epi64, _mm_shrdi_epi64): Ditto.
247 * config/i386/i386-builtin.def (__builtin_ia32_vpshrd_v32hi,
248 __builtin_ia32_vpshrd_v32hi_mask, __builtin_ia32_vpshrd_v16hi,
249 __builtin_ia32_vpshrd_v16hi_mask, __builtin_ia32_vpshrd_v8hi,
250 __builtin_ia32_vpshrd_v8hi_mask, __builtin_ia32_vpshrd_v16si,
251 __builtin_ia32_vpshrd_v16si_mask, __builtin_ia32_vpshrd_v8si,
252 __builtin_ia32_vpshrd_v8si_mask, __builtin_ia32_vpshrd_v4si,
253 __builtin_ia32_vpshrd_v4si_mask, __builtin_ia32_vpshrd_v8di,
254 __builtin_ia32_vpshrd_v8di_mask, __builtin_ia32_vpshrd_v4di,
255 __builtin_ia32_vpshrd_v4di_mask, __builtin_ia32_vpshrd_v2di,
256 __builtin_ia32_vpshrd_v2di_mask): New builtins.
257 * config/i386/sse.md (vpshrd_<mode><mask_name>): New pattern.
258
259 2017-11-28 Julia Koval <julia.koval@intel.com>
260
261 * config/i386/avx512vbmi2intrin.h (_mm512_shldi_epi16,
262 _mm512_mask_shldi_epi16, _mm512_maskz_shldi_epi16, _mm512_shldi_epi32,
263 _mm512_mask_shldi_epi32, _mm512_maskz_shldi_epi32, _mm512_shldi_epi64,
264 _mm512_mask_shldi_epi64, _mm512_maskz_shldi_epi64): New intrinsics.
265 * config/i386/avx512vbmi2vlintrin.h (_mm256_shldi_epi16,
266 _mm256_mask_shldi_epi16, _mm256_maskz_shldi_epi16,
267 _mm256_mask_shldi_epi32, _mm256_maskz_shldi_epi32, _mm256_shldi_epi32,
268 _mm256_mask_shldi_epi64, _mm256_maskz_shldi_epi64, _mm256_shldi_epi64,
269 _mm_mask_shldi_epi16, _mm_maskz_shldi_epi16, _mm_shldi_epi16,
270 _mm_mask_shldi_epi32, _mm_maskz_shldi_epi32, _mm_shldi_epi32,
271 _mm_mask_shldi_epi64, _mm_maskz_shldi_epi64, _mm_shldi_epi64): Ditto.
272 * config/i386/i386-builtin-types.def (V32HI_FTYPE_V32HI_V32HI_INT,
273 V32HI_FTYPE_V32HI_V32HI_INT_V32HI_INT, V16SI_FTYPE_V16SI_V16SI_INT,
274 V16SI_FTYPE_V16SI_V16SI_INT_V16SI_INT,
275 V8DI_FTYPE_V8DI_V8DI_INT_V8DI_INT, V8SI_FTYPE_V8SI_V8SI_INT_V8SI_INT,
276 V16HI_FTYPE_V16HI_V16HI_INT_V16HI_INT,
277 V4DI_FTYPE_V4DI_V4DI_INT_V4DI_INT,
278 V8HI_FTYPE_V8HI_V8HI_INT_V8HI_INT,
279 V4SI_FTYPE_V4SI_V4SI_INT_V4SI_INT,
280 V2DI_FTYPE_V2DI_V2DI_INT_V2DI_INT): New types.
281 * config/i386/i386-builtin.def (__builtin_ia32_vpshld_v32hi,
282 __builtin_ia32_vpshld_v32hi_mask, __builtin_ia32_vpshld_v16hi,
283 __builtin_ia32_vpshld_v16hi_mask, __builtin_ia32_vpshld_v8hi,
284 __builtin_ia32_vpshld_v8hi_mask, __builtin_ia32_vpshld_v16si,
285 __builtin_ia32_vpshld_v16si_mask, __builtin_ia32_vpshld_v8si,
286 __builtin_ia32_vpshld_v8si_mask, __builtin_ia32_vpshld_v4si,
287 __builtin_ia32_vpshld_v4si_mask, __builtin_ia32_vpshld_v8di,
288 __builtin_ia32_vpshld_v8di_mask, __builtin_ia32_vpshld_v4di,
289 __builtin_ia32_vpshld_v4di_mask, __builtin_ia32_vpshld_v2di,
290 __builtin_ia32_vpshld_v2di_mask): New builtins.
291 * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
292 * config/i386/sse.md (vpshld_<mode><mask_name>): New pattern.
293
294 2017-11-28 Richard Biener <rguenther@suse.de>
295
296 PR tree-optimization/80776
297 * gimple-ssa-evrp-analyze.h (evrp_range_analyzer::set_ssa_range_info):
298 Declare.
299 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::set_ssa_range_info):
300 New function.
301 (evrp_range_analyzer::record_ranges_from_incoming_edges):
302 If the incoming edge is an effective fallthru because the other
303 edge only reaches a __builtin_unreachable () then record ranges
304 derived from the controlling condition in SSA info.
305 (evrp_range_analyzer::record_ranges_from_phis): Use set_ssa_range_info.
306 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
307
308 2017-11-28 Olivier Hainque <hainque@adacore.com>
309
310 * Makefile.in (SELFTEST_FLAGS): Use nul instead of /dev/null
311 on mingw build hosts.
312
313 2017-11-28 Jakub Jelinek <jakub@redhat.com>
314
315 PR debug/81307
316 * dbxout.c (dbx_block_with_cold_children): Fix function comment.
317
318 2017-11-28 Richard Biener <rguenther@suse.de>
319
320 PR middle-end/83141
321 * gimple-fold.c (gimple_fold_builtin_memory_op): For aggregate
322 copies generated from memcpy use a character array as reference
323 type.
324
325 2017-11-28 Julia Koval <julia.koval@intel.com>
326 Sebastian Peryt <sebastian.peryt@intel.com>
327
328 * Makefile.in (cilkplus.def, cilk-builtins.def, c-family/cilk.o,
329 c-family/c-cilkplus.o, c-family/array-notation-common.o,
330 cilk-common.o, cilk.h, cilk-common.c): Remove.
331 * builtin-types.def
332 (BT_FN_INT_PTR_PTR_PTR_FTYPE_BT_INT_BT_PTR_BT_PTR_BT_PTR): Remove.
333 * builtins.c (is_builtin_name): Remove cilkplus condition.
334 (BUILT_IN_CILK_DETACH, BUILT_IN_CILK_POP_FRAME): Remove.
335 * builtins.def (DEF_CILK_BUILTIN_STUB, DEF_CILKPLUS_BUILTIN,
336 cilk-builtins.def, cilkplus.def): Remove.
337 * cif-code.def (CILK_SPAWN): Remove.
338 * cilk-builtins.def: Delete.
339 * cilk-common.c: Ditto.
340 * cilk.h: Ditto.
341 * cilkplus.def: Ditto.
342 * config/darwin.h (fcilkplus): Delete.
343 * cppbuiltin.c: Ditto.
344 * doc/extend.texi: Remove cilkplus doc.
345 * doc/generic.texi: Ditto.
346 * doc/invoke.texi: Ditto.
347 * doc/passes.texi: Ditto.
348 * gcc.c (fcilkplus): Remove.
349 * gengtype.c (cilk.h): Remove.
350 * gimple-pretty-print.c (dump_gimple_omp_for): Remove cilkplus
351 support.
352 * gimple.h (GF_OMP_FOR_KIND_CILKFOR, GF_OMP_FOR_KIND_CILKSIMD):
353 Remove.
354 * gimplify.c (gimplify_return_expr, maybe_fold_stmt,
355 gimplify_call_expr,
356 is_gimple_stmt, gimplify_modify_expr, gimplify_scan_omp_clauses,
357 gimplify_adjust_omp_clauses, gimplify_omp_for, gimplify_expr): Remove
358 cilkplus conditions.
359 * ipa-fnsummary.c (ipa_dump_fn_summary, compute_fn_summary,
360 inline_read_section): Ditto.
361 * ipa-inline-analysis.c (cilk.h): Remove.
362 * ira.c (ira_setup_eliminable_regset): Remove cilkplus support.
363 * lto-wrapper.c (merge_and_complain, append_compiler_options,
364 append_linker_options): Remove condition for fcilkplus.
365 * lto/lto-lang.c (cilk.h): Remove.
366 (lto_init): Remove condition for fcilkplus.
367 * omp-expand.c (expand_cilk_for_call): Delete.
368 (expand_omp_taskreg, expand_omp_for_static_chunk,
369 expand_omp_for): Remove cilkplus
370 conditions.
371 (expand_cilk_for): Delete.
372 * omp-general.c (omp_extract_for_data): Remove cilkplus support.
373 * omp-low.c (scan_sharing_clauses, create_omp_child_function,
374 execute_lower_omp, diagnose_sb_0): Ditto.
375 * omp-simd-clone.c (simd_clone_clauses_extract): Ditto.
376 * tree-core.h (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
377 * tree-nested.c: Ditto.
378 * tree-pretty-print.c (dump_omp_clause): Remove cilkplus support.
379 (dump_generic_node): Ditto.
380 * tree.c (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
381 * tree.def (cilk_simd, cilk_for, cilk_spawn_stmt, cilk_sync_stmt):
382 Delete.
383 * tree.h (CILK_SPAWN_FN, EXPR_CILK_SPAWN): Delete.
384
385 2017-11-28 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
386
387 * config/aarch64/aarch64.md (div<mode>3): Change check to TARGET_FLOAT.
388 * config/aarch64/aarch64.c (aarch64_emit_approx_div): Add early exit
389 for vector mode and !TARGET_SIMD.
390
391 2017-11-28 Jakub Jelinek <jakub@redhat.com>
392
393 * tree.def (SWITCH_EXPR): Change from 3 operand to 2 operand tree.
394 Adjust comment.
395 * tree.h (SWITCH_LABELS): Remove.
396 * gimplify.c (gimplify_switch_expr): Don't test SWITCH_LABELS,
397 assert SWITCH_BODY is non-NULL.
398 * tree-pretty-print.c (dump_generic_node): Remove SWITCH_LABELS
399 handling.
400 * tree.c (block_may_fallthru): Always return true; for SWITCH_EXPR.
401
402 PR tree-optimization/80788
403 * match.pd (X +- C1 CMP C2 -> X CMP C2 -+ C1): If res
404 has TREE_OVERFLOW set, call drop_tree_overflow.
405
406 2017-11-28 Richard Biener <rguenther@suse.de>
407
408 PR tree-optimization/83158
409 * tree-vrp.c (intersect_ranges): Prefer ~[0, 0] in a few more
410 cases.
411
412 2017-11-28 Segher Boessenkool <segher@kernel.crashing.org>
413
414 PR 81288/target
415 * config/rs6000/rs6000.c (rs6000_rtx_costs): Do not handle
416 TARGET_ISEL && !TARGET_MFCRF differently. Simplify code.
417
418 2017-11-27 Segher Boessenkool <segher@kernel.crashing.org>
419
420 * config/rs6000/rs6000.md (<code><GPR:mode><GPR2:mode>2_isel): Change
421 LT/GT/LTU/GTU to LE/GE/LEU/GEU where possible.
422
423 2017-11-27 Michael Meissner <meissner@linux.vnet.ibm.com>
424
425 PR middle_end/82333
426 * varasm.c (compare_constant): Take the mode of the constants into
427 account when comparing floating point constants.
428
429 2017-11-27 Gerald Pfeifer <gerald@pfeifer.com>
430
431 * hash-set.h (DEFINE_DEBUG_HASH_SET): Remove static qualifier
432 from explicit instantiation of debug_helper.
433 * vec.h (DEFINE_DEBUG_VEC): Ditto.
434
435 2017-11-27 Richard Biener <rguenther@suse.de>
436
437 * gimple-fold.c (gimple_fold_builtin_memory_op): Remove dead code,
438 refactor a bit.
439
440 2017-11-27 Richard Biener <rguenther@suse.de>
441
442 * tree.c (wide_int_to_tree): Free discarded INTEGER_CST.
443 (type_hash_canon): Also clear int_cst_hash_table entry for
444 TYPE_MIN/MAX_VALUE.
445 (build_nonstandard_integer_type): Hash all TYPE_MAX_VALUEs.
446
447 2017-11-27 Tamar Christina <tamar.christina@arm.com>
448
449 * doc/extend.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
450 * doc/invoke.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
451 * doc/sourcebuild.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
452
453 2017-11-27 Markus Trippelsdorf <markus@trippelsdorf.de>
454
455 * hash-map.h (gt_cleare_cache): Avoid UB.
456
457 2017-11-27 Eric Botcazou <ebotcazou@adacore.com>
458
459 * cfgloop.h (struct loop): Document usage of USHRT_MAX for unroll.
460 * loop-unroll.c (decide_unroll_constant_iterations): Implement it.
461 (decide_unroll_runtime_iterations): Likewise.
462 (decide_unroll_stupid): Likewise.
463
464 2017-11-27 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
465
466 PR target/83109
467 * config/i386/i386.md: Add a loop with incssp.
468
469 2017-11-27 Martin Jambor <mjambor@suse.cz>
470
471 PR tree-optimization/81248
472 * tree-sra.c (splice_param_accesses): Remove size check.
473 (decide_one_param_reduction): Fix size check.
474 * gimple-pretty-print.c (dump_profile): Silence warning.
475 * params.def (PARAM_IPA_SRA_PTR_GROWTH_FACTOR): Adjust description.
476
477 2017-11-27 Jakub Jelinek <jakub@redhat.com>
478
479 PR debug/81307
480 * dbxout.c (lastlineno): New variable.
481 (dbx_debug_hooks): Use dbxout_switch_text_section as
482 switch_text_section debug hook.
483 (dbxout_function_end): Switch to current_function_section
484 rather than function_section. If crtl->has_bb_partition,
485 output just one N_FUN, depending on in_cold_section_p.
486 (dbxout_source_line): Remember last lineno in lastlineno.
487 (dbxout_switch_text_section): New function.
488 (dbxout_function_decl): Adjust dbxout_block caller.
489 (dbx_block_with_cold_children): New function.
490 (dbxout_block): Return true if any LBRAC/RBRAC have been
491 emitted. Use dbx_block_with_cold_children at depth == 0
492 in second partition. Add PARENT_BLOCKNUM argument, pass
493 it optionally adjusted to children. Output LBRAC/RBRAC
494 around recursive call only if the block is in the current
495 partition, if not and anything was output, emit empty
496 range LBRAC/RBRAC.
497 * final.c (final_scan_insn): Compute cold_function_name
498 before calling switch_text_section debug hook. Call
499 that hook even if dwarf2out_do_frame if not emitting
500 dwarf debug info.
501
502 PR target/83100
503 * varasm.c (bss_initializer_p): Return true for DECL_COMMON
504 TREE_READONLY decls.
505
506 2017-11-27 Markus Trippelsdorf <markus@trippelsdorf.de>
507
508 PR rtl-optimization/82488
509 * expr.c (fixup_args_size_notes): Avoid signed integer overflow.
510
511 2017-11-26 Julia Koval <julia.koval@intel.com>
512
513 * config/i386/i386.c (processor_target_table): Add skylake_cost for
514 skylake-avx512.
515 * config/i386/x86-tune-costs.h (skylake_memcpy, skylake_memset,
516 skylake_cost): New.
517
518 2017-11-26 Julia Koval <julia.koval@intel.com>
519
520 * config/i386/driver-i386.c (host_detect_local_cpu):
521 Detect skylake-avx512.
522
523 2017-11-26 Julia Koval <julia.koval@intel.com>
524
525 * config.gcc: Add -march=cannonlake.
526 * config/i386/driver-i386.c (host_detect_local_cpu): Detect cannonlake.
527 * config/i386/i386-c.c (ix86_target_macros_internal): Handle cannonlake.
528 * config/i386/i386.c (processor_costs): Add m_CANNONLAKE.
529 (PTA_CANNONLAKE): New.
530 (processor_target_table): Add cannonlake.
531 (ix86_option_override_internal): Ditto.
532 (fold_builtin_cpu): Ditto.
533 (get_builtin_code_for_version): Handle cannonlake.
534 (M_INTEL_COREI7_CANNONLAKE): New.
535 * config/i386/i386.h (TARGET_CANNONLAKE, PROCESSOR_CANNONLAKE): New.
536 * doc/invoke.texi: Add -march=cannonlake.
537
538 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
539
540 * plugin.c (add_new_plugin): Use platform-specific library extensions.
541 (try_init_one_plugin): Alternative implementation for MinGW.
542 * Makefile.in (plugin_implib): New.
543 (gengtype-lex.c): Fix broken AIX workaround.
544 * configure: Regenerate.
545 * doc/plugins.texi: Document support for MinGW.
546
547 2017-11-25 Jakub Jelinek <jakub@redhat.com>
548
549 PR rtl-optimization/81553
550 * combine.c (simplify_if_then_else): In (if_then_else COND (OP Z C1) Z)
551 to (OP Z (mult COND (C1 * STORE_FLAG_VALUE))) optimization, if OP
552 is a shift where C1 has different mode than the whole shift, use C1's
553 mode for MULT rather than the shift's mode.
554
555 PR target/82848
556 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Don't fold
557 builtins not enabled in the currently selected ISA.
558
559 2017-11-24 Jackson Woodruff <jackson.woodruff@arm.com>
560
561 PR tree-optimization/71026
562 * tree-ssa-math-opts (is_division_by_square, is_square_of): New.
563 (insert_reciprocals): Change to insert reciprocals before a division
564 by a square and to insert the square of a reciprocal.
565 (execute_cse_reciprocals_1): Change to consider division by a square.
566 (register_division_in): Add importance parameter.
567
568 2017-11-24 Richard Biener <rguenther@suse.de>
569
570 PR tree-optimization/82402
571 * tree-vect-loop-manip.c (create_lcssa_for_virtual_phi): Properly
572 set SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
573
574 2017-11-24 Marc Glisse <marc.glisse@inria.fr>
575
576 * match.pd (0-ptr): New transformation.
577
578 2017-11-24 Jan Hubicka <hubicka@ucw.cz>
579
580 PR bootstrap/83015
581 * ipa-inline.c (inline_small_functions): Set current badnes correctly
582 when skipping checking.
583
584 2017-11-24 Richard Biener <rguenther@suse.de>
585
586 PR tree-optimization/83128
587 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Handle STRING_CSTs.
588 (vn_reference_lookup_3): Likewise.
589
590 2017-11-24 Jakub Jelinek <jakub@redhat.com>
591
592 PR sanitizer/83014
593 * ubsan.c (ubsan_type_descriptor): Use pp_unsigned_wide_integer
594 instead of pp_printf with HOST_WIDE_INT_PRINT_DEC. Avoid calling
595 tree_to_uhwi twice.
596
597 * tree-object-size.c (pass_through_call): Use gimple_call_return_flags
598 ERF_RETURN*ARG* for builtins other than BUILT_IN_ASSUME_ALIGNED,
599 check for the latter with gimple_call_builtin_p. Do not handle
600 BUILT_IN_STPNCPY_CHK which is not a pass through call.
601
602 2017-11-24 Christophe Lyon <christophe.lyon@linaro.org>
603
604 * config/arm/arm_neon.h: Fix pragma GCC push_options before
605 vdot_u32.
606
607 2017-11-23 Julia Koval <julia.koval@intel.com>
608
609 * config/i386/avx512vbmi2intrin.h (_mm512_mask_expand_epi8,
610 _mm512_maskz_expand_epi8, _mm512_mask_expandloadu_epi8,
611 _mm512_maskz_expandloadu_epi8, _mm512_mask_expand_epi16,
612 _mm512_maskz_expand_epi16, _mm512_mask_expandloadu_epi16,
613 _mm512_maskz_expandloadu_epi16): New intrinsics.
614 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_expand_epi8,
615 _mm_maskz_expand_epi8, _mm_mask_expandloadu_epi8,
616 _mm_maskz_expandloadu_epi8, _mm_mask_expand_epi16,
617 _mm_maskz_expand_epi16, _mm_mask_expandloadu_epi16,
618 _mm_maskz_expandloadu_epi16, _mm256_mask_expand_epi16,
619 _mm256_maskz_expand_epi16, _mm256_mask_expandloadu_epi16,
620 _mm256_maskz_expandloadu_epi16, _mm256_mask_expand_epi8,
621 _mm256_maskz_expand_epi8, _mm256_mask_expandloadu_epi8,
622 _mm256_maskz_expandloadu_epi8): New intrinsics.
623 * config/i386/i386-builtin-types.def (V64QI_FTYPE_PCV64QI_V64QI_UDI,
624 V32HI_FTYPE_PCV32HI_V32HI_USI, V32QI_FTYPE_PCV32QI_V32QI_USI,
625 V16HI_FTYPE_PCV16HI_V16HI_UHI, V16QI_FTYPE_PCV16QI_V16QI_UHI,
626 V8HI_FTYPE_PCV8HI_V8HI_UQI): New types.
627 * config/i386/i386.c (ix86_expand_special_args_builtin): Use new types.
628 * config/i386/sse.md (VI248_VLBW): New iterator.
629 (expand<mode>_mask, expand<mode>_maskz): New patterns.
630
631 2017-11-23 Julia Koval <julia.koval@intel.com>
632
633 * config.gcc (avx512vbmi2intrin.h, avx512vbmi2vlintrin): New headers.
634 * config/i386/avx512vbmi2intrin.h (_mm512_mask_compress_epi8,
635 _mm512_maskz_compress_epi8, _mm512_mask_compressstoreu_epi8,
636 _mm512_mask_compress_epi16, _mm512_maskz_compress_epi16,
637 _mm512_mask_compressstoreu_epi16): New.
638 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_compress_epi8,
639 _mm_maskz_compress_epi8, _mm256_mask_compressstoreu_epi16,
640 _mm_mask_compress_epi16, _mm_maskz_compress_epi16,
641 _mm256_mask_compress_epi16, _mm256_maskz_compress_epi16,
642 _mm_mask_compressstoreu_epi8, _mm_mask_compressstoreu_epi16,
643 _mm256_mask_compress_epi8, _mm256_maskz_compress_epi8,
644 _mm256_mask_compressstoreu_epi8): New.
645 * config/i386/i386-builtin-types.def (VOID_FTYPE_PV64QI_V64QI_UDI,
646 VOID_FTYPE_PV32HI_V32HI_USI, VOID_FTYPE_PV32QI_V32QI_USI,
647 VOID_FTYPE_PV16QI_V16QI_UHI, VOID_FTYPE_PV16HI_V16HI_UHI,
648 VOID_FTYPE_PV8HI_V8HI_UQI): New types.
649 * config/i386/i386-builtin.def (__builtin_ia32_compressqi512_mask,
650 __builtin_ia32_compresshi512_mask, __builtin_ia32_compressqi256_mask,
651 __builtin_ia32_compressqi128_mask, __builtin_ia32_compresshi256_mask,
652 __builtin_ia32_compresshi128_mask,
653 __builtin_ia32_compressstoreuqi512_mask,
654 __builtin_ia32_compressstoreuhi512_mask,
655 __builtin_ia32_compressstoreuqi256_mask,
656 __builtin_ia32_compressstoreuqi128_mask,
657 __builtin_ia32_compressstoreuhi256_mask,
658 __builtin_ia32_compressstoreuhi128_mask): New builtins.
659 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Create special args
660 array for flags2.
661 (ix86_expand_special_args_builtin): Handle new types.
662 (s4fma_expand): Handle new builtin array.
663 * config/i386/immintrin.h: Include new headers.
664 * config/i386/sse.md (VI12_AVX512VLBW): New iterator.
665 (compress<mode>_mask, compressstore<mode>_mask): New patterns.
666
667 2017-11-23 Jakub Jelinek <jakub@redhat.com>
668
669 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Formatting
670 fixes. Declare temp and g variables at the top in order to avoid
671 {} in most of the cases.
672
673 2017-11-23 Marc Glisse <marc.glisse@inria.fr>
674
675 * match.pd (ptr-0): New transformation.
676
677 2017-11-23 Charles Baylis <charles.baylis@linaro.org>
678
679 * config/arm/arm-protos.h (enum arm_addr_mode_op): New.
680 (struct addr_mode_cost_table): New.
681 (struct tune_params): Add field addr_mode_costs.
682 * config/arm/arm.c (generic_addr_mode_costs): New.
683 (arm_slowmul_tune): Initialise addr_mode_costs field.
684 (arm_fastmul_tune): Likewise.
685 (arm_strongarm_tune): Likewise.
686 (arm_xscale_tune): Likewise.
687 (arm_9e_tune): Likewise.
688 (arm_marvell_pj4_tune): Likewise.
689 (arm_v6t2_tune): Likewise.
690 (arm_cortex_tune): Likewise.
691 (arm_cortex_a8_tune): Likewise.
692 (arm_cortex_a7_tune): Likewise.
693 (arm_cortex_a15_tune): Likewise.
694 (arm_cortex_a35_tune): Likewise.
695 (arm_cortex_a53_tune): Likewise.
696 (arm_cortex_a57_tune): Likewise.
697 (arm_exynosm1_tune): Likewise.
698 (arm_xgene1_tune): Likewise.
699 (arm_cortex_a5_tune): Likewise.
700 (arm_cortex_a9_tune): Likewise.
701 (arm_cortex_a12_tune): Likewise.
702 (arm_cortex_a73_tune): Likewise.
703 (arm_v7m_tune): Likewise.
704 (arm_cortex_m7_tune): Likewise.
705 (arm_v6m_tune): Likewise.
706 (arm_fa726te_tune): Likewise.
707 (arm_mem_costs): Use table lookup to calculate cost of addressing
708 mode.
709
710 2017-11-23 Charles Baylis <charles.baylis@linaro.org>
711
712 * config/arm/arm.c (arm_mem_costs): New function.
713 (arm_rtx_costs_internal): Use arm_mem_costs.
714
715 2017-11-23 Mark Wielaard <mark@klomp.org>
716
717 * dwarf2out.c (init_sections_and_labels): Use generation to create
718 unique ranges_section_label and ranges_base_label. Return generation.
719 (output_rnglists): Add generation argument. Use generation to create
720 unique ranges labels.
721 (dwarf2out_finish): Get generation from init_sections_and_labels
722 and pass generation to output_rnglists.
723
724 2017-11-23 Mike Stump <mikestump@comcast.net>
725 Eric Botcazou <ebotcazou@adacore.com>
726
727 * doc/generic.texi (ANNOTATE_EXPR): Document 3rd operand.
728 * cfgloop.h (struct loop): Add unroll field.
729 * function.h (struct function): Add has_unroll bitfield.
730 * gimplify.c (gimple_boolify) <ANNOTATE_EXPR>: Deal with unroll kind.
731 (gimplify_expr) <ANNOTATE_EXPR>: Propagate 3rd operand.
732 * loop-init.c (pass_loop2::gate): Return true if cfun->has_unroll.
733 (pass_rtl_unroll_loops::gate): Likewise.
734 * loop-unroll.c (decide_unrolling): Tweak note message. Skip loops
735 for which loop->unroll==1.
736 (decide_unroll_constant_iterations): Use note for consistency and
737 take loop->unroll into account. Return early if loop->unroll is set.
738 Fix thinko in existing test.
739 (decide_unroll_runtime_iterations): Use note for consistency and
740 take loop->unroll into account.
741 (decide_unroll_stupid): Likewise.
742 * lto-streamer-in.c (input_cfg): Read loop->unroll.
743 * lto-streamer-out.c (output_cfg): Write loop->unroll.
744 * tree-cfg.c (replace_loop_annotate_in_block) <annot_expr_unroll_kind>:
745 New case.
746 (replace_loop_annotate) <annot_expr_unroll_kind>: Likewise.
747 (print_loop): Print loop->unroll if set.
748 * tree-core.h (enum annot_expr_kind): Add annot_expr_unroll_kind.
749 * tree-inline.c (copy_loops): Copy unroll and set cfun->has_unroll.
750 * tree-pretty-print.c (dump_generic_node) <annot_expr_unroll_kind>:
751 New case.
752 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Bail out if
753 loop->unroll is set and smaller than the trip count. Otherwise bypass
754 entirely the heuristics if loop->unroll is set. Remove dead note.
755 Fix off-by-one bug in other note.
756 (try_peel_loop): Bail out if loop->unroll is set. Fix formatting.
757 (tree_unroll_loops_completely_1): Force unrolling if loop->unroll
758 is greater than 1.
759 (tree_unroll_loops_completely): Make static.
760 (pass_complete_unroll::execute): Use correct type for variable.
761 (pass_complete_unrolli::execute): Fix formatting.
762 * tree.def (ANNOTATE_EXPR): Add 3rd operand.
763
764 2017-11-23 Sergey Shalnov <Sergey.Shalnov@intel.com>
765
766 * config/i386/i386.h (TARGET_PREFER_AVX256): Also
767 enable when TARGET_PREFER_AVX128 is set.
768
769 2017-11-23 Jan Hubicka <hubicka@ucw.cz>
770
771 * ipa-profile.c (ipa_propagate_frequency_1): Use count instead of
772 frequency.
773 * cgraph.c (cgraph_edge::dump_edge_flags): Dump sreal frequencies.
774 (cgraph_edge::maybe_hot_p): Use sreal frequencies.
775
776 2017-11-23 Jan Hubicka <hubicka@ucw.cz>
777
778 * ipa-fnsummary.c (record_modified_bb_info): Use sreal
779 frequencies. Fix estimation of aggregate parameters.
780
781 2017-11-23 Jan Hubicka <hubicka@ucw.cz>
782
783 * cgraphclones.c (cgraph_node::create_clone): Fix updating of profile
784 when inlining.
785
786 2017-11-23 Tom de Vries <tom@codesourcery.com>
787
788 * config/sh/sh.h (ASM_OUTPUT_ADDR_VEC_ELT): Wrap in "do {} while (0)".
789
790 2017-11-23 Tom de Vries <tom@codesourcery.com>
791
792 * config/ft32/ft32.h (ASM_OUTPUT_ADDR_VEC_ELT): Remove semicolon after
793 macro.
794
795 2017-11-23 Oleg Endo <olegendo@gcc.gnu.org>
796
797 PR target/83111
798 * config/sh/sh.md (udivsi3, divsi3, sibcall_value_pcrel,
799 sibcall_value_pcrel_fdpic): Use local variable instead of
800 operands[3].
801 (calli_tbr_rel): Add missing operand 2.
802 (call_valuei_tbr_rel): Add missing operand 3.
803
804 2017-11-23 Jakub Jelinek <jakub@redhat.com>
805
806 PR middle-end/82253
807 * expr.c (expand_assignment): For CONCAT to_rtx, complex type from and
808 bitpos/bitsize covering the whole destination, use store_expr only if
809 the complex mode is the same. Otherwise, use expand_normal and if
810 it returns CONCAT, subreg each part separately instead of trying to
811 subreg the whole result.
812
813 2017-11-23 Richard Biener <rguenther@suse.de>
814
815 PR tree-optimization/23094
816 * tree-ssa-sccvn.c (vuse_ssa_val): Handle VN_TOP when we
817 come here from walking over backedges in the first iteration.
818 (vn_reference_lookup_3): Skip clobbers that store the same value.
819
820 2017-11-23 Richard Biener <rguenther@suse.de>
821
822 PR tree-optimization/81403
823 * tree-ssa-pre.c (get_representative_for): Add parameter specifying
824 a block we need a leader relative to.
825 (phi_translate_1): For nary processing require a leader from
826 get_representative_for given we run expression simplification
827 using match-and-simplify. Remove previous fix.
828
829 2017-11-22 Jeff Law <law@redhat.com>
830
831 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
832 Use new method allocate_value_range rather than accessing the
833 vrp_value_range_pool data member directly.
834 * tree-vrp.c (simplify_stmt_for_jump_threading): Tweak slightly
835 to use extract_range_from_stmt method to avoid need for
836 extract_range_from_assignment method.
837 (vrp_prop::vrp_finalize): Use set_lattice_propagation_complete
838 method rather than setting values_propgated data member directly.
839 * vr-values.h (class vr_values): Privatize vrp_value_range_pool,
840 and values propagated data members and extract_range_from_assignment
841 method. Reorder private data members to conform to standards.
842 Add new methods set_lattice_propagation_complete and
843 allocate_value_range.
844
845 2017-11-22 Eric Botcazou <ebotcazou@adacore.com>
846
847 PR rtl-optimization/83030
848 * doc/rtl.texi (Flags in an RTL Expression): Alphabetize, add entry
849 for CROSSING_JUMP_P and mention usage of 'jump' for JUMP_INSNs.
850 (Insns): Delete entry for REG_CROSSING_JUMP in register notes.
851 * bb-reorder.c (update_crossing_jump_flags): Do not test whether the
852 CROSSING_JUMP_P flag is already set before setting it.
853 * cfgrtl.c (fixup_partition_crossing): Likewise.
854 * reorg.c (relax_delay_slots): Do not consider a CROSSING_JUMP_P
855 insn as useless.
856
857 2017-11-22 Jakub Jelinek <jakub@redhat.com>
858
859 * simplify-rtx.c (simplify_binary_operation_1) <case VEC_SERIES>:
860 Handle the case where both arguments are using gen_const_vec_series.
861
862 2017-11-22 David Malcolm <dmalcolm@redhat.com>
863
864 PR c++/62170
865 * pretty-print.c (pp_format): Move quoting implementation to
866 pp_begin_quote and pp_end_quote. Update pp_format_decoder call
867 to pass address of "quote" local.
868 (pp_begin_quote): New function.
869 (pp_end_quote): New function.
870 * pretty-print.h (printer_fn): Convert penultimate param from bool
871 to bool *.
872 (pp_begin_quote): New decl.
873 (pp_end_quote): New decl.
874 * tree-diagnostic.c (default_tree_printer): Convert penultimate
875 param from bool to bool *.
876 * tree-diagnostic.h (default_tree_printer): Likewise.
877
878 2017-11-22 Jeff Law <law@redhat.com>
879
880 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::evrp_range_analyzer)
881 Initialize vr_values.
882 (evrp_range_analyzer::try_find_new_range): Call methods attached to
883 vr_values via vr_values class instance rather than delegators.
884 (evrp_range_analyzer::record_ranges_from_phis): Likewise.
885 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
886 (evrp_range_analyzer::push_value_range): Likewise.
887 (evrp_range_analyzer::pop_value_range): Likewise.
888 * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Remove
889 most delegators. Those remaining are exposed as public interfaces.
890 Make vr_values a pointer and private.
891 (evrp_range_analyzer::~evrp_range_analyzer): Delete the attached
892 vr_values.
893 (evrp_range_analyzer::get_vr_value): New method.
894 * gimple-ssa-evrp.c (class evrp_folder): Use DISABLE_COPY_AND_ASSIGN.
895 (evrp_folder::evrp_folder): New ctor to initialize vr_values.
896 (class evrp_dom_walker): Attach evrp_folder class, initialize
897 it in the ctor. Remove temporary delegators.
898 (evrp_dom_walker::before_dom_children): Call methods in attached
899 evrp_range_analyzer class via class instance pointer. Use
900 free value_range_constant_singleton to remove need for
901 op_with_constant_singleton_value delegator method. Do not
902 create a vrp_prop class instance for every call! Narrow
903 scope of a couple variables.
904 (evrp_dom_walker::cleanup): Call methods in attached
905 evrp_range_analyzer class via class instance pointer.
906 * vr-values.h (class vr_values): Privatize many methods and
907 data members.
908
909 2017-11-22 Richard Sandiford <richard.sandiford@linaro.org>
910
911 * tree.def (REDUC_MAX_EXPR, REDUC_MIN_EXPR, REDUC_PLUS_EXPR): Delete.
912 * cfgexpand.c (expand_debug_expr): Remove handling for them.
913 * expr.c (expand_expr_real_2): Likewise.
914 * fold-const.c (const_unop): Likewise.
915 * optabs-tree.c (optab_for_tree_code): Likewise.
916 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
917 * tree-inline.c (estimate_operator_cost): Likewise.
918 * tree-pretty-print.c (dump_generic_node): Likewise.
919 (op_code_prio): Likewise.
920 (op_symbol_code): Likewise.
921 * internal-fn.def (DEF_INTERNAL_SIGNED_OPTAB_FN): Define.
922 (IFN_REDUC_PLUS, IFN_REDUC_MAX, IFN_REDUC_MIN): New internal functions.
923 * internal-fn.c (direct_internal_fn_optab): New function.
924 (direct_internal_fn_array, direct_internal_fn_supported_p
925 (internal_fn_expanders): Handle DEF_INTERNAL_SIGNED_OPTAB_FN.
926 * fold-const-call.c (fold_const_reduction): New function.
927 (fold_const_call): Handle CFN_REDUC_PLUS, CFN_REDUC_MAX and
928 CFN_REDUC_MIN.
929 * tree-vect-loop.c: Include internal-fn.h.
930 (reduction_code_for_scalar_code): Rename to...
931 (reduction_fn_for_scalar_code): ...this and return an internal
932 function.
933 (vect_model_reduction_cost): Take an internal_fn rather than
934 a tree_code.
935 (vect_create_epilog_for_reduction): Likewise. Build calls rather
936 than assignments.
937 (vectorizable_reduction): Use internal functions rather than tree
938 codes for the reduction operation. Update calls to the functions
939 above.
940 * config/aarch64/aarch64-builtins.c (aarch64_gimple_fold_builtin):
941 Use calls to internal functions rather than REDUC tree codes.
942 * config/aarch64/aarch64-simd.md: Update comment accordingly.
943
944 2017-11-22 Olivier Hainque <hainque@adacore.com>
945
946 * config/vxworks.c (vxworks_override_options): Pick default
947 dwarf version from macro value, VXWORKS_DWARF_VERSION_DEFAULT.
948 * config/vxworks.h: Define VXWORKS_DWARF_VERSION_DEFAULT and
949 DWARF_GNAT_ENCODINGS_DEFAULT.
950 * config/vxworksae.h: Likewise.
951
952 2017-11-22 Marc Glisse <marc.glisse@inria.fr>
953
954 PR tree-optimization/83104
955 * vr-values.c (simplify_stmt_using_ranges): Check integral argument,
956 not result.
957
958 2017-11-22 Marek Polacek <polacek@redhat.com>
959 H.J. Lu <hongjiu.lu@intel.com>
960 Jason Merrill <jason@redhat.com>
961
962 PR c++/60336
963 PR middle-end/67239
964 PR target/68355
965 * calls.c (initialize_argument_information): Call
966 warn_parameter_passing_abi target hook.
967 (store_one_arg): Use 0 for empty record size. Don't push 0 size
968 argument onto stack.
969 (must_pass_in_stack_var_size_or_pad): Return false for empty types.
970 * common.opt: Update -fabi-version description.
971 * config/i386/i386.c (init_cumulative_args): Set cum->warn_empty.
972 (ix86_gimplify_va_arg): Call arg_int_size_in_bytes instead of
973 int_size_in_bytes.
974 (ix86_is_empty_record): New function.
975 (ix86_warn_parameter_passing_abi): New function.
976 (TARGET_EMPTY_RECORD_P): Redefine.
977 (TARGET_WARN_PARAMETER_PASSING_ABI): Redefine.
978 * config/i386/i386.h (CUMULATIVE_ARGS): Add warn_empty.
979 * doc/tm.texi: Regenerated.
980 * doc/tm.texi.in (TARGET_EMPTY_RECORD_P,
981 TARGET_WARN_PARAMETER_PASSING_ABI): Add.
982 * dwarf2out.c (get_ultimate_context): Move to tree.c.
983 * explow.c (hard_function_value): Call arg_int_size_in_bytes
984 instead of int_size_in_bytes.
985 * expr.c (copy_blkmode_to_reg): Likewise.
986 * function.c (aggregate_value_p): Return 0 for empty types.
987 (assign_parm_find_entry_rtl): Call warn_parameter_passing_abi target hook.
988 (locate_and_pad_parm): Call arg size_in_bytes instead
989 size_in_bytes.
990 * lto-streamer-out.c (hash_tree): Hash TYPE_EMPTY_P and DECL_PADDING_P.
991 * stor-layout.c (finalize_type_size): Set TYPE_EMPTY_P.
992 * target.def (empty_record_p, warn_parameter_passing_abi): New target
993 hooks.
994 * targhooks.c (hook_void_CUMULATIVE_ARGS_tree): New hook.
995 (std_gimplify_va_arg_expr): Skip empty records. Call
996 arg_size_in_bytes instead size_in_bytes.
997 * targhooks.h (hook_void_CUMULATIVE_ARGS_tree): Declare.
998 * tree-core.h (tree_type_common): Add empty_flag.
999 (tree_decl_common): Update comments.
1000 * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Stream
1001 DECL_PADDING_P.
1002 (unpack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
1003 * tree-streamer-out.c (pack_ts_decl_common_value_fields): Stream
1004 DECL_PADDING_P.
1005 (pack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
1006 * tree.c (default_is_empty_type): New function.
1007 (default_is_empty_record): New function.
1008 (arg_int_size_in_bytes): New function.
1009 (arg_size_in_bytes): New function.
1010 (get_ultimate_context): New function.
1011 * tree.h: Define TYPE_EMPTY_P, DECL_PADDING_P and
1012 TRANSLATION_UNIT_WARN_EMPTY_P.
1013 (default_is_empty_record, arg_int_size_in_bytes,
1014 arg_size_in_bytes, get_ultimate_context): Declare.
1015
1016 2017-11-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
1017
1018 * config/arm/arm.c (cmse_clear_registers): New function.
1019 (cmse_nonsecure_call_clear_caller_saved): Replace register clearing
1020 code by call to cmse_clear_registers.
1021 (cmse_nonsecure_entry_clear_before_return): Likewise.
1022
1023 2017-11-22 Tamar Christina <tamar.christina@arm.com>
1024
1025 * config/arm/arm_neon.h (vdot_u32, vdotq_u32)
1026 (vdot_s32, vdotq_s32): New.
1027 (vdot_lane_u32, vdotq_lane_u32): New.
1028 (vdot_lane_s32, vdotq_lane_s32): New.
1029
1030
1031 2017-11-22 Richard Sandiford <richard.sandiford@linaro.org>
1032
1033 PR middle-end/82547
1034 * wide-int.cc (wi::add_large, wi::sub_large): Fix overflow detection
1035 for unsigned values with fewer HWIs than the precision.
1036 (test_overflow): New function.
1037 (wide_int_cc_tests): Call it.
1038
1039 2017-11-22 Richard Sandiford <richard.sandiford@linaro.org>
1040
1041 * emit-rtl.c (init_derived_machine_modes): Make sure ptr_mode
1042 has the same mode class as Pmode.
1043
1044 2017-11-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
1045
1046 * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Get rid of
1047 padding_bits_to_clear_ptr.
1048 (cmse_nonsecure_entry_clear_before_return): Likewise.
1049
1050 2017-11-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
1051
1052 * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Use
1053 auto_sbitap instead of integer bitfield to control register needing
1054 clearing.
1055
1056 2017-11-22 Jakub Jelinek <jakub@redhat.com>
1057
1058 PR tree-optimization/83044
1059 * tree-vrp.c (vrp_prop::check_array_ref): If eltsize is not
1060 INTEGER_CST or is 0, clear up_bound{,_p1} and later ignore tests
1061 that need the upper bound. Subtract offset from
1062 get_addr_base_and_unit_offset only if positive and subtract it
1063 before division by eltsize rather than after it.
1064
1065 PR debug/83084
1066 * valtrack.c (propagate_for_debug_subst, propagate_for_debug): Reset
1067 debug insns if they would contain UNSPEC_VOLATILE or volatile asm.
1068 (dead_debug_insert_temp): Likewise, but also ignore even non-volatile
1069 asm.
1070
1071 PR middle-end/82875
1072 * optabs.c (expand_doubleword_mult, expand_binop): Before calling
1073 expand_binop with *mul_widen_optab, make sure at least one of the
1074 operands doesn't have VOIDmode.
1075
1076 PR debug/83034
1077 * dwarf2out.c (mem_loc_descriptor): Handle VEC_SERIES.
1078
1079 PR rtl-optimization/82044
1080 PR tree-optimization/82042
1081 * dse.c (record_store): Check for overflow.
1082 (check_mem_read_rtx): Properly check for overflow if width == -1, call
1083 add_wild_read instead of clear_rhs_from_active_local_stores on
1084 overflow and log it into dump_file.
1085
1086 2017-11-22 Richard Biener <rguenther@suse.de>
1087
1088 * gimple-iterator.c (gimple_find_edge_insert_loc): Ignore
1089 fake edges to exit when looking for a place to insert.
1090 * tree-ssa-pre.c (clear_expression_ids): Inline into callers
1091 and remove.
1092 (insert_into_preds_of_block): Commit edge insertion immediately,
1093 assert that doesn't require new BBs.
1094 (fini_pre): Release expressions.
1095 (pass_pre::execute): Shuffle things around a bit, if the fn
1096 is too large do not compute AVAIL either as this is really the
1097 quadratic bit.
1098
1099 2017-11-22 Richard Biener <rguenther@suse.de>
1100
1101 PR tree-optimization/83089
1102 * tree-if-conv.c (pass_if_conversion::execute): If anything
1103 changed reset SCEV and free the number of iteration estimates.
1104
1105 2017-11-21 Martin Sebor <msebor@redhat.com>
1106
1107 PR tree-optimization/82945
1108 * calls.h (warn_nonstring_bound): Remove unused function.
1109
1110 2017-11-21 Martin Sebor <msebor@redhat.com>
1111
1112 PR tree-optimization/82945
1113 * builtins.c (expand_builtin_strlen): Call maybe_warn_nonstring_arg.
1114 * calls.h (maybe_warn_nonstring_arg): Declare new function.
1115 * calls.c (get_attr_nonstring_decl, maybe_warn_nonstring_arg): New
1116 functions.
1117 (initialize_argument_information): Call maybe_warn_nonstring_arg.
1118 * calls.h (get_attr_nonstring_decl): Declare new function.
1119 * doc/extend.texi (attribute nonstring): Update.
1120 * gimple-fold.c (gimple_fold_builtin_strncpy): Call
1121 get_attr_nonstring_decl and handle it.
1122 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Same. Improve
1123 detection of nul-termination.
1124 (strlen_to_stridx): Change to a pointer.
1125 (handle_builtin_strlen, handle_builtin_stxncpy): Adjust.
1126 (pass_strlen::execute): Same.
1127
1128 2017-11-21 Sergey Shalnov <Sergey.Shalnov@intel.com>
1129
1130 * config/i386/i386-opts.h (enum prefer_vector_width): Added new enum
1131 for the new option -mprefer-vector-width=[none|128|256|512].
1132 * config/i386/i386.c (ix86_target_string): remove old style options
1133 -mprefer-avx256 and make -mprefer-avx128 as alias.
1134 (ix86_option_override_internal): Apply defaults for the
1135 -mprefer-vector-width=[128|256] option.
1136 * config/i386/i386.h (TARGET_PREFER_AVX128, TARGET_PREFER_AVX256):
1137 Implement macros to work with -mprefer-vector-width=.
1138 * config/i386/i386.opt: Implemented option
1139 -mprefer-vector-width=[none|128|256|512].
1140 * doc/invoke.texi: Documentation for
1141 -mprefer-vector-width=[none|128|256|512].
1142
1143 2017-11-21 Pat Haugen <pthaugen@us.ibm.com>
1144
1145 * config/rs6000/ppc-asm.h (f50, vs50): Fix values.
1146
1147 2017-11-21 Jonathan Wakely <jwakely@redhat.com>
1148
1149 * doc/invoke.texi (-Wmaybe-uninitialized): Rephrase for clarity.
1150
1151 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
1152
1153 * doc/generic.texi: Document POINTER_DIFF_EXPR, update
1154 POINTER_PLUS_EXPR.
1155 * cfgexpand.c (expand_debug_expr): Handle POINTER_DIFF_EXPR.
1156 * expr.c (expand_expr_real_2): Likewise.
1157 * fold-const.c (const_binop, fold_addr_of_array_ref_difference,
1158 fold_binary_loc): Likewise.
1159 * match.pd (X-X, P+(Q-P), &D-P, (P+N)-P, P-(P+N), (P+M)-(P+N),
1160 P-Q==0, -(A-B), X-Z<Y-Z, (X-Z)-(Y-Z), Z-X<Z-Y, (Z-X)-(Z-Y),
1161 (A-B)+(C-A)): New transformations for POINTER_DIFF_EXPR, based on
1162 MINUS_EXPR transformations.
1163 * optabs-tree.c (optab_for_tree_code): Handle POINTER_DIFF_EXPR.
1164 * tree-cfg.c (verify_expr, verify_gimple_assign_binary): Likewise.
1165 * tree-inline.c (estimate_operator_cost): Likewise.
1166 * tree-pretty-print.c (dump_generic_node, op_code_prio,
1167 op_symbol_code): Likewise.
1168 * tree-vect-stmts.c (vectorizable_operation): Likewise.
1169 * vr-values.c (extract_range_from_binary_expr): Likewise.
1170 * varasm.c (initializer_constant_valid_p_1): Likewise.
1171 * tree.def: New tree code POINTER_DIFF_EXPR.
1172
1173 2017-11-21 Uros Bizjak <ubizjak@gmail.com>
1174
1175 * config/i386/i386.md (*bswap<mode>2_movbe): Add
1176 integer suffix to movbe mnemonic.
1177 (*bswaphi2_movbe): Ditto.
1178 (bswaphi_lowpart): Merge with *bswaphi_lowpart_1.
1179
1180 2017-11-21 Jakub Jelinek <jakub@redhat.com>
1181
1182 PR c++/83045
1183 * tree-cfg.c (pass_warn_function_return::execute): Formatting fix.
1184 Also warn if seen __builtin_unreachable () call with BUILTINS_LOCATION.
1185 Use LOCATION_LOCUS when comparing against UNKNOWN_LOCATION.
1186
1187 2017-11-21 Martin Liska <mliska@suse.cz>
1188
1189 * tree-inline.c (expand_call_inline): Remove not needed
1190 xstrdup_for_dump.
1191
1192 2017-11-21 James Cowgill <James.Cowgill@imgtec.com>
1193 Jakub Jelinek <jakub@redhat.com>
1194
1195 PR target/82880
1196 * config/mips/frame-header-opt.c (mips_register_frame_header_opt):
1197 Remove static keyword from f variable.
1198
1199 2017-11-21 Jakub Jelinek <jakub@redhat.com>
1200
1201 PR tree-optimization/83086
1202 * gimple-ssa-store-merging.c
1203 (imm_store_chain_info::try_coalesce_bswap): Test this_n.base_addr
1204 rather than n.base_addr.
1205
1206 2017-11-21 Martin Liska <mliska@suse.cz>
1207
1208 PR rtl-optimization/82044
1209 PR tree-optimization/82042
1210 * dse.c (check_mem_read_rtx): Check for overflow.
1211
1212 2017-11-21 Aldy Hernandez <aldyh@redhat.com>
1213
1214 * tree-ssa-threadbackward.c (find_jump_threads_backwards): Fix
1215 typo in comment.
1216
1217 2017-11-21 Claudiu Zissulescu <claziss@synopsys.com>
1218
1219 * cfgrtl.c (force_nonfallthru_and_redirect): Don't split a call
1220 and its corresponding call arg location note.
1221
1222 2017-11-21 Claudiu Zissulescu <claziss@synopsys.com>
1223 Andrew Burgess <andrew.burgess@embecosm.com>
1224
1225 * config/arc/arc-protos.h (arc_compute_frame_size): Delete
1226 declaration.
1227 (arc_return_slot_offset): Likewise.
1228 (arc_eh_return_address_location): New declaration.
1229 * config/arc/arc.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Define.
1230 (MUST_SAVE_REGISTER): Add exception handler case.
1231 (MUST_SAVE_RETURN_ADDR): Likewise.
1232 (arc_frame_pointer_required): Likewise.
1233 (arc_frame_pointer_needed): New function.
1234 (arc_compute_frame_size): Changed.
1235 (arc_expand_prologue): Likewise.
1236 (arc_expand_epilogue): Likewise.
1237 (arc_initial_elimination_offset): Likewise.
1238 (arc_return_slot_offset): Delete.
1239 (arc_eh_return_address_location): New function.
1240 (arc_builtin_setjmp_frame_value): Likewise.
1241 * config/arc/arc.h (EH_RETURN_DATA_REGNO): Use 2 registers.
1242 (EH_RETURN_STACKADJ_RTX): Define.
1243 (EH_RETURN_HANDLER_RTX): Likewise.
1244 * config/arc/arc.md (eh_return): Delete.
1245
1246 2017-11-21 Aldy Hernandez <aldyh@redhat.com>
1247
1248 * print-tree.h (debug_vec_tree): Remove prototype.
1249 * gdbinit.in (pvt): Remove macro.
1250
1251 2017-11-21 Jakub Jelinek <jakub@redhat.com>
1252
1253 PR tree-optimization/83047
1254 * gimple-ssa-store-merging.c
1255 (imm_store_chain_info::output_merged_store): If the loads with the
1256 same vuse are in different basic blocks, for load_gsi pick a load
1257 location that is dominated by the other loads.
1258
1259 PR c++/83059
1260 * config/i386/i386.c (ix86_memmodel_check): Start
1261 -Winvalid-memory-model diagnostics with lowercase letter.
1262
1263 PR debug/82718
1264 * dwarf2out.c (dw_loc_list): If crtl->has_bb_partition, temporarily
1265 set in_cold_section_p to the partition containing loc_list->first.
1266 When seeing loc_list->last_before_switch node, update secname and
1267 perform range_across_switch second partition handling only after that.
1268
1269 PR debug/82933
1270 * run-rtl-passes.c: Include debug.h.
1271 (run_rtl_passes): Call debug_hooks->assembly_start.
1272 * dwarf2out.c (dwarf2out_assembly_start): Return early if invoked
1273 multiple times.
1274
1275 PR target/82981
1276 * internal-fn.c (expand_mul_overflow): Use OPTAB_WIDEN instead of
1277 OPTAB_DIRECT in calls to expand_simple_binop.
1278
1279 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1280
1281 PR c/81404
1282 * Makefile.in (C_COMMON_OBJS): Add c-family/known-headers.o.
1283
1284 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1285
1286 PR c++/72786
1287 * spellcheck.h (best_match::blithely_get_best_candidate): New
1288 accessor.
1289
1290 2017-11-20 Jakub Jelinek <jakub@redhat.com>
1291
1292 * config/i386/i386.c (parse_mtune_ctrl_str): Start diagnostics
1293 with lower case letter.
1294
1295 2017-11-20 Uros Bizjak <ubizjak@gmail.com>
1296
1297 * config/i386/i386.md (bswaphi2): New expander.
1298 (*bswaphi2_movbe): New insn pattern.
1299 (bswaphi -> rorhi pepehole2): New peephole pattern.
1300
1301 2017-11-20 Jeff Law <law@redhat.com>
1302
1303 * Makefile.in (OBJS): Add gimple-ssa-evrp-analyze.o.
1304 * gimple-ssa-evrp-analyze.c: New file pulled from gimple-ssa-evrp.c.
1305 * gimple-ssa-evrp-analyze.h: New file pulled from gimple-ssa-evrp.c.
1306 * gimple-ssa-evrp.c: Remove bits moved into new files. Include
1307 gimple-ssa-evrp-analyze.h.
1308
1309 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Do not
1310 set BB_VISITED here.
1311 (evrp_range_analyzer::enter): Set BB_VISITED here instead.
1312
1313 2017-11-20 Bin Cheng <bin.cheng@arm.com>
1314
1315 * tree-predcom.c: Add general comment on Store-Store chains.
1316 (split_data_refs_to_components): Postpone clearing eliminate_store_p
1317 flag in component.
1318 (get_chain_last_ref_at): Rename into...
1319 (get_chain_last_write_at): ...this.
1320 (get_chain_last_write_before_load): New function.
1321 (add_ref_to_chain): Promote type of chain from CT_STORE_LOAD to
1322 CT_STORE_STORE when write reference is added.
1323 (determine_roots_comp): Support load ref in CT_STORE_STORE chains.
1324 (is_inv_store_elimination_chain): Update get_chain_last_write_at call.
1325 (initialize_root_vars_store_elim_1): Ditto.
1326 (initialize_root_vars_store_elim_2): Ditto. Replace rhs once default
1327 definition is created.
1328 (execute_pred_commoning_chain): Support load ref in CT_STORE_STORE
1329 chain by replacing it with dominant stored value.
1330
1331 2017-11-20 Bin Cheng <bin.cheng@arm.com>
1332
1333 * tree-predcom.c (add_ref_to_chain): Remove check on distance.
1334
1335 2017-11-20 Marc Glisse <marc.glisse@inria.fr>
1336
1337 * vr-values.c (extract_range_from_binary_expr): Use a full range
1338 for VR_VARYING.
1339
1340 2017-11-20 Thomas Preud'homme <thomas.preudhomme@arm.com>
1341
1342 * config/arm/arm.md (R4_REGNUM): Define constant.
1343 (nonsecure_call_internal): Remove r4 clobber.
1344 (nonsecure_call_value_internal): Likewise.
1345 * config/arm/thumb1.md (nonsecure_call_reg_thumb1_v5): Remove second
1346 clobber and resequence match_operands.
1347 (nonsecure_call_value_reg_thumb1_v5): Likewise.
1348 * config/arm/thumb2.md (nonsecure_call_reg_thumb2): Likewise.
1349 (nonsecure_call_value_reg_thumb2): Likewise.
1350
1351 2017-11-20 Jakub Jelinek <jakub@redhat.com>
1352
1353 PR tree-optimization/78821
1354 * gimple-ssa-store-merging.c (find_bswap_or_nop_load): Give up
1355 if base is TARGET_MEM_REF. If base is not MEM_REF, set base_addr
1356 to the address of the base rather than the base itself.
1357 (find_bswap_or_nop_1): Just use pointer comparison for vuse check.
1358 (find_bswap_or_nop_finalize): New function.
1359 (find_bswap_or_nop): Use it.
1360 (bswap_replace): Return a tree rather than bool, change first
1361 argument from gimple * to gimple_stmt_iterator, allow inserting
1362 into an empty sequence, allow ins_stmt to be NULL - then emit
1363 all stmts into gsi. Fix up MEM_REF address gimplification.
1364 (pass_optimize_bswap::execute): Adjust bswap_replace caller.
1365 (struct store_immediate_info): Add N and INS_STMT non-static
1366 data members.
1367 (store_immediate_info::store_immediate_info): Initialize them
1368 from newly added ctor args.
1369 (merged_store_group::apply_stores): Formatting fixes. Sort by
1370 bitpos at the end.
1371 (stmts_may_clobber_ref_p): For stores call also
1372 refs_anti_dependent_p.
1373 (gather_bswap_load_refs): New function.
1374 (imm_store_chain_info::try_coalesce_bswap): New method.
1375 (imm_store_chain_info::coalesce_immediate_stores): Use it.
1376 (split_group): Handle LROTATE_EXPR and NOP_EXPR rhs_code specially.
1377 (imm_store_chain_info::output_merged_store): Fail if number of
1378 new estimated stmts is bigger or equal than old. Handle LROTATE_EXPR
1379 and NOP_EXPR rhs_code.
1380 (pass_store_merging::process_store): Compute n and ins_stmt, if
1381 ins_stmt is non-NULL and the store rhs is otherwise invalid, use
1382 LROTATE_EXPR rhs_code. Pass n and ins_stmt to store_immediate_info
1383 ctor.
1384 (pass_store_merging::execute): Calculate dominators.
1385
1386 * tree-ssa-math-opts.c (nop_stats, bswap_stats, struct symbolic_number,
1387 BITS_PER_MARKER, MARKER_MASK, MARKER_BYTE_UNKNOWN, HEAD_MARKER, CMPNOP,
1388 CMPXCHG, do_shift_rotate, verify_symbolic_number_p,
1389 init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
1390 find_bswap_or_nop_1, find_bswap_or_nop, pass_data_optimize_bswap,
1391 class pass_optimize_bswap, bswap_replace,
1392 pass_optimize_bswap::execute): Moved to ...
1393 * gimple-ssa-store-merging.c: ... this file.
1394 Include optabs-tree.h.
1395 (nop_stats, bswap_stats, do_shift_rotate, verify_symbolic_number_p,
1396 init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
1397 find_bswap_or_nop_1, find_bswap_or_nop, bswap_replace): Put into
1398 anonymous namespace, remove static keywords.
1399 (pass_optimize_bswap::gate): Test BITS_PER_UNIT == 8 here...
1400 (pass_optimize_bswap::execute): ... rather than here. Formatting fix.
1401
1402 2017-11-20 Jan Hubicka <hubicka@ucw.cz>
1403
1404 PR bootstrap/83062
1405 * ipa-inline.c (can_inline_edge_p): Fix typo in previous patch.
1406
1407 2017-11-20 Aldy Hernandez <aldyh@redhat.com>
1408
1409 * vec.h (debug_helper): New function.
1410 (DEFINE_DEBUG_VEC): New macro.
1411 * hash-set.h (debug_helper): New function.
1412 (DEFINE_DEBUG_HASH_SET): New macro.
1413 * cfg.c (debug_slim (edge)): New function.
1414 Call DEFINE_DEBUG_VEC for edges.
1415 Call DEFINE_DEBUG_HASH_SET for edges.
1416 * cfghooks.c (debug_slim (basic_block)): New function.
1417 Call DEFINE_DEBUG_VEC for basic blocks.
1418 Call DEFINE_DEBUG_HASH_SET for basic blocks.
1419 * print-tree.c (debug_slim): New function to handle trees.
1420 Call DEFINE_DEBUG_VEC for trees.
1421 Call DEFINE_DEBUG_HASH_SET for trees.
1422 (debug (vec<tree, va_gc>) &): Remove.
1423 (debug (<vec<tree, va_gc>) *): Remove.
1424 * print-rtl.c (debug_slim): New function to handle const_rtx.
1425 Call DEFINE_DEBUG_VEC for rtx_def.
1426 Call DEFINE_DEBUG_VEC for rtx_insn.
1427 Call DEFINE_DEBUG_HASH_SET for rtx_def.
1428 Call DEFINE_DEBUG_HASH_SET for rtx_insn.
1429 * sel-sched-dump.c (debug (vec<rtx_insn *> &): Remove.
1430 (debug (vec<rtx_insn *> *ptr): Remove.
1431 (debug_insn_vector): Remove.
1432 * stor-layout.c (debug_rli): Call debug() instead of debug_vec_tree.
1433
1434 2017-11-20 Tom de Vries <tom@codesourcery.com>
1435
1436 PR rtl-optimization/82020
1437 * simplify-rtx.c (simplify_ternary_operation): Fix comparison mode of
1438 IF_THEN_ELSE condition.
1439
1440 2017-11-19 Jeff Law <law@redhat.com>
1441
1442 * tree-ssa-dom.c (record_equivalences_from_phis): Fix handling
1443 of degenerates resulting from ignoring an edge.
1444
1445 2017-11-19 Jan Hubicka <hubicka@ucw.cz>
1446
1447 PR ipa/81360
1448 * ipa-inline.c (can_inline_edge_p): Also check that caller is optimized
1449
1450 2017-11-19 Jan Hubicka <hubicka@ucw.cz>
1451
1452 PR ipa/83001
1453 * profile-count.c (profile_count::to_sreal_scale): Fix return value
1454 for uninitialied counts.
1455
1456 2017-11-19 Jan Hubicka <hubicka@ucw.cz>
1457
1458 PR ipa/60243
1459 * tree-inline.c (estimate_num_insns): Set to 1 at least.
1460
1461 2017-11-19 Jan Hubicka <hubicka@ucw.cz>
1462
1463 PR target/82713
1464 * i386.c (ix86_builtin_vectorization_cost): Be ready for insane types.
1465
1466 2017-11-19 Tom de Vries <tom@codesourcery.com>
1467
1468 * config/arc/arc.h (FUNCTION_PROFILER): Remove semicolon after
1469 "do while (0)".
1470
1471 2017-11-19 Tom de Vries <tom@codesourcery.com>
1472
1473 * config/phoenix.h (TARGET_OS_CPP_BUILTINS): Remove semicolon after
1474 "do {} while (0)".
1475
1476 2017-11-19 Tom de Vries <tom@codesourcery.com>
1477
1478 * config/visium/visium.h (ASM_OUTPUT_CASE_END): Remove semicolon after
1479 macro body.
1480
1481 2017-11-19 Tom de Vries <tom@codesourcery.com>
1482
1483 * config/ft32/ft32.h (REGISTER_TARGET_PRAGMAS): Remove semicolon after
1484 "do {} while (0)".
1485 * config/spu/spu.h (REGISTER_TARGET_PRAGMAS): Same.
1486
1487 2017-11-19 Tom de Vries <tom@codesourcery.com>
1488
1489 * config/mcore/mcore-elf.h (MCORE_EXPORT_NAME): Remove semicolon after
1490 "do {} while (0)".
1491 * config/mcore/mcore.h (ASM_OUTPUT_ALIGNED_COMMON): After missing
1492 semicolon after MCORE_EXPORT_NAME call.
1493
1494 2017-11-19 Tom de Vries <tom@codesourcery.com>
1495
1496 PR target/82961
1497 * vmsdbgout.c (vmsdbgout_early_finish): New function.
1498 (vmsdbg_debug_hooks): Set early_finish field to vmsdbgout_early_finish.
1499
1500 2017-11-18 Jan Hubicka <hubicka@ucw.cz>
1501
1502 * cgraphclones.c (cgraph_edge::clone): Rename gcov_count to prof_count.
1503 (cgraph_edge::clone): Cleanup updating of profile.
1504 * ipa-cp.c (update_profiling_info): Likewise.
1505 * ipa-inline-transform.c (inline_transform): Likewise.
1506 * ipa-inline.c (inline_small_functions): Add missing space to dump.
1507 * ipa-split.c (execute_split_functions): Do not split when function
1508 is cold.
1509 * predict.c (estimate_bb_frequencies): Cleanup updating of profile.
1510 * profile-count.c (profile_count::dump): Add global0.
1511 (profile_count::to_cgraph_frequency): Do not ICE when entry is
1512 undefined.
1513 (profile_count::to_sreal_scale): Likewise.
1514 (profile_count::adjust_for_ipa_scaling): Fix typo in comment.
1515 (profile_count::combine_with_ipa_count): New function.
1516 * profile-count.h (profile_guessed_global0adjusted): New.
1517 (profile_count::adjusted_zero): New.
1518 (profile_count::global0adjusted): New.
1519 (profile_count::combine_with_ipa_count): New.
1520 * tree-inline.c (copy_edges_for_bb): Add NUM/DEN arugment;
1521 correct profile of return block of split functions.
1522 (copy_cfg_body): Remove unused profile_count.
1523 (copy_body): Likewise.
1524 (expand_call_inline): Update.
1525 (tree_function_versioning): Update.
1526
1527 2017-11-18 Aldy Hernandez <aldyh@redhat.com>
1528
1529 * hash-set.h (hash_set::empty): New.
1530 * tree-ssa-threadbackward.h: Delete.
1531 * tree-ssa-threadbackward.c (class thread_jumps): New.
1532 Move max_threaded_paths into class.
1533 (fsm_find_thread_path): Remove arguments that are now in class.
1534 (profitable_jump_thread_path): Rename to...
1535 (thread_jumps::profitable_jump_thread_path): ...this.
1536 (convert_and_register_jump_thread_path): Rename to...
1537 (thread_jumps::convert_and_register_current_path): ...this.
1538 (check_subpath_and_update_thread_path): Rename to...
1539 (thread_jumps::check_subpath_and_update_thread_path): ...this.
1540 (register_jump_thread_path_if_profitable): Rename to...
1541 (thread_jumps::register_jump_thread_path_if_profitable): ...this.
1542 (handle_phi): Rename to...
1543 (thread_jumps::handle_phi): ...this.
1544 (handle_assignment): Rename to...
1545 (thread_jumps::handle_assignment): ...this.
1546 (fsm_find_control_statement_thread_paths): Rename to...
1547 (thread_jumps::fsm_find_control_statement_thread_paths): ...this.
1548 (find_jump_threads_backwards): Rename to...
1549 (thread_jumps::find_jump_threads_backwards): ...this.
1550 Initialize path local data.
1551 (pass_thread_jumps::execute): Call find_jump_threads_backwards
1552 from within thread_jumps class.
1553 (pass_early_thread_jumps::execute): Same.
1554
1555 2017-11-17 Jan Hubicka <hubicka@ucw.cz>
1556
1557 * cgraph.c (cgraph_node::dump): Do IPA sanity checking on IPA counts.
1558
1559 2017-11-17 Steve Ellcey <sellcey@cavium.com>
1560
1561 * config/aarch64/aarch64-simd.md (fnma<mode>4): Move neg operator
1562 to canonical location.
1563
1564 2017-11-17 Steve Ellcey <sellcey@cavium.com>
1565
1566 PR target/81356
1567 * config/aarch64/aarch64.c (aarch64_use_by_pieces_infrastructure_p):
1568 Remove.
1569 (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Remove define.
1570
1571 2017-11-17 H.J. Lu <hongjiu.lu@intel.com>
1572
1573 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Use
1574 rcrt1.o%s/grcrt1.o%s for -static-pie.
1575
1576 2017-11-17 Jan Hubicka <hubicka@ucw.cz>
1577
1578 * i386.c (ix86_multiplication_cost, ix86_division_cost,
1579 ix86_shift_rotate_cost): Break out from ...
1580 (ix86_rtx_costs): ... here.
1581 (ix86_add_stmt_cost): Use rtx cost machinery to compute cost of
1582 vector operations.
1583
1584 2017-11-17 Jan Hubicka <hubicka@ucw.cz>
1585
1586 * predict.c (determine_unlikely_bbs): Set cgraph node count to 0
1587 when entry block was promoted unlikely.
1588 (estimate_bb_frequencies): Increase frequency scale.
1589 * profile-count.h (profile_count): Export precision info.
1590
1591 2017-11-17 Jan Hubicka <hubicka@ucw.cz>
1592
1593 * tree-tailcall.c (eliminate_tail_call): Be more careful about not
1594 disturbin profile of entry block.
1595
1596 2017-11-17 Jan Hubicka <hubicka@ucw.cz>
1597
1598 * ipa-fnsummary.c (estimate_node_size_and_time): Be more tolerant for
1599 roundoff errors.
1600
1601 2017-11-17 Jan Hubicka <hubicka@ucw.cz>
1602
1603 * ipa-cp.c (update_profiling_info): Handle conversion to local profile.
1604 * tree-cfg.c (execute_fixup_cfg): Do fixup same way as inliner does.
1605
1606 2017-11-17 Jeff Law <law@redhat.com>
1607
1608 * gimple-ssa-evrp.c (class evrp_range_analyzer): New class extracted
1609 from evrp_dom_walker class. Various methods moved into new class.
1610 (evrp_range_analyzer::evrp_range_analyzer): Constructor for new class.
1611 (evrp_range_analyzer::enter): New method.
1612 (evrp_range_analyzer::leave): New method.
1613 (evrp_dom_walker): Remove delegators no longer needed by this class.
1614 Replace vr_values data member with evrp_range_analyzer
1615
1616 * gimple-ssa-evrp.c (evrp_dom_walker::record_ranges_from_phis): New
1617 method extracted from evrp_dom_walker::before_dom_children.
1618 (evrp_dom_walker::record_ranges_from_stmt): Likewise.
1619 (evrp_dom_walker::record_ranges_from_incoming_edge): Likewise.
1620
1621 * gimple-ssa-evrp.c (evrp_dom_walker): Add cleanup method.
1622 Add private copy constructor and move assignment operators.
1623 Privatize methods and class data where trivially possible.
1624 (evrp_dom_walker::cleanup): New function, extracted from
1625 execute_early_vrp. Simplify access to class data.
1626
1627 * vr-values.h (get_output_for_vrp): Prototype.
1628 * vr-values.c (get_output_for_vrp): New function extracted from
1629 vrp_visit_assignment_or_call and extract_range_from_stmt.
1630 (vrp_visit_assignment_or_call): Use get_output_for_vrp. Simplify.
1631
1632 2017-11-17 Luis Machado <luis.machado@linaro.org>
1633
1634 * config/aarch64/aarch64.c
1635 (qdf24xx_prefetch_tune) <default_opt_level>: Set to -1.
1636 (qdf24xx_tunings) <autoprefetcher_model>: Set to
1637 tune_params::AUTOPREFETCHER_WEAK.
1638
1639 2017-11-17 Tamar Christina <tamar.christina@arm.com>
1640
1641 PR target/82641
1642 * config/arm/arm.c (arm_valid_target_attribute_rec):
1643 Parse "arch=" and "+<ext>".
1644 (arm_valid_target_attribute_tree): Re-init global options.
1645 (arm_option_override): Make non-static.
1646 (arm_options_perform_arch_sanity_checks): Make errors fatal.
1647 * gcc/config/arm/arm-c.c (__ARM_FEATURE_CMSE): Support undef.
1648 (__ARM_FEATURE_CRC32): Support undef.
1649 * config/arm/arm_acle.h (__ARM_FEATURE_CRC32): Replace with pragma.
1650 * doc/extend.texi (ARM Function Attributes): Add pragma and target.
1651
1652 2017-11-17 David Malcolm <dmalcolm@redhat.com>
1653
1654 * gdbinit.in (break-on-diagnostic): New command.
1655
1656 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
1657
1658 * config/i386/i386.c (ix86_expand_epilogue): Change simple
1659 return to indirect jump for EH return if control-flow
1660 protection is enabled. Change explicit 'false' argument in
1661 pro_epilogue_adjust_stack with a value of
1662 flag_cf_protection.
1663 * config/i386/i386.md (simple_return_indirect_internal):
1664 Remove SImode restriction to support 64-bit.
1665
1666 2017-11-17 Segher Boessenkool <segher@kernel.crashing.org>
1667
1668 * combine.c (added_notes_insn): New.
1669 (try_combine): Handle added_notes_insn like added_links_insn.
1670 Rewrite return value code.
1671 (distribute_notes): Set added_notes_insn to the earliest insn we added
1672 a note to.
1673
1674 2017-11-17 Segher Boessenkool <segher@kernel.crashing.org>
1675
1676 PR rtl-optimization/82621
1677 * combine.c (try_combine): Do not split PARALLELs of two SETs if the
1678 dest of one of those SETs is unused.
1679
1680 2017-11-17 Richard Biener <rguenther@suse.de>
1681
1682 PR fortran/83017
1683 * tree-core.h (enum annot_expr_kind): Add annot_expr_parallel_kind.
1684 * tree-pretty-print.c (dump_generic_node): Handle
1685 annot_expr_parallel_kind.
1686 * tree-cfg.c (replace_loop_annotate_in_block): Likewise.
1687 * gimplify.c (gimple_boolify): Likewise.
1688
1689 2017-11-17 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
1690
1691 * config.gcc (extra_headers): Add cet.h for x86 targets.
1692 * config/i386/cet.h: New file.
1693 * doc/install.texi: Add --enable-cet/--disable-cet.
1694
1695 2017-11-17 Richard Biener <rguenther@suse.de>
1696
1697 PR tree-optimization/83017
1698 * tree-parloops.c (MIN_PER_THREAD): Use --param parloops-min-per-thread.
1699 (gen_parallel_loop): Properly count iterations.
1700 (parallelize_loops): Handle loop->can_be_parallel independent
1701 of flag_loop_parallelize_all. Make static profitability test match
1702 the runtime one.
1703 * params.def (PARAM_PARLOOPS_MIN_PER_THREAD): New.
1704 * invoke.texi (parloops-min-per-thread): Document.
1705
1706 2017-11-17 Vineet Gupta <vgupta@synopsys.com>
1707
1708 * config/arc/linux.h: GLIBC_DYNAMIC_LINKER update per glibc
1709 upstreaming review comments.
1710
1711 2017-11-17 Tamar Christina <tamar.christina@arm.com>
1712
1713 * expr.c (copy_blkmode_to_reg): Fix bitsize for targets
1714 with fast unaligned access.
1715 * doc/sourcebuild.texi (word_mode_no_slow_unalign): New.
1716
1717 2017-11-17 Thomas Preud'homme <thomas.preudhomme@arm.com>
1718
1719 * config/arm/arm.c (cmse_nonsecure_entry_clear_before_return): Allocate
1720 to_clear_arg_regs_bitmap to the same size as to_clear_bitmap.
1721
1722 2017-11-17 Richard Biener <rguenther@suse.de>
1723
1724 * tree-ssa-pre.c (phi_translate_1): Remove redundant constant
1725 folding of references.
1726
1727 2017-11-17 Qing Zhao <qing.zhao@oracle.com>
1728
1729 PR middle-end/78809
1730 * gimple-fold.c (gimple_fold_builtin_string_compare): Add handling
1731 of replacing call to strncmp with corresponding call to strcmp when
1732 meeting conditions.
1733
1734 2017-11-17 Sergey Shalnov <Sergey.Shalnov@intel.com>
1735
1736 * config/i386/x86-tune.def (X86_TUNE_AVX256_OPTIMAL): Add tuning
1737 option prefer-avx256 for skylake-avx512 configuration.
1738 * config/i386/i386.c (ix86_option_override_internal): Ditto.
1739 (get_builtin_code_for_version): Ditto.
1740
1741 2017-11-17 Chung-Ju Wu <jasonwucj@gmail.com>
1742 Monk Chiang <sh.chiang04@gmail.com>
1743
1744 * config/nds32/nds32.h (FIRST_PSEUDO_REGISTER): Modify.
1745 (FIXED_REGISTERS): Reserve more register numbers.
1746 (CALL_USED_REGISTERS): Likewise.
1747 (REG_ALLOC_ORDER): Likewise.
1748 (REG_CLASS_CONTENTS): Likewise.
1749 (REGISTER_NAMES): Likewise.
1750
1751 2017-11-17 Chung-Ju Wu <jasonwucj@gmail.com>
1752 Kito Cheng <kito.cheng@gmail.com>
1753
1754 * config/nds32/nds32-modes.def: Add vector mode V4QI V2HI V8QI V4HI
1755 V2SI.
1756 * config/nds32/iterators.md: Add vector mode iterators and attributes.
1757
1758 2017-11-16 Steven Munroe <munroesj@gcc.gnu.org>
1759
1760 * config/rs6000/mmintrin.h (_mm_add_pi32[_ARCH_PWR]): Correct
1761 parameter list for vec_splats.
1762
1763 2017-11-16 Joseph Myers <joseph@codesourcery.com>
1764
1765 * doc/invoke.texi (-std=c17): Refer to 2018 expected publication
1766 date of C17.
1767 (-std=c18, -std=iso9899:2018, -std=gnu18): Document option aliases.
1768
1769 2017-11-16 Thomas Koenig <tkoenig@gcc.gnu.org>
1770
1771 PR bootstrap/82856
1772 * doc/install.texi: Document incompatibility of Perl >=5.6.26
1773 with the required version of automake 1.11.6.
1774
1775 2017-11-16 Pat Haugen <pthaugen@us.ibm.com>
1776
1777 * rs6000/power9.md (power9fpdiv): New automaton and cpu_unit defined
1778 for it.
1779 (DU_C2_3_power9): Correct reservation combinations.
1780 (FP_DIV_power9, VEC_DIV_power9): New.
1781 (power9-alu): Split out rotate/shift...
1782 (power9-rot): ...to here, correct dispatch resource.
1783 (power9-cracked-alu, power9-mul, power9-mul-compare): Correct dispatch
1784 resource.
1785 (power9-fp): Correct latency.
1786 (power9-sdiv): Add div/sqrt resource.
1787 (power9-ddiv): Correct latency, add div/sqrt resource.
1788 (power9-sqrt, power9-dsqrt): Add div/sqrt resource.
1789 (power9-vecfdiv, power9-vecdiv): Correct latency, add div/sqrt
1790 resource.
1791 (power9-qpdiv, power9-qpmul): Adjust resource usage.
1792
1793 2017-11-15 Michael Meissner <meissner@linux.vnet.ibm.com>
1794
1795 * config/rs6000/rs6000.c (rs6000_expand_builtin): Do not do the
1796 switch statement mapping KF built-ins to TF built-ins if we don't
1797 have the proper ISA 3.0 assembler support.
1798
1799 2017-11-16 Jan Hubicka <hubicka@ucw.cz>
1800
1801 * tree-emutls.c (lower_emutls_data): Remove unused bb_freq.
1802 (lower_emutls_function_body): Do not compute it.
1803
1804 2017-11-16 Jan Hubicka <hubicka@ucw.cz>
1805
1806 * ipa-split.c (split_bb_info): Turn time to sreal.
1807 (split_point): Likewise.
1808 (dump_split_point): Likewise.
1809 (fine_split_points): Likewise.
1810 (execute_split_functions): Only zero split_bbs; turn time to sreals.
1811
1812 2017-11-16 Jan Hubicka <hubicka@ucw.cz>
1813
1814 * ipa-fnsummary.c (analyze_function_body): Accumulate time consistently
1815 in sreal.
1816
1817 2017-11-16 Jan Hubicka <hubicka@ucw.cz>
1818
1819 * predict.c (combine_predictions_for_bb): Preserve zero predicted
1820 edges.
1821 (expensive_function_p): Remove useless assert.
1822 (determine_unlikely_bbs): Propagate also forward; determine cold blocks
1823
1824 2017-11-16 Martin Sebor <msebor@redhat.com>
1825
1826 PR tree-optimization/82588
1827 PR tree-optimization/82583
1828 * tree-vrp.c (check_array_ref): Handle flexible array members,
1829 string literals, and inner indices.
1830 (search_for_addr_array): Add detail to diagnostics.
1831
1832 2017-11-16 Nathan Sidwell <nathan@acm.org>
1833
1834 PR c++/82836
1835 PR c++/82737
1836 * tree.h (COPY_DECL_RTL): Rename parms for clarity.
1837 (SET_DECL_ASSEMBLER_NAME): Forward to
1838 overwrite_decl_assembler_name.
1839 (COPY_DECL_ASSEMBLER_NAME): Rename parms for clarity.
1840 (overwrite_decl_assembler_name): Declare.
1841 * tree.c (overwrite_decl_assembler_name): New.
1842 * langhooks-def.h (lhd_overwrite_decl_assembler_name): Declare.
1843 (LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME): Provide default.
1844 (LANG_HOOKS_INITIALIZER): Add it.
1845 * langhooks.h (struct lang_hooks): Add overwrite_decl_assembler_name.
1846 * langhooks.c (lhd_set_decl_assembler_name): Use
1847 SET_DECL_ASSEMBLER_NAME.
1848 (lhd_overwrite_decl_assembler_name): Default implementation.
1849
1850 2017-11-16 Wilco Dijkstra <wdijkstr@arm.com>
1851 Jackson Woodruff <jackson.woodruff@arm.com>
1852
1853 PR tree-optimization/71026
1854 * match.pd: Canonicalize constant multiplies in division.
1855
1856 2017-11-16 Wilco Dijkstra <wdijkstr@arm.com>
1857
1858 * opts.c (default_options_table): Add OPT_fomit_frame_pointer entry.
1859 * common/config/alpha/alpha-common.c (TARGET_OPTION_OPTIMIZATION_TABLE):
1860 Remove OPT_fomit_frame_pointer entry.
1861 * common/config/arc/arc-common.c: Likewise.
1862 * common/config/arm/arm-common.c: Likewise.
1863 * common/config/avr/avr-common.c: Likewise.
1864 * common/config/c6x/c6x-common.c: Likewise.
1865 * common/config/cr16/cr16-common.c: Likewise.
1866 * common/config/cris/cris-common.c: Likewise.
1867 * common/config/epiphany/epiphany-common.c: Likewise.
1868 * common/config/fr30/fr30-common.c: Likewise.
1869 * common/config/frv/frv-common.c: Likewise.
1870 * common/config/ia64/ia64-common.c: Likewise.
1871 * common/config/iq2000/iq2000-common.c: Likewise.
1872 * common/config/lm32/lm32-common.c: Likewise.
1873 * common/config/m32r/m32r-common.c: Likewise.
1874 * common/config/mcore/mcore-common.c: Likewise.
1875 * common/config/microblaze/microblaze-common.c: Likewise.
1876 * common/config/mips/mips-common.c: Likewise.
1877 * common/config/mmix/mmix-common.c: Likewise.
1878 * common/config/mn10300/mn10300-common.c: Likewise.
1879 * common/config/nios2/nios2-common.c: Likewise.
1880 * common/config/pa/pa-common.c: Likewise.
1881 * common/config/pdp11/pdp11-common.c: Likewise.
1882 * common/config/powerpcspe/powerpcspe-common.c: Likewise.
1883 * common/config/riscv/riscv-common.c: Likewise.
1884 * common/config/rs6000/rs6000-common.c: Likewise.
1885 * common/config/rx/rx-common.c: Likewise.
1886 * common/config/s390/s390-common.c: Likewise.
1887 * common/config/sh/sh-common.c: Likewise.
1888 * common/config/sparc/sparc-common.c: Likewise.
1889 * common/config/tilegx/tilegx-common.c: Likewise.
1890 * common/config/tilepro/tilepro-common.c: Likewise.
1891 * common/config/v850/v850-common.c: Likewise.
1892 * common/config/visium/visium-common.c: Likewise.
1893 * common/config/xstormy16/xstormy16-common.c: Likewise.
1894 * common/config/xtensa/xtensa-common.c: Likewise.
1895 * invoke.texi (-fomit-frame-pointer): Update documentation.
1896
1897 2017-11-16 Jan Hubicka <hubicka@ucw.cz>
1898
1899 * tree-cfg.c (gimple_find_sub_bbs): Do not compute freq.
1900
1901 2017-11-14 Jan Hubicka <hubicka@ucw.cz>
1902
1903 * cfg.c (scale_bbs_frequencies_int,
1904 cale_bbs_frequencies_gcov_type): Remove.
1905 * cfg.h (scale_bbs_frequencies_int,
1906 cale_bbs_frequencies_gcov_type): Remove.
1907
1908 2017-11-14 Jan Hubicka <hubicka@ucw.cz>
1909
1910 * tree-ssa-loop-manip.c
1911 (scale_dominated_blocks_in_loop): Update to profile counts.
1912 (tree_transform_and_unroll_loop): Likewise.
1913
1914 2017-11-14 Jan Hubicka <hubicka@ucw.cz>
1915
1916 * tree-vect-loop-manip.c (vect_do_peeling): Do not use
1917 scale_bbs_frequencies_int.
1918
1919 2017-11-14 Jan Hubicka <hubicka@ucw.cz>
1920
1921 * final.c (compute_alignments): Use counts rather than frequencies.
1922
1923 2017-11-14 Jan Hubicka <hubicka@ucw.cz>
1924
1925 * cfgloopanal.c: Include sreal.h
1926 (average_num_loop_insns): Use counts and sreal for accounting.
1927
1928 2017-11-14 Jan Hubicka <hubicka@ucw.cz>
1929
1930 * cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
1931 manipulation.
1932
1933 2017-11-16 Chung-Ju Wu <jasonwucj@gmail.com>
1934 Kito Cheng <kito.cheng@gmail.com>
1935
1936 * config/nds32/constraints.md: Provide more constraints.
1937 * config/nds32/nds32.h (enum reg_class, REG_CLASS_NAMES,
1938 REG_CLASS_CONTENTS): Define R5_REG, R8_REG, and FRAME_POINTER_REG to
1939 support constraints usage.
1940
1941 2017-11-16 Chung-Ju Wu <jasonwucj@gmail.com>
1942
1943 * config/nds32/constants.md (UNSPEC_VOLATILE_FUNC_RETURN): Remove.
1944
1945 2017-11-16 Chung-Ju Wu <jasonwucj@gmail.com>
1946 Kito Cheng <kito.cheng@gmail.com>
1947
1948 * config/nds32/nds32.opt: Add mext-perf, mext-perf2, mext-string.
1949 * config/nds32/nds32.opt: Refine the layout.
1950 * config/nds32/nds32.c (TARGET_EXT_PERF, TARGET_EXT_PERF2,
1951 TARGET_EXT_STRING): Support new options.
1952 * config/nds32/nds32.h: Likewise.
1953 * config/nds32/nds32.md: Likewise.
1954 * config/nds32/nds32-predicates.c: Likewise.
1955 * config/nds32/constraints.md: Likewise.
1956 * common/config/nds32/nds32-common.c: Likewise.
1957
1958 2017-11-16 Julia Koval <julia.koval@intel.com>
1959
1960 PR target/82983
1961 * config/i386/gfniintrin.h: Add sse check.
1962 * config/i386/i386.c (ix86_expand_builtin): Fix gfni check.
1963
1964 2017-11-16 Julia Koval <julia.koval@intel.com>
1965
1966 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI2_SET,
1967 OPTION_MASK_ISA_AVX512VBMI2_UNSET): New.
1968 (ix86_handle_option): Handle -mavx512vbmi2.
1969 * config/i386/cpuid.h: Add bit_AVX512VBMI2.
1970 * config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit.
1971 * config/i386/i386-c.c (__AVX512VBMI2__): New.
1972 * config/i386/i386.c (ix86_target_string): Handle -mavx512vbmi2.
1973 (ix86_valid_target_attribute_inner_p): Ditto.
1974 * config/i386/i386.h (TARGET_AVX512VBMI2, TARGET_AVX512VBMI2_P): New.
1975 * config/i386/i386.opt (mavx512vbmi2): New option.
1976 * doc/invoke.texi: Add new option.
1977
1978 2017-11-16 Julia Koval <julia.koval@intel.com>
1979
1980 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8, _mm256_gf2p8mul_epi8,
1981 _mm_mask_gf2p8mul_epi8, _mm_maskz_gf2p8mul_epi8,
1982 _mm256_mask_gf2p8mul_epi8, _mm256_maskz_gf2p8mul_epi8,
1983 _mm512_mask_gf2p8mul_epi8, _mm512_maskz_gf2p8mul_epi8,
1984 _mm512_gf2p8mul_epi8): New intrinsics.
1985 * config/i386/i386-builtin-types.def
1986 (V64QI_FTYPE_V64QI_V64QI): New type.
1987 * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8mulb_v64qi,
1988 __builtin_ia32_vgf2p8mulb_v64qi_mask, __builtin_ia32_vgf2p8mulb_v32qi,
1989 __builtin_ia32_vgf2p8mulb_v32qi_mask, __builtin_ia32_vgf2p8mulb_v16qi,
1990 __builtin_ia32_vgf2p8mulb_v16qi_mask): New builtins.
1991 * config/i386/sse.md (vgf2p8mulb_*): New pattern.
1992 * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
1993
1994 2017-11-15 Uros Bizjak <ubizjak@gmail.com>
1995
1996 * config/i386/i386.c (x86_print_call_or_nop): Emit 5 byte nop
1997 explicitly as a stream of bytes.
1998
1999 2017-11-15 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2000
2001 * config/rs6000/altivec.h (vec_xst_be): New #define.
2002 * config/rs6000/altivec.md (altivec_vperm_<mode>_direct): Rename
2003 and externalize from *altivec_vperm_<mode>_internal.
2004 * config/rs6000/rs6000-builtin.def (XL_BE_V16QI): Remove macro
2005 instantiation.
2006 (XL_BE_V8HI): Likewise.
2007 (XL_BE_V4SI): Likewise.
2008 (XL_BE_V4SI): Likewise.
2009 (XL_BE_V2DI): Likewise.
2010 (XL_BE_V4SF): Likewise.
2011 (XL_BE_V2DF): Likewise.
2012 (XST_BE): Add BU_VSX_OVERLOAD_X macro instantiation.
2013 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Correct
2014 all array entries with these keys: VSX_BUILTIN_VEC_XL,
2015 VSX_BUILTIN_VEC_XL_BE, VSX_BUILTIN_VEC_XST. Add entries for key
2016 VSX_BUILTIN_VEC_XST_BE.
2017 * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Remove.
2018 (altivec_expand_builtin): Remove handling for VSX_BUILTIN_XL_BE_*
2019 built-ins.
2020 (altivec_init_builtins): Replace conditional calls to def_builtin
2021 for __builtin_vsx_ld_elemrev_{v8hi,v16qi} and
2022 __builtin_vsx_st_elemrev_{v8hi,v16qi} based on TARGET_P9_VECTOR
2023 with unconditional calls. Remove calls to def_builtin for
2024 __builtin_vsx_le_be_<mode>. Add a call to def_builtin for
2025 __builtin_vec_xst_be.
2026 * config/rs6000/vsx.md (vsx_ld_elemrev_v8hi): Convert define_insn
2027 to define_expand, and add alternate RTL generation for P8.
2028 (*vsx_ld_elemrev_v8hi_internal): New define_insn based on
2029 vsx_ld_elemrev_v8hi.
2030 (vsx_ld_elemrev_v16qi): Convert define_insn to define_expand, and
2031 add alternate RTL generation for P8.
2032 (*vsx_ld_elemrev_v16qi_internal): New define_insn based on
2033 vsx_ld_elemrev_v16qi.
2034 (vsx_st_elemrev_v8hi): Convert define_insn
2035 to define_expand, and add alternate RTL generation for P8.
2036 (*vsx_st_elemrev_v8hi_internal): New define_insn based on
2037 vsx_st_elemrev_v8hi.
2038 (vsx_st_elemrev_v16qi): Convert define_insn to define_expand, and
2039 add alternate RTL generation for P8.
2040 (*vsx_st_elemrev_v16qi_internal): New define_insn based on
2041 vsx_st_elemrev_v16qi.
2042
2043 2017-11-15 H.J. Lu <hongjiu.lu@intel.com>
2044
2045 PR target/82990
2046 * config/i386/i386.c (pass_insert_vzeroupper::gate): Remove
2047 TARGET_AVX512ER check.
2048 (ix86_option_override_internal): Set MASK_VZEROUPPER if
2049 neither -mzeroupper nor -mno-zeroupper is used and
2050 TARGET_EMIT_VZEROUPPER is set.
2051 * config/i386/i386.h (TARGET_EMIT_VZEROUPPER): New.
2052 * config/i386/x86-tune.def: Add X86_TUNE_EMIT_VZEROUPPER.
2053
2054 2017-11-15 Will Schmidt <will_schmidt@vnet.ibm.com>
2055
2056 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
2057 folding of vector compares.
2058 (fold_build_vec_cmp): New helper function.
2059 (fold_compare_helper): New helper function.
2060 (builtin_function_type): Add compare builtins to the list of functions
2061 having unsigned arguments. Cosmetic updates to comment indentation.
2062 * config/rs6000/vsx.md (vcmpneb, vcmpneh, vcmpnew): Update to specify
2063 the not+eq combination.
2064
2065 2017-11-15 Bin Cheng <bin.cheng@arm.com>
2066
2067 PR tree-optimization/82726
2068 PR tree-optimization/70754
2069 * tree-predcom.c (order_drefs_by_pos): New function.
2070 (combine_chains): Move code setting has_max_use_after to...
2071 (try_combine_chains): ...here. New parameter. Sort combined chains
2072 according to position information.
2073 (tree_predictive_commoning_loop): Update call to above function.
2074 (update_pos_for_combined_chains, pcom_stmt_dominates_stmt_p): New.
2075
2076 2017-11-15 Bin Cheng <bin.cheng@arm.com>
2077
2078 PR tree-optimization/82726
2079 Revert
2080 2017-01-23 Bin Cheng <bin.cheng@arm.com>
2081
2082 PR tree-optimization/70754
2083 * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
2084 (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE. Insert
2085 combined stmt before it if not NULL.
2086 (combine_chains): Process refs reversely and compute dominance point
2087 for root ref.
2088
2089 Revert
2090 2017-02-23 Bin Cheng <bin.cheng@arm.com>
2091
2092 PR tree-optimization/79663
2093 * tree-predcom.c (combine_chains): Process refs in reverse order
2094 only for ZERO length chains, and add explaining comment.
2095
2096 2017-11-15 Tamar Christina <tamar.christina@arm.com>
2097
2098 * config/arm/arm-cpus.in (armv8_3, ARMv8_3a, armv8.3-a): New
2099 * config/arm/arm-tables.opt (armv8.3-a): Regenerated.
2100 * doc/invoke.texi (ARM Options): Add armv8.3-a.
2101
2102 2017-11-15 Tamar Christina <tamar.christina@arm.com>
2103
2104 * config/arm/arm.h (TARGET_DOTPROD): Add arm_arch8_2.
2105
2106 2017-11-15 Martin Liska <mliska@suse.cz>
2107
2108 * tree-cfg.c (pass_warn_function_return::execute):
2109 Compare warn_return_type for greater than zero.
2110
2111 2017-11-15 Sebastian Peryt <sebastian.peryt@intel.com>
2112
2113 PR target/82941
2114 PR target/82942
2115 * config/i386/i386.c (pass_insert_vzeroupper): Modify gate condition
2116 to return true on Xeon and not on Xeon Phi.
2117 (ix86_check_avx256_register): Changed to ...
2118 (ix86_check_avx_upper_register): ... this. Add extra check for
2119 VALID_AVX512F_REG_OR_XI_MODE.
2120 (ix86_avx_u128_mode_needed): Changed
2121 ix86_check_avx256_register to ix86_check_avx_upper_register.
2122 (ix86_check_avx256_stores): Changed to ...
2123 (ix86_check_avx_upper_stores): ... this. Changed
2124 ix86_check_avx256_register to ix86_check_avx_upper_register.
2125 (ix86_avx_u128_mode_after): Changed
2126 avx_reg256_found to avx_upper_reg_found. Changed
2127 ix86_check_avx256_stores to ix86_check_avx_upper_stores.
2128 (ix86_avx_u128_mode_entry): Changed
2129 ix86_check_avx256_register to ix86_check_avx_upper_register.
2130 (ix86_avx_u128_mode_exit): Ditto.
2131 * config/i386/i386.h: (host_detect_local_cpu): New define.
2132
2133 2017-11-15 Dominik Infuehr <dominik.infuehr@theobroma-systems.com>
2134
2135 * config/arm/xgene1.md (xgene1): Split into automatons
2136 xgene1_main, xgene1_decoder, xgene1_div, xgene1_simd.
2137 (xgene1_f_load): Adjust reservations and/or types.
2138 (xgene1_f_store): Likewise.
2139 (xgene1_load_pair): Likewise.
2140 (xgene1_store_pair): Likewise.
2141 (xgene1_fp_load1): Likewise.
2142 (xgene1_load1): Likewise.
2143 (xgene1_store1): Likewise.
2144 (xgene1_move): Likewise.
2145 (xgene1_alu): Likewise.
2146 (xgene1_simd): Likewise.
2147 (xgene1_bfm): Likewise.
2148 (xgene1_neon_load1): Likewise.
2149 (xgene1_neon_store1): Likewise.
2150 (xgene1_neon_logic): Likewise.
2151 (xgene1_neon_st1): Likewise.
2152 (xgene1_neon_ld1r): Likewise.
2153 (xgene1_alu_cond): Added.
2154 (xgene1_shift_reg): Likwise.
2155 (xgene1_bfx): Likewise.
2156 (xgene1_mul): Split into xgene1_mul32, xgene1_mul64.
2157
2158 2017-11-15 Jakub Jelinek <jakub@redhat.com>
2159
2160 PR target/82981
2161 * internal-fn.c: Include gimple-ssa.h, tree-phinodes.h and
2162 ssa-iterators.h.
2163 (can_widen_mult_without_libcall): New function.
2164 (expand_mul_overflow): If only checking unsigned mul overflow,
2165 not result, and can do efficiently MULT_HIGHPART_EXPR, emit that.
2166 Don't use WIDEN_MULT_EXPR if it would involve a libcall, unless
2167 no other way works. Add MULT_HIGHPART_EXPR + MULT_EXPR support.
2168 (expand_DIVMOD): Formatting fix.
2169 * expmed.h (expand_mult): Add NO_LIBCALL argument.
2170 * expmed.c (expand_mult): Likewise. Use OPTAB_WIDEN rather
2171 than OPTAB_LIB_WIDEN if NO_LIBCALL is true, and allow it to fail.
2172
2173 PR tree-optimization/82977
2174 * tree-ssa-strlen.c (strlen_optimize_stmt): Pass a reference to a copy
2175 constructed temporary to strlen_to_stridx.put.
2176
2177 2017-11-15 Martin Liska <mliska@suse.cz>
2178
2179 * configure.ac: Remove -fkeep-inline-functions from coverage_flags.
2180 * configure: Regenerate.
2181
2182 2017-11-15 Martin Liska <mliska@suse.cz>
2183
2184 PR target/82927
2185 * config/sh/sh-mem.cc: Use proper probability for
2186 REG_BR_PROB_NOTE.
2187
2188 2017-11-14 Jeff Law <law@redhat.com>
2189
2190 * explow.c (anti_adjust_stack_and_probe_stack_clash): Avoid probing
2191 the red zone for stack_clash_protection_final_dynamic_probe targets
2192 when the total dynamic stack size is zero bytes.
2193
2194 * tree-ssa-threadupdate.c (thread_through_all_blocks): Thread
2195 blocks is post order.
2196
2197 2017-11-15 Alexandre Oliva <aoliva@redhat.com>
2198
2199 * dumpfile.h (TDF_COMPARE_DEBUG): New.
2200 * final.c (rest_of_clean_state): Set it for the
2201 -fcompare-debug dump.
2202 * tree-pretty-print.c (dump_generic_node): Omit OBJ_TYPE_REF
2203 class when TDF_COMPARE_DEBUG is set.
2204
2205 * dwarf2out.c (gen_producer_string): Discard
2206 OPT_fcompare_debug.
2207
2208 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2209
2210 PR c/81156
2211 * doc/extend.texi (Other Builtins): Document __builtin_tgmath.
2212 * ginclude/tgmath.h (__tg_cplx, __tg_ldbl, __tg_dbl, __tg_choose)
2213 (__tg_choose_2, __tg_choose_3, __TGMATH_REAL_1_2)
2214 (__TGMATH_REAL_2_3): Remove macros.
2215 (__TGMATH_CPLX, __TGMATH_CPLX_2, __TGMATH_REAL, __TGMATH_REAL_2)
2216 (__TGMATH_REAL_3, __TGMATH_CPLX_ONLY): Define using
2217 __builtin_tgmath.
2218 (frexp, ldexp, nexttoward, scalbn, scalbln): Define using
2219 __TGMATH_REAL_2.
2220 (remquo): Define using __TGMATH_REAL_3.
2221
2222 2017-11-14 Jeff Law <law@redhat.com>
2223
2224 * vr-values.c: New file with contents extracted from tree-vrp.c.
2225 * Makefile.in (OBJS): Add vr-values.o
2226 * tree-vrp.h (set_value_range_to_nonnull): Prototype.
2227 (set_value_range, set_and_canonicalize_value_range): Likewise.
2228 (vrp_bitmap_equal_p, range_is_nonnull): Likewise.
2229 (value_range_constant_singleton, symbolic_range_p): Likewise.
2230 (compare_values, compare_values_warnv, vrp_val_is_min): Likewise.
2231 (vrp_val_is_max, copy_value_range, set_value_range_to_value): Likewise.
2232 (extract_range_from_binary_expr_1, vrp_val_min, vrp_val_max): Likewise.
2233 (set_value_range_to_null, range_int_cst_p, opreand_less_p): Likewise.
2234 (find_case_label_range, find_case_label_index): Likewise.
2235 (zero_nonzero_bits_from_vr, overflow_comparison_p): Likewise.
2236 (range_int_cst_singleton_p, value_inside_range): Likewise.
2237 (get_single_symbol): Likewise.
2238 (switch_update): Move structure definition here.
2239 (to_remove_edges, to_update_switch_stmts): Provide externs.
2240 * tree-vrp.c: Move all methods for vr-values class to vr-values.c
2241 (vrp_val_max, vrp_val_min, vrp_val_is_max): Make externally visible.
2242 (vrp_val_is_min, set_value_range): Likewise.
2243 (set_and_canonicalize_value_range, copy_value_range): Likewise.
2244 (set_value_range_to_value, set_value_range_to_nonnull): Likewise.
2245 (set_value_range_to_null, vrp_bitmap_equal_p): Likewise.
2246 (range_is_nonnull, range_int_cst_p): Likewwise.
2247 (range_int_cst_singleton_p, symbolic_range_p): Likewise.
2248 (get_single_symbol, operand_less_p): Likewise
2249 (compare_values_warnv, compare_values): Likewise.
2250 (value_inside_range, value_range_constant_singleton): Likewise.
2251 (zero_nonzero_bitgs_from_vr): Likewise.
2252 (extract_range_from_binary_expr_1): Likewise.
2253 (overflow_comparison_p): Likewise.
2254 (to_remove_edges, to_update_switch_stmts): Likewise.
2255 (find_case_label-index, find_case_label_range): Likewise.
2256 (switch_update, set_value_range_to_nonnegative): Remove.
2257 (set_value_range_to_truthvalue): Likewise.
2258 (symbolic_range_based_on_p, gimple_assign_nonzero_p): Likewise.
2259 (gimple_stmt_nonzero_p, compare_ranges): Likewise.
2260 (compare_range_with_value, vrp_valueize, vrp_valueize_1): Likewise.
2261 (find_case_label_ranges, test_for_singularity): Likewise.
2262 (range_fits_type_p, simplify_conversion_using_ranges): LIkewise.
2263 (x_vr_values): Move to its remaining use site.
2264
2265 2017-11-10 Jeff Law <law@redhat.com>
2266
2267 * vr-values.h (VR_INITIALIZER): Move #define here.
2268 * gimple-ssa-evrp.c: New file with contents extracted from tree-vrp.c
2269 * Makefile.in (OBJS): Add tree-evrp.o
2270 * tree-vrp.h (assert_info): Move structure definition here.
2271 (set_value_range_to_varying): Prototype.
2272 (vrp_operand_equal_p, range_includes_zero_p): Likewise.
2273 (infer_value_range, register_edge_assert_for): Likewise.
2274 (stmt_interesting_for_vrp): Likewise.
2275 * tree-vrp.c: Move all methods for evrp class into gimple-ssa-evrp.c.
2276 (set_value_range_to_varying): No longer static.
2277 (vrp_operand_equal_p, range_includes_zero_p): Likewise.
2278 (infer_value_range, register_edge_assert_for): Likewise.
2279
2280 2017-11-14 Michael Meissner <meissner@linux.vnet.ibm.com>
2281
2282 * config/rs6000/rs6000.md (bswapdi2): On 32-bit ISA 3.0, don't
2283 generate the XXBRD instruction.
2284
2285 * config/rs6000/rs6000-c.c (is_float128_p): New helper function.
2286 (rs6000_builtin_type_compatible): Treat _Float128 and long double
2287 as being compatible if -mabi=ieeelongdouble.
2288 * config/rs6000/rs6000-builtin.def (BU_FLOAT128_HW_1): New macros
2289 to setup float128 built-ins with hardware support.
2290 (BU_FLOAT128_HW_2): Likewise.
2291 (BU_FLOAT128_HW_3): Likewise.
2292 (BU_FLOAT128_HW_VSX_1): Likewise.
2293 (BU_FLOAT128_HW_VSX_2): Likewise.
2294 (scalar_extract_expq): Change float128 built-in functions to
2295 accommodate having both KFmode and TFmode functions. Use the
2296 KFmode variant as the default.
2297 (scalar_extract_sigq): Likewise.
2298 (scalar_test_neg_qp): Likewise.
2299 (scalar_insert_exp_q): Likewise.
2300 (scalar_insert_exp_qp): Likewise.
2301 (scalar_test_data_class_qp): Likewise.
2302 (sqrtf128_round_to_odd): Delete processing the round to odd
2303 built-in functions as special built-in functions, and define them
2304 as float128 built-ins. Use the KFmode variant as the default.
2305 (truncf128_round_to_odd): Likewise.
2306 (addf128_round_to_odd): Likewise.
2307 (subf128_round_to_odd): Likewise.
2308 (mulf128_round_to_odd): Likewise.
2309 (divf128_round_to_odd): Likewise.
2310 (fmaf128_round_to_odd): Likewise.
2311 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
2312 support for KFmode and TFmode xststdcqp calls.
2313 (rs6000_expand_builtin): If long double is IEEE 128-bit floating
2314 point, switch the built-in handlers for the get/set float128
2315 exponent, get float128 mantissa, float128 test built-ins, and the
2316 float128 round to odd built-in functions. Eliminate creating the
2317 float128 round to odd built-in functions as special built-ins.
2318 (rs6000_init_builtins): Eliminate special creation of the float128
2319 round to odd built-in functions.
2320 * config/rs6000/vsx.md (xsxexpqp_<mode>): Change float128 built-in
2321 function insns to support both TFmode and KFmode variants.
2322 (xsxsigqp_<mode>): Likewise.
2323 (xsiexpqpf_<mode>): Likewise.
2324 (xsiexpqp_<mode>): Likewise.
2325 (xststdcqp_<mode>): Likewise.
2326 (xststdcnegqp_<mode>): Likewise.
2327 (xststdcqp_<mode>): Likewise.
2328
2329 2017-11-14 Jan Hubicka <hubicka@ucw.cz>
2330
2331 * tree-ssa-threadupdate.c (compute_path_counts): Remove
2332 unused path_in_freq_ptr parameter.
2333 (ssa_fix_duplicate_block_edges): Do not pass around path_in_freq
2334
2335 2017-11-14 Jan Hubicka <hubicka@ucw.cz>
2336
2337 * ipa-inline.c (edge_badness): Dump sreal frequency.
2338 (compute_inlined_call_time): Match natural implementaiton ...
2339 * ipa-fnsummary.c (estimate_edge_size_and_time): ... here; remove
2340 forgotten division by CGRAPH_FREQ_BASE.
2341
2342 2017-11-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2343
2344 * config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since
2345 Solaris 11. Update comment.
2346 * configure.ac (gcc_cv_ld_pid): Adapt comment for Solaris 12
2347 renaming.
2348 * config/sol2.h (STARTFILE_SPEC): Likewise.
2349 * configure: Regenerate.
2350
2351 2017-11-14 Carl Love <cel@us.ibm.com>
2352
2353 * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Remove
2354 le_ and be_ prefixes to swap* variables. Remove
2355 if (VECTOR_ELT_ORDER_BIG) statement. Remove E_V16QImode case
2356 statements.
2357
2358 2017-11-14 Jason Merrill <jason@redhat.com>
2359
2360 Support GTY((cache)) on hash_map.
2361 * hash-traits.h (ggc_remove): Add ggc_maybe_mx member function.
2362 (ggc_cache_remove): Override it instead of ggc_mx.
2363 * hash-table.h (gt_ggc_mx): Call it instead of ggc_mx.
2364 (gt_cleare_cache): Call ggc_mx instead of gt_ggc_mx.
2365 * hash-map-traits.h (simple_hashmap_traits): Add maybe_mx member.
2366 (simple_cache_map_traits): Override maybe_mx.
2367 * hash-map.h (hash_entry): Add ggc_maybe_mx and keep_cache_entry.
2368 (hash_map): Friend gt_cleare_cache.
2369 (gt_cleare_cache): New.
2370 * tree.h (tree_cache_traits): New hash_map traits class.
2371 (tree_cache_map): New typedef.
2372
2373 2017-11-14 Richard Biener <rguenther@suse.de>
2374
2375 * tree-cfgcleanup.c (cleanup_control_expr_graph): Remove first_p
2376 paramter and handling.
2377 (cleanup_control_flow_bb): Likewise.
2378 (cleanup_control_flow_pre): New helper performing a DFS walk
2379 to call cleanup_control_flow_bb in PRE order.
2380 (cleanup_tree_cfg_1): Do the first phase of cleanup_control_flow_bb
2381 via cleanup_control_flow_pre.
2382
2383 2017-11-14 James Greenhalgh <james.greenhalgh@arm.com>
2384
2385 * config/aarch64/aarch64-simd.md
2386 (aarch64_simd_bsl<mode>_internal): Remove DImode.
2387 (*aarch64_simd_bsl<mode>_alt): Likewise.
2388 (aarch64_simd_bsldi_internal): New.
2389 (aarch64_simd_bsldi_alt): Likewise.
2390
2391 2017-11-13 Jan Hubicka <hubicka@ucw.cz>
2392
2393 * tracer.c (better_p): Do not compare frequencies.
2394 * reg-stack.c (better_edge): Likewise.
2395 * shrink-wrap.c (try_shrink_wrapping): Do not convert to gcov counts
2396 and back.
2397
2398 2017-11-13 Jan Hubicka <hubicka@ucw.cz>
2399
2400 * auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
2401 * cgraphunit.c (cgraph_node::expand_thunk): Use update_max_bb_count.
2402 * ipa-utils.c (ipa_merge_profiles): Use update_max_bb_count.
2403 * lto-streamer-in.c (input_function): Use update_max_bb_count.
2404 * omp-expand.c (expand_omp_taskreg): Use update_max_bb_count.
2405 * predict.c (maybe_hot_frequency_p): Inline to ...
2406 (maybe_hot_count_p): ... here; rewrite to counts.
2407 (counts_to_freqs): Rename to ...
2408 (update_max_bb_count): ... this one.
2409 (expensive_function_p): Use counts.
2410 (estimate_bb_frequencies): Update.
2411 (rebuild_frequencies): Update.
2412 * predict.h (counts_to_freqs): Rename to ...
2413 (update_max_bb_count): ... this one.
2414 * profile.c (compute_branch_probabilities): Add debug info
2415 * tree-inline.c (expand_call_inline): Update debug info.
2416 (optimize_inline_calls): Use update_max_bb_count..
2417 (tree_function_versioning): Use update_max_bb_count..
2418 * value-prof.c (gimple_value_profile_transformations):
2419 Do not use update_max_bb_count.
2420
2421 2017-11-13 Jan Hubicka <hubicka@ucw.cz>
2422
2423 * ipa-inline.c (compute_uninlined_call_time, compute_inlined_call_time):
2424 always use frequencies.
2425
2426 2017-11-13 Jan Hubicka <hubicka@ucw.cz>
2427
2428 * bb-reorder.c: Remove frequencies from comments.
2429 (better_edge_p): Use profile counts.
2430 (find_traces): Dump profile counts.
2431 (rotate_loop): Use profile counts.
2432 (find_traces_1_round): Likewise.
2433 (connect_better_edge_p): Use counts instead of probabilities for
2434 reverse walk.
2435 (copy_bb_p): Drop early check for non-0 frequency.
2436 (sanitize_hot_paths): Update comments.
2437
2438 2017-11-13 Jan Hubicka <hubicka@ucw.cz>
2439
2440 * ipa-split.c (struct split_point): Add count.
2441 (consider_split): Do not compute incoming frequency; compute incoming
2442 count and store it to split_point.
2443 (split_function): Set count of the call to split part correctly.
2444
2445 2017-11-13 Carl Love <cel@us.ibm.com>
2446
2447 * config/rs6000/altivec.md (altivec_vsumsws_be): Add define_expand.
2448
2449 2017-11-13 Tom Tromey <tom@tromey.com>
2450
2451 * doc/cpp.texi (Variadic Macros): Document __VA_OPT__.
2452
2453 2017-11-13 Carl Love <cel@us.ibm.com>
2454
2455 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins):
2456 Add support for builtins:
2457 unsigned int vec_first_{,miss}_match_{,or_eos}index,
2458 vector {un,}signed {char,int,short},
2459 vector {un,}signed {char,int,short}) arguments.
2460 * config/rs6000/rs6000-builtin.def (VFIRSTMATCHINDEX,
2461 VFIRSTMATCHOREOSINDEX, VFIRSTMISMATCHINDEX, VFIRSTMISMATCHOREOSINDEX):
2462 Add BU_P9V_AV_2 expansions for the builtins.
2463 * config/rs6000/altivec.h (vec_first_match_index,
2464 vec_first_mismatch_index, vec_first_match_or_eos_index,
2465 vec_first_mismatch_or_eos_index): Add #defines for the builtins.
2466 * config/rs6000/rs6000-protos.h (bytes_in_mode): Add
2467 new extern declaration.
2468 * config/rs6000/rs6000.c (bytes_in_mode): Add new function.
2469 * config/rs6000/vsx.md (first_match_index_<mode>,
2470 first_match_or_eos_index_<mode>, first_mismatch_index_<mode>,
2471 first_mismatch_or_eos_index_<mode>): Add define expand.
2472 (vctzlsbb_<mode>): Add mode field to define_insn for vctzlsbb.
2473 * doc/extend.texi: Update the built-in documenation file for the new
2474 built-in functions.
2475
2476 2017-11-13 Michael Meissner <meissner@linux.vnet.ibm.com>
2477
2478 * match.pd: Convert fminf<N>, fminf<N>x, fmax<N>, and fmax<N>x
2479 into the min/max operations for _Float<N> and _Float<N>X types.
2480
2481 2017-11-13 Eric Botcazou <ebotcazou@adacore.com>
2482
2483 PR lto/81351
2484 * dwarf2out.c (do_eh_frame): New static variable.
2485 (dwarf2out_begin_prologue): Set it.
2486 (dwarf2out_frame_finish): Test it instead of dwarf2out_do_eh_frame.
2487
2488 2017-11-13 Jan Hubicka <hubicka@ucw.cz>
2489
2490 * tree-ssa-coalesce.c (coalesce_cost): Fix formating.
2491
2492 * tree-ssa-sink.c (select_best_block): Do not use frequencies.
2493
2494 2017-11-13 Eric Botcazou <ebotcazou@adacore.com>
2495
2496 PR lto/81351
2497 * debug.h (dwarf2out_do_eh_frame): Declare.
2498 * dwarf2cfi.c (dwarf2out_do_eh_frame): New predicate.
2499 (dwarf2out_do_frame): Use it.
2500 (dwarf2out_do_cfi_asm): Likewise.
2501 * dwarf2out.c (dwarf2out_frame_finish): Likewise.
2502 (dwarf2out_assembly_start): Likewise.
2503 (dwarf2out_begin_prologue): Fix comment.
2504 * toplev.c (compile_file): Always call dwarf2out_frame_finish
2505 if the target needs either debug or unwind DWARF2 info.
2506 * lto-opts.c (lto_write_options): Do not save -fexceptions,
2507 -fnon-call-exceptions, -ffp-contract, -fmath-errno, -fsigned-zeros,
2508 -ftrapping-math, -ftrapv and -fwrapv.
2509
2510 2017-11-13 Jan Hubicka <hubicka@ucw.cz>
2511
2512 * cgraph.c (cgraph_edge::sreal_frequency): New function.
2513 * cgraph.h (cgraph_edge::sreal_frequency): Declare.
2514 * ipa-fnsummary.c (dump_ipa_call_summary): Use sreal_frequency.
2515 (estimate_edge_size_and_time): Likewise.
2516 (ipa_merge_fn_summary_after_inlining): Likewise.
2517 * ipa-inline.c (cgraph_freq_base_rec): Remove.
2518 (compute_uninlined_call_time): Use sreal_frequency.
2519 (compute_inlined_call_time): Likewise.
2520 (ipa_inline): Do not initialize cgraph_freq_base_rec.
2521 * profile-count.c: Include sreal.h.
2522 (profile_count::to_sreal_scale): New.
2523 * profile-count.h: Forward declare sreal.
2524 (profile_count::to_sreal_scale): Declare.
2525
2526 2017-11-13 Nathan Sidwell <nathan@acm.org>
2527
2528 * diagnostic.c (maybe_line_and_column): New.
2529 (diagnostic_get_location_text): Use it.
2530 (diagnostic_report_current_module): Likewise.
2531 (test_diagnostic_get_location_text): Add tests.
2532
2533 2017-11-13 Luis Machado <luis.machado@linaro.org>
2534
2535 * doc/md.texi (Specifying processor pipeline description): Fix
2536 incorrect latency for the div instruction example.
2537
2538 2017-11-13 Jakub Jelinek <jakub@redhat.com>
2539
2540 PR tree-optimization/78821
2541 * gimple-ssa-store-merging.c (compatible_load_p): Don't require
2542 that bit_not_p is the same.
2543 (imm_store_chain_info::coalesce_immediate_stores): Likewise.
2544 (split_group): Count precisely bit_not_p bits in each statement.
2545 (invert_op): New function.
2546 (imm_store_chain_info::output_merged_store): Use invert_op to
2547 emit BIT_XOR_EXPR with a xor_mask instead of BIT_NOT_EXPR if some
2548 but not all orig_stores have BIT_NOT_EXPR in the corresponding spots.
2549
2550 2017-11-13 Martin Liska <mliska@suse.cz>
2551
2552 * gcov.c (struct coverage_info): Remove typedef of coverage_t.
2553 (struct source_info): Likewise.
2554 (add_branch_counts): Likewise.
2555 (add_line_counts): Likewise.
2556 (function_summary): Likewise.
2557 (output_intermediate_line): Likewise.
2558 (generate_results): Likewise.
2559
2560 2017-11-13 Martin Liska <mliska@suse.cz>
2561
2562 * gcov.c (struct block_info): Remove typedef for block_t.
2563 (struct line_info): Likewise.
2564 (line_info::has_block): Likewise.
2565 (EXIT_BLOCK): Likewise.
2566 (unblock): Likewise.
2567 (circuit): Likewise.
2568 (get_cycles_count): Likewise.
2569 (process_file): Likewise.
2570 (read_graph_file): Likewise.
2571 (solve_flow_graph): Likewise.
2572 (find_exception_blocks): Likewise.
2573 (add_line_counts): Likewise.
2574 (accumulate_line_info): Likewise.
2575 (output_line_details): Likewise.
2576
2577 2017-11-13 Martin Liska <mliska@suse.cz>
2578
2579 * gcov.c (struct arc_info): Remove typedef for arc_t.
2580 (struct line_info): Likewise.
2581 (add_branch_counts): Likewise.
2582 (output_branch_count): Likewise.
2583 (function_info::~function_info): Likewise.
2584 (circuit): Likewise.
2585 (output_intermediate_line): Likewise.
2586 (read_graph_file): Likewise.
2587 (solve_flow_graph): Likewise.
2588 (find_exception_blocks): Likewise.
2589 (add_line_counts): Likewise.
2590 (accumulate_line_info): Likewise.
2591 (output_line_details): Likewise.
2592 (output_function_details): Likewise.
2593
2594 2017-11-13 Martin Liska <mliska@suse.cz>
2595
2596 * gcov.c (struct function_info): Remove typedef for function_t.
2597 (struct source_info): Likewise.
2598 (source_info::get_functions_at_location): Likewise.
2599 (solve_flow_graph): Likewise.
2600 (find_exception_blocks): Likewise.
2601 (add_line_counts): Likewise.
2602 (output_intermediate_file): Likewise.
2603 (process_file): Likewise.
2604 (generate_results): Likewise.
2605 (release_structures): Likewise.
2606 (read_graph_file): Likewise.
2607 (read_count_file): Likewise.
2608 (accumulate_line_counts): Likewise.
2609 (output_lines): Likewise.
2610
2611 2017-11-13 Martin Liska <mliska@suse.cz>
2612
2613 * gcov.c (function_info::function_info): Remove num_counts
2614 and add vector<gcov_type>.
2615 (function_info::~function_info): Use the vector.
2616 (process_file): Likewise.
2617 (read_graph_file): Likewise.
2618 (read_count_file): Likewise.
2619 (solve_flow_graph): Likewise.
2620
2621 2017-11-13 Martin Liska <mliska@suse.cz>
2622
2623 * gcov.c (function_info::is_artificial): New function.
2624 (process_file): Erase all artificial early.
2625 (generate_results): Skip as all artificial are already
2626 removed.
2627
2628 2017-11-13 Martin Liska <mliska@suse.cz>
2629
2630 * gcov.c (read_graph_file): Store to global vector of functions.
2631 (read_count_file): Iterate the vector.
2632 (process_file): Likewise.
2633 (generate_results): Likewise.
2634 (release_structures): Likewise.
2635
2636 2017-11-13 Jakub Jelinek <jakub@redhat.com>
2637
2638 PR tree-optimization/82954
2639 * gimple-ssa-store-merging.c
2640 (imm_store_chain_info::coalesce_immediate_stores): If
2641 !infof->ops[N].base_addr, split group if info->ops[N].base_addr.
2642
2643 2017-11-13 Richard Sandiford <richard.sandiford@linaro.org>
2644
2645 * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
2646 Upddate call to ENDIAN_LANE_N.
2647 (aarch64_<sur>dot_lane<vsi2qi>): Use aarch64_endian_lane_rtx.
2648 (aarch64_<sur>dot_laneq<vsi2qi>): Likewise.
2649 (*aarch64_simd_vec_copy_lane<mode>): Update calls to ENDIAN_LANE_N
2650 and use aarch64_endian_lane_rtx.
2651 (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Likewise.
2652
2653 2017-11-12 Tom de Vries <tom@codesourcery.com>
2654
2655 * config/riscv/riscv.h (ASM_OUTPUT_LABELREF): Wrap in do {} while (0).
2656
2657 2017-11-12 Tom de Vries <tom@codesourcery.com>
2658
2659 * config/elfos.h (ASM_OUTPUT_ASCII): Remove semicolon after macro body.
2660
2661 2017-11-12 Tom de Vries <tom@codesourcery.com>
2662
2663 * config/cr16/cr16.h (ASM_OUTPUT_LABELREF): Remove semicolon after macro
2664 body.
2665 * config/powerpcspe/xcoff.h (ASM_OUTPUT_LABELREF): Same.
2666 * config/rs6000/xcoff.h (ASM_OUTPUT_LABELREF): Same.
2667 * defaults.h (ASM_OUTPUT_LABELREF): Same.
2668
2669 2017-11-11 Martin Sebor <msebor@redhat.com>
2670
2671 PR c/81117
2672 * doc/extend.texi (attribute nonstring): Remove spurious argument.
2673
2674 PR bootstrap/82948
2675 * prefic.c (translate_name): Replace strncpy with memcpy to
2676 avoid -Wstringop-truncation.
2677
2678 2017-11-10 Jan Hubicka <hubicka@ucw.cz>
2679
2680 * tree-ssa-loop-im.c (execute_sm_if_changed): Do not compute freq_sum.
2681
2682 2017-11-10 Jan Hubicka <hubicka@ucw.cz>
2683
2684 * predict.c (maybe_hot_frequency_p): Do not use cfun.
2685
2686 2017-11-10 Jan Hubicka <hubicka@ucw.cz>
2687
2688 * tree-ssa-tail-merge.c (replace_block_by): Fix and re-enable profile
2689 merging.
2690
2691 2017-11-10 Michael Meissner <meissner@linux.vnet.ibm.com>
2692
2693 * config/rs6000/rs6000.md (bswaphi2_reg): On ISA 3.0 systems,
2694 enable generating XXBRH if the value is in a vector register.
2695 (bswapsi2_reg): On ISA 3.0 systems, enable generating XXBRW if the
2696 value is in a vector register.
2697 (bswapdi2_reg): On ISA 3.0 systems, always use XXBRD to do
2698 register to register bswap64's instead of doing the GPR sequence
2699 used on previous machines.
2700 (bswapdi2_xxbrd): New insn.
2701 (bswapdi2_reg): Disallow on ISA 3.0.
2702 (register to register bswap64 splitter): Do not split the insn on
2703 ISA 3.0 systems that use XXBRD.
2704
2705 2017-11-10 Martin Sebor <msebor@redhat.com>
2706
2707 PR c/81117
2708 * config/darwin-c.c (framework_construct_pathname): Replace strncpy
2709 with memcpy.
2710 (find_subframework_file): Same.
2711
2712 2017-11-10 Jan Hubicka <hubicka@ucw.cz>
2713
2714 * auto-profile.c (afdo_indirect_call): Drop frequency.
2715 * cgraph.c (symbol_table::create_edge): Drop frequency argument.
2716 (cgraph_node::create_edge): Drop frequency argument.
2717 (cgraph_node::create_indirect_edge): Drop frequency argument.
2718 (cgraph_edge::make_speculative): Drop frequency arguments.
2719 (cgraph_edge::resolve_speculation): Do not update frequencies
2720 (cgraph_edge::dump_edge_flags): Do not dump frequency.
2721 (cgraph_node::dump): Check consistency in IPA mode.
2722 (cgraph_edge::maybe_hot_p): Use IPA counter.
2723 (cgraph_edge::verify_count_and_frequency): Rename to ...
2724 (cgraph_edge::verify_count): ... this one; drop frequency checking.
2725 (cgraph_node::verify_node): Update.
2726 * cgraph.h (struct cgraph_edge): Drop frequency.
2727 (cgraph_edge::frequency): New function.
2728 * cgraphbuild.c (pass_build_cgraph_edges::execute): Donot pass
2729 frequencies.
2730 (cgraph_edge::rebuild_edges): Likewise.
2731 * cgraphclones.c (cgraph_edge::clone): Scale only counts.
2732 (duplicate_thunk_for_node): Do not pass frequency.
2733 (cgraph_node::create_clone): Scale only counts.
2734 (cgraph_node::create_virtual_clone): Do not pass frequency.
2735 (cgraph_node::create_edge_including_clones): Do not pass frequency.
2736 (cgraph_node::create_version_clone): Do not pass frequency.
2737 * cgraphunit.c (cgraph_node::analyze): Do not pass frequency.
2738 (cgraph_node::expand_thunk): Do not pass frequency.
2739 (cgraph_node::create_wrapper): Do not pass frequency.
2740 * gimple-iterator.c (update_call_edge_frequencies): Do not pass
2741 frequency.
2742 * gimple-streamer-in.c (input_bb): Scale only IPA counts.
2743 * ipa-chkp.c (chkp_produce_thunks): Do not pass frequency.
2744 * ipa-cp.c (ipcp_lattice::print): Use frequency function.
2745 (gather_caller_stats): Use frequency function.
2746 (ipcp_cloning_candidate_p): Use frequency function.
2747 (ipcp_propagate_stage): Use frequency function.
2748 (get_info_about_necessary_edges): Use frequency function.
2749 (update_profiling_info): Update only IPA profile.
2750 (update_specialized_profile): Use frequency functoin.
2751 (perhaps_add_new_callers): Update only IPA profile.
2752 * ipa-devirt.c (ipa_devirt): Use IPA profile.
2753 * ipa-fnsummary.c (redirect_to_unreachable): Do not set frequrency.
2754 (dump_ipa_call_summary): Use frequency function.
2755 (estimate_edge_size_and_time): Use frequency function.
2756 (ipa_merge_fn_summary_after_inlining): Use frequency function.
2757 * ipa-inline-analysis.c (do_estimate_edge_time): Use IPA profile.
2758 * ipa-inline-transform.c (update_noncloned_frequencies): Rename to ..
2759 (update_noncloned_counts): ... ths one; scale counts only.
2760 (clone_inlined_nodes): Do not scale frequency.
2761 (inline_call): Do not pass frequency.
2762 * ipa-inline.c (compute_uninlined_call_time): Use IPA profile.
2763 (compute_inlined_call_time): Use IPA profile.
2764 (want_inline_small_function_p): Use IPA profile.
2765 (want_inline_self_recursive_call_p): Use IPA profile.
2766 (edge_badness): Use IPA profile.
2767 (lookup_recursive_calls): Use IPA profile.
2768 (recursive_inlining): Do not pass frequency.
2769 (resolve_noninline_speculation): Do not update frequency.
2770 (inline_small_functions): Collect max of IPA profile.
2771 (dump_overall_stats): Dump IPA porfile.
2772 (dump_inline_stats): Dump IPA porfile.
2773 (ipa_inline): Collect IPA stats.
2774 * ipa-inline.h (clone_inlined_nodes): Update prototype.
2775 * ipa-profile.c (ipa_propagate_frequency_1): Use frequency function.
2776 (ipa_propagate_frequency): Use frequency function.
2777 (ipa_profile): Cleanup.
2778 * ipa-prop.c (ipa_make_edge_direct_to_target): Do not pass frequency
2779 * ipa-utils.c (ipa_merge_profiles): Merge all profiles.
2780 * lto-cgraph.c (lto_output_edge): Do not stream frequency.
2781 (input_node): Do not stream frequency.
2782 (input_edge): Do not stream frequency.
2783 (merge_profile_summaries): Scale only IPA profiles.
2784 * omp-simd-clone.c (simd_clone_adjust): Do not pass frequency.
2785 * predict.c (drop_profile): Do not recompute frequency.
2786 * trans-mem.c (ipa_tm_insert_irr_call): Do not pass frequency.
2787 (ipa_tm_insert_gettmclone_call): Do not pass frequency.
2788 * tree-cfg.c (execute_fixup_cfg): Drop profile to global0 if needed.
2789 * tree-chkp.c (chkp_copy_bounds_for_assign): Do not pass frequency.
2790 * tree-emutls.c (gen_emutls_addr): Do not pass frequency.
2791 * tree-inline.c (copy_bb): Do not scale frequency.
2792 (expand_call_inline): Do not scale frequency.
2793 (tree_function_versioning): Do not scale frequency.
2794 * ubsan.c (ubsan_create_edge): Do not pass frequency.
2795
2796 2017-11-10 Julia Koval <julia.koval@intel.com>
2797
2798 * config/i386/gfniintrin.h (_mm_gf2p8affine_epi64_epi8)
2799 (_mm256_gf2p8affine_epi64_epi8, _mm_mask_gf2p8affine_epi64_epi8)
2800 (_mm_maskz_gf2p8affine_epi64_epi8, _mm256_mask_gf2p8affine_epi64_epi8)
2801 (_mm256_maskz_gf2p8affine_epi64_epi8)
2802 (_mm512_mask_gf2p8affine_epi64_epi8, _mm512_gf2p8affine_epi64_epi8)
2803 (_mm512_maskz_gf2p8affine_epi64_epi8): New intrinsics.
2804 * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineqb_v64qi)
2805 (__builtin_ia32_vgf2p8affineqb_v32qi)
2806 (__builtin_ia32_vgf2p8affineqb_v16qi): New builtins.
2807 * config/i386/sse.md (vgf2p8affineqb_<mode><mask_name>): New pattern.
2808
2809 2017-11-10 Tamar Christina <tamar.christina@arm.com>
2810
2811 PR target/82641
2812 * config/arm/arm.c
2813 (arm_option_override): Refactor.
2814 (arm_option_reconfigure_globals): New.
2815 (arm_options_perform_arch_sanity_checks): New.
2816 * config/arm/arm-protos.h (arm_option_reconfigure_globals):
2817 New prototype.
2818 (arm_options_perform_arch_sanity_checks): Likewise
2819
2820 2017-11-10 Pat Haugen <pthaugen@us.ibm.com>
2821
2822 * rs6000/power9.md (power9-qpdiv): Correct DFU pipe usage.
2823 (power9-qpmul): New.
2824 * rs6000/rs6000.md ("type" attr): Add qmul.
2825 (mul<mode>3, fma<mode>4_hw, *fms<mode>4_hw, *nfma<mode>4_hw,
2826 *nfms<mode>4_hw, mul<mode>3_odd, fma<mode>4_odd, *fms<mode>4_odd,
2827 *nfma<mode>4_odd, *nfms<mode>4_odd): Change type to qmul.
2828
2829 2017-11-10 Martin Sebor <msebor@redhat.com>
2830
2831 PR c/81117
2832 * builtins.c (compute_objsize): Handle arrays that
2833 compute_builtin_object_size likes to fail for. Make extern.
2834 * builtins.h (compute_objsize): Declare.
2835 (check_strncpy_sizes): New function.
2836 (expand_builtin_strncpy): Call check_strncpy_sizes.
2837 * gimple-fold.c (gimple_fold_builtin_strncpy): Implement
2838 -Wstringop-truncation.
2839 (gimple_fold_builtin_strncat): Same.
2840 * gimple.c (gimple_build_call_from_tree): Set call location.
2841 * tree-ssa-strlen.c (strlen_to_stridx): New global variable.
2842 (maybe_diag_bound_equal_length, is_strlen_related_p): New functions.
2843 (handle_builtin_stxncpy, handle_builtin_strncat): Same.
2844 (handle_builtin_strlen): Use strlen_to_stridx.
2845 (strlen_optimize_stmt): Handle flavors of strncat, strncpy, and
2846 stpncpy.
2847 Use strlen_to_stridx.
2848 (pass_strlen::execute): Release strlen_to_stridx.
2849 * doc/invoke.texi (-Wsizeof-pointer-memaccess): Document enhancement.
2850 (-Wstringop-truncation): Document new option.
2851
2852 2017-11-10 Martin Liska <mliska@suse.cz>
2853
2854 PR gcov-profile/82702
2855 * gcov.c (main): Handle intermediate files in a different
2856 way.
2857 (get_gcov_intermediate_filename): New function.
2858 (output_gcov_file): Remove support of intermediate files.
2859 (generate_results): Allocate intermediate file.
2860 (release_structures): Clean-up properly fn_end.
2861 (output_intermediate_file): Start iterating with line 1.
2862
2863 2017-11-10 Jakub Jelinek <jakub@redhat.com>
2864
2865 PR tree-optimization/82929
2866 * gimple-ssa-store-merging.c (struct store_immediate_info): Add
2867 ops_swapped_p non-static data member.
2868 (store_immediate_info::store_immediate_info): Clear it.
2869 (imm_store_chain_info::coalesce_immediate_stores): If swapping
2870 ops set ops_swapped_p.
2871 (count_multiple_uses): Handle ops_swapped_p.
2872
2873 2017-11-10 Martin Liska <mliska@suse.cz>
2874
2875 * coverage.c (coverage_init): Stream information about
2876 support of has_unexecuted_blocks.
2877 * doc/gcov.texi: Document that.
2878 * gcov-dump.c (dump_gcov_file): Support it in gcov_dump tool.
2879 * gcov.c (read_graph_file): Likewise.
2880 (output_line_beginning): Fix a small issue with
2881 color output.
2882
2883 2017-11-10 Bin Cheng <bin.cheng@arm.com>
2884
2885 * tree-predcom.c (determine_roots_comp): Avoid memory leak by freeing
2886 reference of trivial component.
2887
2888 2017-11-10 Jakub Jelinek <jakub@redhat.com>
2889
2890 PR bootstrap/82916
2891 * gimple-ssa-store-merging.c
2892 (pass_store_merging::terminate_all_aliasing_chains): For
2893 gimple_store_p stmts also call refs_output_dependent_p.
2894
2895 PR rtl-optimization/82913
2896 * compare-elim.c (try_merge_compare): Punt if def_insn is not
2897 single set.
2898
2899 2017-11-09 Jeff Law <law@redhat.com>
2900
2901 * vr-values.h: New file with vr_values class.
2902 * tree-vrp.c: Include vr-values.h
2903 (vrp_value_range_pool, vrp_equiv_obstack, num_vr_values): Move static
2904 data objects into the vr_values class.
2905 (vr_value, values_propagated, vr_phi_edge_counts): Likewise.
2906 (get_value_range): Make it a member function within vr_values class.
2907 (set_defs_to_varying, update_value_range, add_equivalence): Likewise.
2908 (vrp_stmt_computes_nonzero_p, op_with_boolean_value_range_p): Likewise.
2909 (op_with_constant_singleton_value_range): Likewise.
2910 (extract_range_for_var_from_comparison_expr): Likewise.
2911 (extract_range_from_assert, extract_range_from_ssa_name): Likewise.
2912 (extract_range_from_binary_expr): Likewise.
2913 (extract_range_from_unary_expr): Likewise.
2914 (extract_range_from_cond_expr, extrat_range_from_comparison): Likewise.
2915 (check_for_binary_op_overflow, extract_range_basic): Likewise.
2916 (extract_range_from_assignment, adjust_range_with_scev): Likewise.
2917 (dump_all_value_ranges, get_vr_for_comparison): Likewise.
2918 (compare_name_with_value, compare_names): Likewise.
2919 (vrp_evaluate_conditional_warnv_with_ops_using_ranges): Likewise.
2920 (vrp_evaluate_conditional_warnv_with_ops): Likewise. Remove prototype.
2921 (vrp_evaluate_conditional, vrp_visit_cond_stmt): Likewise.
2922 (vrp_visit_switch_stmt, extract_range_from_stmt): Likewise.
2923 (extract_range_from_phi_node): Likewise.
2924 (simplify_truth_ops_using_ranges): Likewise.
2925 (simplify_div_or_mod_using_ranges): Likewise.
2926 (simplify_min_or_max_using_ranges, simplify_abs_using_ranges): Likewise.
2927 (simplify_bit_ops_using_ranges, simplify_cond_using_ranges_1): Likewise.
2928 (simplify_cond_using_ranges_2, simplify_switch_using_ranges): Likewise.
2929 (simplify_float_conversion_using_ranges): Likewise.
2930 (simplify_internal_call_using_ranges): Likewise.
2931 (two_valued_val_range_p, simplify_stmt_using_ranges): Likewise.
2932 (vrp_visit_assignment_or_call): Likewise. Smuggle class instance
2933 poitner via x_vr_values for calls into gimple folder.
2934 (vrp_initialize_lattice): Make this the vr_values ctor.
2935 (vrp_free_lattice): Make this the vr_values dtor.
2936 (set_vr_value): New function.
2937 (class vrp_prop): Add vr_values data member. Add various member
2938 functions as well as member functions that delegate to vr_values.
2939 (check_array_ref): Make a member function within vrp_prop class.
2940 (search_for_addr_array, vrp_initialize): Likewise.
2941 (vrp_finalize): Likewise. Revamp to avoid direct access to
2942 vr_value, values_propagated, etc.
2943 (check_array_bounds): Extract vrp_prop class instance pointer from
2944 walk info structure. Use it to call member functions.
2945 (check_all_array_refs): Make a member function within vrp_prop class.
2946 Smuggle class instance pointer via walk info structure.
2947 (x_vr_values): New local static.
2948 (vrp_valueize): Use x_vr_values to get class instance.
2949 (vr_valueize_1): Likewise.
2950 (class vrp_folder): Add vr_values data member. Add various member
2951 functions as well as member functions that delegate to vr_values.
2952 (fold_predicate_in): Make a mber fucntion within vrp_folder class.
2953 (simplify_stmt_for_jump_threading): Extract smuggled vr_values
2954 class instance from vr_values. Use it to call member functions.
2955 (vrp_dom_walker): Add vr_values data member.
2956 (vrp_dom_walker::after_dom_children): Smuggle vr_values class
2957 instance via x_vr_values.
2958 (identify_jump_threads): Accept vr_values as argument. Store
2959 it into the walker structure.
2960 (evrp_dom_walker): Add vr_values class data member. Add various
2961 delegators.
2962 (evrp_dom_walker::try_find_new_range): Use vr_values data
2963 member to access the memory allocator.
2964 (evrp_dom_walker::before_dom_children): Store vr_values class
2965 instance into the vrp_folder class.
2966 (evrp_dom_walker::push_value_range): Rework to avoid direct
2967 access to num_vr_values and vr_value.
2968 (evrp_dom_walker::pop_value_range): Likewise.
2969 (execute_early_vrp): Remove call to vrp_initialize_lattice.
2970 Use vr_values to get to dump_all_value_ranges member function.
2971 Remove call to vrp_free_lattice. Call vrp_initialize, vrp_finalize,
2972 and simplify_cond_using_ranges_2 via vrp_prop class instance.
2973 Pass vr_values class instance down to identify_jump_threads.
2974 Remove call to vrp_free_lattice.
2975 (debug_all_value_ranges): Remove.
2976
2977 * tree-vrp.c (vrp_prop): Move class to earlier point in the file.
2978 (vrp_folder): Likewise.
2979
2980 * tree-vrp.c (set_value_range): Do not reference vrp_equiv_obstack.
2981 Get it from the existing bitmap instead.
2982 (vrp_intersect_ranges_1): Likewise.
2983
2984 2017-11-09 Jakub Jelinek <jakub@redhat.com>
2985
2986 * gimple-ssa-store-merging.c (struct store_immediate_info): Add
2987 bit_not_p field.
2988 (store_immediate_info::store_immediate_info): Add bitnotp argument,
2989 set bit_not_p to it.
2990 (imm_store_chain_info::coalesce_immediate_stores): Break group
2991 if bit_not_p is different.
2992 (count_multiple_uses, split_group,
2993 imm_store_chain_info::output_merged_store): Handle info->bit_not_p.
2994 (handled_load): Avoid multiple chained BIT_NOT_EXPRs.
2995 (pass_store_merging::process_store): Handle BIT_{AND,IOR,XOR}_EXPR
2996 result inverted using BIT_NOT_EXPR, compute bit_not_p, pass it
2997 to store_immediate_info ctor.
2998
2999 2017-11-09 Jim Wilson <jimw@sifive.com>
3000
3001 * collect2.c (OBJECT_FORMAT_COFF): Remove EXTENDED_COFF support.
3002 (scan_prog_file): Likewise.
3003
3004 2017-11-09 Jan Hubicka <hubicka@ucw.cz>
3005
3006 * bb-reorder.c (max_entry_frequency): Remove.
3007 (find_traces, rotate_loop, mark_bb_visited, connect_better_edge_p,
3008 connect_traces, push_to_next_round_p): Remove prototypes.
3009 (find_traces_1_round): Use counts only.
3010 (push_to_next_round_p): Likewise.
3011 (find_traces): Likewise.
3012 (rotate_loop): Likewise.
3013 (find_traces_1_round): Likewise.
3014 (connect_traces): Likewise.
3015 (edge_order): Likewise.
3016
3017 2017-11-09 Thomas Preud'homme <thomas.preudhomme@arm.com>
3018
3019 * config/arm/arm.c (output_return_instruction): Add comments to
3020 indicate requirement for cmse_nonsecure_entry return to account
3021 for the size of clearing instruction output here.
3022 (thumb_exit): Likewise.
3023 * config/arm/thumb2.md (thumb2_cmse_entry_return): Fix length for
3024 return in hardfloat mode.
3025
3026 2017-11-09 Segher Boessenkool <segher@kernel.crashing.org>
3027
3028 * config/rs6000/rs6000.c (machine_function): Add a bool,
3029 "toc_is_wrapped_separately".
3030 (rs6000_option_override_internal): Enable OPTION_MASK_SAVE_TOC_INDIRECT
3031 if it wasn't explicitly set or unset, we are optimizing for speed, and
3032 doing separate shrink-wrapping.
3033 (rs6000_get_separate_components): Enable the TOC component if
3034 saving the TOC register in the prologue.
3035 (rs6000_components_for_bb): Handle the TOC component.
3036 (rs6000_emit_prologue_components): Store the TOC register where needed.
3037 (rs6000_set_handled_components): Mark TOC as handled, if handled.
3038 (rs6000_emit_prologue): Don't save the TOC if that is already done.
3039
3040 2017-11-09 Martin Jambor <mjambor@suse.cz>
3041
3042 * ipa-param-manipulation.c: New file.
3043 * ipa-param-manipulation.h: Likewise.
3044 * Makefile.in (OBJS): Add ipa-param-manipulation.o.
3045 (PLUGIN_HEADERS): Addded ipa-param-manipulation.h
3046 * ipa-param.h (ipa_parm_op): Moved to ipa-param-manipulation.h.
3047 (ipa_parm_adjustment): Likewise.
3048 (ipa_parm_adjustment_vec): Likewise.
3049 (ipa_get_vector_of_formal_parms): Moved declaration to
3050 ipa-param-manipulation.h.
3051 (ipa_get_vector_of_formal_parm_types): Likewise.
3052 (ipa_modify_formal_parameters): Likewise.
3053 (ipa_modify_call_arguments): Likewise.
3054 (ipa_combine_adjustments): Likewise.
3055 (ipa_dump_param_adjustments): Likewise.
3056 (ipa_modify_expr): Likewise.
3057 (ipa_get_adjustment_candidate): Likewise.
3058 * ipa-prop.c (ipa_get_vector_of_formal_parms): Moved to
3059 ipa-param-manipulation.c.
3060 (ipa_get_vector_of_formal_parm_types): Likewise.
3061 (ipa_modify_formal_parameters): Likewise.
3062 (ipa_modify_call_arguments): Likewise.
3063 (ipa_modify_expr): Likewise.
3064 (get_ssa_base_param): Likewise.
3065 (ipa_get_adjustment_candidate): Likewise.
3066 (index_in_adjustments_multiple_times_p): Likewise.
3067 (ipa_combine_adjustments): Likewise.
3068 (ipa_dump_param_adjustments): Likewise.
3069 * tree-sra.c: Also include ipa-param-manipulation.h
3070 * omp-simd-clone.c: Include ipa-param-manipulation.h instead of
3071 ipa-param.h.
3072
3073 2017-11-09 Richard Sandiford <richard.sandiford@linaro.org>
3074 Alan Hayward <alan.hayward@arm.com>
3075 David Sherwood <david.sherwood@arm.com>
3076
3077 * doc/sourcebuild.texi (vect_masked_store): Document.
3078
3079 2017-11-09 Richard Sandiford <richard.sandiford@linaro.org>
3080 Alan Hayward <alan.hayward@arm.com>
3081 David Sherwood <david.sherwood@arm.com>
3082
3083 * doc/sourcebuild.texi (vect_align_stack_vars): Document.
3084
3085 2017-11-09 Richard Sandiford <richard.sandiford@linaro.org>
3086 Alan Hayward <alan.hayward@arm.com>
3087 David Sherwood <david.sherwood@arm.com>
3088
3089 * doc/sourcebuild.texi (vect_variable_length): Document.
3090
3091 2017-11-09 Richard Sandiford <richard.sandiford@linaro.org>
3092 Alan Hayward <alan.hayward@arm.com>
3093 David Sherwood <david.sherwood@arm.com>
3094
3095 * doc/sourcebuild.texi (vect_unaligned_possible): Document.
3096
3097 2017-11-09 Richard Sandiford <richard.sandiford@linaro.org>
3098 Alan Hayward <alan.hayward@arm.com>
3099 David Sherwood <david.sherwood@arm.com>
3100
3101 * doc/sourcebuild.texi (vect_element_align_preferred): Document.
3102
3103 2017-11-09 Richard Sandiford <richard.sandiford@linaro.org>
3104 Alan Hayward <alan.hayward@arm.com>
3105 David Sherwood <david.sherwood@arm.com>
3106
3107 * doc/sourcebuild.texi (vect_perm_short, vect_perm_byte): Document
3108 previously undocumented selectors.
3109 (vect_perm3_byte, vect_perm3_short, vect_perm3_int): Document.
3110
3111 2017-11-09 Richard Sandiford <richard.sandiford@linaro.org>
3112
3113 * doc/rtl.texi (const_vector): Say that elements can be
3114 const_wide_ints too.
3115 * emit-rtl.h (valid_for_const_vec_duplicate_p): Declare.
3116 * emit-rtl.c (valid_for_const_vec_duplicate_p): New function.
3117 (gen_vec_duplicate): Use it instead of CONSTANT_P.
3118 * optabs.c (expand_vector_broadcast): Likewise.
3119
3120 2017-11-09 Richard Sandiford <richard.sandiford@linaro.org>
3121 Alan Hayward <alan.hayward@arm.com>
3122 David Sherwood <david.sherwood@arm.com>
3123
3124 * tree-ssa-loop-ivopts.c (get_address_cost): Try using a
3125 scaled index even if the unscaled address was invalid.
3126 Don't increase the complexity of using a scale in that case.
3127
3128 2017-11-09 Richard Sandiford <richard.sandiford@linaro.org>
3129 Alan Hayward <alan.hayward@arm.com>
3130 David Sherwood <david.sherwood@arm.com>
3131
3132 * doc/rtl.texi: Rewrite the subreg rules so that they partition
3133 the inner register into REGMODE_NATURAL_SIZE bytes rather than
3134 UNITS_PER_WORD bytes.
3135 * emit-rtl.c (validate_subreg): Divide subregs into blocks
3136 based on REGMODE_NATURAL_SIZE of the inner mode.
3137 (gen_lowpart_common): Split the SCALAR_FLOAT_MODE_P and
3138 !SCALAR_FLOAT_MODE_P cases. Use REGMODE_NATURAL_SIZE for the latter.
3139 * expmed.c (lowpart_bit_field_p): Divide the value up into
3140 chunks of REGMODE_NATURAL_SIZE rather than UNITS_PER_WORD.
3141 * expr.c (store_constructor): Use REGMODE_NATURAL_SIZE to test
3142 whether something is likely to occupy more than one register.
3143
3144 2017-11-09 Jan Hubicka <hubicka@ucw.cz>
3145
3146 PR ipa/82879
3147 * ipa-inline-transform.c (update_noncloned_frequencies): Use
3148 profile_count::adjust_for_ipa_scaling.
3149 * tree-inline.c (copy_bb, copy_cfg_body): Likewise.
3150 * profile-count.c (profile_count::adjust_for_ipa_scaling): New member
3151 function.
3152 * profile-count.h (profile_count::adjust_for_ipa_scaling): Declare.
3153
3154 2017-11-09 Jakub Jelinek <jakub@redhat.com>
3155
3156 * gimple-ssa-store-merging.c (count_multiple_uses): New function.
3157 (split_group): Add total_orig and total_new arguments, estimate the
3158 number of statements related to the store group without store merging
3159 and with store merging.
3160 (imm_store_chain_info::output_merged_store): Adjust split_group
3161 callers, punt if estimated number of statements with store merging
3162 is not smaller than estimated number of statements without it.
3163 Formatting fix.
3164 (handled_load): Remove has_single_use checks.
3165 (pass_store_merging::process_store): Likewise.
3166
3167 2017-11-09 Richard Biener <rguenther@suse.de>
3168
3169 PR tree-optimization/82902
3170 * tree-ssa-phiprop.c (propagate_with_phi): Test proper type.
3171
3172 2017-11-09 Martin Liska <mliska@suse.cz>
3173
3174 PR target/82863
3175 * emit-rtl.c (init_emit_regs): Initialize split_branch_probability to
3176 uninitialized.
3177
3178 2017-11-09 Martin Liska <mliska@suse.cz>
3179
3180 PR tree-optimization/82669
3181 * sbitmap.h (bmp_iter_set_init): Remove non needed check.
3182
3183 2017-11-09 Martin Liska <mliska@suse.cz>
3184
3185 PR gcov-profile/48463
3186 * coverage.c (coverage_begin_function): Output also end locus
3187 of a function and information whether the function is
3188 artificial.
3189 * gcov-dump.c (tag_function): Parse and print the information.
3190 * gcov.c (INCLUDE_MAP): Add include.
3191 (INCLUDE_SET): Likewise.
3192 (struct line_info): Move earlier in the source file because
3193 of vector<line_info> in function_info structure.
3194 (line_info::line_info): Likewise.
3195 (line_info::has_block): Likewise.
3196 (struct source_info): Add new member index.
3197 (source_info::get_functions_at_location): New function.
3198 (function_info::group_line_p): New function.
3199 (output_intermediate_line): New function.
3200 (output_intermediate_file): Use the mentioned function.
3201 (struct function_start): New.
3202 (struct function_start_pair_hash): Likewise.
3203 (process_file): Add code that identifies group functions.
3204 Assign lines either to global or function scope.
3205 (generate_results): Skip artificial functions.
3206 (find_source): Assign index for each source file.
3207 (read_graph_file): Read new flag artificial and end_line.
3208 (add_line_counts): Assign it either to global of function scope.
3209 (accumulate_line_counts): Isolate core of the function to
3210 accumulate_line_info and call it for both function and global
3211 scope lines.
3212 (accumulate_line_info): New function.
3213 (output_line_beginning): Fix GNU coding style.
3214 (print_source_line): New function.
3215 (output_line_details): Likewise.
3216 (output_function_details): Likewise.
3217 (output_lines): Iterate both source (global) scope and function
3218 scope.
3219 (struct function_line_start_cmp): New class.
3220 * doc/gcov.texi: Reflect changes in documentation.
3221
3222 2017-11-09 Jakub Jelinek <jakub@redhat.com>
3223
3224 PR debug/82837
3225 * dwarf2out.c (const_ok_for_output_1): Reject NEG in addition to NOT.
3226 (mem_loc_descriptor): Handle (const (neg (...))) as (neg (const (...)))
3227 and similarly for not instead of neg.
3228
3229 2017-11-08 Andi Kleen <ak@linux.intel.com>
3230
3231 * config/i386/i386.opt: Add -mforce-indirect-call.
3232 * config/i386/predicates.md: Check for flag_force_indirect_call.
3233 * doc/invoke.texi: Document -mforce-indirect-call
3234
3235 2017-11-08 Kito Cheng <kito.cheng@gmail.com>
3236
3237 * config/riscv/riscv-protos.h (riscv_slow_unaligned_access_p):
3238 New extern.
3239 (MOVE_RATIO): Use riscv_slow_unaligned_access_p.
3240 config/riscv/riscv.c (predict.h): New include.
3241 (riscv_slow_unaligned_access_p): No longer static.
3242 (riscv_block_move_straight): Add require.
3243 * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
3244
3245 2017-11-08 Jakub Jelinek <jakub@redhat.com>
3246
3247 PR target/82855
3248 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>,
3249 <avx512>_eq<mode>3<mask_scalar_merge_name>_1): Use
3250 nonimmediate_operand predicate for operand 1 instead of
3251 register_operand.
3252
3253 2017-11-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3254
3255 * config/aarch64/aarch64-simd.md (store_pair_lanes<mode>):
3256 New pattern.
3257 * config/aarch64/constraints.md (Uml): New constraint.
3258 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): New
3259 predicate.
3260
3261 2017-11-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3262
3263 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
3264 of two vec_duplicates into a vec_concat.
3265
3266 2017-11-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3267
3268 * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
3269 Simplify vec_merge of vec_duplicate and vec_concat.
3270 * config/aarch64/constraints.md (Utq): New constraint.
3271 * config/aarch64/aarch64-simd.md (load_pair_lanes<mode>): New
3272 define_insn.
3273
3274 2017-11-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3275
3276 * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
3277 Simplify vec_merge of vec_duplicate and const_vector.
3278 * config/aarch64/predicates.md (aarch64_simd_or_scalar_imm_zero):
3279 New predicate.
3280 * config/aarch64/aarch64-simd.md (*aarch64_combinez<mode>): Use VDC
3281 mode iterator. Update predicate on operand 1 to
3282 handle non-const_vec constants. Delete constraints.
3283 (*aarch64_combinez_be<mode>): Likewise for operand 2.
3284
3285 2017-11-08 Jakub Jelinek <jakub@redhat.com>
3286
3287 PR tree-optimization/78821
3288 * gimple-ssa-store-merging.c (struct store_operand_info): Add bit_not_p
3289 data member.
3290 (store_operand_info::store_operand_info): Initialize it to false.
3291 (pass_store_merging::terminate_all_aliasing_chains): Rewritten to use
3292 ref_maybe_used_by_stmt_p and stmt_may_clobber_ref_p on lhs of each
3293 store in the group, and if chain_info is non-NULL, to ignore altogether
3294 that chain.
3295 (compatible_load_p): Fail if bit_not_p does not match.
3296 (imm_store_chain_info::output_merged_store): Handle bit_not_p loads.
3297 (handled_load): Fill in bit_not_p. Handle BIT_NOT_EXPR.
3298 (pass_store_merging::process_store): Adjust
3299 terminate_all_aliasing_chains calls to pass NULL in all current spots,
3300 call terminate_all_aliasing_chains newly when adding a store into
3301 a chain with non-NULL chain_info.
3302
3303 2017-11-08 Wilco Dijkstra <wdijkstr@arm.com>
3304
3305 * config/aarch64/aarch64.c (aarch64_can_eliminate): Simplify logic.
3306
3307 2017-11-08 Wilco Dijkstra <wdijkstr@arm.com>
3308
3309 * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
3310 Remove.
3311 (aarch64_layout_frame): Initialise emit_frame_chain.
3312 (aarch64_can_eliminate): Remove omit leaf frame pointer code.
3313 (TARGET_FRAME_POINTER_REQUIRED): Remove define.
3314
3315 2017-11-08 Martin Liska <mliska@suse.cz>
3316
3317 * gimplify.c (expand_FALLTHROUGH_r): Simplify usage
3318 of gimple_call_internal_p.
3319
3320 2017-11-07 Tom de Vries <tom@codesourcery.com>
3321
3322 * config/mips/mips.h (ASM_OUTPUT_LABELREF): Wrap in "do {} while (0)".
3323
3324 2017-11-07 Tom de Vries <tom@codesourcery.com>
3325
3326 * config/mips/mips.h (ASM_OUTPUT_CASE_END): Remove semicolon after
3327 "do {} while (0)".
3328
3329 2017-11-08 Martin Liska <mliska@suse.cz>
3330
3331 PR sanitizer/82792
3332 * gimplify.c (expand_FALLTHROUGH_r): Skip IFN_ASAN_MARK.
3333
3334 2017-11-07 Eric Botcazou <ebotcazou@adacore.com>
3335
3336 * gimple-pretty-print.c (dump_profile): Return "" instead of NULL.
3337
3338 2017-11-07 Jakub Jelinek <jakub@redhat.com>
3339
3340 PR target/82855
3341 * config/i386/i386.md (SWI1248_AVX512BWDQ2_64): New mode iterator.
3342 (*cmp<mode>_ccz_1): New insn with $k alternative.
3343
3344 PR target/82855
3345 * config/i386/i386.c (ix86_swap_binary_operands_p): Treat
3346 RTX_COMM_COMPARE as commutative as well.
3347 (ix86_binary_operator_ok): Formatting fix.
3348 * config/i386/sse.md (*mul<mode>3<mask_name><round_name>,
3349 *<code><mode>3<mask_name><round_saeonly_name>,
3350 *<code><mode>3<mask_name>, *<code>tf3, *mul<mode>3<mask_name>,
3351 *<s>mul<mode>3_highpart<mask_name>,
3352 *vec_widen_umult_even_v16si<mask_name>,
3353 *vec_widen_umult_even_v8si<mask_name>,
3354 *vec_widen_umult_even_v4si<mask_name>,
3355 *vec_widen_smult_even_v16si<mask_name>,
3356 *vec_widen_smult_even_v8si<mask_name>, *sse4_1_mulv2siv2di3<mask_name>,
3357 *avx2_pmaddwd, *sse2_pmaddwd, *<sse4_1_avx2>_mul<mode>3<mask_name>,
3358 *avx2_<code><mode>3, *avx512f_<code><mode>3<mask_name>,
3359 *sse4_1_<code><mode>3<mask_name>, *<code>v8hi3,
3360 *sse4_1_<code><mode>3<mask_name>, *<code>v16qi3, *avx2_eq<mode>3,
3361 <avx512>_eq<mode>3<mask_scalar_merge_name>_1, *sse4_1_eqv2di3,
3362 *sse2_eq<mode>3, <mask_codefor><code><mode>3<mask_name>,
3363 *<code><mode>3, *<sse2_avx2>_uavg<mode>3<mask_name>,
3364 *<ssse3_avx2>_pmulhrsw<mode>3<mask_name>, *ssse3_pmulhrswv4hi3): Use
3365 !(MEM_P (operands[1]) && MEM_P (operands[2])) condition instead of
3366 ix86_binary_operator_ok. Formatting fixes.
3367 (*<plusminus_insn><mode>3<mask_name><round_name>,
3368 *<plusminus_insn><mode>3, *<plusminus_insn><mode>3_m): Formatting
3369 fixes.
3370
3371 2017-11-07 Segher Boessenkool <segher@kernel.crashing.org>
3372
3373 * config/rs6000/rs6000.md (GPR2): New mode_iterator.
3374 ("cstore<mode>4"): Don't always expand with rs6000_emit_int_cmove for
3375 eq and ne if TARGET_ISEL.
3376 (cmp): New code_iterator.
3377 (UNS, UNSU_, UNSIK): New code_attrs.
3378 (<code><GPR:mode><GPR2:mode>2_isel): New define_insn_and_split.
3379 ("eq<mode>3"): New define_expand, rename the define_insn_and_split
3380 to...
3381 ("eq<mode>3"): ... this.
3382 ("ne<mode>3"): New define_expand, rename the define_insn_and_split
3383 to...
3384 ("ne<mode>3"): ... this.
3385
3386 2017-11-07 Julia Koval <julia.koval@intel.com>
3387
3388 PR target/82812
3389 * common/config/i386/i386-common.c
3390 (OPTION_MASK_ISA_GENERAL_REGS_ONLY_UNSET): Remove MPX from flag.
3391 (ix86_handle_option): Move MPX to isa_flags2 and GFNI to isa_flags.
3392 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto.
3393 * config/i386/i386.opt: Ditto.
3394 * config/i386/i386.c (ix86_target_string): Ditto.
3395 (ix86_option_override_internal): Ditto.
3396 (ix86_init_mpx_builtins): Move MPX to args2.
3397 (ix86_expand_builtin): Special handling for OPTION_MASK_ISA_GFNI.
3398 * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineinvqb_v64qi,
3399 __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
3400 __builtin_ia32_vgf2p8affineinvqb_v32qi,
3401 __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
3402 __builtin_ia32_vgf2p8affineinvqb_v16qi,
3403 __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): Move to ARGS array.
3404
3405 2017-11-07 Uros Bizjak <ubizjak@gmail.com>
3406
3407 PR target/80425
3408 * config/i386.i386.md (*zero_extendsidi2): Change (?r,*Yj), (?*Yi,r)
3409 and (*x,m) to ($r,Yj), ($Yi,r) and ($x,m).
3410 (zero-extendsidi peephole2): Remove peephole.
3411
3412 2017-11-07 Eric Botcazou <ebotcazou@adacore.com>
3413
3414 PR c/53037
3415 * stor-layout.c: Include attribs.h.
3416 (handle_warn_if_not_align): Replace test on TYPE_USER_ALIGN with
3417 explicit lookup of "aligned" attribute.
3418
3419 2017-11-07 Andrew Waterman <andrew@sifive.com>
3420
3421 * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): New prototype.
3422 (riscv_expand_block_move): Likewise.
3423 * config/riscv/riscv.h (MOVE_RATIO): Tune cost to movmemsi
3424 implementation.
3425 (RISCV_MAX_MOVE_BYTES_PER_LOOP_ITER): New define.
3426 (RISCV_MAX_MOVE_BYTES_STRAIGHT): New define.
3427 * config/riscv/riscv.c (riscv_block_move_straight): New function.
3428 (riscv_adjust_block_mem): Likewise.
3429 (riscv_block_move_loop): Likewise.
3430 (riscv_expand_block_move): Likewise.
3431 * config/riscv/riscv.md (movmemsi): New pattern.
3432
3433 2017-11-07 Michael Clark <michaeljclark@mac.com>
3434
3435 * config/riscv/linux.h (MUSL_ABI_SUFFIX): New define.
3436 (MUSL_DYNAMIC_LINKER): Likewise.
3437
3438 2017-11-07 Richard Sandiford <richard.sandiford@linaro.org>
3439
3440 * config/aarch64/aarch64.md (ashl<mode>3, ashr<mode>3, lshr<mode>3)
3441 (rotr<mode>3, rotl<mode>3): Use aarch64_reg_or_imm instead of
3442 nonmmory_operand.
3443
3444 2017-11-07 Richard Biener <rguenther@suse.de>
3445
3446 * match.pd: Fix build.
3447
3448 2017-11-07 Wilco Dijkstra <wdijkstr@arm.com>
3449 Jackson Woodruff <jackson.woodruff@arm.com>
3450
3451 PR tree-optimization/71026
3452 * match.pd: Canonicalize negate in division.
3453
3454 2017-11-07 Sudakshina Das <sudi.das@arm.com>
3455
3456 PR middle-end/80131
3457 * match.pd: Simplify 1 << (C - x) where C = precision (x) - 1.
3458
3459 2017-11-07 Marc Glisse <marc.glisse@inria.fr>
3460
3461 * match.pd ((a&~b)|(a^b),(a&~b)^~a,(a|b)&~(a^b),a|~(a^b),
3462 (a|b)|(a&^b),(a&b)|~(a^b),~(~a&b),~X^Y): New transformations.
3463
3464 2017-11-07 Marc Glisse <marc.glisse@inria.fr>
3465
3466 * fold-const.c (negate_expr_p) [PLUS_EXPR, MINUS_EXPR]: Handle
3467 non-scalar integral types.
3468 * match.pd (negate_expr_p): Handle MINUS_EXPR.
3469 (-(A-B), -(~A)): New transformations.
3470
3471 2017-11-07 Tom de Vries <tom@codesourcery.com>
3472
3473 * config/powerpcspe/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove
3474 semicolon after "do {} while (0)".
3475 * config/powerpcspe/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
3476 * config/powerpcspe/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
3477 * config/powerpcspe/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
3478 * config/powerpcspe/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
3479 * config/powerpcspe/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
3480
3481 2017-11-07 Tom de Vries <tom@codesourcery.com>
3482
3483 * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove semicolon
3484 after "do {} while (0)".
3485 * config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
3486 * config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
3487 * config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
3488 * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
3489 * config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
3490
3491 2017-11-07 Tom de Vries <tom@codesourcery.com>
3492
3493 PR other/82784
3494 * config/arm/arm.c (HANDLE_NARROW_SHIFT_ARITH): Remove semicolon after
3495 "while {} do (0)".
3496 (arm_rtx_costs_internal): Add missing semicolon after
3497 HANDLE_NARROW_SHIFT_ARITH call.
3498
3499 2017-11-06 Segher Boessenkool <segher@kernel.crashing.org>
3500
3501 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
3502 disable isel if it was not set explicitly.
3503
3504 2017-11-06 James Bowman <james.bowman@ftdichip.com>
3505
3506 * gcc/dwarf2out.c (modified_type_die): Retain ADDR_SPACE qualifiers.
3507 (add_type_attribute) likewise.
3508
3509 2017-11-06 H.J. Lu <hongjiu.lu@intel.com>
3510
3511 * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
3512 of struct ix86_frame.
3513 (ix86_initial_elimination_offset): Likewise.
3514 (ix86_expand_split_stack_prologue): Likewise.
3515
3516 2017-11-06 Marc Glisse <marc.glisse@inria.fr>
3517
3518 * tree-vrp.h (enum value_range_type): Update stale comment.
3519
3520 2017-11-06 Richard Sandiford <richard.sandiford@linaro.org>
3521 Alan Hayward <alan.hayward@arm.com>
3522 David Sherwood <david.sherwood@arm.com>
3523
3524 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm)
3525 (aarch64_expand_vec_perm_const): Take the number of units too.
3526 * config/aarch64/aarch64.c (aarch64_expand_vec_perm)
3527 (aarch64_expand_vec_perm_const): Likewise.
3528 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>)
3529 (vec_perm<mode>): Update accordingly.
3530
3531 2017-11-06 Richard Sandiford <richard.sandiford@linaro.org>
3532 Alan Hayward <alan.hayward@arm.com>
3533 David Sherwood <david.sherwood@arm.com>
3534
3535 * config/aarch64/aarch64-protos.h (aarch64_simd_vect_par_cnst_half):
3536 Take the number of units too.
3537 * config/aarch64/aarch64.c (aarch64_simd_vect_par_cnst_half): Likewise.
3538 (aarch64_simd_check_vect_par_cnst_half): Update call accordingly,
3539 but check for a vector mode before rather than after the call.
3540 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3541 (move_hi_quad_<mode>, vec_unpack<su>_hi_<mode>)
3542 (vec_unpack<su>_lo_<mode, vec_widen_<su>mult_lo_<mode>)
3543 (vec_widen_<su>mult_hi_<mode>, vec_unpacks_lo_<mode>)
3544 (vec_unpacks_hi_<mode>, aarch64_saddl2<mode>, aarch64_uaddl2<mode>)
3545 (aarch64_ssubl2<mode>, aarch64_usubl2<mode>, widen_ssum<mode>3)
3546 (widen_usum<mode>3, aarch64_saddw2<mode>, aarch64_uaddw2<mode>)
3547 (aarch64_ssubw2<mode>, aarch64_usubw2<mode>, aarch64_sqdmlal2<mode>)
3548 (aarch64_sqdmlsl2<mode>, aarch64_sqdmlal2_lane<mode>)
3549 (aarch64_sqdmlal2_laneq<mode>, aarch64_sqdmlsl2_lane<mode>)
3550 (aarch64_sqdmlsl2_laneq<mode>, aarch64_sqdmlal2_n<mode>)
3551 (aarch64_sqdmlsl2_n<mode>, aarch64_sqdmull2<mode>)
3552 (aarch64_sqdmull2_lane<mode>, aarch64_sqdmull2_laneq<mode>)
3553 (aarch64_sqdmull2_n<mode>): Update accordingly.
3554
3555 2017-11-06 Richard Sandiford <richard.sandiford@linaro.org>
3556 Alan Hayward <alan.hayward@arm.com>
3557 David Sherwood <david.sherwood@arm.com>
3558
3559 * config/aarch64/aarch64-protos.h (aarch64_reverse_mask): Take
3560 the number of units too.
3561 * config/aarch64/aarch64.c (aarch64_reverse_mask): Likewise.
3562 * config/aarch64/aarch64-simd.md (vec_load_lanesoi<mode>)
3563 (vec_store_lanesoi<mode>, vec_load_lanesci<mode>)
3564 (vec_store_lanesci<mode>, vec_load_lanesxi<mode>)
3565 (vec_store_lanesxi<mode>): Update accordingly.
3566
3567 2017-11-06 Richard Sandiford <richard.sandiford@linaro.org>
3568 Alan Hayward <alan.hayward@arm.com>
3569 David Sherwood <david.sherwood@arm.com>
3570
3571 * config/aarch64/aarch64-protos.h (aarch64_endian_lane_rtx): Declare.
3572 * config/aarch64/aarch64.c (aarch64_endian_lane_rtx): New function.
3573 * config/aarch64/aarch64.h (ENDIAN_LANE_N): Take the number
3574 of units rather than the mode.
3575 * config/aarch64/iterators.md (nunits): New mode attribute.
3576 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args):
3577 Use aarch64_endian_lane_rtx instead of GEN_INT (ENDIAN_LANE_N ...).
3578 * config/aarch64/aarch64-simd.md (aarch64_dup_lane<mode>)
3579 (aarch64_dup_lane_<vswap_width_name><mode>, *aarch64_mul3_elt<mode>)
3580 (*aarch64_mul3_elt_<vswap_width_name><mode>): Likewise.
3581 (*aarch64_mul3_elt_to_64v2df, *aarch64_mla_elt<mode>): Likewise.
3582 (*aarch64_mla_elt_<vswap_width_name><mode>, *aarch64_mls_elt<mode>)
3583 (*aarch64_mls_elt_<vswap_width_name><mode>, *aarch64_fma4_elt<mode>)
3584 (*aarch64_fma4_elt_<vswap_width_name><mode>):: Likewise.
3585 (*aarch64_fma4_elt_to_64v2df, *aarch64_fnma4_elt<mode>): Likewise.
3586 (*aarch64_fnma4_elt_<vswap_width_name><mode>): Likewise.
3587 (*aarch64_fnma4_elt_to_64v2df, reduc_plus_scal_<mode>): Likewise.
3588 (reduc_plus_scal_v4sf, reduc_<maxmin_uns>_scal_<mode>): Likewise.
3589 (reduc_<maxmin_uns>_scal_<mode>): Likewise.
3590 (*aarch64_get_lane_extend<GPI:mode><VDQQH:mode>): Likewise.
3591 (*aarch64_get_lane_zero_extendsi<mode>): Likewise.
3592 (aarch64_get_lane<mode>, *aarch64_mulx_elt_<vswap_width_name><mode>)
3593 (*aarch64_mulx_elt<mode>, *aarch64_vgetfmulx<mode>): Likewise.
3594 (aarch64_sq<r>dmulh_lane<mode>, aarch64_sq<r>dmulh_laneq<mode>)
3595 (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_lane<mode>): Likewise.
3596 (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_laneq<mode>): Likewise.
3597 (aarch64_sqdml<SBINQOPS:as>l_lane<mode>): Likewise.
3598 (aarch64_sqdml<SBINQOPS:as>l_laneq<mode>): Likewise.
3599 (aarch64_sqdml<SBINQOPS:as>l2_lane<mode>_internal): Likewise.
3600 (aarch64_sqdml<SBINQOPS:as>l2_laneq<mode>_internal): Likewise.
3601 (aarch64_sqdmull_lane<mode>, aarch64_sqdmull_laneq<mode>): Likewise.
3602 (aarch64_sqdmull2_lane<mode>_internal): Likewise.
3603 (aarch64_sqdmull2_laneq<mode>_internal): Likewise.
3604 (aarch64_vec_load_lanesoi_lane<mode>): Likewise.
3605 (aarch64_vec_store_lanesoi_lane<mode>): Likewise.
3606 (aarch64_vec_load_lanesci_lane<mode>): Likewise.
3607 (aarch64_vec_store_lanesci_lane<mode>): Likewise.
3608 (aarch64_vec_load_lanesxi_lane<mode>): Likewise.
3609 (aarch64_vec_store_lanesxi_lane<mode>): Likewise.
3610 (aarch64_simd_vec_set<mode>): Update use of ENDIAN_LANE_N.
3611 (aarch64_simd_vec_setv2di): Likewise.
3612
3613 2017-11-06 Carl Love <cel@us.ibm.com>
3614
3615 * config/rs6000/rs6000-c.c (P8V_BUILTIN_VEC_REVB): Add power 8
3616 definitions.
3617 (P9V_BUILTIN_VEC_REVB): Remove the power 9 instance definitions.
3618 * config/rs6000/altivec.h (vec_revb): Change the #define from power 9
3619 to power 8.
3620 * config/rs6000/r6000-protos.h (swap_endian_selector_for_mode): Add new
3621 extern declaration.
3622 * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Add function.
3623 * config/rs6000/rs6000-builtin.def (BU_P8V_VSX_1, BU_P8V_OVERLOAD_1):
3624 Add power 8 macro expansions.
3625 (BU_P9V_OVERLOAD_1): Remove power 9 overload expansion.
3626 * config/rs6000/vsx.md (revb_<mode>): Add define_expand to generate
3627 power 8 instructions. (VSX_XXBR): Add iterator.
3628
3629 2017-11-06 Wilco Dijkstra <wdijkstr@arm.com>
3630
3631 * config/arm/arm.md (predicable_short_it): Change default to "no",
3632 improve documentation, remove uses that are identical to the default.
3633 (enabled_for_depr_it): Rename to enabled_for_short_it.
3634 * gcc/config/arm/arm-fixed.md (predicable_short_it):
3635 Remove default uses.
3636 * gcc/config/arm/ldmstm.md (predicable_short_it): Likewise.
3637 * gcc/config/arm/sync.md (predicable_short_it): Likewise.
3638 * gcc/config/arm/thumb2.md (predicable_short_it): Likewise.
3639 * gcc/config/arm/vfp.md (predicable_short_it): Likewise.
3640
3641 2017-11-06 Michael Meissner <meissner@linux.vnet.ibm.com>
3642
3643 PR target/82748
3644 * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1): Delete
3645 float128 helper macros, which are no longer used after deleting
3646 the old 'q' built-in functions, and moving the round to odd
3647 built-in functions to being special built-in functions.
3648 (BU_FLOAT128_2): Likewise.
3649 (BU_FLOAT128_1_HW): Likewise.
3650 (BU_FLOAT128_2_HW): Likewise.
3651 (BU_FLOAT128_3_HW): Likewise.
3652 (FABSQ): Delete old 'q' built-in functions.
3653 (COPYSIGNQ): Likewise.
3654 (SQRTF128_ODD): Move round to odd built-in functions to be
3655 special built-in functions, so that we can handle
3656 -mabi=ieeelongdouble.
3657 (TRUNCF128_ODD): Likewise.
3658 (ADDF128_ODD): Likewise.
3659 (SUBF128_ODD): Likewise.
3660 (MULF128_ODD): Likewise.
3661 (DIVF128_ODD): Likewise.
3662 (FMAF128_ODD): Likewise.
3663 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Map old 'q'
3664 built-in names to 'f128'.
3665 * config/rs6000/rs6000.c (rs6000_fold_builtin): Remove folding the
3666 old 'q' built-in functions, as the machine independent code for
3667 'f128' built-in functions handles this.
3668 (rs6000_expand_builtin): Add expansion for float128 round to odd
3669 functions, keying off on -mabi=ieeelongdouble of whether to use
3670 the KFmode or TFmode variant.
3671 (rs6000_init_builtins): Initialize the _Float128 round to odd
3672 built-in functions.
3673 * doc/extend.texi (PowerPC Built-in Functions): Document the old
3674 _Float128 'q' built-in functions are now mapped into the new
3675 'f128' built-in functions.
3676
3677 2017-11-06 David Edelsohn <dje.gcc@gmail.com>
3678
3679 * collect2.c (add_lto_object): Compile for OBJECT_COFF.
3680 (scan_prog_file): Don't skip PASS_LTOINFO. Scan for LTO objects.
3681
3682 2017-11-06 David Malcolm <dmalcolm@redhat.com>
3683
3684 PR jit/82826
3685 * ipa-fnsummary.c (ipa_fnsummary_c_finalize): New function.
3686 * ipa-fnsummary.h (ipa_fnsummary_c_finalize): New decl.
3687 * toplev.c: Include "ipa-fnsummary.h".
3688 (toplev::finalize): Call ipa_fnsummary_c_finalize.
3689
3690 2017-11-06 Jakub Jelinek <jakub@redhat.com>
3691
3692 PR tree-optimization/82838
3693 * gimple-ssa-store-merging.c
3694 (imm_store_chain_info::output_merged_store): Call force_gimple_operand_1
3695 on a separate gimple_seq which is then appended to seq.
3696
3697 2017-11-06 Jeff Law <law@redhat.com>
3698
3699 PR target/82788
3700 * config/i386/i386.c (PROBE_INTERVAL): Remove.
3701 (get_probe_interval): New functions.
3702 (ix86_adjust_stack_and_probe_stack_clash): Use get_probe_interval.
3703 (ix86_adjust_stack_and_probe): Likewise.
3704 (output_adjust_stack_and_probe): Likewise.
3705 (ix86_emit_probe_stack_range): Likewise.
3706 (ix86_expand_prologue): Likewise.
3707
3708 2017-11-06 Richard Sandiford <richard.sandiford@linaro.org>
3709
3710 PR tree-optimization/82816
3711 * tree-ssa-math-opts.c (convert_mult_to_widen): Return false
3712 if the modes of the two types are the same.
3713 (convert_plusminus_to_widen): Likewise.
3714
3715 2017-11-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3716
3717 * config/rs6000/altivec.md (*p9_vadu<mode>3) Rename to
3718 p9_vadu<mode>3.
3719 (usadv16qi): New define_expand.
3720 (usadv8hi): New define_expand.
3721
3722 2017-11-06 Jan Hubicka <hubicka@ucw.cz>
3723
3724 PR bootstrap/82832
3725 * ipa-inline-transform.c (update_noncloned_frequencies): Always
3726 scale.
3727 (inline_transform): Likewise.
3728 * predict.c (counts_to_freqs): Remove useless conditional.
3729 * profile-count.h (profile_count::apply_scale): Move sanity check.
3730 * tree-inline.c (copy_bb): Always scale.
3731 (copy_cfg_body): Likewise.
3732
3733 2017-11-06 Christophe Lyon <christophe.lyon@linaro.org>
3734
3735 PR target/67591
3736 * config/arm/arm.md (*sub_shiftsi): Add predicable_short_it
3737 attribute.
3738 (*cmp_ite0): Add enabled_for_depr_it attribute.
3739 (*cmp_ite1): Likewise.
3740
3741 2017-11-06 Segher Boessenkool <segher@kernel.crashing.org>
3742
3743 * config/rs6000/rs6000.c (rs6000_insn_cost): Handle TYPE_MFCR and
3744 TYPE_MFCRF.
3745
3746 2017-11-06 Richard Sandiford <richard.sandiford@linaro.org>
3747
3748 * tree-vrp.c (vrp_int_const_binop): Return true on success and
3749 return the value by pointer.
3750 (extract_range_from_multiplicative_op_1): Update accordingly.
3751 Return as soon as an operation fails.
3752
3753 2017-11-05 Tom de Vries <tom@codesourcery.com>
3754
3755 PR other/82784
3756 * asan.c (DEF_SANITIZER_BUILTIN_1): Factor out of ...
3757 (DEF_SANITIZER_BUILTIN): ... here.
3758 (initialize_sanitizer_builtins): Use DEF_SANITIZER_BUILTIN_1 instead of
3759 DEF_SANITIZER_BUILTIN in if stmt. Add missing semicolon.
3760
3761 2017-11-05 Tom de Vries <tom@codesourcery.com>
3762
3763 PR other/82784
3764 * config/elfos.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon after
3765 macro body.
3766 (ASM_OUTPUT_CASE_LABEL): Add semicolon after
3767 ASM_OUTPUT_BEFORE_CASE_LABEL call.
3768 * config/arc/arc.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon
3769 after macro body.
3770 * config/m68k/m68kelf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
3771 * config/mips/mips.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
3772 * config/v850/v850.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
3773
3774 2017-11-05 Tom de Vries <tom@codesourcery.com>
3775
3776 PR other/82784
3777 * graphite-scop-detection.c (DEBUG_PRINT): Remove semicolon after
3778 "do {} while (0)".
3779
3780 2017-11-04 Michael Clark <michaeljclark@mac.com>
3781
3782 * config/riscv/riscv.c (riscv_print_operand): Add a 'i' format.
3783 config/riscv/riscv.md (addsi3): Use 'i' for immediates.
3784 (adddi3): Likewise.
3785 (*addsi3_extended): Likewise.
3786 (*addsi3_extended2): Likewise.
3787 (<optab>si3): Likewise.
3788 (<optab>di3): Likewise.
3789 (<optab><mode>3): Likewise.
3790 (<*optabe>si3_internal): Likewise.
3791 (zero_extendqi<SUPERQI:mode>2): Likewise.
3792 (*add<mode>hi3): Likewise.
3793 (*xor<mode>hi3): Likewise.
3794 (<optab>di3): Likewise.
3795 (*<optab>si3_extend): Likewise.
3796 (*sge<u>_<X:mode><GPR:mode>): Likewise.
3797 (*slt<u>_<X:mode><GPR:mode>): Likewise.
3798 (*sle<u>_<X:mode><GPR:mode>): Likewise.
3799
3800 2017-11-04 Andrew Waterman <andrew@sifive.com>
3801
3802 * config/riscv/riscv.c (riscv_option_override): Conditionally set
3803 TARGET_STRICT_ALIGN based upon -mtune argument.
3804
3805 2017-11-04 Andrew Waterman <andrew@sifive.com>
3806
3807 * config/riscv/riscv.h (SLOW_BYTE_ACCESS): Change to 1.
3808
3809 2017-11-04 Daniel Santos <daniel.santos@pobox.com>
3810
3811 * config/i386/i386.c (choose_basereg): Use optional scratch
3812 register and add assertion.
3813 (x86_emit_outlined_ms2sysv_save): Use scratch register when
3814 needed, and don't allocate stack.
3815 (ix86_expand_prologue): Rearrange where SSE saves/stub call is
3816 emitted, correct wrong allocation with -mcall-ms2sysv-xlogues.
3817 (ix86_emit_outlined_ms2sysv_restore): Fix non-immediate offsets.
3818
3819 2017-11-03 Jeff Law <law@redhat.com>
3820
3821 * config/i386/i386.c (ix86_emit_restore_reg_using_pop): Prototype.
3822 (ix86_adjust_stack_and_probe_stack_clash): Use a push/pop sequence
3823 to probe at the start of a noreturn function.
3824
3825 2017-11-03 Jakub Jelinek <jakub@redhat.com>
3826
3827 PR tree-optimization/78821
3828 * gimple-ssa-store-merging.c: Update the file comment.
3829 (MAX_STORE_ALIAS_CHECKS): Define.
3830 (struct store_operand_info): New type.
3831 (store_operand_info::store_operand_info): New constructor.
3832 (struct store_immediate_info): Add rhs_code and ops data members.
3833 (store_immediate_info::store_immediate_info): Add rhscode, op0r
3834 and op1r arguments to the ctor, initialize corresponding data members.
3835 (struct merged_store_group): Add load_align_base and load_align
3836 data members.
3837 (merged_store_group::merged_store_group): Initialize them.
3838 (merged_store_group::do_merge): Update them.
3839 (merged_store_group::apply_stores): Pick the constant for
3840 encode_tree_to_bitpos from one of the two operands, or skip
3841 encode_tree_to_bitpos if neither operand is a constant.
3842 (class pass_store_merging): Add process_store method decl. Remove
3843 bool argument from terminate_all_aliasing_chains method decl.
3844 (pass_store_merging::terminate_all_aliasing_chains): Remove
3845 var_offset_p argument and corresponding handling.
3846 (stmts_may_clobber_ref_p): New function.
3847 (compatible_load_p): New function.
3848 (imm_store_chain_info::coalesce_immediate_stores): Terminate group
3849 if there is overlap and rhs_code is not INTEGER_CST. For
3850 non-overlapping stores terminate group if rhs is not mergeable.
3851 (get_alias_type_for_stmts): Change first argument from
3852 auto_vec<gimple *> & to vec<gimple *> &. Add IS_LOAD, CLIQUEP and
3853 BASEP arguments. If IS_LOAD is true, look at rhs1 of the stmts
3854 instead of lhs. Compute *CLIQUEP and *BASEP in addition to the
3855 alias type.
3856 (get_location_for_stmts): Change first argument from
3857 auto_vec<gimple *> & to vec<gimple *> &.
3858 (struct split_store): Remove orig_stmts data member, add orig_stores.
3859 (split_store::split_store): Create orig_stores rather than orig_stmts.
3860 (find_constituent_stmts): Renamed to ...
3861 (find_constituent_stores): ... this. Change second argument from
3862 vec<gimple *> * to vec<store_immediate_info *> *, push pointers
3863 to info structures rather than the statements.
3864 (split_group): Rename ALLOW_UNALIGNED argument to
3865 ALLOW_UNALIGNED_STORE, add ALLOW_UNALIGNED_LOAD argument and handle
3866 it. Adjust find_constituent_stores caller.
3867 (imm_store_chain_info::output_merged_store): Handle rhs_code other
3868 than INTEGER_CST, adjust split_group, get_alias_type_for_stmts and
3869 get_location_for_stmts callers. Set MR_DEPENDENCE_CLIQUE and
3870 MR_DEPENDENCE_BASE on the MEM_REFs if they are the same in all stores.
3871 (mem_valid_for_store_merging): New function.
3872 (handled_load): New function.
3873 (pass_store_merging::process_store): New method.
3874 (pass_store_merging::execute): Use process_store method. Adjust
3875 terminate_all_aliasing_chains caller.
3876
3877 2017-11-03 Wilco Dijkstra <wdijkstr@arm.com>
3878
3879 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
3880 Return true for more constants, symbols and label references.
3881 (aarch64_valid_floating_const): Remove unused function.
3882
3883 2017-11-03 Wilco Dijkstra <wdijkstr@arm.com>
3884
3885 PR target/82786
3886 * config/aarch64/aarch64.c (aarch64_layout_frame):
3887 Undo forcing of LR at bottom of frame.
3888
3889 2017-11-03 Jeff Law <law@redhat.com>
3890
3891 PR target/82823
3892 * config/i386/i386.c (ix86_expand_prologue): Tighten assert
3893 for int_registers_saved.
3894
3895 * cfganal.c (single_pred_edge_ignoring_loop_edges): New function
3896 extracted from tree-ssa-dom.c.
3897 * cfganal.h (single_pred_edge_ignoring_loop_edges): Prototype.
3898 * tree-ssa-dom.c (single_incoming_edge_ignoring_loop_edges): Remove.
3899 (record_equivalences_from_incoming_edge): Add additional argument
3900 to single_pred_edge_ignoring_loop_edges call.
3901 * tree-ssa-uncprop.c (single_incoming_edge_ignoring_loop_edges): Remove.
3902 (uncprop_dom_walker::before_dom_children): Add additional argument
3903 to single_pred_edge_ignoring_loop_edges call.
3904 * tree-ssa-sccvn.c (sccvn_dom_walker::before_dom_children): Use
3905 single_pred_edge_ignoring_loop_edges rather than open coding.
3906 * tree-vrp.c (evrp_dom_walker::before_dom_children): Similarly.
3907
3908 2017-11-03 Marc Glisse <marc.glisse@inria.fr>
3909
3910 * match.pd (-(-A)): Rewrite.
3911
3912 2017-11-03 Segher Boessenkool <segher@kernel.crashing.org>
3913
3914 * config/rs6000/rs60000-protos.h (rs6000_emit_sISEL): Delete.
3915 (rs6000_emit_int_cmove): New declaration.
3916 * config/rs6000/rs6000.c (rs6000_emit_int_cmove): Delete declaration.
3917 (rs6000_emit_sISEL): Delete.
3918 (rs6000_emit_int_cmove): Make non-static.
3919 * config/rs6000/rs6000.md (cstore<mode>4): Use rs6000_emit_int_cmove
3920 instead of rs6000_emit_sISEL.
3921
3922 2017-11-03 Jan Hubicka <hubicka@ucw.cz>
3923
3924 * asan.c (create_cond_insert_point): Maintain profile.
3925 * ipa-utils.c (ipa_merge_profiles): Be sure only IPA profiles are
3926 merged.
3927 * basic-block.h (struct basic_block_def): Remove frequency.
3928 (EDGE_FREQUENCY): Use to_frequency
3929 * bb-reorder.c (push_to_next_round_p): Use only IPA counts for global
3930 heuristics.
3931 (find_traces): Update to use to_frequency.
3932 (find_traces_1_round): Likewise; use only IPA counts.
3933 (bb_to_key): Likewise.
3934 (connect_traces): Use IPA counts only.
3935 (copy_bb_p): Update to use to_frequency.
3936 (fix_up_crossing_landing_pad): Likewise.
3937 (sanitize_hot_paths): Likewise.
3938 * bt-load.c (basic_block_freq): Likewise.
3939 * cfg.c (init_flow): Set count_max to uninitialized.
3940 (check_bb_profile): Remove frequencies; check counts.
3941 (dump_bb_info): Do not dump frequencies.
3942 (update_bb_profile_for_threading): Update counts only.
3943 (scale_bbs_frequencies_int): Likewise.
3944 (MAX_SAFE_MULTIPLIER): Remove.
3945 (scale_bbs_frequencies_gcov_type): Update counts only.
3946 (scale_bbs_frequencies_profile_count): Update counts only.
3947 (scale_bbs_frequencies): Update counts only.
3948 * cfg.h (struct control_flow_graph): Add count-max.
3949 (update_bb_profile_for_threading): Update prototype.
3950 * cfgbuild.c (find_bb_boundaries): Do not update frequencies.
3951 (find_many_sub_basic_blocks): Likewise.
3952 * cfgcleanup.c (try_forward_edges): Likewise.
3953 (try_crossjump_to_edge): Likewise.
3954 * cfgexpand.c (expand_gimple_cond): Likewise.
3955 (expand_gimple_tailcall): Likewise.
3956 (construct_init_block): Likewise.
3957 (construct_exit_block): Likewise.
3958 * cfghooks.c (verify_flow_info): Check consistency of counts.
3959 (dump_bb_for_graph): Do not dump frequencies.
3960 (split_block_1): Do not update frequencies.
3961 (split_edge): Do not update frequencies.
3962 (make_forwarder_block): Do not update frequencies.
3963 (duplicate_block): Do not update frequencies.
3964 (account_profile_record): Do not update frequencies.
3965 * cfgloop.c (find_subloop_latch_edge_by_profile): Use IPA counts
3966 for global heuristics.
3967 * cfgloopanal.c (average_num_loop_insns): Update to use to_frequency.
3968 (expected_loop_iterations_unbounded): Use counts only.
3969 * cfgloopmanip.c (scale_loop_profile): Simplify.
3970 (create_empty_loop_on_edge): Simplify
3971 (loopify): Simplify
3972 (duplicate_loop_to_header_edge): Simplify
3973 * cfgrtl.c (force_nonfallthru_and_redirect): Update profile.
3974 (update_br_prob_note): Take care of removing note when profile
3975 becomes undefined.
3976 (relink_block_chain): Do not dump frequency.
3977 (rtl_account_profile_record): Use to_frequency.
3978 * cgraph.c (symbol_table::create_edge): Convert count to ipa count.
3979 (cgraph_edge::redirect_call_stmt_to_calle): Conver tcount to ipa count.
3980 (cgraph_update_edges_for_call_stmt_node): Likewise.
3981 (cgraph_edge::verify_count_and_frequency): Update.
3982 (cgraph_node::verify_node): Temporarily disable frequency verification.
3983 * cgraphbuild.c (compute_call_stmt_bb_frequency): Use
3984 to_cgraph_frequency.
3985 (cgraph_edge::rebuild_edges): Convert to ipa counts.
3986 * cgraphunit.c (init_lowered_empty_function): Do not initialize
3987 frequencies.
3988 (cgraph_node::expand_thunk): Update profile.
3989 * except.c (dw2_build_landing_pads): Do not update frequency.
3990 * final.c (compute_alignments): Use to_frequency.
3991 (dump_basic_block_info): Do not dump frequency.
3992 * gimple-pretty-print.c (dump_profile): Do not dump frequency.
3993 (dump_gimple_bb_header): Do not dump frequency.
3994 * gimple-ssa-isolate-paths.c (isolate_path): Do not update frequency;
3995 do update count.
3996 * gimple-streamer-in.c (input_bb): Do not stream frequency.
3997 * gimple-streamer-out.c (output_bb): Do not stream frequency.
3998 * haifa-sched.c (sched_pressure_start_bb): Use to_freuqency.
3999 (init_before_recovery): Do not update frequency.
4000 (sched_create_recovery_edges): Do not update frequency.
4001 * hsa-gen.c (convert_switch_statements): Do not update frequency.
4002 * ipa-cp.c (ipcp_propagate_stage): Update search for max_count.
4003 (ipa_cp_c_finalize): Set max_count to uninitialized.
4004 * ipa-fnsummary.c (get_minimal_bb): Use counts.
4005 (param_change_prob): Use counts.
4006 * ipa-profile.c (ipa_profile_generate_summary): Do not summarize
4007 local profiles.
4008 * ipa-split.c (consider_split): Use to_frequency.
4009 (split_function): Use to_frequency.
4010 * ira-build.c (loop_compare_func): Likewise.
4011 (mark_loops_for_removal): Likewise.
4012 (mark_all_loops_for_removal): Likewise.
4013 * loop-doloop.c (doloop_modify): Do not update frequency.
4014 * loop-unroll.c (unroll_loop_runtime_iterations): Do not update
4015 frequency.
4016 * lto-streamer-in.c (input_function): Update count_max.
4017 * omp-expand.c (expand_omp_taskreg): Update count_max.
4018 * omp-simd-clone.c (simd_clone_adjust): Update profile.
4019 * predict.c (maybe_hot_frequency_p): Use to_frequency.
4020 (maybe_hot_count_p): Use ipa counts only.
4021 (maybe_hot_bb_p): Simplify.
4022 (maybe_hot_edge_p): Simplify.
4023 (probably_never_executed): Do not take frequency argument.
4024 (probably_never_executed_bb_p): Do not pass frequency.
4025 (probably_never_executed_edge_p): Likewise.
4026 (combine_predictions_for_bb): Check that profile is nonzero.
4027 (propagate_freq): Do not set frequency.
4028 (drop_profile): Simplify.
4029 (counts_to_freqs): Simplify.
4030 (expensive_function_p): Use to_frequency.
4031 (propagate_unlikely_bbs_forward): Simplify.
4032 (determine_unlikely_bbs): Simplify.
4033 (estimate_bb_frequencies): Add hack to silence graphite issues.
4034 (compute_function_frequency): Use ipa counts.
4035 (pass_profile::execute): Update.
4036 (rebuild_frequencies): Use counts only.
4037 (force_edge_cold): Use counts only.
4038 * profile-count.c (profile_count::dump): Dump new count types.
4039 (profile_count::differs_from_p): Check compatiblity.
4040 (profile_count::to_frequency): New function.
4041 (profile_count::to_cgraph_frequency): New function.
4042 * profile-count.h (struct function): Declare.
4043 (enum profile_quality): Add profile_guessed_local and
4044 profile_guessed_global0.
4045 (class profile_proability): Decrease number of bits to 29;
4046 update from_reg_br_prob_note and to_reg_br_prob_note.
4047 (class profile_count: Update comment; decrease number of bits
4048 to 61. Check compatibility.
4049 (profile_count::compatible_p): New private member function.
4050 (profile_count::ipa_p): New member function.
4051 (profile_count::operator<): Handle global zero correctly.
4052 (profile_count::operator>): Handle global zero correctly.
4053 (profile_count::operator<=): Handle global zero correctly.
4054 (profile_count::operator>=): Handle global zero correctly.
4055 (profile_count::nonzero_p): New member function.
4056 (profile_count::force_nonzero): New member function.
4057 (profile_count::max): New member function.
4058 (profile_count::apply_scale): Handle IPA scalling.
4059 (profile_count::guessed_local): New member function.
4060 (profile_count::global0): New member function.
4061 (profile_count::ipa): New member function.
4062 (profile_count::to_frequency): Declare.
4063 (profile_count::to_cgraph_frequency): Declare.
4064 * profile.c (OVERLAP_BASE): Delete.
4065 (compute_frequency_overlap): Delete.
4066 (compute_branch_probabilities): Do not use compute_frequency_overlap.
4067 * regs.h (REG_FREQ_FROM_BB): Use to_frequency.
4068 * sched-ebb.c (rank): Use counts only.
4069 * shrink-wrap.c (handle_simple_exit): Use counts only.
4070 (try_shrink_wrapping): Use counts only.
4071 (place_prologue_for_one_component): Use counts only.
4072 * tracer.c (find_best_predecessor): Use to_frequency.
4073 (find_trace): Use to_frequency.
4074 (tail_duplicate): Use to_frequency.
4075 * trans-mem.c (expand_transaction): Do not update frequency.
4076 * tree-call-cdce.c: Do not update frequency.
4077 * tree-cfg.c (gimple_find_sub_bbs): Likewise.
4078 (gimple_merge_blocks): Likewise.
4079 (gimple_split_edge): Likewise.
4080 (gimple_duplicate_sese_region): Likewise.
4081 (gimple_duplicate_sese_tail): Likewise.
4082 (move_sese_region_to_fn): Likewise.
4083 (gimple_account_profile_record): Likewise.
4084 (insert_cond_bb): Likewise.
4085 * tree-complex.c (expand_complex_div_wide): Likewise.
4086 * tree-eh.c (lower_resx): Update profile.
4087 * tree-inline.c (copy_bb): Simplify count scaling; do not scale
4088 frequencies.
4089 (initialize_cfun): Do not initialize frequencies
4090 (freqs_to_counts): Delete.
4091 (copy_cfg_body): Ignore count parameter.
4092 (copy_body): Update.
4093 (expand_call_inline): Update count_max.
4094 (optimize_inline_calls): Update count_max.
4095 (tree_function_versioning): Update count_max.
4096 * tree-ssa-coalesce.c (coalesce_cost_bb): Use to_frequency.
4097 * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Do not update
4098 frequency.
4099 * tree-ssa-loop-im.c (execute_sm_if_changed): Use counts only.
4100 * tree-ssa-loop-ivcanon.c (unloop_loops): Do not update freuqency.
4101 (try_peel_loop): Likewise.
4102 * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Use
4103 to_frequency.
4104 * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Pass -1.
4105 (tree_transform_and_unroll_loop): Do not use frequencies
4106 * tree-ssa-loop-niter.c (estimate_numbers_of_iterations):
4107 Use reliable prediction only.
4108 * tree-ssa-loop-unswitch.c (hoist_guard): Do not use frequencies.
4109 * tree-ssa-sink.c (select_best_block): Use to_frequency.
4110 * tree-ssa-tail-merge.c (replace_block_by): Temporarily disable
4111 probability scaling.
4112 * tree-ssa-threadupdate.c (create_block_for_threading): Do
4113 not update frequency
4114 (any_remaining_duplicated_blocks): Likewise.
4115 (update_profile): Likewise.
4116 (estimated_freqs_path): Delete.
4117 (freqs_to_counts_path): Delete.
4118 (clear_counts_path): Delete.
4119 (ssa_fix_duplicate_block_edges): Likewise.
4120 (duplicate_thread_path): Likewise.
4121 * tree-switch-conversion.c (gen_inbound_check): Use counts.
4122 * tree-tailcall.c (decrease_profile): Do not update frequency.
4123 (eliminate_tail_call): Likewise.
4124 * tree-vect-loop-manip.c (vect_do_peeling): Likewise.
4125 * tree-vect-loop.c (scale_profile_for_vect_loop): Likewise.
4126 (optimize_mask_stores): Likewise.
4127 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
4128 * ubsan.c (ubsan_expand_null_ifn): Update profile.
4129 (ubsan_expand_ptr_ifn): Update profile.
4130 * value-prof.c (gimple_ic): Simplify.
4131 * value-prof.h (gimple_ic): Update prototype.
4132 * ipa-inline-transform.c (inline_transform): Fix scaling conditoins.
4133 * ipa-inline.c (compute_uninlined_call_time): Be sure that
4134 counts are nonzero.
4135 (want_inline_self_recursive_call_p): Likewise.
4136 (resolve_noninline_speculation): Only cummulate defined counts.
4137 (inline_small_functions): Use nonzero_p.
4138 (ipa_inline): Do not access freed node.
4139
4140 2017-11-03 Wilco Dijkstra <wdijkstr@arm.com>
4141
4142 * config/aarch64/aarch64.c (aarch64_override_options_internal):
4143 Set PARAM_SCHED_PRESSURE_ALGORITHM to SCHED_PRESSURE_MODEL.
4144
4145 2017-11-03 Kito Cheng <kito.cheng@gmail.com>
4146
4147 * config/riscv/riscv.c (riscv_legitimize_move): Handle
4148 non-legitimate address.
4149
4150 2017-11-03 Segher Boessenkool <segher@kernel.crashing.org>
4151
4152 * config/rs6000/rs6000.md (*lt0_disi): Delete.
4153 (*lt0_<mode>di, *lt0_<mode>si): New.
4154
4155 2017-11-03 Segher Boessenkool <segher@kernel.crashing.org>
4156
4157 * config/rs6000/rs6000.md (move_from_CR_ov_bit): Change condition to
4158 TARGET_PAIRED_FLOAT.
4159
4160 2017-11-03 Siddhesh Poyarekar <siddhesh.poyarekar@linaro.org>
4161 Jim Wilson <jim.wilson@linaro.org>
4162
4163 * config/aarch64/aarch64-cores.def (saphira): New CPU.
4164 * config/aarch64/aarch64-tune.md: Regenerated.
4165 * doc/invoke.texi (AArch64 Options/-mtune): Add "saphira".
4166 * gcc/config/aarch64/aarch64.c (saphira_tunings): New tuning table.
4167
4168 2017-11-03 Cupertino Miranda <cmiranda@synopsys.com>
4169
4170 * config/arc/arc.c (arc_save_restore): Corrected CFA note.
4171 (arc_expand_prologue): Restore blink for millicode.
4172 * config/arc/linux.h (LINK_EH_SPEC): Defined.
4173
4174 2017-11-03 Richard Sandiford <richard.sandiford@linaro.org>
4175
4176 PR target/82809
4177 * config/i386/i386.c (ix86_vector_duplicate_value): Use
4178 gen_vec_duplicate after forcing the scalar into a register.
4179
4180 2017-11-02 Segher Boessenkool <segher@kernel.crashing.org>
4181
4182 * combine (try_combine): Print the insns input to try_combine to the
4183 dump file.
4184
4185 2017-11-02 Steve Ellcey <sellcey@cavium.com>
4186
4187 PR target/79868
4188 * config/aarch64/aarch64-c.c (aarch64_pragma_target_parse):
4189 Remove second argument from aarch64_process_target_attr call.
4190 * config/aarch64/aarch64-protos.h (aarch64_process_target_attr):
4191 Ditto.
4192 * config/aarch64/aarch64.c (aarch64_attribute_info): Change
4193 field type.
4194 (aarch64_handle_attr_arch): Remove second argument.
4195 (aarch64_handle_attr_cpu): Ditto.
4196 (aarch64_handle_attr_tune): Ditto.
4197 (aarch64_handle_attr_isa_flags): Ditto.
4198 (aarch64_process_one_target_attr): Ditto.
4199 (aarch64_process_target_attr): Ditto.
4200 (aarch64_option_valid_attribute_p): Remove second argument.
4201 on aarch64_process_target_attr call.
4202
4203 2017-11-02 David Malcolm <dmalcolm@redhat.com>
4204
4205 * diagnostic.c: Include "selftest-diagnostic.h".
4206 (selftest::assert_location_text): New function.
4207 (selftest::test_diagnostic_get_location_text): New function.
4208 (selftest::diagnostic_c_tests): Call it.
4209
4210 2017-11-02 David Malcolm <dmalcolm@redhat.com>
4211
4212 * Makefile.in (OBJS-libcommon): Add selftest-diagnostic.o.
4213 * diagnostic-show-locus.c: Include "selftest-diagnostic.h".
4214 (class selftest::test_diagnostic_context): Move to...
4215 * selftest-diagnostic.c: New file.
4216 * selftest-diagnostic.h: New file.
4217
4218 2017-11-02 James Bowman <james.bowman@ftdichip.com>
4219
4220 * config/ft32/ft32.c (ft32_addr_space_legitimate_address_p): increase
4221 offset range for FT32B.
4222 * config/ft32/ft32.h: option "mcompress" enables relaxation.
4223 * config/ft32/ft32.md: Add TARGET_NOPM.
4224 * config/ft32/ft32.opt: Add mft32b, mcompress, mnopm.
4225 * gcc/doc/invoke.texi: Add mft32b, mcompress, mnopm.
4226
4227 2017-11-02 Wilco Dijkstra <wdijkstr@arm.com>
4228
4229 * config/aarch64/aarch64.h (MALLOC_ABI_ALIGNMENT): New define.
4230
4231 2017-11-02 Jeff Law <law@redhat.com>
4232
4233 * gimple-ssa-sprintf.c (sprintf_dom_walker): Remove
4234 virtual keyword on FINAL OVERRIDE members.
4235
4236 * tree-ssa-propagate.h (ssa_propagation_engine): Group
4237 virtuals together. Add virtual destructor.
4238 (substitute_and_fold_engine): Similarly.
4239
4240 2017-11-02 Jan Hubicka <hubicka@ucw.cz>
4241
4242 * x86-tune.def (X86_TUNE_USE_INCDEC): Enable for Haswell+.
4243
4244 2017-11-02 Richard Biener <rguenther@suse.de>
4245
4246 PR tree-optimization/82795
4247 * tree-if-conv.c (predicate_mem_writes): Remove bogus assert.
4248
4249 2017-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4250
4251 * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Don't require
4252 gcc_SUN_LD_VERSION.
4253 (gcc_GAS_CHECK_FEATURE): Remove.
4254 * configure.ac (ld_vers) <*-*-solaris2*>: Move comments from
4255 gcc_AC_INITFINI_ARRAY here. Update for Solaris 11.4 changes.
4256 * configure: Regenerate.
4257
4258 2017-11-02 Claudiu Zissulescu <claziss@synopsys.com>
4259
4260 * config/arc/arc.c (hwloop_optimize): Account for empty
4261 body loops.
4262
4263 2017-11-02 Richard Biener <rguenther@suse.de>
4264
4265 PR middle-end/82765
4266 * varasm.c (decode_addr_const): Make offset HOST_WIDE_INT.
4267 Truncate ARRAY_REF index and element size.
4268
4269 2017-11-01 Palmer Dabbelt <palmer@dabbelt.com>
4270
4271 * doc/invoke.texi (RISC-V Options): Use "@minus{}2 GB", not "-2 GB".
4272
4273 2017-11-01 Jeff Law <law@redhat.com>
4274
4275 * tree-ssa-ccp.c (ccp_folder): New class derived from
4276 substitute_and_fold_engine.
4277 (ccp_folder::get_value): New member function.
4278 (ccp_folder::fold_stmt): Renamed from ccp_fold_stmt.
4279 (ccp_fold_stmt): Remove prototype.
4280 (ccp_finalize): Call substitute_and_fold from the ccp_class.
4281 * tree-ssa-copy.c (copy_folder): New class derived from
4282 substitute_and_fold_engine.
4283 (copy_folder::get_value): Renamed from get_value.
4284 (fini_copy_prop): Call substitute_and_fold from copy_folder class.
4285 * tree-vrp.c (vrp_folder): New class derived from
4286 substitute_and_fold_engine.
4287 (vrp_folder::fold_stmt): Renamed from vrp_fold_stmt.
4288 (vrp_folder::get_value): New member function.
4289 (vrp_finalize): Call substitute_and_fold from vrp_folder class.
4290 (evrp_dom_walker::before_dom_children): Similarly for replace_uses_in.
4291 * tree-ssa-propagate.h (substitute_and_fold_engine): New class to
4292 provide a class interface to folder/substitute routines.
4293 (ssa_prop_fold_stmt_fn): Remove typedef.
4294 (ssa_prop_get_value_fn): Likewise.
4295 (subsitute_and_fold): Remove prototype.
4296 (replace_uses_in): Likewise.
4297 * tree-ssa-propagate.c (substitute_and_fold_engine::replace_uses_in):
4298 Renamed from replace_uses_in. Call the virtual member function
4299 (substitute_and_fold_engine::replace_phi_args_in): Similarly.
4300 (substitute_and_fold_dom_walker): Remove initialization of
4301 data member entries for calbacks. Add substitute_and_fold_engine
4302 member and initialize it.
4303 (substitute_and_fold_dom_walker::before_dom_children0: Use the
4304 member functions for get_value, replace_phi_args_in c
4305 replace_uses_in, and fold_stmt calls.
4306 (substitute_and_fold_engine::substitute_and_fold): Renamed from
4307 substitute_and_fold. Remove assert. Update ctor call.
4308
4309 * tree-ssa-propagate.h (ssa_prop_visit_stmt_fn): Remove typedef.
4310 (ssa_prop_visit_phi_fn): Likewise.
4311 (class ssa_propagation_engine): New class to provide an interface
4312 into ssa_propagate.
4313 * tree-ssa-propagate.c (ssa_prop_visit_stmt): Remove file scoped
4314 variable.
4315 (ssa_prop_visit_phi): Likewise.
4316 (ssa_propagation_engine::simulate_stmt): Moved into class.
4317 Call visit_phi/visit_stmt from the class rather than via
4318 file scoped static variables.
4319 (ssa_propagation_engine::simulate_block): Moved into class.
4320 (ssa_propagation_engine::process_ssa_edge_worklist): Similarly.
4321 (ssa_propagation_engine::ssa_propagate): Similarly. No longer
4322 set file scoped statics for the visit_stmt/visit_phi callbacks.
4323 * tree-complex.c (complex_propagate): New class derived from
4324 ssa_propagation_engine.
4325 (complex_propagate::visit_stmt): Renamed from complex_visit_stmt.
4326 (complex_propagate::visit_phi): Renamed from complex_visit_phi.
4327 (tree_lower_complex): Call ssa_propagate via the complex_propagate
4328 class.
4329 * tree-ssa-ccp.c: (ccp_propagate): New class derived from
4330 ssa_propagation_engine.
4331 (ccp_propagate::visit_phi): Renamed from ccp_visit_phi_node.
4332 (ccp_propagate::visit_stmt): Renamed from ccp_visit_stmt.
4333 (do_ssa_ccp): Call ssa_propagate from the ccp_propagate class.
4334 * tree-ssa-copy.c (copy_prop): New class derived from
4335 ssa_propagation_engine.
4336 (copy_prop::visit_stmt): Renamed from copy_prop_visit_stmt.
4337 (copy_prop::visit_phi): Renamed from copy_prop_visit_phi_node.
4338 (execute_copy_prop): Call ssa_propagate from the copy_prop class.
4339 * tree-vrp.c (vrp_prop): New class derived from ssa_propagation_engine.
4340 (vrp_prop::visit_stmt): Renamed from vrp_visit_stmt.
4341 (vrp_prop::visit_phi): Renamed from vrp_visit_phi_node.
4342 (execute_vrp): Call ssa_propagate from the vrp_prop class.
4343
4344 2017-11-01 Jakub Jelinek <jakub@redhat.com>
4345
4346 PR rtl-optimization/82778
4347 PR rtl-optimization/82597
4348 * compare-elim.c (struct comparison): Add in_a_setter field.
4349 (find_comparison_dom_walker::before_dom_children): Remove killed
4350 bitmap and df_simulate_find_defs call, instead walk the defs.
4351 Compute last_setter and initialize in_a_setter. Merge definitions
4352 with first initialization for a few variables.
4353 (try_validate_parallel): Use insn_invalid_p instead of
4354 recog_memoized. Return insn rather than just the pattern.
4355 (try_merge_compare): Fix up comment. Don't uselessly test if
4356 in_a is a REG_P. Use cmp->in_a_setter instead of walking UD
4357 chains.
4358 (execute_compare_elim_after_reload): Remove df_chain_add_problem
4359 call.
4360
4361 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4362 Alan Hayward <alan.hayward@arm.com>
4363 David Sherwood <david.sherwood@arm.com>
4364
4365 * config/aarch64/aarch64.c (aarch64_rtx_costs): Use
4366 aarch64_hard_regno_nregs to get the number of registers
4367 in a mode.
4368
4369 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4370 Alan Hayward <alan.hayward@arm.com>
4371 David Sherwood <david.sherwood@arm.com>
4372
4373 * config/aarch64/constraints.md (Upl): Rename to...
4374 (Uaa): ...this.
4375 * config/aarch64/aarch64.md
4376 (*zero_extend<SHORT:mode><GPI:mode>2_aarch64, *addsi3_aarch64_uxtw):
4377 Update accordingly.
4378
4379 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4380 Alan Hayward <alan.hayward@arm.com>
4381 David Sherwood <david.sherwood@arm.com>
4382
4383 * config/aarch64/aarch64.c (aarch64_add_constant_internal)
4384 (aarch64_add_constant, aarch64_add_sp, aarch64_sub_sp): Move
4385 earlier in file.
4386
4387 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4388 Alan Hayward <alan.hayward@arm.com>
4389 David Sherwood <david.sherwood@arm.com>
4390
4391 * config/aarch64/aarch64.c (aarch64_evpc_trn, aarch64_evpc_uzp)
4392 (aarch64_evpc_zip, aarch64_evpc_ext, aarch64_evpc_rev)
4393 (aarch64_evpc_dup): Generate rtl direcly, rather than using
4394 named expanders.
4395 (aarch64_expand_vec_perm_const_1): Explicitly check for permutes
4396 of a single element.
4397 * config/aarch64/iterators.md: Add a comment above the permute
4398 unspecs to say that they are generated directly by
4399 aarch64_expand_vec_perm_const.
4400 * config/aarch64/aarch64-simd.md: Likewise the permute instructions.
4401
4402 2017-11-01 Nathan Sidwell <nathan@acm.org>
4403
4404 * tree-dump.c (dequeue_and_dump): Use HAS_DECL_ASSEMBLER_NAME_P.
4405
4406 2017-11-01 Palmer Dabbelt <palmer@dabbelt.com>
4407
4408 * doc/invoke.texi (RISC-V Options): Explicitly name the medlow
4409 and medany code models, and describe what they do.
4410
4411 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4412
4413 Revert accidental duplicate:
4414
4415 * combine.c (can_change_dest_mode): Reject changes in
4416 REGMODE_NATURAL_SIZE.
4417
4418 2017-11-01 Segher Boessenkool <segher@kernel.crashing.org>
4419
4420 PR rtl-optimization/64682
4421 PR rtl-optimization/69567
4422 PR rtl-optimization/69737
4423 PR rtl-optimization/82683
4424 * combine.c (distribute_notes) <REG_DEAD>: If the new I2 sets the same
4425 register mentioned in the note, drop the note, unless it came from I3,
4426 in which case it should go to I3 again.
4427
4428 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4429
4430 * tree-ssa-dse.c (normalize_ref): Check whether the ranges overlap
4431 and return false if not.
4432 (clear_bytes_written_by, live_bytes_read): Update accordingly.
4433
4434 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4435
4436 * tree-ssa-alias.h (ranges_overlap_p): Return false if either
4437 range is known to be empty.
4438
4439 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4440 Alan Hayward <alan.hayward@arm.com>
4441 David Sherwood <david.sherwood@arm.com>
4442
4443 * simplify-rtx.c (simplify_const_unary_operation): Use GET_MODE_NUNITS
4444 and CONST_VECTOR_NUNITS instead of computing the number of units from
4445 the byte sizes of the vector and element.
4446 (simplify_binary_operation_1): Likewise.
4447 (simplify_const_binary_operation): Likewise.
4448 (simplify_ternary_operation): Likewise.
4449
4450 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4451 Alan Hayward <alan.hayward@arm.com>
4452 David Sherwood <david.sherwood@arm.com>
4453
4454 * var-tracking.c (INT_MEM_OFFSET): Replace with...
4455 (int_mem_offset): ...this new function.
4456 (var_mem_set, var_mem_delete_and_set, var_mem_delete)
4457 (find_mem_expr_in_1pdv, dataflow_set_preserve_mem_locs)
4458 (same_variable_part_p, use_type, add_stores, vt_get_decl_and_offset):
4459 Update accordingly.
4460
4461 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4462 Alan Hayward <alan.hayward@arm.com>
4463 David Sherwood <david.sherwood@arm.com>
4464
4465 * lower-subreg.c (interesting_mode_p): New function.
4466 (compute_costs, find_decomposable_subregs, decompose_register)
4467 (simplify_subreg_concatn, can_decompose_p, resolve_simple_move)
4468 (resolve_clobber, dump_choices): Use it.
4469
4470 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4471 Alan Hayward <alan.hayward@arm.com>
4472 David Sherwood <david.sherwood@arm.com>
4473
4474 * rtlhash.c (add_rtx): Use add_hwi for 'w' and add_int for 'i'.
4475
4476 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4477 Alan Hayward <alan.hayward@arm.com>
4478 David Sherwood <david.sherwood@arm.com>
4479
4480 * alias.c (find_base_value, find_base_term): Only process integer
4481 truncations. Check the precision rather than the size.
4482
4483 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4484 Alan Hayward <alan.hayward@arm.com>
4485 David Sherwood <david.sherwood@arm.com>
4486
4487 * machmode.h (is_narrower_int_mode): New function
4488 * optabs.c (expand_float, expand_fix): Use it.
4489 * dwarf2out.c (rotate_loc_descriptor): Likewise.
4490
4491 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4492 Alan Hayward <alan.hayward@arm.com>
4493 David Sherwood <david.sherwood@arm.com>
4494
4495 * rtl.h (narrower_subreg_mode): New function.
4496 * ira-color.c (update_costs_from_allocno): Use it.
4497
4498 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4499 Alan Hayward <alan.hayward@arm.com>
4500 David Sherwood <david.sherwood@arm.com>
4501
4502 * optabs-query.h (convert_optab_p): New function, split out from...
4503 (convert_optab_handler): ...here.
4504 (widening_optab_handler): Delete.
4505 (find_widening_optab_handler): Remove permit_non_widening parameter.
4506 (find_widening_optab_handler_and_mode): Likewise. Provide an
4507 override that operates on mode class wrappers.
4508 * optabs-query.c (widening_optab_handler): Delete.
4509 (find_widening_optab_handler_and_mode): Remove permit_non_widening
4510 parameter. Assert that the two modes are the same class and that
4511 the "from" mode is narrower than the "to" mode. Use
4512 convert_optab_handler instead of widening_optab_handler.
4513 * expmed.c (expmed_mult_highpart_optab): Use convert_optab_handler
4514 instead of widening_optab_handler.
4515 * expr.c (expand_expr_real_2): Update calls to
4516 find_widening_optab_handler.
4517 * optabs.c (expand_widen_pattern_expr): Likewise.
4518 (expand_binop_directly): Take the insn_code as a parameter.
4519 (expand_binop): Only call find_widening_optab_handler for
4520 conversion optabs; use optab_handler otherwise. Update calls
4521 to find_widening_optab_handler and expand_binop_directly.
4522 Use convert_optab_handler instead of widening_optab_handler.
4523 * tree-ssa-math-opts.c (convert_mult_to_widen): Update calls to
4524 find_widening_optab_handler and use scalar_mode rather than
4525 machine_mode.
4526 (convert_plusminus_to_widen): Likewise.
4527
4528 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4529 Alan Hayward <alan.hayward@arm.com>
4530 David Sherwood <david.sherwood@arm.com>
4531
4532 * machmode.h (fixed_size_mode): New class.
4533 * rtl.h (get_pool_mode): Return fixed_size_mode.
4534 * gengtype.c (main): Add fixed_size_mode.
4535 * target.def (get_raw_result_mode): Return a fixed_size_mode.
4536 (get_raw_arg_mode): Likewise.
4537 * doc/tm.texi: Regenerate.
4538 * targhooks.h (default_get_reg_raw_mode): Return a fixed_size_mode.
4539 * targhooks.c (default_get_reg_raw_mode): Likewise.
4540 * config/ia64/ia64.c (ia64_get_reg_raw_mode): Likewise.
4541 * config/mips/mips.c (mips_get_reg_raw_mode): Likewise.
4542 * config/msp430/msp430.c (msp430_get_raw_arg_mode): Likewise.
4543 (msp430_get_raw_result_mode): Likewise.
4544 * config/avr/avr-protos.h (regmask): Use as_a <fixed_side_mode>
4545 * dbxout.c (dbxout_parms): Require fixed-size modes.
4546 * expr.c (copy_blkmode_from_reg, copy_blkmode_to_reg): Likewise.
4547 * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
4548 * omp-low.c (lower_oacc_reductions): Likewise.
4549 * simplify-rtx.c (simplify_immed_subreg): Take fixed_size_modes.
4550 (simplify_subreg): Update accordingly.
4551 * varasm.c (constant_descriptor_rtx::mode): Change to fixed_size_mode.
4552 (force_const_mem): Update accordingly. Return NULL_RTX for modes
4553 that aren't fixed-size.
4554 (get_pool_mode): Return a fixed_size_mode.
4555 (output_constant_pool_2): Take a fixed_size_mode.
4556
4557 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4558 Alan Hayward <alan.hayward@arm.com>
4559 David Sherwood <david.sherwood@arm.com>
4560
4561 * doc/rtl.texi (vec_series): Document.
4562 (const): Say that the operand can be a vec_series.
4563 * rtl.def (VEC_SERIES): New rtx code.
4564 * rtl.h (const_vec_series_p_1): Declare.
4565 (const_vec_series_p): New function.
4566 * emit-rtl.h (gen_const_vec_series): Declare.
4567 (gen_vec_series): Likewise.
4568 * emit-rtl.c (const_vec_series_p_1, gen_const_vec_series)
4569 (gen_vec_series): Likewise.
4570 * optabs.c (expand_mult_highpart): Use gen_const_vec_series.
4571 * simplify-rtx.c (simplify_unary_operation): Handle negations
4572 of vector series.
4573 (simplify_binary_operation_series): New function.
4574 (simplify_binary_operation_1): Use it. Handle VEC_SERIES.
4575 (test_vector_ops_series): New function.
4576 (test_vector_ops): Call it.
4577 * config/powerpcspe/altivec.md (altivec_lvsl): Use
4578 gen_const_vec_series.
4579 (altivec_lvsr): Likewise.
4580 * config/rs6000/altivec.md (altivec_lvsl, altivec_lvsr): Likewise.
4581
4582 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4583 Alan Hayward <alan.hayward@arm.com>
4584 David Sherwood <david.sherwood@arm.com>
4585
4586 * doc/rtl.texi (const): Update description of address constants.
4587 Say that vector constants are allowed too.
4588 * common.md (E, F): Use CONSTANT_P instead of checking for
4589 CONST_VECTOR.
4590 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
4591 checking for CONST_VECTOR.
4592 * expmed.c (make_tree): Use build_vector_from_val for a CONST
4593 VEC_DUPLICATE.
4594 * expr.c (expand_expr_real_2): Check for vector modes instead
4595 of checking for CONST_VECTOR.
4596 * rtl.h (const_vec_p): New function.
4597 (const_vec_duplicate_p): Check for a CONST VEC_DUPLICATE.
4598 (unwrap_const_vec_duplicate): Handle them here too.
4599
4600 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4601 David Malcolm <dmalcolm@redhat.com>
4602 Alan Hayward <alan.hayward@arm.com>
4603 David Sherwood <david.sherwood@arm.com>
4604
4605 * rtl.h (vec_duplicate_p): New function.
4606 * selftest-rtl.c (assert_rtx_eq_at): New function.
4607 * selftest-rtl.h (ASSERT_RTX_EQ): New macro.
4608 (assert_rtx_eq_at): Declare.
4609 * selftest.h (selftest::simplify_rtx_c_tests): Declare.
4610 * selftest-run-tests.c (selftest::run_tests): Call it.
4611 * simplify-rtx.c: Include selftest.h and selftest-rtl.h.
4612 (simplify_unary_operation_1): Recursively handle vector duplicates.
4613 (simplify_binary_operation_1): Likewise. Handle VEC_SELECTs of
4614 vector duplicates.
4615 (simplify_subreg): Handle subregs of vector duplicates.
4616 (make_test_reg, test_vector_ops_duplicate, test_vector_ops)
4617 (selftest::simplify_rtx_c_tests): New functions.
4618
4619 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4620 Alan Hayward <alan.hayward@arm.com>
4621 David Sherwood <david.sherwood@arm.com>
4622
4623 * emit-rtl.h (gen_const_vec_duplicate): Declare.
4624 (gen_vec_duplicate): Likewise.
4625 * emit-rtl.c (gen_const_vec_duplicate_1): New function, split
4626 out from...
4627 (gen_const_vector): ...here.
4628 (gen_const_vec_duplicate, gen_vec_duplicate): New functions.
4629 (gen_rtx_CONST_VECTOR): Use gen_const_vec_duplicate for constants
4630 whose elements are all equal.
4631 * optabs.c (expand_vector_broadcast): Use gen_const_vec_duplicate.
4632 * simplify-rtx.c (simplify_const_unary_operation): Likewise.
4633 (simplify_relational_operation): Likewise.
4634 * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
4635 Likewise.
4636 (aarch64_simd_dup_constant): Use gen_vec_duplicate.
4637 (aarch64_expand_vector_init): Likewise.
4638 * config/arm/arm.c (neon_vdup_constant): Likewise.
4639 (neon_expand_vector_init): Likewise.
4640 (arm_expand_vec_perm): Use gen_const_vec_duplicate.
4641 (arm_block_set_unaligned_vect): Likewise.
4642 (arm_block_set_aligned_vect): Likewise.
4643 * config/arm/neon.md (neon_copysignf<mode>): Likewise.
4644 * config/i386/i386.c (ix86_expand_vec_perm): Likewise.
4645 (expand_vec_perm_even_odd_pack): Likewise.
4646 (ix86_vector_duplicate_value): Use gen_vec_duplicate.
4647 * config/i386/sse.md (one_cmpl<mode>2): Use CONSTM1_RTX.
4648 * config/ia64/ia64.c (ia64_expand_vecint_compare): Use
4649 gen_const_vec_duplicate.
4650 * config/ia64/vect.md (addv2sf3, subv2sf3): Use CONST1_RTX.
4651 * config/mips/mips.c (mips_gen_const_int_vector): Use
4652 gen_const_vec_duplicate.
4653 (mips_expand_vector_init): Use CONST0_RTX.
4654 * config/powerpcspe/altivec.md (abs<mode>2, nabs<mode>2): Likewise.
4655 (define_split): Use gen_const_vec_duplicate.
4656 * config/rs6000/altivec.md (abs<mode>2, nabs<mode>2): Use CONST0_RTX.
4657 (define_split): Use gen_const_vec_duplicate.
4658 * config/s390/vx-builtins.md (vec_genmask<mode>): Likewise.
4659 (vec_ctd_s64, vec_ctd_u64, vec_ctsl, vec_ctul): Likewise.
4660 * config/spu/spu.c (spu_const): Likewise.
4661
4662 2017-11-01 Richard Sandiford <richard.sandiford@linaro.org>
4663 Alan Hayward <alan.hayward@arm.com>
4664 David Sherwood <david.sherwood@arm.com>
4665
4666 * combine.c (can_change_dest_mode): Reject changes in
4667 REGMODE_NATURAL_SIZE.
4668
4669 2017-10-31 Sandra Loosemore <sandra@codesourcery.com>
4670
4671 * configure.ac (--enable-libssp): New.
4672 (gcc_cv_libc_provides_ssp): Check for explicit setting before
4673 trying to determine target-specific default. Adjust indentation.
4674 * configure: Regenerated.
4675 * doc/install.texi (Configuration): Expand --disable-libssp
4676 documentation.
4677
4678 2017-10-31 Daniel Santos <daniel.santos@pobox.com>
4679
4680 config/i386/i386.c (ix86_expand_epilogue): Correct stack
4681 calculation.
4682
4683 2017-10-31 Martin Jambor <mjambor@suse.cz>
4684
4685 PR c++/81702
4686 * gimple-fold.c (gimple_get_virt_method_for_vtable): Remove assert.
4687
4688 2017-10-31 David Malcolm <dmalcolm@redhat.com>
4689
4690 * auto-profile.c (autofdo_source_profile::read): Use
4691 UNKNOWN_LOCATION rather than 0.
4692 * diagnostic-core.h (warning_at_rich_loc): Rename to...
4693 (warning_at): ...this overload.
4694 (warning_at_rich_loc_n): Rename to...
4695 (warning_n): ...this overload.
4696 (error_at_rich_loc): Rename to...
4697 (error_at): ...this overload.
4698 (pedwarn_at_rich_loc): Rename to...
4699 (pedwarn): ...this overload.
4700 (permerror_at_rich_loc): Rename to...
4701 (permerror): ...this overload.
4702 (inform_at_rich_loc): Rename to...
4703 (inform): ...this overload.
4704 * diagnostic.c: (diagnostic_n_impl): Delete location_t-based decl.
4705 (diagnostic_n_impl_richloc): Rename to...
4706 (diagnostic_n_impl): ...this rich_location *-based decl.
4707 (inform_at_rich_loc): Rename to...
4708 (inform): ...this, and add an assertion.
4709 (inform_n): Update for removal of location_t-based diagnostic_n_impl.
4710 (warning_at_rich_loc): Rename to...
4711 (warning_at): ...this, and add an assertion.
4712 (warning_at_rich_loc_n): Rename to...
4713 (warning_n): ...this, and add an assertion.
4714 (warning_n): Update location_t-based implementation for removal of
4715 location_t-based diagnostic_n_impl.
4716 (pedwarn_at_rich_loc): Rename to...
4717 (pedwarn): ...this, and add an assertion.
4718 (permerror_at_rich_loc): Rename to...
4719 (permerror): ...this, and add an assertion.
4720 (error_n): Update for removal of location_t-based diagnostic_n_impl.
4721 (error_at_rich_loc): Rename to...
4722 (error_at): ...this, and add an assertion.
4723 * gcc.c (do_spec_1): Use UNKNOWN_LOCATION rather than 0.
4724 (driver::do_spec_on_infiles): Likewise.
4725 * substring-locations.c (format_warning_va): Update for renaming
4726 of inform_at_rich_loc.
4727
4728 2017-10-31 Michael Meissner <meissner@linux.vnet.ibm.com>
4729
4730 * builtins.def (DEF_FLOATN_BUILTIN): Change most _Float<N> and
4731 _Float<N>X built-in functions so that the variant without the
4732 "__builtin_" prefix is only enabled for the GNU C and Objective C
4733 languages when they are in non-strict ANSI/ISO mode.
4734 (DEF_EXT_LIB_FLOATN_NX_BUILTINS): Likewise.
4735 * target.def (floatn_builtin_p): Add a target hook to control
4736 whether _Float<N> and _Float<N>X built-in functions without the
4737 "__builtin_" prefix are enabled, and return true for C and
4738 Objective C in the default hook. Include langhooks.h in
4739 targhooks.c.
4740 * targhooks.h (default_floatn_builtin_p): Likewise.
4741 * targhooks.c (default_floatn_builtin_p): Likewise.
4742 * doc/tm.texi.in (TARGET_FLOATN_BUILTIN_P): Document the
4743 floatn_builtin_p target hook.
4744 * doc/tm.texi (TARGET_FLOATN_BUILTIN_P): Likewise.
4745
4746 2017-10-31 Matthew Fortune <matthew.fortune@imgtec.com>
4747 Eric Botcazou <ebotcazou@adacore.com>
4748
4749 PR rtl-optimization/81803
4750 * lra-constraints.c (curr_insn_transform): Also reload the whole
4751 register for a strict subreg no wider than a word if this is for
4752 a WORD_REGISTER_OPERATIONS target.
4753
4754 2017-10-31 Jason Merrill <jason@redhat.com>
4755
4756 * gdbinit.in: Skip over inlines from timevar.h.
4757
4758 2017-10-31 Martin Liska <mliska@suse.cz>
4759
4760 * doc/gcov.texi: Document new option.
4761 * gcov.c (print_usage): Likewise print it.
4762 (process_args): Support the argument.
4763 (format_count): New function.
4764 (format_gcov): Use the function.
4765
4766 2017-10-31 Martin Liska <mliska@suse.cz>
4767
4768 * gcov.c (struct name_map): do not use typedef.
4769 Define operator== and operator<.
4770 (name_search): Remove.
4771 (name_sort): Remove.
4772 (main): Do not allocate names.
4773 (process_file): Add vertical space.
4774 (generate_results): Use std::find.
4775 (release_structures): Do not release memory.
4776 (find_source): Use std::find.
4777
4778 2017-10-31 Martin Liska <mliska@suse.cz>
4779
4780 * gcov.c (struct line_info): Remove it's typedef.
4781 (line_info::line_info): Add proper ctor.
4782 (line_info::has_block): Do not use a typedef.
4783 (struct source_info): Do not use typedef.
4784 (circuit): Likewise.
4785 (get_cycles_count): Likewise.
4786 (output_intermediate_file): Iterate via vector iterator.
4787 (add_line_counts): Use std::vector methods.
4788 (accumulate_line_counts): Likewise.
4789 (output_lines): Likewise.
4790
4791 2017-10-31 Martin Liska <mliska@suse.cz>
4792
4793 * gcov.c (struct source_info): Remove typedef.
4794 (source_info::source_info): Add proper ctor.
4795 (accumulate_line_counts): Use struct, not it's typedef.
4796 (output_gcov_file): Likewise.
4797 (output_lines): Likewise.
4798 (main): Do not allocate an array.
4799 (output_intermediate_file): Use size of vector container.
4800 (process_file): Resize the vector.
4801 (generate_results): Do not preallocate, use newly added vector
4802 lines.
4803 (release_structures): Do not release sources.
4804 (find_source): Use vector methods.
4805 (add_line_counts): Do not use typedef.
4806
4807 2017-10-31 Martin Liska <mliska@suse.cz>
4808
4809 * doc/gcov.texi: Document that.
4810 * gcov.c (add_line_counts): Mark lines with a non-executed
4811 statement.
4812 (output_line_beginning): Handle such lines.
4813 (output_lines): Pass new argument.
4814 (output_intermediate_file): Print it in intermediate format.
4815
4816 2017-10-31 Martin Liska <mliska@suse.cz>
4817
4818 * color-macros.h: New file.
4819 * diagnostic-color.c: Factor out color related to macros to
4820 color-macros.h.
4821 * doc/gcov.texi: Document -k option.
4822 * gcov.c (INCLUDE_STRING): Include string.h.
4823 (print_usage): Add -k option.
4824 (process_args): Parse it.
4825 (pad_count_string): New function.
4826 (output_line_beginning): Likewise.
4827 (DEFAULT_LINE_START): New macro.
4828 (output_lines): Support color output.
4829
4830 2017-10-31 Martin Liska <mliska@suse.cz>
4831
4832 PR gcov-profile/82633
4833 * doc/gcov.texi: Document -fkeep-{static,inline}-functions and
4834 their interaction with GCOV infrastructure.
4835 * configure.ac: Add -fkeep-{inline,static}-functions to
4836 coverage_flags.
4837 * configure: Regenerate.
4838
4839 2017-10-31 Uros Bizjak <ubizjak@gmail.com>
4840
4841 PR target/82772
4842 * config/alpha/sync.md (fetchop_constr) <and>: Change to "rINM".
4843
4844 2017-10-31 Segher Boessenkool <segher@kernel.crashing.org>
4845
4846 PR target/82674
4847 * config/rs6000/rs6000.md (allocate_stack): Force update interval
4848 into a register if it does not fit into an immediate offset field.
4849
4850 2017-10-31 Olivier Hainque <hainque@adacore.com>
4851
4852 * gcc/Makefile.in (FLAGS_TO_PASS): Pass libsubdir as well.
4853
4854 2017-10-31 Julia Koval <julia.koval@intel.com>
4855
4856 * config.gcc: Add gfniintrin.h.
4857 * config/i386/gfniintrin.h: New.
4858 * config/i386/i386-builtin-types.def
4859 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
4860 __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
4861 __builtin_ia32_vgf2p8affineinvqb_v32qi,
4862 __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
4863 __builtin_ia32_vgf2p8affineinvqb_v16qi,
4864 __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): New builtins.
4865 * config/i386/i386-builtin.def (V64QI_FTYPE_V64QI_V64QI_INT_V64QI_UDI,
4866 V32QI_FTYPE_V32QI_V32QI_INT_V32QI_USI,
4867 V16QI_FTYPE_V16QI_V16QI_INT_V16QI_UHI,
4868 V64QI_FTYPE_V64QI_V64QI_INT): New types.
4869 * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
4870 * config/i386/immintrin.h: Include gfniintrin.h.
4871 * config/i386/sse.md (vgf2p8affineinvqb_*) New pattern.
4872
4873 2017-10-30 Eric Botcazou <ebotcazou@adacore.com>
4874
4875 * gcc.c (HAVE_TARGET_EXECUTABLE_SUFFIX): Remove old kludge.
4876
4877 2017-10-30 Wilco Dijkstra <wdijkstr@arm.com>
4878
4879 * config/arm/arm.md (ashldi3): Remove shift by 1 expansion.
4880 (arm_ashldi3_1bit): Remove pattern.
4881 (ashrdi3): Remove shift by 1 expansion.
4882 (arm_ashrdi3_1bit): Remove pattern.
4883 (lshrdi3): Remove shift by 1 expansion.
4884 (arm_lshrdi3_1bit): Remove pattern.
4885 * config/arm/arm.c (arm_rtx_costs_internal): Slightly increase
4886 cost of ashldi3 by 1.
4887 * config/arm/neon.md (ashldi3_neon): Remove shift by 1 expansion.
4888 (<shift>di3_neon): Likewise.
4889
4890 2017-10-30 Dominik Infuehr <dominik.infuehr@theobroma-systems.com>
4891
4892 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov): Rename
4893 both identically named patterns to (*aarch64_simd_mov<VD:mode>)
4894 and (*aarch64_simd_mov<VQ:mode>).
4895 (*aarch64_simd_mov<VD:mode>): Change type attribute to match
4896 pattern alternative.
4897 (*aarch64_simd_mov<VQ:mode>): Re-order and change type
4898 attributes to match pattern alternative.
4899
4900 2017-10-30 Steven Munroe <munroesj@gcc.gnu.org>
4901
4902 * config.gcc (powerpc*-*-*): Add emmintrin.h.
4903 * config/rs6000/emmintrin.h: New file.
4904 * config/rs6000/x86intrin.h [__ALTIVEC__]: Include emmintrin.h.
4905
4906 2017-10-30 Wilco Dijkstra <wdijkstr@arm.com>
4907
4908 * config/arm/vfp.md (movdi_vfp): Merge changes from movdi_vfp_cortexa8.
4909 * (movdi_vfp_cortexa8): Remove pattern.
4910
4911 2017-10-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4912
4913 * doc/install.texi (Specific, alpha*-*-*): Remove DEC OSF/1
4914 etc. reference.
4915 (Specific, alpha*-dec-osf5.1): Remove.
4916 (Specific, mips-sgi-irix5): Remove.
4917 (Specific, mips-sgi-irix6): Remove.
4918
4919 2017-10-30 Jakub Jelinek <jakub@redhat.com>
4920
4921 PR middle-end/22141
4922 * gimple-ssa-store-merging.c (merged_store_group::apply_stores): Fix
4923 arguments to clear_bit_region_be.
4924
4925 2017-10-30 Jim Wilson <wilson@tuliptree.org>
4926
4927 * gimplify.c: Include memmodel.h.
4928
4929 2017-10-30 Martin Jambor <mjambor@suse.cz>
4930
4931 * omp-grid.c (grid_attempt_target_gridification): Also insert a
4932 condition whether loop should be executed at all.
4933
4934 2017-10-30 Will Schmidt <will_schmidt@vnet.ibm.com>
4935
4936 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
4937 gimple folding of vec_madd() intrinsics.
4938 * config/rs6000/altivec.md (mulv8hi3): Rename altivec_vmladduhm to
4939 fmav8hi4. (altivec_vmladduhm): Rename to fmav8hi4.
4940 * config/rs6000/rs6000-builtin.def: Rename vmladduhm to fmav8hi4
4941
4942 2017-10-30 Richard Biener <rguenther@suse.de>
4943
4944 PR tree-optimization/82762
4945 Revert
4946 2017-10-23 Richard Biener <rguenther@suse.de>
4947
4948 PR tree-optimization/82129
4949 Revert
4950 2017-08-01 Richard Biener <rguenther@suse.de>
4951
4952 PR tree-optimization/81181
4953 * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
4954 (compute_antic): ... end of iteration here.
4955
4956 2017-10-30 Joseph Myers <joseph@codesourcery.com>
4957
4958 * doc/invoke.texi (C Dialect Options): Document -std=c17,
4959 -std=iso9899:2017 and -std=gnu17.
4960 * doc/standards.texi (C Language): Document C17 support.
4961 * doc/cpp.texi (Overview): Mention -std=c17.
4962 (Standard Predefined Macros): Document C11 and C17 values of
4963 __STDC_VERSION__. Do not refer to C99 support as incomplete.
4964 * doc/extend.texi (Inline): Do not list individual options for
4965 standards newer than C99.
4966 * dwarf2out.c (highest_c_language, gen_compile_unit_die): Handle
4967 "GNU C17".
4968 * config/rl78/rl78.c (rl78_option_override): Handle "GNU C17"
4969 language name.
4970
4971 2017-10-30 Maxim Ostapenko <m.ostapenko@samsung.com>
4972
4973 * asan.c (asan_finish_file): Align asan globals array by shadow
4974 granularity.
4975
4976 2017-10-30 Jakub Jelinek <jakub@redhat.com>
4977
4978 PR middle-end/22141
4979 * gimple-ssa-store-merging.c: Include rtl.h and expr.h.
4980 (struct store_immediate_info): Add bitregion_start and bitregion_end
4981 fields.
4982 (store_immediate_info::store_immediate_info): Add brs and bre
4983 arguments and initialize bitregion_{start,end} from those.
4984 (struct merged_store_group): Add bitregion_start, bitregion_end,
4985 align_base and mask fields. Drop unnecessary struct keyword from
4986 struct store_immediate_info. Add do_merge method.
4987 (clear_bit_region_be): Use memset instead of loop storing zeros.
4988 (merged_store_group::do_merge): New method.
4989 (merged_store_group::merge_into): Use do_merge. Allow gaps in between
4990 stores as long as the surrounding bitregions have no gaps.
4991 (merged_store_group::merge_overlapping): Use do_merge.
4992 (merged_store_group::apply_stores): Test that bitregion_{start,end}
4993 is byte aligned, rather than requiring that start and width are
4994 byte aligned. Drop unnecessary struct keyword from
4995 struct store_immediate_info. Allocate and populate also mask array.
4996 Make start of the arrays relative to bitregion_start rather than
4997 start and size them according to bitregion_{end,start} difference.
4998 (struct imm_store_chain_info): Drop unnecessary struct keyword from
4999 struct store_immediate_info.
5000 (pass_store_merging::gate): Punt if BITS_PER_UNIT or CHAR_BIT is not 8.
5001 (pass_store_merging::terminate_all_aliasing_chains): Drop unnecessary
5002 struct keyword from struct store_immediate_info.
5003 (imm_store_chain_info::coalesce_immediate_stores): Allow gaps in
5004 between stores as long as the surrounding bitregions have no gaps.
5005 Formatting fixes.
5006 (struct split_store): Add orig non-static data member.
5007 (split_store::split_store): Initialize orig to false.
5008 (find_constituent_stmts): Return store_immediate_info *, non-NULL
5009 if there is exactly a single original stmt. Change stmts argument
5010 to pointer from reference, if NULL, don't push anything to it. Add
5011 first argument, use it to optimize skipping over orig stmts that
5012 are known to be before bitpos already. Simplify.
5013 (split_group): Return unsigned int count how many stores are or
5014 would be needed rather than a bool. Add allow_unaligned argument.
5015 Change split_stores argument from reference to pointer, if NULL,
5016 only do a dry run computing how many stores would be produced.
5017 Rewritten algorithm to use both alignment and misalign if
5018 !allow_unaligned and handle bitfield stores with gaps.
5019 (imm_store_chain_info::output_merged_store): Set start_byte_pos
5020 from bitregion_start instead of start. Compute allow_unaligned
5021 here, if true, do 2 split_group dry runs to compute which one
5022 produces fewer stores and prefer aligned if equal. Punt if
5023 new count is bigger or equal than original before emitting any
5024 statements, rather than during that. Remove no longer needed
5025 new_ssa_names tracking. Replace num_stmts with
5026 split_stores.length (). Use 32-bit stack allocated entries
5027 in split_stores auto_vec. Try to reuse original store lhs/rhs1
5028 if possible. Handle bitfields with gaps.
5029 (pass_store_merging::execute): Ignore bitsize == 0 stores.
5030 Compute bitregion_{start,end} for the stores and construct
5031 store_immediate_info with that. Formatting fixes.
5032
5033 2017-10-30 Uros Bizjak <ubizjak@gmail.com>
5034
5035 PR target/82725
5036 * config/i386/i386.c (legitimate_pic_address_disp_p): Allow
5037 UNSPEC_DTPOFF and UNSPEC_NTPOFF with SImode immediate offset.
5038
5039 2017-10-29 Jim Wilson <wilson@tuliptree.org>
5040
5041 * gimplify.c: Include tm_p.h.
5042
5043 * common.opt (gcoff): Re-add as ignored option.
5044 (gcoff1, gcoff2, gcoff3): Likewise.
5045
5046 * Makefile.in (OBJS): Delete sdbout.o.
5047 (GTFILES): Delete $(srcdir)/sdbout.c.
5048 * debug.h: Delete sdb_debug_hooks.
5049 * final.c: Delete sdbout.h include.
5050 (final_scan_insn): Delete SDB_DEBUG check.
5051 (rest_of_clean_state): Likewise.
5052 * output.h: Delete sdb_begin_function_line.
5053 * sdbout.c: Delete.
5054 * sdbout.h: Delete.
5055 * toplev.c: Delete sdbout.h include.
5056 (process_options): Delete SDB_DEBUG check.
5057 * tree-core.h (tree_type_common): Delete pointer field of
5058 tree_type_symtab.
5059 * tree.c (copy_node): Clear TYPE_SYMTAB_DIE instead of
5060 TYPE_SYMTAB_POINTER.
5061 * tree.h (TYPE_SYMTAB_POINTER): Delete.
5062 (TYPE_SYMTAB_IS_POINTER): Delete.
5063 (TYPE_SYMTAB_IS_DIE): Renumber.
5064 * xcoffout.c: Refer to former sdbout.c file.
5065 (xcoffout_begin_prologue): Use past tense for sdbout.c reference.
5066
5067 * doc/install.texi (--with-stabs): Delete COFF and ECOFF info.
5068 * doc/invoke.texi (SEEALSO): Delete adb and sdb references.
5069 (Debugging Options): Delete -gcoff.
5070 (-gstabs): Delete SDB reference.
5071 (-gcoff): Delete.
5072 (-gcoff@var{level}): Delete.
5073 * doc/passes.texi (Debugging information output): Delete SDB and
5074 sdbout.c references.
5075 * doc/tm.texi: Regenerate.
5076 * doc/tm.texi.in (DWARF_CIE_DATA_ALIGNMENT): Delete SDB from xref.
5077 (SDB and DWARF): Change node name to DWARF and delete SDB and COFF
5078 references.
5079 (DEBUGGER_AUTO_OFFSET): Delete COFF and SDB references.
5080 (PREFERRED_DEBUGGING_TYPE): Delete SDB_DEBUG and -gcoff references.
5081 (SDB_DEBUGGING_INFO): Delete.
5082 (PUT_SDB_@dots{}, SDB_DELIM, SDB_ALLOW_UNKNOWN_REFERENCES)
5083 SDB_ALLOW_FORWARD_REFERENCES, SDB_OUTPUT_SOURCE_LINE): Delete.
5084 * target.def (output_source_filename): Delete COFF reference.
5085
5086 * common.opt (gcoff): Delete.
5087 (gxcoff+): Update Negative chain.
5088 * defaults.h: Delete all references to SDB_DEBUGGING_INFO and
5089 SDB_DEBUG.
5090 * dwarf2out.c (gen_array_type_die): Change SDB to debuggers.
5091 * flag-types.h (enum debug_info_type): Delete SDB_DEBUG.
5092 * function.c (number_blocks): Delete SDB_DEBUGGING_INFO, SDB_DEBUG,
5093 and SDB references.
5094 (expand_function_start): Change sdb reference to past tense.
5095 (expand_function_end): Change sdb reference to past tense.
5096 * gcc.c (cpp_unique_options): Delete gcoff3 reference.
5097 * opts.c (debug_type_names): Delete coff entry.
5098 (common_handle_option): Delete OPT_gcoff case.
5099 * system.h (SDB_DEBUG, SDB_DEBUGGING_INFO): Poison.
5100
5101 * config/dbxcoff.h (PREFERRED_DEBUGGING_TYPE): Set to DBX_DEBUG.
5102 * config/cris/cris.h: Delete SDB reference in comment.
5103 * config/i386/cygming.h: Don't define SDB_DEBUGGING_INFO.
5104 (ASM_DECLARE_FUNCTION_NAME): Delete SDB reference from comment.
5105 * config/i386/gas.h: Don't define SDB_DEBUGGING_INFO.
5106 * config/i386/i386.c (svr4_dbx_register_map): Change SDB references
5107 to past tense.
5108 (ix86_expand_prologue): Likewise.
5109 * config/i386/winnt.c (i386_pe_start_function): Don't check SDB_DEBUG.
5110 * config/ia64/ia64.h: Likewise.
5111 * config/m68k/m68kelf.h (DBX_REGISTER_NUMBER): Delete SDB reference.
5112 * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Delete gcoff*
5113 support.
5114 * config/mmix/mmix.h: Likewise.
5115 * config/nds32/nds32.c: Likewise.
5116 * config/stormy/storym16.h: Likewise.
5117 * config/visium/visium.h: Likewise.
5118 * config/vx-common.h (SDB_DEBUGGING_INFO): Delete undef.
5119
5120 2017-10-28 Sandra Loosemore <sandra@codesourcery.com>
5121
5122 * config/nios2/nios2.h (FRAME_GROWS_DOWNWARD): Define to 1.
5123 * config/nios2/nios2.c (nios2_initial_elimination_offset): Make
5124 FRAME_POINTER_REGNUM point at high end of local var area.
5125
5126 2017-10-27 Eric Botcazou <ebotcazou@adacore.com>
5127
5128 * bb-reorder.c (find_traces_1_round): Fix off-by-one index.
5129 Move comment around. Do not reset best_edge for a copiable
5130 destination if the copy would cause a partition change.
5131 (better_edge_p): Remove redundant check.
5132
5133 2017-10-27 Uros Bizjak <ubizjak@gmail.com>
5134
5135 * config/i386/i386-protos.h (ix86_fp_compare_mode): Remove prototype.
5136
5137 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5138
5139 * builtins.c (CASE_MATHFN_FLOATN): New helper macro to add cases
5140 for math functions that have _Float<N> and _Float<N>X variants.
5141 (mathfn_built_in_2): Add support for math functions that have
5142 _Float<N> and _Float<N>X variants.
5143 (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro.
5144 (expand_builtin_mathfn_ternary): Add support for fma with
5145 _Float<N> and _Float<N>X variants.
5146 (expand_builtin): Likewise.
5147 (fold_builtin_3): Likewise.
5148 * builtins.def (DEF_EXT_LIB_FLOATN_NX_BUILTINS): New macro to
5149 create math function _Float<N> and _Float<N>X variants as external
5150 library builtins.
5151 (BUILT_IN_COPYSIGN _Float<N> and _Float<N>X variants) Use
5152 DEF_EXT_LIB_FLOATN_NX_BUILTINS to make built-in functions using
5153 the __builtin_ prefix and if not strict ansi, without the prefix.
5154 (BUILT_IN_FABS _Float<N> and _Float<N>X variants): Likewise.
5155 (BUILT_IN_FMA _Float<N> and _Float<N>X variants): Likewise.
5156 (BUILT_IN_FMAX _Float<N> and _Float<N>X variants): Likewise.
5157 (BUILT_IN_FMIN _Float<N> and _Float<N>X variants): Likewise.
5158 (BUILT_IN_NAN _Float<N> and _Float<N>X variants): Likewise.
5159 (BUILT_IN_SQRT _Float<N> and _Float<N>X variants): Likewise.
5160 * builtin-types.def (BT_FN_FLOAT16_FLOAT16_FLOAT16_FLOAT16): New
5161 function signatures for fma _Float<N> and _Float<N>X variants.
5162 (BT_FN_FLOAT32_FLOAT32_FLOAT32_FLOAT32): Likewise.
5163 (BT_FN_FLOAT64_FLOAT64_FLOAT64_FLOAT64): Likewise.
5164 (BT_FN_FLOAT128_FLOAT128_FLOAT128_FLOAT128): Likewise.
5165 (BT_FN_FLOAT32X_FLOAT32X_FLOAT32X_FLOAT32X): Likewise.
5166 (BT_FN_FLOAT64X_FLOAT64X_FLOAT64X_FLOAT64X): Likewise.
5167 (BT_FN_FLOAT128X_FLOAT128X_FLOAT128X_FLOAT128X): Likewise.
5168 * gencfn-macros.c (print_case_cfn): Add support for math functions
5169 that have _Float<N> and _Float<N>X variants.
5170 (print_define_operator_list): Likewise.
5171 (fltfn_suffixes): Likewise.
5172 (main): Likewise.
5173 * internal-fn.def (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro
5174 for math functions that have _Float<N> and _Float<N>X variants.
5175 (SQRT): Add support for sqrt, copysign, fmin and fmax _Float<N>
5176 and _Float<N>X variants.
5177 (COPYSIGN): Likewise.
5178 (FMIN): Likewise.
5179 (FMAX): Likewise.
5180 * fold-const.c (tree_call_nonnegative_warnv_p): Add support for
5181 copysign, fma, fmax, fmin, and sqrt _Float<N> and _Float<N>X
5182 variants.
5183 (integer_valued_read_call_p): Likewise.
5184 * fold-const-call.c (fold_const_call_ss): Likewise.
5185 (fold_const_call_sss): Add support for copysign, fmin, and fmax
5186 _Float<N> and _Float<N>X variants.
5187 (fold_const_call_ssss): Add support for fma _Float<N> and
5188 _Float<N>X variants.
5189 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Add
5190 support for copysign and fma _Float<N> and _Float<N>X variants.
5191 (backprop::process_builtin_call_use): Likewise.
5192 * tree-call-cdce.c (can_test_argument_range); Add support for
5193 sqrt _Float<N> and _Float<N>X variants.
5194 (edom_only_function): Likewise.
5195 (get_no_error_domain): Likewise.
5196 * tree-ssa-math-opts.c (internal_fn_reciprocal): Likewise.
5197 * tree-ssa-reassoc.c (attempt_builtin_copysign): Add support for
5198 copysign _Float<N> and _Float<N>X variants.
5199 * config/rs6000/rs6000-builtin.def (SQRTF128): Delete, this is now
5200 handled by machine independent code.
5201 (FMAF128): Likewise.
5202 * doc/cpp.texi (Common Predefined Macros): Document defining
5203 __FP_FAST_FMAF<N> and __FP_FAST_FMAF<N>X if the backend supports
5204 fma _Float<N> and _Float<N>X variants.
5205
5206 2017-10-27 Uros Bizjak <ubizjak@gmail.com>
5207
5208 PR target/82692
5209 * config/i386/i386-modes.def (CCFPU): Remove definition.
5210 * config/i386/i386.c (put_condition_mode): Remove CCFPU mode handling.
5211 (ix86_cc_modes_compatible): Ditto.
5212 (ix86_expand_carry_flag_compare): Ditto.
5213 (ix86_expand_int_movcc): Ditto.
5214 (ix86_expand_int_addcc): Ditto.
5215 (ix86_reverse_condition): Ditto.
5216 (ix86_unordered_fp_compare): Rename from ix86_fp_compare_mode.
5217 Return true/false for unordered/ordered fp comparisons.
5218 (ix86_cc_mode): Always return CCFPmode for float mode comparisons.
5219 (ix86_prepare_fp_compare_args): Update for rename.
5220 (ix86_expand_fp_compare): Update for rename. Generate unordered
5221 compare RTXes wrapped with UNSPEC_NOTRAP unspec.
5222 (ix86_expand_sse_compare_and_jump): Ditto.
5223 * config/i386/predicates.md (fcmov_comparison_operator):
5224 Remove CCFPU mode handling.
5225 (ix86_comparison_operator): Ditto.
5226 (ix86_carry_flag_operator): Ditto.
5227 * config/i386/i386.md (UNSPEC_NOTRAP): New unspec.
5228 (*cmpu<mode>_i387): Wrap compare RTX with UNSPEC_NOTRAP unspec.
5229 (*cmpu<mode>_cc_i387): Ditto.
5230 (FPCMP): Remove mode iterator.
5231 (unord): Remove mode attribute.
5232 (unord_subst): New define_subst transformation
5233 (unord): New define_subst attribute.
5234 (unordered): Ditto.
5235 (*cmpi<unord><MODEF:mode>): Rewrite using unord_subst transformation.
5236 (*cmpi<unord>xf_i387): Ditto.
5237 * config/i386/sse.md (<sse>_<unord>comi<round_saeonly_name>): Merge
5238 from <sse>_comi<round_saeonly_name> and <sse>_ucomi<round_saeonly_name>
5239 using unord_subst transformation.
5240 * config/i386/subst.md (SUBST_A): Remove CCFP and CCFPU modes.
5241 (round_saeonly): Also handle CCFP mode.
5242 * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_NOTRAP unspec.
5243 Remove UNSPEC_SAHF unspec handling.
5244
5245 2017-10-27 Jan Hubicka <hubicka@ucw.cz>
5246
5247 * x86-tune.def (X86_TUNE_INTER_UNIT_MOVES_TO_VEC): Disable for Zen.
5248
5249 2017-10-27 Jeff Law <law@redhat.com>
5250
5251 * gimple-ssa-sprintf.c: Include domwalk.h.
5252 (class sprintf_dom_walker): New class, derived from dom_walker.
5253 (sprintf_dom_walker::before_dom_children): New function.
5254 (struct call_info): Moved into sprintf_dom_walker class
5255 (compute_formath_length, handle_gimple_call): Likewise.
5256 (sprintf_length::execute): Call the dominator walker rather
5257 than walking the statements.
5258
5259 * tree-vrp.c (check_all_array_refs): Do not use wi->info to smuggle
5260 gimple statement locations.
5261 (check_array_bounds): Corresponding changes. Get the statement's
5262 location directly from wi->stmt.
5263
5264 2017-10-27 Palmer Dabbelt <palmer@dabbelt.com>
5265
5266 PR target/82717
5267 * doc/invoke.texi (RISC-V) <-mabi>: Correct and improve.
5268
5269 2017-10-27 Jan Hubicka <hubicka@ucw.cz>
5270
5271 * config/i386/x86-tune.def (X86_TUNE_PARTIAL_REG_DEPENDENCY,
5272 X86_TUNE_MOVX): Disable for Haswell and newer CPUs.
5273
5274 2017-10-27 Jakub Jelinek <jakub@redhat.com>
5275
5276 PR target/82703
5277 * config/i386/i386-protos.h (maybe_get_pool_constant): Removed.
5278 * config/i386/i386.c (maybe_get_pool_constant): Removed.
5279 (ix86_split_to_parts): Use avoid_constant_pool_reference instead of
5280 maybe_get_pool_constant.
5281 * config/i386/predicates.md (zero_extended_scalar_load_operand):
5282 Likewise.
5283
5284 2017-10-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5285
5286 * doc/install.texi (Specific, i?86-*-solaris2.10): Simplify gas
5287 2.26 caveat. Update gas and gld versions.
5288 (Specific, *-*-solaris2*): Update binutils version. Remove caveat
5289 reference.
5290
5291 2017-10-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5292
5293 * cgraph.h (set_malloc_flag): Declare.
5294 * cgraph.c (set_malloc_flag_1): New function.
5295 (set_malloc_flag): Likewise.
5296 * ipa-fnsummary.h (ipa_call_summary): Add new field is_return_callee.
5297 * ipa-fnsummary.c (ipa_call_summary::reset): Set is_return_callee to
5298 false.
5299 (read_ipa_call_summary): Add support for reading is_return_callee.
5300 (write_ipa_call_summary): Stream is_return_callee.
5301 * ipa-inline.c (ipa_inline): Remove call to ipa_free_fn_summary.
5302 * ipa-pure-const.c: Add headers ssa.h, alloc-pool.h, symbol-summary.h,
5303 ipa-prop.h, ipa-fnsummary.h.
5304 (pure_const_names): Change to static.
5305 (malloc_state_e): Define.
5306 (malloc_state_names): Define.
5307 (funct_state_d): Add field malloc_state.
5308 (varying_state): Set malloc_state to STATE_MALLOC_BOTTOM.
5309 (check_retval_uses): New function.
5310 (malloc_candidate_p): Likewise.
5311 (analyze_function): Add support for malloc attribute.
5312 (pure_const_write_summary): Stream malloc_state.
5313 (pure_const_read_summary): Add support for reading malloc_state.
5314 (dump_malloc_lattice): New function.
5315 (propagate_malloc): New function.
5316 (warn_function_malloc): New function.
5317 (ipa_pure_const::execute): Call propagate_malloc and
5318 ipa_free_fn_summary.
5319 (pass_local_pure_const::execute): Add support for malloc attribute.
5320 * ssa-iterators.h (RETURN_FROM_IMM_USE_STMT): New macro.
5321 * doc/invoke.texi: Document Wsuggest-attribute=malloc.
5322
5323 2017-10-27 Martin Liska <mliska@suse.cz>
5324
5325 PR gcov-profile/82457
5326 * doc/invoke.texi: Document that one needs a non-strict ISO mode
5327 for fork-like functions to be properly instrumented.
5328
5329 2017-10-27 Richard Biener <rguenther@suse.de>
5330
5331 PR middle-end/81659
5332 * tree-eh.c (pass_lower_eh_dispatch::execute): Free dominator
5333 info when we redirected EH.
5334
5335 2017-10-26 Michael Collison <michael.collison@arm.com>
5336
5337 * config/aarch64/aarch64.md(<optab>_trunc><vf><GPI:mode>2):
5338 New pattern.
5339 (<optab>_trunchf<GPI:mode>2: New pattern.
5340 (<optab>_trunc<vgp><GPI:mode>2: New pattern.
5341 * config/aarch64/iterators.md (wv): New mode attribute.
5342 (vf, VF): New mode attributes.
5343 (vgp, VGP): New mode attributes.
5344 (s): Update attribute with SImode and DImode prefixes.
5345
5346 2017-10-26 Sandra Loosemore <sandra@codesourcery.com>
5347
5348 * config/nios2/constraints.md ("S"): Match r0rel_constant_p too.
5349 * config/nios2/nios2-protos.h (r0rel_constant_p): Declare.
5350 * config/nios2/nios2.c: (nios2_r0rel_sec_regex): New.
5351 (nios2_option_overide): Initialize it. Don't allow R0-relative
5352 addressing with PIC.
5353 (nios2_rtx_costs): Handle r0rel_constant_p like gprel_constant_p.
5354 (nios2_symbolic_constant_p): Likewise.
5355 (nios2_legitimate_address_p): Likewise.
5356 (nios2_r0rel_section_name_p): New.
5357 (nios2_symbol_ref_in_r0rel_data_p): New.
5358 (nios2_emit_move_sequence): Handle r0rel_constant_p.
5359 (r0rel_constant_p): New.
5360 (nios2_print_operand_address): Handle r0rel_constant_p.
5361 (nios2_cdx_narrow_form_p): Likewise.
5362 * config/nios2/nios2.opt (mr0rel-sec=): New option.
5363 * doc/invoke.texi (Option Summary): Add -mr0rel-sec.
5364 (Nios II Options): Document -mr0rel-sec.
5365
5366 2017-10-26 Sandra Loosemore <sandra@codesourcery.com>
5367
5368 * config/nios2/nios2.c: Include xregex.h.
5369 (nios2_gprel_sec_regex): New.
5370 (nios2_option_overide): Initialize it. Don't allow GP-relative
5371 addressing with PIC.
5372 (nios2_small_section_name_p): Check for regex match.
5373 * config/nios2/nios2.opt (mgprel-sec=): New option.
5374 * doc/invoke.texi (Option Summary): Add -mgprel-sec.
5375 (Nios II Options): Document -mgprel-sec.
5376
5377 2017-10-26 Jim Wilson <wilson@tuliptree.org>
5378
5379 * doc/invoke.texi (-fdebug-prefix-map): Expand documentation.
5380
5381 2017-10-26 Tom de Vries <tom@codesourcery.com>
5382
5383 PR tree-optimization/82707
5384 * gimple.c (gimple_copy): Fix unsharing of
5385 GIMPLE_OMP_{SINGLE,TARGET,TEAMS}.
5386
5387 2017-10-26 Olga Makhotina <olga.makhotina@intel.com>
5388
5389 * config/i386/avx512fintrin.h (_mm512_cmpeq_pd_mask,
5390 _mm512_cmple_pd_mask, _mm512_cmplt_pd_mask,
5391 _mm512_cmpneq_pd_mask, _mm512_cmpnle_pd_mask,
5392 _mm512_cmpnlt_pd_mask, _mm512_cmpord_pd_mask,
5393 _mm512_cmpunord_pd_mask, _mm512_mask_cmpeq_pd_mask,
5394 _mm512_mask_cmple_pd_mask, _mm512_mask_cmplt_pd_mask,
5395 _mm512_mask_cmpneq_pd_mask, _mm512_mask_cmpnle_pd_mask,
5396 _mm512_mask_cmpnlt_pd_mask, _mm512_mask_cmpord_pd_mask,
5397 _mm512_mask_cmpunord_pd_mask, _mm512_cmpeq_ps_mask,
5398 _mm512_cmple_ps_mask, _mm512_cmplt_ps_mask,
5399 _mm512_cmpneq_ps_mask, _mm512_cmpnle_ps_mask,
5400 _mm512_cmpnlt_ps_mask, _mm512_cmpord_ps_mask,
5401 _mm512_cmpunord_ps_mask, _mm512_mask_cmpeq_ps_mask,
5402 _mm512_mask_cmple_ps_mask, _mm512_mask_cmplt_ps_mask,
5403 _mm512_mask_cmpneq_ps_mask, _mm512_mask_cmpnle_ps_mask,
5404 _mm512_mask_cmpnlt_ps_mask, _mm512_mask_cmpord_ps_mask,
5405 _mm512_mask_cmpunord_ps_mask): New intrinsics.
5406
5407 2017-10-26 Michael Meissner <meissner@linux.vnet.ibm.com>
5408
5409 * config/rs6000/aix.h (TARGET_IEEEQUAD_DEFAULT): Set long double
5410 default to IBM.
5411 * config/rs6000/darwin.h (TARGET_IEEEQUAD_DEFAULT): Likewise.
5412 * config/rs6000/rs6000.opt (-mabi=ieeelongdouble): Move the
5413 warning to rs6000.c. Remove the Undocumented flag, since it has
5414 been documented.
5415 (-mabi=ibmlongdouble): Likewise.
5416 * config/rs6000/rs6000.c (TARGET_IEEEQUAD_DEFAULT): If it is not
5417 already set, set the default format for long double.
5418 (rs6000_debug_reg_global): Print whether long double is IBM or
5419 IEEE.
5420 (rs6000_option_override_internal): Rework setting long double
5421 format. Only warn if the user is changing the long double default
5422 and they did not use -Wno-psabi.
5423 * doc/invoke.texi (PowerPC options): Update the documentation for
5424 -mabi=ieeelongdouble and -mabi=ibmlongdouble.
5425
5426 2017-10-26 Richard Sandiford <richard.sandiford@linaro.org>
5427 Alan Hayward <alan.hayward@arm.com>
5428 David Sherwood <david.sherwood@arm.com>
5429
5430 * rtl.h (wider_subreg_mode): New function.
5431 * ira.h (ira_sort_regnos_for_alter_reg): Take a machine_mode *
5432 rather than an unsigned int *.
5433 * ira-color.c (regno_max_ref_width): Replace with...
5434 (regno_max_ref_mode): ...this new variable.
5435 (coalesced_pseudo_reg_slot_compare): Update accordingly.
5436 Use wider_subreg_mode.
5437 (ira_sort_regnos_for_alter_reg): Likewise. Take a machine_mode *
5438 rather than an unsigned int *.
5439 * lra-constraints.c (uses_hard_regs_p): Use wider_subreg_mode.
5440 (process_alt_operands): Likewise.
5441 (invariant_p): Likewise.
5442 * lra-spills.c (assign_mem_slot): Likewise.
5443 (add_pseudo_to_slot): Likewise.
5444 * lra.c (collect_non_operand_hard_regs): Likewise.
5445 (add_regs_to_insn_regno_info): Likewise.
5446 * reload1.c (regno_max_ref_width): Replace with...
5447 (regno_max_ref_mode): ...this new variable.
5448 (reload): Update accordingly. Update call to
5449 ira_sort_regnos_for_alter_reg.
5450 (alter_reg): Update to use regno_max_ref_mode. Call wider_subreg_mode.
5451 (init_eliminable_invariants): Update to use regno_max_ref_mode.
5452 (scan_paradoxical_subregs): Likewise.
5453
5454 2017-10-26 Wilco Dijkstra <wdijkstr@arm.com>
5455
5456 * config/aarch64/aarch64.h (EXIT_IGNORE_STACK): Set if alloca is used.
5457 (aarch64_frame): Add emit_frame_chain boolean.
5458 * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
5459 Move eh_return case to aarch64_layout_frame.
5460 (aarch64_layout_frame): Initialize emit_frame_chain.
5461 (aarch64_expand_prologue): Use emit_frame_chain.
5462
5463 2017-10-26 Wilco Dijkstra <wdijkstr@arm.com>
5464
5465 * config/aarch64/aarch64.c (aarch64_layout_frame):
5466 Ensure LR is always stored at the bottom of the callee-saves.
5467 Remove rarely used frame layout which saves callee-saves at top of
5468 frame, so the store of LR can be used as a valid probe in all cases.
5469
5470 2017-10-26 Wilco Dijkstra <wdijkstr@arm.com>
5471
5472 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
5473 Improve unaligned TImode/TFmode base/offset split.
5474
5475 2017-10-26 Richard Sandiford <richard.sandiford@linaro.org>
5476 Alan Hayward <alan.hayward@arm.com>
5477 David Sherwood <david.sherwood@arm.com>
5478
5479 * caller-save.c (mark_referenced_regs): Use read_modify_subreg_p.
5480 * combine.c (find_single_use_1): Likewise.
5481 (expand_field_assignment): Likewise.
5482 (move_deaths): Likewise.
5483 * lra-constraints.c (simplify_operand_subreg): Likewise.
5484 (curr_insn_transform): Likewise.
5485 * lra.c (collect_non_operand_hard_regs): Likewise.
5486 (add_regs_to_insn_regno_info): Likewise.
5487 * rtlanal.c (reg_referenced_p): Likewise.
5488 (covers_regno_no_parallel_p): Likewise.
5489
5490 2017-10-26 Richard Sandiford <richard.sandiford@linaro.org>
5491
5492 * wide-int-print.cc (print_hex): Loop based on extract_uhwi.
5493 Don't print any bits outside the precision of the value.
5494 * wide-int.cc (test_printing): Add some new tests.
5495
5496 2017-10-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5497
5498 * configure.ac (gcc_cv_as_ix86_xbrace_comment): Check if assembler
5499 supports -xbrace_comment option.
5500 * configure: Regenerate.
5501 * config.in: Regenerate.
5502 * config/i386/sol2.h (ASM_XBRACE_COMMENT_SPEC): Define.
5503 (ASM_CPU_SPEC): Use it.
5504
5505 2017-10-26 Richard Sandiford <richard.sandiford@linaro.org>
5506
5507 * target.def (static_rtx_alignment): New hook.
5508 * targhooks.h (default_static_rtx_alignment): Declare.
5509 * targhooks.c (default_static_rtx_alignment): New function.
5510 * doc/tm.texi.in (TARGET_STATIC_RTX_ALIGNMENT): New hook.
5511 * doc/tm.texi: Regenerate.
5512 * varasm.c (force_const_mem): Use targetm.static_rtx_alignment
5513 instead of targetm.constant_alignment. Remove call to
5514 set_mem_attributes.
5515 * config/cris/cris.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
5516 (cris_preferred_mininum_alignment): New function, split out from...
5517 (cris_constant_alignment): ...here.
5518 (cris_static_rtx_alignment): New function.
5519 * config/i386/i386.c (ix86_static_rtx_alignment): New function,
5520 split out from...
5521 (ix86_constant_alignment): ...here.
5522 (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
5523 * config/mmix/mmix.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
5524 (mmix_static_rtx_alignment): New function.
5525 * config/spu/spu.c (spu_static_rtx_alignment): New function.
5526 (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
5527
5528 2017-10-26 Tamar Christina <tamar.christina@arm.com>
5529
5530 PR target/81800
5531 * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2):
5532 Add flag_trapping_math and flag_fp_int_builtin_inexact.
5533
5534 2017-10-25 Palmer Dabbelt <palmer@dabbelt.com>
5535
5536 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Define.
5537 * config/riscv/pic.md (local_pic_load): Rename to local_pic_load_s,
5538 mark as a sign-extending load.
5539 (local_pic_load_u): Define.
5540
5541 2017-10-25 Eric Botcazou <ebotcazou@adacore.com>
5542
5543 PR middle-end/82062
5544 * fold-const.c (operand_equal_for_comparison_p): Also return true
5545 if ARG0 is a simple variant of ARG1 with narrower precision.
5546 (fold_ternary_loc): Always pass unstripped operands to the predicate.
5547
5548 2017-10-25 Jan Hubicka <hubicka@ucw.cz>
5549
5550 * i386.c (ix86_builtin_vectorization_cost): Compute scatter/gather
5551 cost correctly.
5552 * i386.h (processor_costs): Add gather_static, gather_per_elt,
5553 scatter_static, scatter_per_elt.
5554 * x86-tune-costs.h: Add new cost entries.
5555
5556 2017-10-25 Richard Biener <rguenther@suse.de>
5557
5558 * tree-ssa-sccvn.h (vn_eliminate): Declare.
5559 * tree-ssa-pre.c (class eliminate_dom_walker, eliminate,
5560 class pass_fre): Move to ...
5561 * tree-ssa-sccvn.c (class eliminate_dom_walker, vn_eliminate,
5562 class pass_fre): ... here and adjust for statistics.
5563
5564 2017-10-25 Jakub Jelinek <jakub@redhat.com>
5565
5566 PR libstdc++/81706
5567 * attribs.c (attribute_value_equal): Use omp_declare_simd_clauses_equal
5568 for comparison of OMP_CLAUSEs regardless of flag_openmp{,_simd}.
5569 (duplicate_one_attribute, copy_attributes_to_builtin): New functions.
5570 * attribs.h (duplicate_one_attribute, copy_attributes_to_builtin): New
5571 declarations.
5572
5573 2017-10-25 Richard Biener <rguenther@suse.de>
5574
5575 * tree-ssa-pre.c (need_eh_cleanup, need_ab_cleanup, el_to_remove,
5576 el_to_fixup, el_todo, el_avail, el_avail_stack, eliminate_avail,
5577 eliminate_push_avail, eliminate_insert): Move inside...
5578 (class eliminate_dom_walker): ... this class in preparation
5579 of move.
5580 (fini_eliminate): Remove by merging with ...
5581 (eliminate): ... this function. Adjust for class changes.
5582 (pass_pre::execute): Remove fini_eliminate call.
5583 (pass_fre::execute): Likewise.
5584
5585 2017-10-24 Jakub Jelinek <jakub@redhat.com>
5586
5587 PR target/82460
5588 * config/i386/sse.md (UNSPEC_VPERMI2, UNSPEC_VPERMI2_MASK): Remove.
5589 (VPERMI2, VPERMI2I): New mode iterators.
5590 (<avx512>_vpermi2var<mode>3_maskz): Remove 3 define_expand patterns.
5591 (<avx512>_vpermi2var<mode>3<sd_maskz_name>): Remove 3 define_insn
5592 patterns.
5593 (<avx512>_vpermi2var<mode>3_mask): New define_expand using VPERMI2
5594 mode iterator. Remove 3 old define_insn patterns.
5595 (*<avx512>_vpermi2var<mode>3_mask): 2 new define_insn patterns.
5596 (<avx512>_vpermt2var<mode>3_maskz): Adjust 1 define_expand to use
5597 VPERMI2 mode iterator, remove the other two expanders.
5598 (<avx512>_vpermt2var<mode>3<sd_maskz_name>): Adjust 1 define_insn
5599 to use VPERMI2 mode iterator, add another alternative for vpermi2*
5600 instructions, remove the other two patterns.
5601 (<avx512>_vpermt2var<mode>3_mask): Adjust 1 define_insn to use VPERMI2
5602 mode iterator, remove the other two patterns.
5603 * config/i386/i386.c (ix86_expand_vec_perm_vpermi2): Renamed to ...
5604 (ix86_expand_vec_perm_vpermt2): ... this. Swap mask and op0
5605 arguments, use gen_*vpermt2* expanders instead of gen_*vpermi2*
5606 and adjust argument order accordingly.
5607 (ix86_expand_vec_perm): Adjust caller.
5608 (expand_vec_perm_1): Likewise.
5609 (expand_vec_perm_vpermi2_vpshub2): Rename to ...
5610 (expand_vec_perm_vpermt2_vpshub2): ... this.
5611 (ix86_expand_vec_perm_const_1): Adjust caller.
5612 (ix86_vectorize_vec_perm_const_ok): Adjust comments.
5613
5614 PR target/82370
5615 * config/i386/sse.md (VIMAX_AVX2): Remove V4TImode.
5616 (VIMAX_AVX2_AVX512BW, VIMAX_AVX512VL): New mode iterators.
5617 (vec_shl_<mode>): Remove unused expander.
5618 (avx512bw_<shift_insn><mode>3): New define_insn.
5619 (<sse2_avx2>_ashl<mode>3, <sse2_avx2>_lshr<mode>3): Replaced by ...
5620 (<sse2_avx2>_<shift_insn><mode>3): ... this. New define_insn.
5621
5622 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
5623
5624 PR c++/82466
5625 * doc/invoke.texi ([Wbuiltin-declaration-mismatch]): Extend
5626 description.
5627
5628 2017-10-24 Wilco Dijkstra <wdijkstr@arm.com>
5629
5630 PR rtl-optimization/82396
5631 * gcc/haifa-sched.c (ready_sort_real): Remove qsort workaround.
5632 (autopref_multipass_init): Simplify initialization.
5633 (autopref_rank_data): Simplify sort order.
5634 * gcc/sched-int.h (autopref_multipass_data_): Remove
5635 multi_mem_insn_p, min_offset and max_offset.
5636
5637 2017-10-24 Wilco Dijkstra <wdijkstr@arm.com>
5638
5639 PR middle-end/60580
5640 * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
5641 Check special value of flag_omit_frame_pointer.
5642 (aarch64_can_eliminate): Likewise.
5643 (aarch64_override_options_after_change_1): Simplify handling of
5644 -fomit-frame-pointer and -fomit-leaf-frame-pointer.
5645
5646 2017-10-24 Richard Biener <rguenther@suse.de>
5647
5648 PR tree-optimization/82697
5649 * tree-ssa-phiopt.c (cond_store_replacement): Use alias-set
5650 zero for conditional load and unconditional store.
5651
5652 2017-10-24 H.J. Lu <hongjiu.lu@intel.com>
5653
5654 * doc/install.texi: Document bootstrap-cet.
5655
5656 2017-10-24 H.J. Lu <hongjiu.lu@intel.com>
5657
5658 PR target/82659
5659 * config/i386/i386.c (rest_of_insert_endbranch): Don't insert
5660 ENDBR instruction at function entrance if function is only
5661 called directly.
5662
5663 2017-10-24 Jakub Jelinek <jakub@redhat.com>
5664
5665 PR target/82628
5666 * config/i386/i386.md (addcarry<mode>, subborrow<mode>): Change
5667 patterns to better describe from which operation the CF is computed.
5668 (addcarry<mode>_0, subborrow<mode>_0): New patterns.
5669 * config/i386/i386.c (ix86_expand_builtin) <case handlecarry>: Pass
5670 one LTU with [DT]Imode and another one with [SD]Imode. If arg0
5671 is 0, use _0 suffixed expanders instead of emitting a comparison
5672 before it.
5673
5674 2017-10-06 Sergey Shalnov <Sergey.Shalnov@intel.com>
5675
5676 * config/i386/i386.md(*movsf_internal, *movdf_internal):
5677 Avoid 512-bit AVX modes for TARGET_PREFER_AVX256.
5678
5679 2017-10-24 Eric Botcazou <ebotcazou@adacore.com>
5680
5681 PR middle-end/82569
5682 * tree-outof-ssa.h (always_initialized_rtx_for_ssa_name_p): Delete.
5683 * expr.c (expand_expr_real_1) <expand_decl_rtl>: Revert latest change.
5684 * loop-iv.c (iv_get_reaching_def): Likewise.
5685 * cfgexpand.c (expand_one_ssa_partition): Initialize the RTX if the
5686 variable is promoted and the partition contains undefined values.
5687
5688 2017-10-23 Sandra Loosemore <sandra@codesourcery.com>
5689
5690 * config/nios2/nios2.c (nios2_rtx_costs): Make costs better
5691 reflect reality.
5692 (nios2_address_cost): Define.
5693 (nios2_legitimize_address): Recognize (exp + constant) directly.
5694 (TARGET_ADDRESS_COST): Define.
5695
5696 2017-10-23 Sandra Loosemore <sandra@codesourcery.com>
5697
5698 * config/nios2/nios2-protos.h (nios2_large_constant_p): Declare.
5699 (nios2_symbolic_memory_operand_p): Declare.
5700 (nios2_split_large_constant): Declare.
5701 (nios2_split_symbolic_memory_operand): Declare.
5702 * config/nios2/nios2.c: Adjust includes.
5703 (nios2_symbolic_constant_allowed): New.
5704 (nios2_symbolic_constant_p): New.
5705 (nios2_plus_symbolic_constant_p): New.
5706 (nios2_valid_addr_expr_p): Recognize addresses involving
5707 symbolic constants.
5708 (nios2_legitimate_address_p): Likewise, also LO_SUM.
5709 (nios2_symbolic_memory_operand_p): New.
5710 (nios2_large_constant_p): New.
5711 (nios2_split_large_constant): New.
5712 (nios2_split_plus_large_constant): New.
5713 (nios2_split_symbolic_memory_operand): New.
5714 (nios2_legitimize_address): Code refactoring. Handle addresses
5715 involving symbolic constants.
5716 (nios2_emit_move_sequence): Likewise.
5717 (nios2_print_operand): Improve error output.
5718 (nios2_print_operand_address): Handle LO_SUM.
5719 (nios2_cdx_narrow_form_p): Likewise.
5720 * config/nios2/nios2.md (movqi_internal): Add splitter for memory
5721 operands involving symbolic constants.
5722 (movhi_internal, movsi_internal): Likewise.
5723 (zero_extendhisi2, zero_extendqi<mode>2): Likewise.
5724 (extendhisi2, extendqi<mode>2): Likewise.
5725
5726 2017-10-23 Sandra Loosemore <sandra@codesourcery.com>
5727
5728 * tree-pass.h (PROP_rtl_split_insns): Define.
5729 * recog.c (pass_data_split_all_insns): Provide PROP_rtl_split_insns.
5730
5731 2017-10-23 Sandra Loosemore <sandra@codesourcery.com>
5732
5733 * config/nios2/nios2.c (TARGET_LRA_P): Don't override.
5734
5735 2017-10-23 Jakub Jelinek <jakub@redhat.com>
5736
5737 PR debug/82630
5738 * target.def (const_not_ok_for_debug_p): Default to
5739 default_const_not_ok_for_debug_p instead of hook_bool_rtx_false.
5740 * targhooks.h (default_const_not_ok_for_debug_p): New declaration.
5741 * targhooks.c (default_const_not_ok_for_debug_p): New function.
5742 * dwarf2out.c (const_ok_for_output_1): Only reject UNSPECs for
5743 which targetm.const_not_ok_for_debug_p returned true.
5744 * config/arm/arm.c (arm_const_not_ok_for_debug_p): Return true
5745 for UNSPECs.
5746 * config/powerpcspe/powerpcspe.c (rs6000_const_not_ok_for_debug_p):
5747 Likewise.
5748 * config/rs6000/rs6000.c (rs6000_const_not_ok_for_debug_p): Likewise.
5749 * config/i386/i386.c (ix86_delegitimize_address_1): Don't delegitimize
5750 UNSPEC_GOTOFF with addend into addend - _GLOBAL_OFFSET_TABLE_ + symbol
5751 if !base_term_p.
5752 (ix86_const_not_ok_for_debug_p): New function.
5753 (i386_asm_output_addr_const_extra): Handle UNSPEC_GOTOFF.
5754 (TARGET_CONST_NOT_OK_FOR_DEBUG_P): Redefine.
5755
5756 2017-10-23 David Malcolm <dmalcolm@redhat.com>
5757
5758 PR bootstrap/82610
5759 * system.h: Conditionally include "unique-ptr.h" if
5760 INCLUDE_UNIQUE_PTR is defined.
5761 * unique-ptr-tests.cc: Remove include of "unique-ptr.h" in favor
5762 of defining INCLUDE_UNIQUE_PTR before including "system.h".
5763
5764 2017-10-23 Sebastian Perta <sebastian.perta@renesas.com>
5765
5766 * config/rl78/rl78.md: New define_expand "subdi3".
5767
5768 2017-10-23 H.J. Lu <hongjiu.lu@intel.com>
5769
5770 PR target/82673
5771 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Skip
5772 DF_REF_INSN if DF_REF_INSN_INFO is false.
5773
5774 2017-10-23 Jan Hubicka <hubicka@ucw.cz>
5775
5776 * i386.c (dimode_scalar_chain::compute_convert_gain): Use
5777 xmm_move instead of sse_move.
5778 (sse_store_index): New function.
5779 (ix86_register_move_cost): Be more sensible about mismatch stall;
5780 model AVX moves correctly; make difference between sse->integer and
5781 integer->sse.
5782 (ix86_builtin_vectorization_cost): Model correctly aligned and unaligned
5783 moves; make difference between SSE and AVX.
5784 * i386.h (processor_costs): Remove sse_move; add xmm_move, ymm_move
5785 and zmm_move. Increase size of sse load and store tables;
5786 add unaligned load and store tables; add ssemmx_to_integer.
5787 * x86-tune-costs.h: Update all entries according to real
5788 move latencies from Agner Fog's manual and chip documentation.
5789
5790 2017-10-23 Jakub Jelinek <jakub@redhat.com>
5791
5792 PR target/82628
5793 * config/i386/predicates.md (x86_64_dwzext_immediate_operand): New.
5794 * config/i386/constraints.md (Wf): New constraint.
5795 * config/i386/i386.md (UNSPEC_SBB): New unspec.
5796 (cmp<dwi>_doubleword): Removed.
5797 (sub<mode>3_carry_ccc, *sub<mode>3_carry_ccc_1): New patterns.
5798 (sub<mode>3_carry_ccgz): Use unspec instead of compare.
5799 * config/i386/i386.c (ix86_expand_branch) <case E_TImode>: Don't
5800 expand with cmp<dwi>_doubleword. For LTU and GEU use
5801 sub<mode>3_carry_ccc instead of sub<mode>3_carry_ccgz and use CCCmode.
5802
5803 * common.opt (gcolumn-info): Enable by default.
5804 * doc/invoke.texi (gcolumn-info): Document new default.
5805
5806 2017-10-23 Richard Biener <rguenther@suse.de>
5807
5808 PR tree-optimization/82672
5809 * graphite-isl-ast-to-gimple.c (graphite_copy_stmts_from_block):
5810 Fold the stmt if we propagated into it.
5811
5812 2017-10-23 Richard Biener <rguenther@suse.de>
5813
5814 * tree-ssa-pre.c (bitmap_remove_from_set): Rename to...
5815 (bitmap_remove_expr_from_set): ... this. All callers call this
5816 for non-constant values.
5817 (bitmap_set_subtract): Rename to...
5818 (bitmap_set_subtract_expressions): ... this. Adjust and
5819 optimize.
5820 (bitmap_set_contains_value): Remove superfluous check.
5821 (bitmap_set_replace_value): Inline into single caller ...
5822 (bitmap_value_replace_in_set): ... here and simplify.
5823 (dependent_clean): Merge into ...
5824 (clean): ... this using an overload. Adjust.
5825 (prune_clobbered_mems): Adjust.
5826 (compute_antic_aux): Likewise.
5827 (compute_partial_antic_aux): Likewise.
5828
5829 2017-10-23 Richard Biener <rguenther@suse.de>
5830
5831 PR tree-optimization/82129
5832 Revert
5833 2017-08-01 Richard Biener <rguenther@suse.de>
5834
5835 PR tree-optimization/81181
5836 * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
5837 (compute_antic): ... end of iteration here.
5838
5839 2017-10-23 Richard Sandiford <richard.sandiford@linaro.org>
5840
5841 * target.def (starting_frame_offset): New hook.
5842 * doc/tm.texi (STARTING_FRAME_OFFSET): Remove in favor of...
5843 (TARGET_STARTING_FRAME_OFFSET): ...this new hook.
5844 * doc/tm.texi.in: Regenerate.
5845 * hooks.h (hook_hwi_void_0): Declare.
5846 * hooks.c (hook_hwi_void_0): New function.
5847 * doc/rtl.texi: Refer to TARGET_STARTING_FRAME_OFFSET instead of
5848 STARTING_FRAME_OFFSET.
5849 * builtins.c (expand_builtin_setjmp_receiver): Likewise.
5850 * reload1.c (reload): Likewise.
5851 * cfgexpand.c (expand_used_vars): Use targetm.starting_frame_offset
5852 instead of STARTING_FRAME_OFFSET.
5853 * function.c (try_fit_stack_local): Likewise.
5854 (assign_stack_local_1): Likewise
5855 (instantiate_virtual_regs): Likewise.
5856 * rtlanal.c (rtx_addr_can_trap_p_1): Likewise.
5857 * config/avr/avr.md (nonlocal_goto_receiver): Likewise.
5858 * config/aarch64/aarch64.h (STARTING_FRAME_OFFSET): Delete.
5859 * config/alpha/alpha.h (STARTING_FRAME_OFFSET): Likewise.
5860 * config/arc/arc.h (STARTING_FRAME_OFFSET): Likewise.
5861 * config/arm/arm.h (STARTING_FRAME_OFFSET): Likewise.
5862 * config/bfin/bfin.h (STARTING_FRAME_OFFSET): Likewise.
5863 * config/c6x/c6x.h (STARTING_FRAME_OFFSET): Likewise.
5864 * config/cr16/cr16.h (STARTING_FRAME_OFFSET): Likewise.
5865 * config/cris/cris.h (STARTING_FRAME_OFFSET): Likewise.
5866 * config/fr30/fr30.h (STARTING_FRAME_OFFSET): Likewise.
5867 * config/frv/frv.h (STARTING_FRAME_OFFSET): Likewise.
5868 * config/ft32/ft32.h (STARTING_FRAME_OFFSET): Likewise.
5869 * config/h8300/h8300.h (STARTING_FRAME_OFFSET): Likewise.
5870 * config/i386/i386.h (STARTING_FRAME_OFFSET): Likewise.
5871 * config/ia64/ia64.h (STARTING_FRAME_OFFSET): Likewise.
5872 * config/m32c/m32c.h (STARTING_FRAME_OFFSET): Likewise.
5873 * config/m68k/m68k.h (STARTING_FRAME_OFFSET): Likewise.
5874 * config/mcore/mcore.h (STARTING_FRAME_OFFSET): Likewise.
5875 * config/mn10300/mn10300.h (STARTING_FRAME_OFFSET): Likewise.
5876 * config/moxie/moxie.h (STARTING_FRAME_OFFSET): Likewise.
5877 * config/msp430/msp430.h (STARTING_FRAME_OFFSET): Likewise.
5878 * config/nds32/nds32.h (STARTING_FRAME_OFFSET): Likewise.
5879 * config/nios2/nios2.h (STARTING_FRAME_OFFSET): Likewise.
5880 * config/nvptx/nvptx.h (STARTING_FRAME_OFFSET): Likewise.
5881 * config/pdp11/pdp11.h (STARTING_FRAME_OFFSET): Likewise.
5882 * config/riscv/riscv.h (STARTING_FRAME_OFFSET): Likewise.
5883 * config/rl78/rl78.h (STARTING_FRAME_OFFSET): Likewise.
5884 * config/rx/rx.h (STARTING_FRAME_OFFSET): Likewise.
5885 * config/s390/s390.h (STARTING_FRAME_OFFSET): Likewise.
5886 * config/sh/sh.h (STARTING_FRAME_OFFSET): Likewise.
5887 * config/sparc/sparc.c (sparc_compute_frame_size): Likewise.
5888 * config/sparc/sparc.h (STARTING_FRAME_OFFSET): Likewise.
5889 * config/spu/spu.h (STARTING_FRAME_OFFSET): Likewise.
5890 * config/stormy16/stormy16.h (STARTING_FRAME_OFFSET): Likewise.
5891 * config/tilegx/tilegx.h (STARTING_FRAME_OFFSET): Likewise.
5892 * config/tilepro/tilepro.h (STARTING_FRAME_OFFSET): Likewise.
5893 * config/v850/v850.h (STARTING_FRAME_OFFSET): Likewise.
5894 * config/visium/visium.h (STARTING_FRAME_OFFSET): Likewise.
5895 * config/avr/avr.h (STARTING_FRAME_OFFSET): Likewise.
5896 * config/avr/avr-protos.h (avr_starting_frame_offset): Likewise.
5897 * config/avr/avr.c (avr_starting_frame_offset): Make static and
5898 return a HOST_WIDE_INT.
5899 (avr_builtin_setjmp_frame_value): Use it instead of
5900 STARTING_FRAME_OFFSET.
5901 (TARGET_STARTING_FRAME_OFFSET): Redefine.
5902 * config/epiphany/epiphany.h (STARTING_FRAME_OFFSET): Delete.
5903 * config/epiphany/epiphany.c (epiphany_starting_frame_offset):
5904 New function.
5905 (TARGET_STARTING_FRAME_OFFSET): Redefine.
5906 * config/iq2000/iq2000.h (STARTING_FRAME_OFFSET): Delete.
5907 * config/iq2000/iq2000.c (iq2000_starting_frame_offset): New function.
5908 (TARGET_CONSTANT_ALIGNMENT): Redefine.
5909 * config/lm32/lm32.h (STARTING_FRAME_OFFSET): Delete.
5910 * config/lm32/lm32.c (lm32_starting_frame_offset): New function.
5911 (TARGET_STARTING_FRAME_OFFSET): Redefine.
5912 * config/m32r/m32r.h (STARTING_FRAME_OFFSET): Delete.
5913 * config/m32r/m32r.c (m32r_starting_frame_offset): New function.
5914 (TARGET_STARTING_FRAME_OFFSET): Redefine.
5915 * config/microblaze/microblaze.h (STARTING_FRAME_OFFSET): Delete.
5916 * config/microblaze/microblaze.c (microblaze_starting_frame_offset):
5917 New function.
5918 (TARGET_STARTING_FRAME_OFFSET): Redefine.
5919 * config/mips/mips.h (STARTING_FRAME_OFFSET): Delete.
5920 * config/mips/mips.c (mips_compute_frame_info): Refer to
5921 TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
5922 (mips_starting_frame_offset): New function.
5923 (TARGET_STARTING_FRAME_OFFSET): Redefine.
5924 * config/mmix/mmix.h (STARTING_FRAME_OFFSET): Delete.
5925 * config/mmix/mmix-protos.h (mmix_starting_frame_offset): Delete.
5926 * config/mmix/mmix.c (mmix_starting_frame_offset): Make static
5927 and return a HOST_WIDE_INT.
5928 (TARGET_STARTING_FRAME_OFFSET): Redefine.
5929 (mmix_initial_elimination_offset): Refer to
5930 TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
5931 * config/pa/pa.h (STARTING_FRAME_OFFSET): Delete.
5932 * config/pa/pa.c (pa_starting_frame_offset): New function.
5933 (pa_compute_frame_size): Use it instead of STARTING_FRAME_OFFSET.
5934 (pa_expand_prologue): Likewise.
5935 (TARGET_STARTING_FRAME_OFFSET): Redefine.
5936 * config/powerpcspe/aix.h (STARTING_FRAME_OFFSET): Split out
5937 !FRAME_GROWS_DOWNWARD handling to...
5938 (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
5939 * config/powerpcspe/darwin.h (STARTING_FRAME_OFFSET): Split out
5940 !FRAME_GROWS_DOWNWARD handling to...
5941 (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
5942 * config/powerpcspe/powerpcspe.h (STARTING_FRAME_OFFSET): Split out
5943 !FRAME_GROWS_DOWNWARD handling to...
5944 (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
5945 * config/powerpcspe/powerpcspe.c (TARGET_STARTING_FRAME_OFFSET):
5946 Redefine.
5947 (rs6000_starting_frame_offset): New function.
5948 * config/rs6000/aix.h (STARTING_FRAME_OFFSET): Split out
5949 !FRAME_GROWS_DOWNWARD handling to...
5950 (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
5951 * config/rs6000/darwin.h (STARTING_FRAME_OFFSET): Split out
5952 !FRAME_GROWS_DOWNWARD handling to...
5953 (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
5954 * config/rs6000/rs6000.h (STARTING_FRAME_OFFSET): Split out
5955 !FRAME_GROWS_DOWNWARD handling to...
5956 (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
5957 * config/rs6000/rs6000.c (TARGET_STARTING_FRAME_OFFSET): Refine.
5958 (rs6000_starting_frame_offset): New function.
5959 * config/vax/elf.h (STARTING_FRAME_OFFSET): Delete.
5960 * config/vax/vax.h (STARTING_FRAME_OFFSET): Delete.
5961 * config/vax/vax.c (vax_starting_frame_offset): New function.
5962 (vax_expand_prologue): Use it instead of STARTING_FRAME_OFFSET.
5963 (TARGET_STARTING_FRAME_OFFSET): Redefine.
5964 * config/xtensa/xtensa.h (STARTING_FRAME_OFFSET): Delete.
5965 * config/xtensa/xtensa.c (xtensa_starting_frame_offset): New function.
5966 (TARGET_STARTING_FRAME_OFFSET): Redefine.
5967 * system.h (STARTING_FRAME_OFFSET): Poison.
5968
5969 2017-10-23 Richard Sandiford <richard.sandiford@linaro.org>
5970
5971 * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
5972 SCALAR_TYPE_MODE instead of TYPE_MODE.
5973
5974 2017-10-23 Richard Sandiford <richard.sandiford@linaro.org>
5975 Alan Hayward <alan.hayward@arm.com>
5976 David Sherwood <david.sherwood@arm.com>
5977
5978 * dwarf2out.c (loc_list_from_tree_1): Use SCALAR_INT_TYPE_MODE
5979
5980 2017-10-23 Richard Sandiford <richard.sandiford@linaro.org>
5981 Alan Hayward <alan.hayward@arm.com>
5982 David Sherwood <david.sherwood@arm.com>
5983
5984 * expmed.c (expand_shift_1): Use scalar_mode for scalar_mode.
5985
5986 2017-10-23 Richard Biener <rguenther@suse.de>
5987
5988 PR tree-optimization/82129
5989 * tree-ssa-pre.c (bitmap_set_and): Remove.
5990 (compute_antic_aux): Compute ANTIC_OUT intersection in a way
5991 canonicalizing expressions in the set to those with lowest
5992 ID rather than taking that from the first edge.
5993
5994 2017-10-23 Richard Sandiford <richard.sandiford@linaro.org>
5995
5996 * combine.c (rtx_equal_for_field_assignment_p): Use
5997 byte_lowpart_offset.
5998
5999 2017-10-22 Richard Sandiford <richard.sandiford@linaro.org>
6000 Alan Hayward <alan.hayward@arm.com>
6001 David Sherwood <david.sherwood@arm.com>
6002
6003 * internal-fn.c (expand_direct_optab_fn): Don't assign directly
6004 to a SUBREG_PROMOTED_VAR.
6005
6006 2017-10-22 Richard Sandiford <richard.sandiford@linaro.org>
6007 Alan Hayward <alan.hayward@arm.com>
6008 David Sherwood <david.sherwood@arm.com>
6009
6010 * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_PRECISION.
6011 (expand_debug_source_expr): Likewise.
6012 * combine.c (combine_simplify_rtx): Likewise.
6013 * cse.c (fold_rtx): Likewise.
6014 * optabs.c (expand_float): Likewise.
6015 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
6016 (simplify_binary_operation_1): Likewise.
6017
6018 2017-10-22 Richard Sandiford <richard.sandiford@linaro.org>
6019 Alan Hayward <alan.hayward@arm.com>
6020 David Sherwood <david.sherwood@arm.com>
6021
6022 * combine.c (simplify_comparison): Use HWI_COMPUTABLE_MODE_P.
6023 (record_promoted_value): Likewise.
6024 * expr.c (expand_expr_real_2): Likewise.
6025 * ree.c (update_reg_equal_equiv_notes): Likewise.
6026 (combine_set_extension): Likewise.
6027 * rtlanal.c (low_bitmask_len): Likewise.
6028 * simplify-rtx.c (neg_const_int): Likewise.
6029 (simplify_binary_operation_1): Likewise.
6030
6031 2017-10-22 Richard Sandiford <richard.sandiford@linaro.org>
6032 Alan Hayward <alan.hayward@arm.com>
6033 David Sherwood <david.sherwood@arm.com>
6034
6035 * lra-spills.c (assign_mem_slot): Use subreg_size_lowpart_offset.
6036 * regcprop.c (maybe_mode_change): Likewise.
6037 * reload1.c (alter_reg): Likewise.
6038
6039 2017-10-22 Richard Sandiford <richard.sandiford@linaro.org>
6040
6041 * inchash.h (inchash::hash::add_wide_int): New function.
6042 * lto-streamer-out.c (hash_tree): Use it.
6043
6044 2017-10-22 Richard Sandiford <richard.sandiford@linaro.org>
6045
6046 * inchash.h (inchash::hash::add_wide_int): Rename to...
6047 (inchash::hash::add_hwi): ...this.
6048 * ipa-devirt.c (hash_odr_vtable): Update accordingly.
6049 (polymorphic_call_target_hasher::hash): Likewise.
6050 * ipa-icf.c (sem_function::get_hash, sem_function::init): Likewise.
6051 (sem_item::add_expr, sem_item::add_type, sem_variable::get_hash)
6052 (sem_item_optimizer::update_hash_by_addr_refs): Likewise.
6053 * lto-streamer-out.c (hash_tree): Likewise.
6054 * optc-save-gen.awk: Likewise.
6055 * tree.c (add_expr): Likewise.
6056
6057 2017-10-22 Uros Bizjak <ubizjak@gmail.com>
6058
6059 PR target/52451
6060 * config/i386/i386.c (ix86_fp_compare_mode): Return CCFPmode
6061 for ordered inequality comparisons even with TARGET_IEEE_FP.
6062
6063 2017-10-22 Uros Bizjak <ubizjak@gmail.com>
6064
6065 PR target/82628
6066 * config/i386/i386.md (cmp<dwi>_doubleword): New pattern.
6067 * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
6068 Expand with cmp<dwi>_doubleword.
6069
6070 2017-10-21 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
6071
6072 * extend.texi: Add x86 specific to 'nocf_check' attribute.
6073 List CET intrinsics.
6074 * invoke.texi: Add -mcet, -mibt, -mshstk options. Add x86
6075 specific to -fcf-protection option.
6076
6077 2017-10-21 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
6078
6079 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET): New.
6080 (OPTION_MASK_ISA_SHSTK_SET): Likewise.
6081 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
6082 (OPTION_MASK_ISA_SHSTK_UNSET): Likewise.
6083 (ix86_handle_option): Add -mibt, -mshstk, -mcet handling.
6084 * config.gcc (extra_headers): Add cetintrin.h for x86 targets.
6085 (extra_objs): Add cet.o for Linux/x86 targets.
6086 (tmake_file): Add i386/t-cet for Linux/x86 targets.
6087 * config/i386/cet.c: New file.
6088 * config/i386/cetintrin.h: Likewise.
6089 * config/i386/t-cet: Likewise.
6090 * config/i386/cpuid.h (bit_SHSTK): New.
6091 (bit_IBT): Likewise.
6092 * config/i386/driver-i386.c (host_detect_local_cpu): Detect and
6093 pass IBT and SHSTK bits.
6094 * config/i386/i386-builtin-types.def
6095 (VOID_FTYPE_UNSIGNED_PVOID): New.
6096 (VOID_FTYPE_UINT64_PVOID): Likewise.
6097 * config/i386/i386-builtin.def: Add CET intrinsics.
6098 * config/i386/i386-c.c (ix86_target_macros_internal): Add
6099 OPTION_MASK_ISA_IBT, OPTION_MASK_ISA_SHSTK handling.
6100 * config/i386/i386-passes.def: Add pass_insert_endbranch pass.
6101 * config/i386/i386-protos.h (make_pass_insert_endbranch): New
6102 prototype.
6103 * config/i386/i386.c (rest_of_insert_endbranch): New.
6104 (pass_data_insert_endbranch): Likewise.
6105 (pass_insert_endbranch): Likewise.
6106 (make_pass_insert_endbranch): Likewise.
6107 (ix86_notrack_prefixed_insn_p): Likewise.
6108 (ix86_target_string): Add -mibt, -mshstk flags.
6109 (ix86_option_override_internal): Add flag_cf_protection
6110 processing.
6111 (ix86_valid_target_attribute_inner_p): Set OPT_mibt, OPT_mshstk.
6112 (ix86_print_operand): Add 'notrack' prefix output.
6113 (ix86_init_mmx_sse_builtins): Add CET intrinsics.
6114 (ix86_expand_builtin): Expand CET intrinsics.
6115 (x86_output_mi_thunk): Add 'endbranch' instruction.
6116 * config/i386/i386.h (TARGET_IBT): New.
6117 (TARGET_IBT_P): Likewise.
6118 (TARGET_SHSTK): Likewise.
6119 (TARGET_SHSTK_P): Likewise.
6120 * config/i386/i386.md (unspecv): Add UNSPECV_NOP_RDSSP,
6121 UNSPECV_INCSSP, UNSPECV_SAVEPREVSSP, UNSPECV_RSTORSSP,
6122 UNSPECV_WRSS, UNSPECV_WRUSS, UNSPECV_SETSSBSY, UNSPECV_CLRSSBSY.
6123 (builtin_setjmp_setup): New pattern.
6124 (builtin_longjmp): Likewise.
6125 (rdssp<mode>): Likewise.
6126 (incssp<mode>): Likewise.
6127 (saveprevssp): Likewise.
6128 (rstorssp): Likewise.
6129 (wrss<mode>): Likewise.
6130 (wruss<mode>): Likewise.
6131 (setssbsy): Likewise.
6132 (clrssbsy): Likewise.
6133 (nop_endbr): Likewise.
6134 * config/i386/i386.opt: Add -mcet, -mibt, -mshstk and -mcet-switch
6135 options.
6136 * config/i386/immintrin.h: Include <cetintrin.h>.
6137 * config/i386/linux-common.h
6138 (file_end_indicate_exec_stack_and_cet): New prototype.
6139 (TARGET_ASM_FILE_END): New.
6140
6141 2017-10-20 Jan Hubicka <hubicka@ucw.cz>
6142
6143 * i386.c (ix86_builtin_vectorization_cost): Use existing rtx_cost
6144 latencies instead of having separate table; make difference between
6145 integer and float costs.
6146 * i386.h (processor_costs): Remove scalar_stmt_cost,
6147 scalar_load_cost, scalar_store_cost, vec_stmt_cost, vec_to_scalar_cost,
6148 scalar_to_vec_cost, vec_align_load_cost, vec_unalign_load_cost,
6149 vec_store_cost.
6150 * x86-tune-costs.h: Remove entries which has been removed in
6151 procesor_costs from all tables; make cond_taken_branch_cost
6152 and cond_not_taken_branch_cost COST_N_INSNS based.
6153
6154 2017-10-20 Jan Hubicka <hubicka@ucw.cz>
6155
6156 * x86-tune-costs.h (intel_cost, generic_cost): Fix move costs.
6157
6158 2017-10-20 Jakub Jelinek <jakub@redhat.com>
6159
6160 * config/i386/i386.md (isa): Remove fma_avx512f.
6161 * config/i386/sse.md (<avx512>_fmadd_<mode>_mask<round_name>,
6162 <avx512>_fmadd_<mode>_mask3<round_name>,
6163 <avx512>_fmsub_<mode>_mask<round_name>,
6164 <avx512>_fmsub_<mode>_mask3<round_name>,
6165 <avx512>_fnmadd_<mode>_mask<round_name>,
6166 <avx512>_fnmadd_<mode>_mask3<round_name>,
6167 <avx512>_fnmsub_<mode>_mask<round_name>,
6168 <avx512>_fnmsub_<mode>_mask3<round_name>,
6169 <avx512>_fmaddsub_<mode>_mask<round_name>,
6170 <avx512>_fmaddsub_<mode>_mask3<round_name>,
6171 <avx512>_fmsubadd_<mode>_mask<round_name>,
6172 <avx512>_fmsubadd_<mode>_mask3<round_name>): Remove isa attribute.
6173 (*vec_widen_umult_even_v16si<mask_name>,
6174 *vec_widen_smult_even_v16si<mask_name>): Likewise.
6175 (<mask_codefor>avx512bw_dbpsadbw<mode><mask_name>): Likewise.
6176
6177 2017-10-20 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
6178
6179 * extend.texi: Add 'nocf_check' documentation.
6180 * gimple.texi: Add second parameter to
6181 gimple_build_call_from_tree.
6182 * invoke.texi: Add -fcf-protection documentation.
6183 * rtl.texi: Add REG_CALL_NOTRACK documenation.
6184
6185 2017-10-20 Richard Biener <rguenther@suse.de>
6186
6187 PR tree-optimization/82473
6188 * tree-vect-loop.c (vectorizable_reduction): Properly get at
6189 the largest input type.
6190
6191 2017-10-20 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
6192
6193 * c-attribs.c (handle_nocf_check_attribute): New function.
6194 (c_common_attribute_table): Add 'nocf_check' handling.
6195 * gimple-parser.c: Add second argument NULL to
6196 gimple_build_call_from_tree.
6197 * attrib.c (comp_type_attributes): Check nocf_check attribute.
6198 * cfgexpand.c (expand_call_stmt): Set REG_CALL_NOCF_CHECK for
6199 call insn.
6200 * combine.c (distribute_notes): Add REG_CALL_NOCF_CHECK handling.
6201 * common.opt: Add fcf-protection flag.
6202 * emit-rtl.c (try_split): Add REG_CALL_NOCF_CHECK handling.
6203 * flag-types.h: Add enum cf_protection_level.
6204 * gimple.c (gimple_build_call_from_tree): Add second parameter.
6205 Add 'nocf_check' attribute propagation to gimple call.
6206 * gimple.h (gf_mask): Add GF_CALL_NOCF_CHECK.
6207 (gimple_build_call_from_tree): Update prototype.
6208 (gimple_call_nocf_check_p): New function.
6209 (gimple_call_set_nocf_check): Likewise.
6210 * gimplify.c: Add second argument to gimple_build_call_from_tree.
6211 * ipa-icf.c: Add nocf_check attribute in statement hash.
6212 * recog.c (peep2_attempt): Add REG_CALL_NOCF_CHECK handling.
6213 * reg-notes.def: Add REG_NOTE (CALL_NOCF_CHECK).
6214 * toplev.c (process_options): Add flag_cf_protection handling.
6215
6216 2017-10-19 Jan Hubicka <hubicka@ucw.cz>
6217
6218 * x86-tune-costs.h (core_cost): Fix div, move and sqrt latencies.
6219
6220 2017-10-20 Richard Biener <rguenther@suse.de>
6221
6222 PR tree-optimization/82603
6223 * tree-if-conv.c (predicate_mem_writes): Make sure to only
6224 remove false predicated stores.
6225
6226 2017-10-20 Richard Biener <rguenther@suse.de>
6227
6228 * graphite-isl-ast-to-gimple.c
6229 (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block):
6230 Remove return value and simplify, dump copied stmt after lhs
6231 adjustment.
6232 (translate_isl_ast_to_gimple::translate_isl_ast_node_user):
6233 Reduce dump verbosity.
6234 (gsi_insert_earliest): Likewise.
6235 (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Adjust.
6236 * graphite.c (print_global_statistics): Adjust dumping.
6237 (print_graphite_scop_statistics): Likewise.
6238 (print_graphite_statistics): Do not dump loops here.
6239 (graphite_transform_loops): But here.
6240
6241 2017-10-20 Nicolas Roche <roche@adacore.com>
6242
6243 * configure.ac (ACX_PROG_GNAT): Append "libgnat" to include search dir.
6244 * configure: Regenerate.
6245
6246 2017-10-20 Jakub Jelinek <jakub@redhat.com>
6247
6248 PR target/82158
6249 * tree-cfg.c (pass_warn_function_return::execute): In noreturn
6250 functions when optimizing replace GIMPLE_RETURN stmts with
6251 calls to __builtin_unreachable ().
6252
6253 PR sanitizer/82595
6254 * config/gnu-user.h (LIBTSAN_EARLY_SPEC): Add libtsan_preinit.o
6255 for -fsanitize=thread link of executables.
6256 (LIBLSAN_EARLY_SPEC): Add liblsan_preinit.o for -fsanitize=leak
6257 link of executables.
6258
6259 PR target/82370
6260 * config/i386/sse.md (VI248_AVX2, VI248_AVX512BW, VI248_AVX512BW_2):
6261 New mode iterators.
6262 (<shift_insn><mode>3<mask_name>): Change the last of the 3
6263 define_insns for logical vector shifts to use VI248_AVX512BW
6264 iterator instead of VI48_AVX512, remove <mask_mode512bit_condition>
6265 condition, useless isa and prefix attributes. Change the first
6266 2 of these define_insns to ...
6267 (<mask_codefor><shift_insn><mode>3<mask_name>): ... this, new
6268 define_insn for avx512vl.
6269 (<shift_insn><mode>3): ... and this, new define_insn without
6270 masking for non-avx512vl.
6271
6272 PR target/82370
6273 * config/i386/sse.md (*andnot<mode>3,
6274 <mask_codefor><code><mode>3<mask_name>, *<code><mode>3): Split
6275 (=v,v,vm) alternative into (=x,x,xm) and (=v,v,vm), for 128-bit
6276 and 256-bit vectors, the (=x,x,xm) alternative and when mask is
6277 not applied use empty suffix even for TARGET_AVX512VL.
6278 * config/i386/subst.md (mask_prefix3, mask_prefix4): When mask
6279 is applied, supply evex,evex or evex,evex,evex instead of just
6280 evex.
6281
6282 2017-10-20 Julia Koval <julia.koval@intel.com>
6283
6284 * common/config/i386/i386-common.c (OPTION_MASK_ISA_GFNI_SET,
6285 (OPTION_MASK_ISA_GFNI_UNSET): New.
6286 (ix86_handle_option): Handle OPT_mgfni.
6287 * config/i386/cpuid.h (bit_GFNI): New.
6288 * config/i386/driver-i386.c (host_detect_local_cpu): Detect gfni.
6289 * config/i386/i386-c.c (ix86_target_macros_internal): Define __GFNI__.
6290 * config/i386/i386.c (ix86_target_string): Add -mgfni.
6291 (ix86_valid_target_attribute_inner_p): Add OPT_mgfni.
6292 * config/i386/i386.h (TARGET_GFNI, TARGET_GFNI_P): New.
6293 * config/i386/i386.opt: Add mgfni.
6294
6295 2017-10-20 Orlando Arias <oarias@knights.ucf.edu>
6296
6297 * config/msp430/msp430.c (msp430_option_override): Disable
6298 -fdelete-null-pointer-checks.
6299 * doc/invoke.text (-fdelete-null-pointer-checks): Document that.
6300
6301 2017-10-19 Jan Hubicka <hubicka@ucw.cz>
6302
6303 * x86-tune-costs.h (generic_cost, core_cost): Correct costs
6304 of x87 and SSE instructions.
6305
6306 2017-10-19 Jan Hubicka <hubicka@ucw.cz>
6307
6308 * asan.c (create_cond_insert_point): Do not update edge count.
6309 * auto-profile.c (afdo_propagate_edge): Update for edge count removal.
6310 (afdo_propagate_circuit): Likewise.
6311 (afdo_calculate_branch_prob): Likewise.
6312 (afdo_annotate_cfg): Likewise.
6313 * basic-block.h (struct edge_def): Remove count.
6314 (edge_def::count): New accessor.
6315 * bb-reorder.c (rotate_loop): Update.
6316 (find_traces_1_round): Update.
6317 (connect_traces): Update.
6318 (sanitize_hot_paths): Update.
6319 * cfg.c (unchecked_make_edge): Update.
6320 (make_single_succ_edge): Update.
6321 (check_bb_profile): Update.
6322 (dump_edge_info): Update.
6323 (update_bb_profile_for_threading): Update.
6324 (scale_bbs_frequencies_int): Update.
6325 (scale_bbs_frequencies_gcov_type): Update.
6326 (scale_bbs_frequencies_profile_count): Update.
6327 (scale_bbs_frequencies): Update.
6328 * cfganal.c (connect_infinite_loops_to_exit): Update.
6329 * cfgbuild.c (compute_outgoing_frequencies): Update.
6330 (find_many_sub_basic_blocks): Update.
6331 * cfgcleanup.c (try_forward_edges): Update.
6332 (try_crossjump_to_edge): Update
6333 * cfgexpand.c (expand_gimple_cond): Update
6334 (expand_gimple_tailcall): Update
6335 (construct_exit_block): Update
6336 * cfghooks.c (verify_flow_info): Update
6337 (redirect_edge_succ_nodup): Update
6338 (split_edge): Update
6339 (make_forwarder_block): Update
6340 (duplicate_block): Update
6341 (account_profile_record): Update
6342 * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
6343 * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
6344 * cfgloopmanip.c (scale_loop_profile): Update.
6345 (loopify): Update.
6346 (lv_adjust_loop_entry_edge): Update.
6347 * cfgrtl.c (try_redirect_by_replacing_jump): Update.
6348 (force_nonfallthru_and_redirect): Update.
6349 (purge_dead_edges): Update.
6350 (rtl_flow_call_edges_add): Update.
6351 * cgraphunit.c (init_lowered_empty_function): Update.
6352 (cgraph_node::expand_thunk): Update.
6353 * gimple-pretty-print.c (dump_probability): Update.
6354 (dump_edge_probability): Update.
6355 * gimple-ssa-isolate-paths.c (isolate_path): Update.
6356 * haifa-sched.c (sched_create_recovery_edges): Update.
6357 * hsa-gen.c (convert_switch_statements): Update.
6358 * ifcvt.c (dead_or_predicable): Update.
6359 * ipa-inline-transform.c (inline_transform): Update.
6360 * ipa-split.c (split_function): Update.
6361 * ipa-utils.c (ipa_merge_profiles): Update.
6362 * loop-doloop.c (add_test): Update.
6363 * loop-unroll.c (unroll_loop_runtime_iterations): Update.
6364 * lto-streamer-in.c (input_cfg): Update.
6365 (input_function): Update.
6366 * lto-streamer-out.c (output_cfg): Update.
6367 * modulo-sched.c (sms_schedule): Update.
6368 * postreload-gcse.c (eliminate_partially_redundant_load): Update.
6369 * predict.c (maybe_hot_edge_p): Update.
6370 (unlikely_executed_edge_p): Update.
6371 (probably_never_executed_edge_p): Update.
6372 (dump_prediction): Update.
6373 (drop_profile): Update.
6374 (propagate_unlikely_bbs_forward): Update.
6375 (determine_unlikely_bbs): Update.
6376 (force_edge_cold): Update.
6377 * profile.c (compute_branch_probabilities): Update.
6378 * reg-stack.c (better_edge): Update.
6379 * shrink-wrap.c (handle_simple_exit): Update.
6380 * tracer.c (better_p): Update.
6381 * trans-mem.c (expand_transaction): Update.
6382 (split_bb_make_tm_edge): Update.
6383 * tree-call-cdce.c: Update.
6384 * tree-cfg.c (gimple_find_sub_bbs): Update.
6385 (gimple_split_edge): Update.
6386 (gimple_duplicate_sese_region): Update.
6387 (gimple_duplicate_sese_tail): Update.
6388 (gimple_flow_call_edges_add): Update.
6389 (insert_cond_bb): Update.
6390 (execute_fixup_cfg): Update.
6391 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update.
6392 * tree-complex.c (expand_complex_div_wide): Update.
6393 * tree-eh.c (lower_resx): Update.
6394 (unsplit_eh): Update.
6395 (cleanup_empty_eh_move_lp): Update.
6396 * tree-inline.c (copy_edges_for_bb): Update.
6397 (freqs_to_counts): Update.
6398 (copy_cfg_body): Update.
6399 * tree-ssa-dce.c (remove_dead_stmt): Update.
6400 * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
6401 * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
6402 * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
6403 (unloop_loops): Update.
6404 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
6405 * tree-ssa-loop-split.c (connect_loops): Update.
6406 (split_loop): Update.
6407 * tree-ssa-loop-unswitch.c (hoist_guard): Update.
6408 * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
6409 * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
6410 * tree-ssa-reassoc.c (branch_fixup): Update.
6411 * tree-ssa-tail-merge.c (replace_block_by): Update.
6412 * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
6413 (compute_path_counts): Update.
6414 (update_profile): Update.
6415 (recompute_probabilities): Update.
6416 (update_joiner_offpath_counts): Update.
6417 (estimated_freqs_path): Update.
6418 (freqs_to_counts_path): Update.
6419 (clear_counts_path): Update.
6420 (ssa_fix_duplicate_block_edges): Update.
6421 (duplicate_thread_path): Update.
6422 * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
6423 (case_bit_test_cmp): Update.
6424 (collect_switch_conv_info): Update.
6425 (gen_inbound_check): Update.
6426 (do_jump_if_equal): Update.
6427 (emit_cmp_and_jump_insns): Update.
6428 * tree-tailcall.c (decrease_profile): Update.
6429 (eliminate_tail_call): Update.
6430 * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
6431 (vect_do_peeling): Update.
6432 * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
6433 * ubsan.c (ubsan_expand_null_ifn): Update.
6434 (ubsan_expand_ptr_ifn): Update.
6435 * value-prof.c (gimple_divmod_fixed_value): Update.
6436 (gimple_mod_pow2): Update.
6437 (gimple_mod_subtract): Update.
6438 (gimple_ic): Update.
6439 (gimple_stringop_fixed_value): Update.
6440
6441 2017-10-19 Uros Bizjak <ubizjak@gmail.com>
6442
6443 PR target/82618
6444 * config/i386/i386.md (sub to cmp): New peephole2 pattern.
6445
6446 2017-10-19 Alexander Monakov <amonakov@ispras.ru>
6447
6448 PR rtl-optimization/82395
6449 * ira-color.c (allocno_priority_compare_func): Fix comparison step
6450 based on non_spilled_static_chain_regno_p.
6451
6452 2017-10-19 Uros Bizjak <ubizjak@gmail.com>
6453
6454 * config/i386/i386.c (output_387_binary_op): Rewrite SSE part.
6455 (ix86_emit_mode_set): Rewrite insn mnemonic construction.
6456 (ix86_prepare_fp_compare_args): Redefine is_sse as bool.
6457
6458 2017-10-19 Martin Sebor <msebor@redhat.com>
6459
6460 PR tree-optimization/82596
6461 * tree.c (array_at_struct_end_p): Handle STRING_CST.
6462
6463 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
6464
6465 * asan.c (handle_builtin_alloca): Deal with all alloca variants.
6466 (get_mem_refs_of_builtin_call): Likewise.
6467 * builtins.c (expand_builtin_apply): Adjust call to
6468 allocate_dynamic_stack_space.
6469 (expand_builtin_alloca): For __builtin_alloca_with_align_and_max, pass
6470 the third argument to allocate_dynamic_stack_space, otherwise -1.
6471 (expand_builtin): Deal with all alloca variants.
6472 (is_inexpensive_builtin): Likewise.
6473 * builtins.def (BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX): New.
6474 * calls.c (special_function_p): Deal with all alloca variants.
6475 (initialize_argument_information): Adjust call to
6476 allocate_dynamic_stack_space.
6477 (expand_call): Likewise.
6478 * cfgexpand.c (expand_call_stmt): Deal with all alloca variants.
6479 * doc/extend.texi (Built-ins): Add __builtin_alloca_with_align_and_max
6480 * explow.c (allocate_dynamic_stack_space): Add MAX_SIZE parameter and
6481 use it for the stack usage computation.
6482 * explow.h (allocate_dynamic_stack_space): Adjust prototype.
6483 * function.c (gimplify_parameters): Call build_alloca_call_expr.
6484 * gimple-ssa-warn-alloca.c (alloca_call_type): Simplify control flow.
6485 Take into account 3rd argument of __builtin_alloca_with_align_and_max.
6486 (in_loop_p): Remove first argument and useless check.
6487 (pass_walloca::execute): Remove useless test and adjust call to above.
6488 * gimple.c (gimple_build_call_from_tree): Deal with all alloc variants
6489 * gimplify.c (gimplify_vla_decl): Call build_alloca_call_expr.
6490 (gimplify_call_expr): Deal with all alloca variants.
6491 * hsa-gen.c (gen_hsa_alloca): Likewise.
6492 (gen_hsa_insns_for_call): Likewise.
6493 * ipa-pure-const.c (special_builtin_state): Likewise.
6494 * tree-chkp.c (chkp_build_returned_bound): Likewise.
6495 * tree-object-size.c (alloc_object_size): Likewise.
6496 * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Likewise.
6497 (call_may_clobber_ref_p_1): Likewise.
6498 * tree-ssa-ccp.c (evaluate_stmt): Likewise.
6499 (ccp_fold_stmt): Likewise.
6500 (optimize_stack_restore): Likewise.
6501 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
6502 (mark_all_reaching_defs_necessary_1): Likewise.
6503 (propagate_necessity): Likewise.
6504 (eliminate_unnecessary_stmts): Likewise.
6505 * tree.c (build_common_builtin_nodes): Build
6506 BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX.
6507 (build_alloca_call_expr): New function.
6508 * tree.h (ALLOCA_FUNCTION_CODE_P): New macro.
6509 (CASE_BUILT_IN_ALLOCA): Likewise.
6510 (build_alloca_call_expr): Declare.
6511 * varasm.c (incorporeal_function_p): Deal with all alloca variants.
6512
6513 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
6514
6515 PR debug/82509
6516 * dwarf2out.c (new_die_raw): New static inline function.
6517 (new_die): Use it to create the DIE.
6518 (add_AT_external_die_ref): Likewise.
6519 (clone_die): Likewise.
6520 (clone_as_declaration): Likewise.
6521 (dwarf2out_vms_debug_main_pointer): Likewise.
6522 (base_type_die): Likewise. Remove early return for corner cases.
6523 Do not call add_pubtype on the DIE here.
6524 (is_base_type): Remove ERROR_MARK and return 0 for VOID_TYPE.
6525 (modified_type_die): Adjust the lookup for reverse order DIEs. Skip
6526 typedefs for base types with DW_AT_endianity. Make sure a DIE with
6527 native order exists for base types, attach the DIE manually and call
6528 add_pubtype on it. Do not equate a reverse order DIE to the type.
6529
6530 2017-10-19 Richard Earnshaw <rearnsha@arm.com>
6531
6532 * config/arm/arm.c (align_ok_ldrd_strd): New function.
6533 (mem_ok_for_ldrd_strd): New parameter align. Extract the alignment of
6534 the mem into it.
6535 (gen_operands_ldrd_strd): Validate the alignment of the accesses.
6536
6537 2017-10-19 Jakub Jelinek <jakub@redhat.com>
6538
6539 * flag-types.h (enum sanitize_code): Add SANITIZE_BUILTIN. Or
6540 SANITIZE_BUILTIN into SANITIZE_UNDEFINED.
6541 * sanitizer.def (BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN,
6542 BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN_ABORT): New builtins.
6543 * opts.c (sanitizer_opts): Add builtin.
6544 * ubsan.c (instrument_builtin): New function.
6545 (pass_ubsan::execute): Call it.
6546 (pass_ubsan::gate): Enable even for SANITIZE_BUILTIN.
6547 * doc/invoke.texi: Document -fsanitize=builtin.
6548
6549 * ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
6550 builtins, store max (log2 (align), 0) into uchar field instead of
6551 align into uptr field.
6552 (ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
6553 store uchar 0 field instead of uptr 0 field.
6554 (instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
6555 instead of passing one address of struct with 2 locations pass
6556 two addresses of structs with 1 location each.
6557 * sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
6558 BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
6559 BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
6560 BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
6561 (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
6562 BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
6563 BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
6564 BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.
6565
6566 2017-10-19 Martin Liska <mliska@suse.cz>
6567
6568 PR driver/81829
6569 * file-find.c (remove_prefix): Remove.
6570 * file-find.h (remove_prefix): Likewise.
6571 * gcc-ar.c: Remove smartness of lookup.
6572
6573 2017-10-19 Segher Boessenkool <segher@kernel.crashing.org>
6574
6575 * config/rs6000/rs6000.md (*call_indirect_aix<mode>,
6576 *call_value_indirect_aix<mode>, *call_indirect_elfv2<mode>,
6577 *call_value_indirect_elfv2<mode>): Add correct mode to the unspec.
6578
6579 2017-10-19 Jakub Jelinek <jakub@redhat.com>
6580
6581 PR target/82580
6582 * config/i386/i386.md (setcc + movzbl to xor + setcc): New peephole2.
6583 (setcc + and to xor + setcc): New peephole2.
6584
6585 2017-10-19 Tom de Vries <tom@codesourcery.com>
6586
6587 * doc/sourcebuild.texi (Test Directives, Variants of
6588 dg-require-support): Add dg-require-stack-size.
6589
6590 2017-10-19 Martin Liska <mliska@suse.cz>
6591
6592 PR sanitizer/82517
6593 * gimplify.c (gimplify_decl_expr): Do not instrument variables
6594 that have a large alignment.
6595 (gimplify_target_expr): Likewise.
6596
6597 2017-10-18 Segher Boessenkool <segher@kernel.crashing.org>
6598
6599 PR rtl-optimization/82602
6600 * ira.c (rtx_moveable_p): Return false for volatile asm.
6601
6602 2017-10-18 Uros Bizjak <ubizjak@gmail.com>
6603
6604 PR target/82580
6605 * config/i386/i386-modes.def (CCGZ): New CC mode.
6606 * config/i386/i386.md (sub<mode>3_carry_ccgz): New insn pattern.
6607 * config/i386/predicates.md (ix86_comparison_operator):
6608 Handle CCGZmode.
6609 * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
6610 Emulate LE, LEU, GT, GTU, LT, LTU, GE and GEU double-word comparisons
6611 with double-word subtraction.
6612 (put_condition_code): Handle CCGZmode.
6613
6614 2017-10-18 Aldy Hernandez <aldyh@redhat.com>
6615
6616 * wide-int.cc (debug (const wide_int &)): New.
6617 (debug (const wide_int *)): New.
6618 (debug (const widest_int &)): New.
6619 (debug (const widest_int *)): New.
6620
6621 2017-10-18 Vladimir Makarov <vmakarov@redhat.com>
6622
6623 PR middle-end/82556
6624 * lra-constraints.c (curr_insn_transform): Use non-input operand
6625 instead of output one for matched reload.
6626
6627 2017-10-18 Bin Cheng <bin.cheng@arm.com>
6628
6629 * tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
6630 (tree-ssa-loop-ivopts.h): New header file.
6631 (struct builtin_info): New fields.
6632 (classify_builtin_1): Compute and record base and offset parts for
6633 memset builtin partition by calling strip_offset.
6634 (offset_cmp, fuse_memset_builtins): New functions.
6635 (finalize_partitions): Fuse adjacent memset partitions by calling
6636 above function.
6637 * tree-ssa-loop-ivopts.c (strip_offset): Delete static declaration.
6638 Expose the interface.
6639 * tree-ssa-loop-ivopts.h (strip_offset): New declaration.
6640
6641 2017-10-18 Bin Cheng <bin.cheng@arm.com>
6642
6643 PR tree-optimization/82574
6644 * tree-loop-distribution.c (find_single_drs): New parameter. Check
6645 that data reference must be executed exactly once per iteration
6646 against the outermost loop in nest.
6647 (classify_partition): Update call to above function.
6648
6649 2017-10-18 Richard Biener <rguenther@suse.de>
6650
6651 PR tree-optimization/82591
6652 * graphite.c (graphite_transform_loops): Move code gen message
6653 printing ...
6654 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
6655 Here. Handle scop_to_isl_ast failing.
6656 (scop_to_isl_ast): Limit the number of ISL operations.
6657
6658 2017-10-18 Richard Biener <rguenther@suse.de>
6659
6660 * graphite-isl-ast-to-gimple.c
6661 (translate_isl_ast_to_gimple::set_rename): Simplify.
6662 (translate_isl_ast_to_gimple::set_rename_for_each_def): Inline...
6663 (graphite_copy_stmts_from_block): ... here.
6664 (copy_bb_and_scalar_dependences): Simplify.
6665 (add_parameters_to_ivs_params): Canonicalize.
6666 (generate_entry_out_of_ssa_copies): Simplify.
6667 * graphite-sese-to-poly.c (extract_affine_name): Simplify
6668 by passing in ISL dimension.
6669 (parameter_index_in_region_1): Rename to ...
6670 (parameter_index_in_region): ... this.
6671 (extract_affine): Adjust assert, pass down parameter index.
6672 (add_param_constraints): Use range-info when available.
6673 (build_scop_context): Adjust.
6674 * sese.c (new_sese_info): Adjust.
6675 (free_sese_info): Likewise.
6676 * sese.h (bb_map_t, rename_map_t, phi_rename, init_back_edge_pair_t):
6677 Remove unused typedefs.
6678 (struct sese_info_t): Simplify rename_map, remove incomplete_phis.
6679
6680 2017-10-18 Martin Liska <mliska@suse.cz>
6681
6682 * combine.c (simplify_compare_const): Add gcc_fallthrough.
6683
6684 2017-10-18 Robin Dapp <rdapp@linux.vnet.ibm.com>
6685
6686 * config/s390/s390.c (s390_bb_fallthru_entry_likely): New function.
6687 (s390_sched_init): Do not reset s390_sched_state if we entered the
6688 current basic block via a fallthru edge and all others are unlikely.
6689
6690 2017-10-18 Robin Dapp <rdapp@linux.vnet.ibm.com>
6691
6692 * config/s390/s390.c (NUM_SIDES): New variable.
6693 (LONGRUNNING_THRESHOLD): New variable.
6694 (LATENCY_FACTOR): New variable.
6695 (s390_sched_score): Decrease score for long-running instructions on
6696 wrong side.
6697 (s390_sched_variable_issue): Perform bookkeeping for long-running
6698 instructions.
6699
6700 2017-10-18 Richard Biener <rguenther@suse.de>
6701
6702 * graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_ast_expr_id):
6703 Simplify with removal of the parameter rename map.
6704 (set_rename): Likewise.
6705 (should_copy_to_new_region): Likewise.
6706 (graphite_copy_stmts_from_block): Likewise.
6707 (copy_bb_and_scalar_dependences): Remove initialization of
6708 unused copied_bb_map.
6709 (copy_def): Remove.
6710 (copy_internal_parameters): Likewise.
6711 (graphite_regenerate_ast_isl): Do not call copy_internal_parameters.
6712 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
6713 Use INTEGRAL_TYPE_P.
6714 (parameter_index_in_region_1): Rename to ...
6715 (assign_parameter_index_in_region): ... this. Assert we have
6716 a parameter we handle.
6717 (scan_tree_for_params): Adjust.
6718 * sese.h (parameter_rename_map_t): Remove.
6719 (struct sese_info_t): Remove unused parameter_rename_map and
6720 copied_bb_map members.
6721 * sese.c (new_sese_info): Adjust.
6722 (free_sese_info): Likewise.
6723
6724 2017-10-18 Martin Liska <mliska@suse.cz>
6725
6726 PR sanitizer/82545
6727 * asan.c (asan_expand_poison_ifn): Do not put gimple stmt
6728 on an abnormal edge.
6729
6730 2017-10-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
6731
6732 * doc/invoke.texi (ffunction-sections and fdata-sections):
6733 Update.
6734
6735 2017-10-17 Eric Botcazou <ebotcazou@adacore.com>
6736
6737 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if
6738 the use statement can throw internally.
6739
6740 2017-10-17 Eric Botcazou <ebotcazou@adacore.com>
6741
6742 * config/visium/visium.c (visium_select_cc_mode): Return CCmode for
6743 any RTX present on the RHS of a SET.
6744 * compare-elim.c (try_eliminate_compare): Restore comment.
6745
6746 2017-10-17 Jakub Jelinek <jakub@redhat.com>
6747
6748 * langhooks.h (struct lang_hooks): Document that tree_size langhook
6749 may be also called on tcc_type nodes.
6750 * langhooks.c (lhd_tree_size): Likewise.
6751
6752 2017-10-17 David Malcolm <dmalcolm@redhat.com>
6753
6754 * gimple-ssa-sprintf.c (fmtwarn): Update for changed signature of
6755 format_warning_at_substring.
6756 (maybe_warn): Convert source_range * param to a location_t. Pass
6757 UNKNOWN_LOCATION rather than NULL to fmtwarn.
6758 (format_directive): Remove code to extract source_ranges and
6759 source_range * in favor of just a location_t.
6760 (parse_directive): Pass UNKNOWN_LOCATION rather than NULL to
6761 fmtwarn.
6762 * substring-locations.c (format_warning_va): Convert
6763 source_range * param to a location_t.
6764 (format_warning_at_substring): Likewise.
6765 * substring-locations.h (format_warning_va): Likewise.
6766 (format_warning_at_substring): Likewise.
6767
6768 2017-10-17 Jan Hubicka <hubicka@ucw.cz>
6769
6770 * target.h (enum vect_cost_for_stmt): Add vec_gather_load and
6771 vec_scatter_store
6772 * tree-vect-stmts.c (record_stmt_cost): Make difference between normal
6773 and scatter/gather ops.
6774
6775 * aarch64/aarch64.c (aarch64_builtin_vectorization_cost): Add
6776 vec_gather_load and vec_scatter_store.
6777 * arm/arm.c (arm_builtin_vectorization_cost): Likewise.
6778 * powerpcspe/powerpcspe.c (rs6000_builtin_vectorization_cost): Likewise.
6779 * rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Likewise.
6780 * s390/s390.c (s390_builtin_vectorization_cost): Likewise.
6781 * spu/spu.c (spu_builtin_vectorization_cost): Likewise.
6782 * i386/i386.c (x86_builtin_vectorization_cost): Likewise.
6783
6784 2017-10-17 Uros Bizjak <ubizjak@gmail.com>
6785
6786 * reg-stack.c (compare_for_stack_reg): Add bool argument.
6787 Detect FTST instruction and handle its register pops. Only pop
6788 second operand if can_pop_second_op is true.
6789 (subst_stack_regs_pat) <case COMPARE>: Detect FCOMI instruction to
6790 set can_pop_second_op to false in the compare_for_stack_reg call.
6791
6792 * config/i386/i386.md (*cmpi<FPCMP:unord><MODEF:mode>): Only call
6793 output_fp_compare for stack register operands.
6794 * config/i386/i386.c (output_fp_compare): Do not output SSE compare
6795 instructions here. Do not emit stack register pops here. Assert
6796 that FCOMPP pops next to top stack register. Rewrite function.
6797
6798 2017-10-17 Nathan Sidwell <nathan@acm.org>
6799
6800 PR middle-end/82577
6801 * alias.c (compare_base_decls): Check HAS_DECL_ASSEMBLER_NAME_P,
6802 use DECL_ASSEMBLER_NAME_RAW.
6803
6804 PR middle-end/82546
6805 * tree.c (tree_code_size): Reformat. Punt to lang hook for unknown
6806 TYPE nodes.
6807
6808 2017-10-17 Qing Zhao <qing.zhao@oracle.com>
6809 Wilco Dijkstra <wilco.dijkstra@arm.com>
6810
6811 * builtins.c (expand_builtin_update_setjmp_buf): Add a
6812 converstion to Pmode from the buf_addr.
6813
6814 2017-10-17 Richard Biener <rguenther@suse.de>
6815
6816 * graphite-dependences.c (scop_get_reads_and_writes): Change
6817 output parameters to references.
6818
6819 2017-10-17 Jackson Woodruff <jackson.woodruff@arm.com>
6820
6821 PR 71026/tree-optimization
6822 * fold-const.c (distribute_real_division): Removed.
6823 (fold_binary_loc): Remove calls to distribute_real_divison.
6824
6825 2017-10-17 Richard Biener <rguenther@suse.de>
6826
6827 * graphite-scop-detection.c
6828 (scop_detection::stmt_has_simple_data_refs_p): Always use
6829 the full nest as region.
6830 (try_generate_gimple_bb): Likewise.
6831 * sese.c (scalar_evolution_in_region): Simplify now that
6832 SCEV can handle instantiation in regions.
6833 * tree-scalar-evolution.c (instantiate_scev_name): Also instantiate
6834 in the non-loop part of a function if requested.
6835
6836 2017-10-17 Richard Biener <rguenther@suse.de>
6837
6838 PR tree-optimization/82563
6839 * graphite-isl-ast-to-gimple.c (generate_entry_out_of_ssa_copies):
6840 New function.
6841 (graphite_regenerate_ast_isl): Call it.
6842 * graphite-scop-detection.c (build_scops): Remove entry edge split.
6843
6844 2017-10-17 Jakub Jelinek <jakub@redhat.com>
6845
6846 PR tree-optimization/82549
6847 * fold-const.c (optimize_bit_field_compare, fold_truth_andor_1):
6848 Formatting fixes. Instead of calling make_bit_field_ref with negative
6849 bitpos return 0.
6850
6851 2017-10-17 Olga Makhotina <olga.makhotina@intel.com>
6852
6853 * config/i386/avx512dqintrin.h (_mm_mask_reduce_sd,
6854 _mm_maskz_reduce_sd, _mm_mask_reduce_ss,=20
6855 _mm_maskz_reduce_ss): New.
6856 * config/i386/i386-builtin.def (__builtin_ia32_reducesd_mask,
6857 __builtin_ia32_reducess_mask): Ditto..
6858 (__builtin_ia32_reducesd, __builtin_ia32_reducess): Remove.
6859 * config/i386/sse.md (reduces<mode>): Renamed to ...
6860 (reduces<mode><mask_scalar_name>): ... this.
6861 (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}):
6862 Changed to ...
6863 (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0<mask_scalar_operand4>|
6864 %0<mask_scalar_operand4>, %1, %2, %3}): ... this.
6865
6866 2017-10-16 David Malcolm <dmalcolm@redhat.com>
6867
6868 * Makefile.in (OBJS): Add unique-ptr-tests.o.
6869 * selftest-run-tests.c (selftest::run_tests): Call
6870 selftest::unique_ptr_tests_cc_tests.
6871 * selftest.h (selftest::unique_ptr_tests_cc_tests): New decl.
6872 * unique-ptr-tests.cc: New file.
6873
6874 2017-10-16 Vladimir Makarov <vmakarov@redhat.com>
6875
6876 PR sanitizer/82353
6877 * lra.c (collect_non_operand_hard_regs): Don't ignore operator
6878 locations.
6879 * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
6880 (make_hard_regno_born, make_hard_regno_dead): Update
6881 bb_killed_pseudos and bb_gen_pseudos for fixed regs.
6882
6883 2017-10-16 Jeff Law <law@redhat.com>
6884
6885 * tree-ssa-dse.c (live_bytes_read): Fix thinko.
6886
6887 2017-10-16 Jan Hubicka <hubicka@ucw.cz>
6888
6889 * x86-tune-costs.h (znver1_cost): Fix move cost tables.
6890
6891 2017-10-16 Olivier Hainque <hainque@adacore.com>
6892
6893 * gcc/config.gcc (powerpc*-*-*spe*): Pick 8548 as the default
6894 with_cpu if we were configured for an e500v2 target cpu name.
6895
6896 2017-10-16 Thomas Preud'homme <thomas.preudhomme@arm.com>
6897
6898 * config/arm/arm-cpus.in (cortex-m33): Add nodsp option.
6899 * doc/invoke.texi: Document +nodsp as a valid extension for
6900 -mcpu=cortex-m33.
6901
6902 2017-10-16 Martin Liska <mliska@suse.cz>
6903
6904 * sbitmap.c (bitmap_bit_in_range_p_checking): New function.
6905 (test_set_range): Likewise.
6906 (test_range_functions): Rename to ...
6907 (test_bit_in_range): ... this.
6908 (sbitmap_c_tests): Add new test.
6909
6910 2017-10-16 Tamar Christina <tamar.christina@arm.com>
6911
6912 * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32):
6913 New.
6914 (vdot_lane_u32, vdot_laneq_u32, vdotq_lane_u32, vdotq_laneq_u32): New.
6915 (vdot_lane_s32, vdot_laneq_s32, vdotq_lane_s32, vdotq_laneq_s32): New.
6916
6917 2017-10-16 Tamar Christina <tamar.christina@arm.com>
6918
6919 * config/aarch64/aarch64-builtins.c
6920 (aarch64_types_quadopu_lane_qualifiers): New.
6921 (TYPES_QUADOPU_LANE): New.
6922 * config/aarch64/aarch64-simd.md (aarch64_<sur>dot<vsi2qi>): New.
6923 (<sur>dot_prod<vsi2qi>, aarch64_<sur>dot_lane<vsi2qi>): New.
6924 (aarch64_<sur>dot_laneq<vsi2qi>): New.
6925 * config/aarch64/aarch64-simd-builtins.def (sdot, udot): New.
6926 (sdot_lane, udot_lane, sdot_laneq, udot_laneq): New.
6927 * config/aarch64/iterators.md (sur): Add UNSPEC_SDOT, UNSPEC_UDOT.
6928 (Vdottype, DOTPROD): New.
6929 (sur): Add SDOT and UDOT.
6930
6931 2017-10-16 Tamar Christina <tamar.christina@arm.com>
6932
6933 * config/aarch64/aarch64.h (AARCH64_FL_DOTPROD): New.
6934 (AARCH64_ISA_DOTPROD, TARGET_DOTPROD): New.
6935 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
6936 Add TARGET_DOTPROD.
6937 * config/aarch64/aarch64-option-extensions.def (dotprod): New.
6938 * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75):
6939 Enable TARGET_DOTPROD.
6940 (cortex-a75.cortex-a55): Likewise.
6941 * doc/invoke.texi (aarch64-feature-modifiers): Document dotprod.
6942
6943 2017-10-16 Tamar Christina <tamar.christina@arm.com>
6944
6945 * config/arm/arm-builtins.c (arm_unsigned_uternop_qualifiers): New.
6946 (UTERNOP_QUALIFIERS, arm_umac_lane_qualifiers, UMAC_LANE_QUALIFIERS):
6947 New.
6948 * config/arm/arm_neon_builtins.def (sdot, udot, sdot_lane, udot_lane):
6949 New.
6950 * config/arm/iterators.md (DOTPROD, VSI2QI, vsi2qi): New.
6951 (UNSPEC_DOT_S, UNSPEC_DOT_U, opsuffix): New.
6952 * config/arm/neon.md (neon_<sup>dot<vsi2qi>): New.
6953 (neon_<sup>dot_lane<vsi2qi>, <sup>dot_prod<vsi2qi>): New.
6954 * config/arm/types.md (neon_dot, neon_dot_q): New.
6955 * config/arm/unspecs.md (sup): Add UNSPEC_DOT_S, UNSPEC_DOT_U.
6956
6957 2017-10-16 Tamar Christina <tamar.christina@arm.com>
6958
6959 * config/arm/arm.h (TARGET_DOTPROD): New.
6960 * config/arm/arm.c (arm_arch_dotprod): New.
6961 (arm_option_reconfigure_globals): Add arm_arch_dotprod.
6962 * config/arm/arm-c.c (__ARM_FEATURE_DOTPROD): New.
6963 * config/arm/arm-cpus.in (armv8.2-a): Enabled +dotprod.
6964 (feature dotprod, group dotprod, ALL_SIMD_INTERNAL): New.
6965 (ALL_FPU_INTERNAL): Use ALL_SIMD_INTERNAL.
6966 * config/arm/t-multilib (v8_2_a_simd_variants): Add dotprod.
6967 * doc/invoke.texi (armv8.2-a): Document dotprod
6968
6969 2017-10-14 Jan Hubicka <hubicka@ucw.cz>
6970
6971 * i386.c (ix86_vec_cost): New function.
6972 (ix86_rtx_costs): Handle vector operations better.
6973 * i386.h (struct processor_costs): Add sse_op, fmasd, fmass.
6974 * x86-tune-costs.h: Add new costs to all tables.
6975
6976 2017-10-14 Jan Hubicka <hubicka@ucw.cz>
6977
6978 * i386.c (ix86_rtx_costs): Make difference between x87 and SSE
6979 operations.
6980 * i386.h (struct processor_costs): Add addss, mulss, mulsd, divss,
6981 divsd, sqrtss and sqrtsd
6982 * x86-tune-costs.h: Add new entries to all costs.
6983 (znver1_cost): Fix to match real instruction latencies.
6984
6985 2017-10-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6986 Michael Collison <michael.collison@arm.com>
6987
6988 * compare-elim.c: Include emit-rtl.h.
6989 (can_merge_compare_into_arith): New function.
6990 (try_validate_parallel): Likewise.
6991 (try_merge_compare): Likewise.
6992 (try_eliminate_compare): Call the above when no previous clobber
6993 is available.
6994 (execute_compare_elim_after_reload): Add DF_UD_CHAIN and DF_DU_CHAIN
6995 dataflow problems.
6996
6997 2017-10-14 Jakub Jelinek <jakub@redhat.com>
6998
6999 PR middle-end/62263
7000 PR middle-end/82498
7001 * tree-ssa-phiopt.c (value_replacement): Comment fix. Handle
7002 up to 2 preparation statements for ASSIGN in MIDDLE_BB.
7003
7004 PR middle-end/62263
7005 PR middle-end/82498
7006 * tree-ssa-forwprop.c (simplify_rotate): Allow def_arg1[N]
7007 to be any operand_equal_p operands. For & (B - 1) require
7008 B to be power of 2. Recognize
7009 (X << (Y & (B - 1))) | (X >> ((-Y) & (B - 1))) and similar patterns.
7010
7011 2017-10-14 Uros Bizjak <ubizjak@gmail.com>
7012
7013 PR bootstrap/82553
7014 * optabs.c (expand_memory_blockage): Fix call of
7015 targetm.have_memory_blockage.
7016
7017 2017-10-14 Jakub Jelinek <jakub@redhat.com>
7018
7019 PR bootstrap/82548
7020 * config.gcc (*-*-solaris2*, i[34567]86-*-cygwin*,
7021 x86_64-*-cygwin*, i[34567]86-*-mingw* | x86_64-*-mingw*): Append
7022 objects to extra_objs instead of overwriting it.
7023
7024 2017-10-14 Uros Bizjak <ubizjak@gmail.com>
7025
7026 * config/i386/sync.md (FILD_ATOMIC/FIST_ATOMIC FP load peephole2):
7027 Use any_fp_register_operand as operand[3] predicate. Simplify
7028 equality test for operands[2] and operands[4] memory location.
7029 (LDX_ATOMIC/STX_ATOMIC FP load peephole2): Ditto.
7030 (FILD_ATOMIC/FIST_ATOMIC FP load peephole2 with mem blockage): New.
7031 (LDX_ATOMIC/LDX_ATOMIC FP load peephole2 with mem blockage): Ditto.
7032 (FILD_ATOMIC/FIST_ATOMIC FP store peephole2): Use
7033 any_fp_register_operand as operand[1] predicate. Simplify
7034 equality test for operands[0] and operands[3] memory location.
7035 (LDX_ATOMIC/STX_ATOMIC FP store peephole2): Ditto.
7036 (FILD_ATOMIC/FIST_ATOMIC FP store peephole2 with mem blockage): New.
7037 (LDX_ATOMIC/LDX_ATOMIC FP storepeephole2 with mem blockage): Ditto.
7038
7039 2017-10-14 Uros Bizjak <ubizjak@gmail.com>
7040
7041 * target-insns.def: Add memory_blockage.
7042 * optabs.c (expand_memory_blockage): New function.
7043 (expand_asm_memory_barrier): Rename ...
7044 (expand_asm_memory_blockage): ... to this.
7045 (expand_mem_thread_fence): Call expand_memory_blockage
7046 instead of expand_asm_memory_barrier.
7047 (expand_mem_singnal_fence): Ditto.
7048 (expand_atomic_load): Ditto.
7049 (expand_atomic_store): Ditto.
7050 * doc/md.texi (Standard Pattern Names For Generation):
7051 Document memory_blockage instruction pattern.
7052
7053 2017-10-13 Sebastian Perta <sebastian.perta@renesas.com>
7054
7055 * config/rl78/rl78.c (rl78_emit_libcall): New function.
7056 * config/rl78/rl78-protos.h (rl78_emit_libcall): New function.
7057 * config/rl78/rl78.md: New define_expand "adddi3".
7058
7059 2017-10-13 Jan Hubicka <hubicka@ucw.cz>
7060
7061 * cfghooks.c (verify_flow_info): Disable check that all probabilities
7062 are set correctly.
7063
7064 2017-10-13 Jeff Law <law@redhat.com>
7065
7066 * tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly.
7067
7068 2017-10-13 Jakub Jelinek <jakub@redhat.com>
7069
7070 PR target/82274
7071 * internal-fn.c (expand_mul_overflow): If both operands have
7072 the same highpart of -1 or 0 and the topmost bit of lowpart
7073 is different, overflow is if res <= 0 rather than res < 0.
7074
7075 2017-10-13 Pat Haugen <pthaugen@us.ibm.com>
7076
7077 * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Remove
7078 TARGET_P9_VECTOR code for unaligned_load case.
7079
7080 2017-10-13 Jan Hubicka <hubicka@ucw.cz>
7081
7082 * cfghooks.c (verify_flow_info): Check that edge probabilities are set.
7083
7084 2017-10-13 Nathan Sidwell <nathan@acm.org>
7085
7086 * tree-core.h (tree_contains_struct): Make bool.
7087 * tree.c (tree_contains_struct): Likewise.
7088 * tree.h (MARK_TS_BASE): Remove do ... while (0) idiom.
7089 (MARK_TS_TYPED, MARK_TS_COMMON, MARK_TS_TYPE_COMMON,
7090 MARK_TS_TYPE_WITH_LANG_SPECIFIC, MARK_TS_DECL_MINIMAL,
7091 MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL, MARK_TS_DECL_WITH_VIS,
7092 MARK_TS_DECL_NON_COMMON): Likewise, use comma operator.
7093
7094 2017-10-13 Richard Biener <rguenther@suse.de>
7095
7096 * graphite-isl-ast-to-gimple.c
7097 (translate_isl_ast_to_gimple::get_rename_from_scev): Remove unused
7098 parameters and dominance check.
7099 (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block): Adjust.
7100 (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Likewise.
7101 (translate_isl_ast_to_gimple::graphite_regenerate_ast_isl):
7102 Do not update SSA form here or do intermediate IL verification.
7103 * graphite.c: Include tree-ssa.h and tree-into-ssa.h.
7104 (graphite_initialize): Remove check on the number of loops in
7105 the function and inline into graphite_transform_loops.
7106 (graphite_finalize): Inline into graphite_transform_loops.
7107 (graphite_transform_loops): Perform SSA update and IL verification
7108 here.
7109 * params.def (PARAM_GRAPHITE_MIN_LOOPS_PER_FUNCTION): Remove.
7110
7111 2017-10-13 Richard Biener <rguenther@suse.de>
7112
7113 * graphite-isl-ast-to-gimple.c (max_mode_int_precision,
7114 graphite_expression_type_precision): Avoid global constructor
7115 by moving ...
7116 (translate_isl_ast_to_gimple::translate_isl_ast_to_gimple): Here.
7117 (translate_isl_ast_to_gimple::graphite_expr_type): Add type member.
7118 (translate_isl_ast_to_gimple::translate_isl_ast_node_for): Use it.
7119 (translate_isl_ast_to_gimple::build_iv_mapping): Likewise.
7120 (translate_isl_ast_to_gimple::graphite_create_new_guard): Likewise.
7121 * graphite-sese-to-poly.c (build_original_schedule): Return nothing.
7122
7123 2017-10-13 H.J. Lu <hongjiu.lu@intel.com>
7124
7125 PR target/82499
7126 * config/i386/i386.h (ix86_red_zone_size): New.
7127 * config/i386/i386.md (push peephole2s): Replace
7128 "!ix86_using_red_zone ()" with "ix86_red_zone_size == 0".
7129
7130 2017-10-13 Richard Sandiford <richard.sandiford@linaro.org>
7131 Alan Hayward <alan.hayward@arm.com>
7132 David Sherwood <david.sherwood@arm.com>
7133
7134 * combine.c (can_change_dest_mode): Reject changes in
7135 REGMODE_NATURAL_SIZE.
7136
7137 2017-10-13 Richard Sandiford <richard.sandiford@linaro.org>
7138 Alan Hayward <alan.hayward@arm.com>
7139 David Sherwood <david.sherwood@arm.com>
7140
7141 * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_BITSIZE.
7142 (expand_debug_source_expr): Likewise.
7143 * combine.c (combine_simplify_rtx): Likewise.
7144 * cse.c (fold_rtx): Likewise.
7145 * fwprop.c (canonicalize_address): Likewise.
7146 * targhooks.c (default_shift_truncation_mask): Likewise.
7147
7148 2017-10-13 Richard Sandiford <richard.sandiford@linaro.org>
7149 Alan Hayward <alan.hayward@arm.com>
7150 David Sherwood <david.sherwood@arm.com>
7151
7152 * optabs.c (add_equal_note): Use GET_MODE_UNIT_SIZE.
7153 (widened_mode): Likewise.
7154 (expand_unop): Likewise.
7155 * ree.c (transform_ifelse): Likewise.
7156 (merge_def_and_ext): Likewise.
7157 (combine_reaching_defs): Likewise.
7158 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
7159
7160 2017-10-13 Richard Sandiford <richard.sandiford@linaro.org>
7161 Alan Hayward <alan.hayward@arm.com>
7162 David Sherwood <david.sherwood@arm.com>
7163
7164 * caller-save.c (replace_reg_with_saved_mem): Use byte_lowpart_offset.
7165 * combine.c (gen_lowpart_for_combine): Likewise.
7166 * dwarf2out.c (rtl_for_decl_location): Likewise.
7167 * final.c (alter_subreg): Likewise.
7168 * rtlhooks.c (gen_lowpart_general): Likewise.
7169 (gen_lowpart_if_possible): Likewise.
7170
7171 2017-10-13 Richard Sandiford <richard.sandiford@linaro.org>
7172 Alan Hayward <alan.hayward@arm.com>
7173 David Sherwood <david.sherwood@arm.com>
7174
7175 * calls.c (expand_call): Use subreg_lowpart_offset.
7176 * cse.c (cse_insn): Likewise.
7177 * regcprop.c (copy_value): Likewise.
7178 (copyprop_hardreg_forward_1): Likewise.
7179
7180 2017-10-13 Jakub Jelinek <jakub@redhat.com>
7181
7182 PR target/82524
7183 * config/i386/i386.md (addqi_ext_1, andqi_ext_1,
7184 *andqi_ext_1_cc, *<code>qi_ext_1, *xorqi_ext_1_cc): Change
7185 =Q constraints to +Q and into insn condition add check
7186 that operands[0] and operands[1] are equal.
7187 (*addqi_ext_2, *andqi_ext_2, *<code>qi_ext_2): Change
7188 =Q constraints to +Q and into insn condition add check
7189 that operands[0] is equal to either operands[1] or operands[2].
7190
7191 PR target/82498
7192 * fold-const.c (fold_binary_loc) <bit_rotate>: Code cleanups,
7193 instead of handling MINUS_EXPR twice (once for each argument),
7194 canonicalize operand order and handle just once, use rtype where
7195 possible. Handle (A << B) | (A >> (-B & (Z - 1))).
7196
7197 PR target/82498
7198 * config/i386/ia32intrin.h (__rold, __rord, __rolq, __rorq): Allow
7199 any values of __C while still being pattern recognizable as a simple
7200 rotate instruction.
7201
7202 2017-10-13 Richard Biener <rguenther@suse.de>
7203
7204 PR tree-optimization/82451
7205 Revert
7206 2017-10-02 Richard Biener <rguenther@suse.de>
7207
7208 PR tree-optimization/82355
7209 * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
7210 a mapping for the enclosing loop but avoid generating one for
7211 the loop tree root.
7212 (copy_bb_and_scalar_dependences): Remove premature codegen
7213 error on PHIs in blocks duplicated into multiple places.
7214 * graphite-scop-detection.c
7215 (scop_detection::stmt_has_simple_data_refs_p): For a loop not
7216 in the region use it as loop and nest to analyze the DR in.
7217 (try_generate_gimple_bb): Likewise.
7218 * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
7219 (add_loop_constraints): For blocks in a loop not in the region
7220 create a dimension with a single iteration.
7221 * sese.h (gbb_loop_at_index): Remove assert.
7222
7223 * cfgloop.c (loop_preheader_edge): For the loop tree root
7224 return the single successor of the entry block.
7225 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
7226 Reset the SCEV hashtable and niters.
7227 * graphite-scop-detection.c
7228 (scop_detection::graphite_can_represent_scev): Add SCOP parameter,
7229 assert that we only have POLYNOMIAL_CHREC that vary in loops
7230 contained in the region.
7231 (scop_detection::graphite_can_represent_expr): Adjust.
7232 (scop_detection::stmt_has_simple_data_refs_p): For loops
7233 not in the region set loop to NULL. The nest is now the
7234 entry edge to the region.
7235 (try_generate_gimple_bb): Likewise.
7236 * sese.c (scalar_evolution_in_region): Adjust for
7237 instantiate_scev change.
7238 * tree-data-ref.h (graphite_find_data_references_in_stmt):
7239 Make nest parameter the edge into the region.
7240 (create_data_ref): Likewise.
7241 * tree-data-ref.c (dr_analyze_indices): Make nest parameter an
7242 entry edge into a region and adjust instantiate_scev calls.
7243 (create_data_ref): Likewise.
7244 (graphite_find_data_references_in_stmt): Likewise.
7245 (find_data_references_in_stmt): Pass the loop preheader edge
7246 from the nest argument.
7247 * tree-scalar-evolution.h (instantiate_scev): Make instantiate_below
7248 parameter the edge into the region.
7249 (instantiate_parameters): Use the loop preheader edge as entry.
7250 * tree-scalar-evolution.c (analyze_scalar_evolution): Handle
7251 NULL loop.
7252 (get_instantiated_value_entry): Make instantiate_below parameter
7253 the edge into the region.
7254 (instantiate_scev_name): Likewise. Adjust dominance checks,
7255 when we cannot use loop-based instantiation instantiate by
7256 walking use-def chains.
7257 (instantiate_scev_poly): Adjust.
7258 (instantiate_scev_binary): Likewise.
7259 (instantiate_scev_convert): Likewise.
7260 (instantiate_scev_not): Likewise.
7261 (instantiate_array_ref): Remove.
7262 (instantiate_scev_3): Likewise.
7263 (instantiate_scev_2): Likewise.
7264 (instantiate_scev_1): Likewise.
7265 (instantiate_scev_r): Do not blindly handle N-operand trees.
7266 Do not instantiate array-refs. Handle all constants and invariants.
7267 (instantiate_scev): Make instantiate_below parameter
7268 the edge into the region.
7269 (resolve_mixers): Use the loop preheader edge for the region
7270 parameter to instantiate_scev_r.
7271 * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Adjust.
7272
7273 2017-10-13 Richard Biener <rguenther@suse.de>
7274
7275 PR tree-optimization/82525
7276 * graphite-isl-ast-to-gimple.c
7277 (translate_isl_ast_to_gimple::widest_int_from_isl_expr_int): Split
7278 out from ...
7279 (translate_isl_ast_to_gimple::gcc_expression_from_isl_expr_int): Here.
7280 Fail code generation when we cannot represent the isl integer.
7281 (binary_op_to_tree): Elide modulo operations that are no-ops
7282 in the type we code generate. Remove now superfluous code
7283 generation errors.
7284
7285 2017-10-13 Richard Biener <rguenther@suse.de>
7286
7287 * graphite-scop-detection.c (loop_ivs_can_be_represented): Remove.
7288 (scop_detection::harmful_loop_in_region): Remove premature
7289 IV type restriction.
7290 (scop_detection::graphite_can_represent_scev): We can handle
7291 pointer IVs just fine.
7292
7293 2017-10-13 Alan Modra <amodra@gmail.com>
7294
7295 * doc/extend.texi (Extended Asm <Clobbers>): Rename to
7296 "Clobbers and Scratch Registers". Add paragraph on
7297 alternative to clobbers for scratch registers and OpenBLAS
7298 example.
7299
7300 2017-10-13 Alan Modra <amodra@gmail.com>
7301
7302 * doc/extend.texi (Clobbers): Correct vax example. Delete old
7303 example of a memory input for a string of known length. Move
7304 commentary out of table. Add a number of new examples
7305 covering array memory inputs.
7306
7307 2017-10-12 Martin Liska <mliska@suse.cz>
7308
7309 PR tree-optimization/82493
7310 * sbitmap.c (bitmap_bit_in_range_p): Fix the implementation.
7311 (test_range_functions): New function.
7312 (sbitmap_c_tests): Likewise.
7313 * selftest-run-tests.c (selftest::run_tests): Run new tests.
7314 * selftest.h (sbitmap_c_tests): New function.
7315
7316 * tree-ssa-dse.c (live_bytes_read): Fix thinko.
7317
7318 2017-10-12 Michael Meissner <meissner@linux.vnet.ibm.com>
7319
7320 * config/rs6000/amo.h: Fix spacing issue.
7321
7322 2017-10-12 Jakub Jelinek <jakub@redhat.com>
7323
7324 PR target/82498
7325 * config/i386/i386.md (*ashl<mode>3_mask_1,
7326 *<shift_insn><mode>3_mask_1, *<rotate_insn><mode>3_mask_1,
7327 *<btsc><mode>_mask_1, *btr<mode>_mask_1): New define_insn_and_split
7328 patterns.
7329
7330 2017-10-12 Jan Hubicka <hubicka@ucw.cz>
7331
7332 * profile-count.h (safe_scale_64bit): Fix GCC4.x path.
7333 (profile_probability): Set max_probability
7334 to (uint32_t) 1 << (n_bits - 2) and update accessors to avoid overlfows
7335 in temporaries.
7336 * profile-count.c (profile_probability::differs_from_p): Do not
7337 rely on max_probaiblity == 10000
7338
7339 2017-10-12 Jeff Law <law@redhat.com>
7340
7341 * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject ao_refs with
7342 negative offsets.
7343
7344 2017-10-12 Martin Sebor <msebor@redhat.com>
7345
7346 PR other/82301
7347 PR c/82435
7348 * cgraphunit.c (maybe_diag_incompatible_alias): New function.
7349 (handle_alias_pairs): Call it.
7350 * common.opt (-Wattribute-alias): New option.
7351 * doc/extend.texi (ifunc attribute): Discuss C++ specifics.
7352 * doc/invoke.texi (-Wattribute-alias): Document.
7353
7354 2017-10-12 Vladimir Makarov <vmakarov@redhat.com>
7355
7356 Revert
7357 2017-10-11 Vladimir Makarov <vmakarov@redhat.com>
7358 PR sanitizer/82353
7359 * lra.c (collect_non_operand_hard_regs): Don't ignore operator
7360 locations.
7361 * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
7362 (make_hard_regno_born, make_hard_regno_dead): Update
7363 bb_killed_pseudos and bb_gen_pseudos.
7364
7365 2017-10-12 Jan Hubicka <hubicka@ucw.cz>
7366
7367 * config/i386/x86-tune-sched.c (ix86_adjust_cost): Fix Zen support.
7368
7369 2017-10-12 Uros Bizjak <ubizjak@gmail.com>
7370
7371 * config/alpha/alpha.c (alpha_split_conditional_move):
7372 Use std::swap instead of manually swapping.
7373 (alpha_stdarg_optimize_hook): Ditto.
7374 (alpha_canonicalize_comparison): Ditto.
7375
7376 2017-10-12 Bin Cheng <bin.cheng@arm.com>
7377
7378 * tree-loop-distribution.c (struct builtin_info): New struct.
7379 (struct partition): Refactor fields into struct builtin_info.
7380 (partition_free): Free struct builtin_info.
7381 (build_size_arg_loc, build_addr_arg_loc): Delete.
7382 (generate_memset_builtin, generate_memcpy_builtin): Get memory range
7383 information from struct builtin_info.
7384 (find_single_drs): New function refactored from classify_partition.
7385 Also moved builtin validity checks to this function.
7386 (compute_access_range, alloc_builtin): New functions.
7387 (classify_builtin_st, classify_builtin_ldst): New functions.
7388 (classify_partition): Refactor code into functions find_single_drs,
7389 classify_builtin_st and classify_builtin_ldst.
7390 (distribute_loop): Don't do runtime alias check when distributing
7391 loop nest.
7392 (find_seed_stmts_for_distribution): New function.
7393 (pass_loop_distribution::execute): Refactor code finding seed
7394 stmts into above function. Support distribution for the innermost
7395 two-level loop nest. Adjust dump information.
7396
7397 2017-10-12 Bin Cheng <bin.cheng@arm.com>
7398
7399 * tree-loop-distribution.c: Adjust the general comment.
7400 (NUM_PARTITION_THRESHOLD): New macro.
7401 (ssa_name_has_uses_outside_loop_p): Support loop nest distribution.
7402 (classify_partition): Skip builtin pattern of loop nest's inner loop.
7403 (merge_dep_scc_partitions): New parameter ignore_alias_p and use it
7404 in call to build_partition_graph.
7405 (finalize_partitions): New parameter. Make loop distribution more
7406 conservative by fusing more partitions.
7407 (distribute_loop): Don't do runtime alias check in case of loop nest
7408 distribution.
7409 (find_seed_stmts_for_distribution): New function.
7410 (prepare_perfect_loop_nest): New function.
7411 (pass_loop_distribution::execute): Refactor code finding seed stmts
7412 and loop nest into above functions. Support loop nest distribution.
7413 Adjust dump information accordingly.
7414
7415 2017-10-12 Bin Cheng <bin.cheng@arm.com>
7416
7417 * tree-loop-distribution.c (break_alias_scc_partitions): Add comment
7418 and set PTYPE_SEQUENTIAL for merged partition.
7419
7420 2017-10-12 Richard Biener <rguenther@suse.de>
7421
7422 PR tree-optimization/69728
7423 Revert
7424 2017-09-19 Richard Biener <rguenther@suse.de>
7425
7426 PR tree-optimization/69728
7427 * graphite-sese-to-poly.c (schedule_error): New global.
7428 (add_loop_schedule): Handle empty domain by failing the
7429 schedule.
7430 (build_original_schedule): Handle schedule_error.
7431
7432 * graphite-sese-to-poly.c (add_loop_schedule): Handle empty
7433 domain by returning an unchanged schedule.
7434
7435 2017-10-12 Jakub Jelinek <jakub@redhat.com>
7436
7437 * genrecog.c (validate_pattern): For VEC_SELECT verify that
7438 CONST_INT selectors are 0 to GET_MODE_NUNITS (imode) - 1.
7439
7440 2017-10-12 Aldy Hernandez <aldyh@redhat.com>
7441
7442 * Makefile.in (TAGS): Merge all the *.def files into one pattern.
7443 Handle params.def.
7444
7445 2017-10-12 Jakub Jelinek <jakub@redhat.com>
7446
7447 PR c++/82159
7448 * expr.c (store_field): Don't optimize away bitsize == 0 store
7449 from CALL_EXPR with addressable return type.
7450
7451 2017-10-11 Segher Boessenkool <segher@kernel.crashing.org>
7452
7453 * config/rs6000/rs6000.h (TARGET_ISEL64): Delete.
7454 * config/rs6000/rs6000.md (sel): Delete mode attribute.
7455 (mov<mode>cc, isel_signed_<mode>, isel_unsigned_<mode>,
7456 *isel_reversed_signed_<mode>, *isel_reversed_unsigned_<mode>): Use
7457 TARGET_ISEL instead of TARGET_ISEL<sel>.
7458
7459 2017-10-11 David Edelsohn <dje.gcc@gmail.com>
7460
7461 * config/rs6000/rs6000.c
7462 (rs6000_xcoff_asm_output_aligned_decl_common): Test for NULL decl.
7463
7464 2017-10-11 Segher Boessenkool <segher@kernel.crashing.org>
7465
7466 * config/rs6000/predicates.md (zero_constant, all_ones_constant):
7467 Move up in file.
7468 (reg_or_cint_operand): Fix comment.
7469 (reg_or_zero_operand): New predicate.
7470 * config/rs6000/rs6000-protos.h (output_isel): Delete.
7471 * config/rs6000/rs6000.c (output_isel): Delete.
7472 * config/rs6000/rs6000.md (isel_signed_<mode>): Use reg_or_zero_operand
7473 instead of reg_or_cint_operand. Output instruction directly (not via
7474 output_isel).
7475 (isel_unsigned_<mode>): Ditto.
7476 (*isel_reversed_signed_<mode>): Use reg_or_zero_operand instead of
7477 gpc_reg_operand. Add an instruction alternative for this. Output
7478 instruction directly.
7479 (*isel_reversed_unsigned_<mode>): Ditto.
7480
7481 2017-10-11 Uros Bizjak <ubizjak@gmail.com>
7482
7483 * config/i386/i386.c (ix86_canonicalize_comparison): New function.
7484 (TARGET_CANONICALIZE_COMPARISON): Define.
7485
7486 2017-10-11 Qing Zhao <qing.zhao@oracle.com>
7487
7488 PR target/81422
7489 * config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
7490 Check whether the dest is REG before adding REG_EQUIV note.
7491
7492 2017-10-11 Vladimir Makarov <vmakarov@redhat.com>
7493
7494 PR sanitizer/82353
7495 * lra.c (collect_non_operand_hard_regs): Don't ignore operator
7496 locations.
7497 * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
7498 (make_hard_regno_born, make_hard_regno_dead): Update
7499 bb_killed_pseudos and bb_gen_pseudos.
7500
7501 2017-10-11 Nathan Sidwell <nathan@acm.org>
7502
7503 * incpath.h (enum incpath_kind): Name enum, prefix values.
7504 (add_path, add_cpp_dir_path, get_added_cpp_dirs): Use incpath_kind.
7505 * incpath.c (heads, tails): Use INC_MAX.
7506 (add_env_var_paths, add_standard_paths): Use incpath_kind.
7507 (merge_include_chains, split_quote_chain,
7508 register_include_chains): Update incpath_kind names.
7509 (add_cpp_dir_path, add_path, get_added_cpp_dirs): Use incpath_kind.
7510 * config/darwin-c.c (add_system_framework_path): Update incpath_kind
7511 names.
7512 (add_framework_path, darwin_register_objc_includes): Likewise.
7513 * config/vms/vms-c.c (vms_c_register_includes): Likewise.
7514
7515 2017-10-11 Uros Bizjak <ubizjak@gmail.com>
7516
7517 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
7518 Do not use float_operator operator predicate.
7519 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
7520 * config/i386/predicates.md (float_operator): Remove predicate.
7521
7522 2017-10-11 Uros Bizjak <ubizjak@gmail.com>
7523
7524 * config/i386/i386.md (*jcc<mode>_0_i387): Remove insn pattern.
7525 (*jccxf_i387): Ditto.
7526 (*jcc<mode>_i387): Ditto.
7527 (*jccu<mode>_i387): Ditto.
7528 (*jcc<X87MODEF:mode>_<SWI24:mode>_i387): Ditto.
7529 (*jcc_*_i387 splitters): Remove.
7530 * config/i386/i386-protos.h (ix86_split_fp_branch): Remove prototype.
7531 * config/i386/i386.c (ix86_split_fp_branch): Remove.
7532 * config/i386/predicates.md (ix86_swapped_fp_comparison_operator):
7533 Remove predicate.
7534
7535 2017-10-11 Jan Hubicka <hubicka@ucw.cz>
7536
7537 * profile-count.h (slow_safe_scale_64bit): New function.
7538 (safe_scale_64bit): New inline.
7539 (profile_count::max_safe_multiplier): Remove; use safe_scale_64bit.
7540 * profile-count.c: Include wide-int.h
7541 (slow_safe_scale_64bit): New.
7542
7543 2017-10-11 Nathan Sidwell <nathan@acm.org>
7544
7545 * tree.h (DECL_ASSEMBLER_NAME_SET_P): Don't check
7546 HAS_DECL_ASSEMBLER_NAME_P.
7547 * gimple-expr.c (gimple_decl_printable_name: Check
7548 HAS_DECL_ASSEMBLER_NAME_P too.
7549 * ipa-utils.h (type_in_anonymous_namespace_p): Check
7550 DECL_ASSEMBLER_NAME_SET_P of TYPE_NAME.
7551 (odr_type_p): No need to assert TYPE_NAME is a TYPE_DECL.
7552 * passes.c (rest_of_decl_compilation): Check
7553 HAS_DECL_ASSEMBLER_NAME_P too.
7554 * recog.c (verify_changes): Likewise.
7555 * tree-pretty-print.c (dump_decl_name): Likewise.
7556 * tree-ssa-structalias.c (alias_get_name): Likewise. Reimplement.
7557
7558 * tree.h (DECL_ASSEMBLER_NAME_RAW): New.
7559 (SET_DECL_ASSEMBLER_NAME): Use it.
7560 (DECL_ASSEMBLER_NAME_SET_P): Likewise.
7561 (COPY_DECL_ASSEMBLER_NAME): Likewise.
7562 * tree.c (decl_assembler_name): Use DECL_ASSEMBLER_NAME_RAW.
7563
7564 2017-10-11 Jan Hubicka <hubicka@ucw.cz>
7565
7566 * config.gcc (i386, x86_64): Add extra objects.
7567 * config/i386/i386-protos.h (ix86_rip_relative_addr_p): Declare.
7568 (ix86_min_insn_size): Declare.
7569 (ix86_issue_rate): Declare.
7570 (ix86_adjust_cost): Declare.
7571 (ia32_multipass_dfa_lookahead): Declare.
7572 (ix86_macro_fusion_p): Declare.
7573 (ix86_macro_fusion_pair_p): Declare.
7574 (ix86_bd_has_dispatch): Declare.
7575 (ix86_bd_do_dispatch): Declare.
7576 (ix86_core2i7_init_hooks): Declare.
7577 (ix86_atom_sched_reorder): Declare.
7578 * config/i386/i386.c Move all CPU cost tables to x86-tune-costs.h.
7579 (COSTS_N_BYTES): Move to x86-tune-costs.h.
7580 (DUMMY_STRINGOP_ALGS):Move to x86-tune-costs.h.
7581 (rip_relative_addr_p): Rename to ...
7582 (ix86_rip_relative_addr_p): ... this one; export.
7583 (memory_address_length): Update.
7584 (ix86_issue_rate): Move to x86-tune-sched.c.
7585 (ix86_flags_dependent): Move to x86-tune-sched.c.
7586 (ix86_agi_dependent): Move to x86-tune-sched.c.
7587 (exact_dependency_1): Move to x86-tune-sched.c.
7588 (exact_store_load_dependency): Move to x86-tune-sched.c.
7589 (ix86_adjust_cost): Move to x86-tune-sched.c.
7590 (ia32_multipass_dfa_lookahead): Move to x86-tune-sched.c.
7591 (ix86_macro_fusion_p): Move to x86-tune-sched.c.
7592 (ix86_macro_fusion_pair_p): Move to x86-tune-sched.c.
7593 (do_reorder_for_imul): Move to x86-tune-sched-atom.c.
7594 (swap_top_of_ready_list): Move to x86-tune-sched-atom.c.
7595 (ix86_sched_reorder): Move to x86-tune-sched-atom.c.
7596 (core2i7_first_cycle_multipass_init): Move to x86-tune-sched-core.c.
7597 (core2i7_dfa_post_advance_cycle): Move to x86-tune-sched-core.c.
7598 (min_insn_size): Rename to ...
7599 (ix86_min_insn_size): ... this one; export.
7600 (core2i7_first_cycle_multipass_begin): Move to x86-tune-sched-core.c.
7601 (core2i7_first_cycle_multipass_issue): Move to x86-tune-sched-core.c.
7602 (core2i7_first_cycle_multipass_backtrack): Move to
7603 x86-tune-sched-core.c.
7604 (core2i7_first_cycle_multipass_end): Move to x86-tune-sched-core.c.
7605 (core2i7_first_cycle_multipass_fini): Move to x86-tune-sched-core.c.
7606 (ix86_sched_init_global): Break up logic to ix86_core2i7_init_hooks.
7607 (ix86_avoid_jump_mispredicts): Update.
7608 (TARGET_SCHED_DISPATCH): Move to ix86-tune-sched-bd.c.
7609 (TARGET_SCHED_DISPATCH_DO): Move to ix86-tune-sched-bd.c.
7610 (TARGET_SCHED_REORDER): Move to ix86-tune-sched-bd.c.
7611 (DISPATCH_WINDOW_SIZE): Move to ix86-tune-sched-bd.c.
7612 (MAX_DISPATCH_WINDOWS): Move to ix86-tune-sched-bd.c.
7613 (MAX_INSN): Move to ix86-tune-sched-bd.c.
7614 (MAX_IMM): Move to ix86-tune-sched-bd.c.
7615 (MAX_IMM_SIZE): Move to ix86-tune-sched-bd.c.
7616 (MAX_IMM_32): Move to ix86-tune-sched-bd.c.
7617 (MAX_IMM_64): Move to ix86-tune-sched-bd.c.
7618 (MAX_LOAD): Move to ix86-tune-sched-bd.c.
7619 (MAX_STORE): Move to ix86-tune-sched-bd.c.
7620 (BIG): Move to ix86-tune-sched-bd.c.
7621 (enum dispatch_group): Move to ix86-tune-sched-bd.c.
7622 (enum insn_path): Move to ix86-tune-sched-bd.c.
7623 (get_mem_group): Move to ix86-tune-sched-bd.c.
7624 (is_cmp): Move to ix86-tune-sched-bd.c.
7625 (dispatch_violation): Move to ix86-tune-sched-bd.c.
7626 (is_branch): Move to ix86-tune-sched-bd.c.
7627 (is_prefetch): Move to ix86-tune-sched-bd.c.
7628 (init_window): Move to ix86-tune-sched-bd.c.
7629 (allocate_window): Move to ix86-tune-sched-bd.c.
7630 (init_dispatch_sched): Move to ix86-tune-sched-bd.c.
7631 (is_end_basic_block): Move to ix86-tune-sched-bd.c.
7632 (process_end_window): Move to ix86-tune-sched-bd.c.
7633 (allocate_next_window): Move to ix86-tune-sched-bd.c.
7634 (find_constant): Move to ix86-tune-sched-bd.c.
7635 (get_num_immediates): Move to ix86-tune-sched-bd.c.
7636 (has_immediate): Move to ix86-tune-sched-bd.c.
7637 (get_insn_path): Move to ix86-tune-sched-bd.c.
7638 (get_insn_group): Move to ix86-tune-sched-bd.c.
7639 (count_num_restricted): Move to ix86-tune-sched-bd.c.
7640 (fits_dispatch_window): Move to ix86-tune-sched-bd.c.
7641 (add_insn_window): Move to ix86-tune-sched-bd.c.
7642 (add_to_dispatch_window): Move to ix86-tune-sched-bd.c.
7643 (debug_dispatch_window_file): Move to ix86-tune-sched-bd.c.
7644 (debug_dispatch_window): Move to ix86-tune-sched-bd.c.
7645 (debug_insn_dispatch_info_file): Move to ix86-tune-sched-bd.c.
7646 (debug_ready_dispatch): Move to ix86-tune-sched-bd.c.
7647 (do_dispatch): Move to ix86-tune-sched-bd.c.
7648 (has_dispatch): Move to ix86-tune-sched-bd.c.
7649 * config/i386/t-i386: Add new object files.
7650 * config/i386/x86-tune-costs.h: New file.
7651 * config/i386/x86-tune-sched-atom.c: New file.
7652 * config/i386/x86-tune-sched-bd.c: New file.
7653 * config/i386/x86-tune-sched-core.c: New file.
7654 * config/i386/x86-tune-sched.c: New file.
7655
7656 2017-10-11 Liu Hao <lh_mouse@126.com>
7657
7658 * pretty-print.c [_WIN32] (colorize_init): Remove. Use
7659 the generic version below instead.
7660 (should_colorize): Recognize Windows consoles as terminals
7661 for MinGW targets.
7662 * pretty-print.c [__MINGW32__] (write_all): New function.
7663 [__MINGW32__] (find_esc_head): Likewise.
7664 [__MINGW32__] (find_esc_terminator): Likewise.
7665 [__MINGW32__] (eat_esc_sequence): Likewise.
7666 [__MINGW32__] (mingw_ansi_fputs): New function that handles
7667 ANSI escape codes.
7668 (pp_write_text_to_stream): Use mingw_ansi_fputs instead of fputs
7669 for MinGW targets.
7670
7671 2017-10-11 Richard Biener <rguenther@suse.de>
7672
7673 * tree-ssa-loop-niter.c (infer_loop_bounds_from_pointer_arith):
7674 Properly call analyze_scalar_evolution with the loop of the stmt.
7675
7676 2017-10-11 Richard Biener <rguenther@suse.de>
7677
7678 * tree.def (POLYNOMIAL_CHREC): Remove CHREC_VARIABLE tree operand.
7679 * tree-core.h (tree_base): Add chrec_var union member.
7680 * tree.h (CHREC_VAR): Remove.
7681 (CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Adjust.
7682 * tree-chrec.h (build_polynomial_chrec): Adjust.
7683 * tree-chrec.c (reset_evolution_in_loop): Use build_polynomial_chrec.
7684 * tree-pretty-print.c (dump_generic_node): Use CHREC_VARIABLE.
7685
7686 2017-10-11 Marc Glisse <marc.glisse@inria.fr>
7687
7688 * fold-const.c (fold_binary_loc) [X +- Y CMP X]: Move ...
7689 * match.pd: ... here.
7690 ((T) X == (T) Y): Relax condition.
7691
7692 2017-10-11 Bin Cheng <bin.cheng@arm.com>
7693
7694 PR tree-optimization/82472
7695 * tree-loop-distribution.c (sort_partitions_by_post_order): Refine
7696 comment.
7697 (break_alias_scc_partitions): Update postorder number.
7698
7699 2017-10-11 Martin Liska <mliska@suse.cz>
7700
7701 PR sanitizer/82490
7702 * opts.c (parse_no_sanitize_attribute): Do not use error_value
7703 variable.
7704 * opts.h (parse_no_sanitize_attribute): Remove last argument.
7705
7706 2017-10-11 Martin Liska <mliska@suse.cz>
7707
7708 * print-rtl.c (print_insn): Move declaration of idbuf
7709 to same scope as name.
7710
7711 2017-10-11 Martin Liska <mliska@suse.cz>
7712
7713 Revert r253637:
7714
7715 PR sanitizer/82484
7716 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
7717 volatile arguments.
7718
7719 2017-10-11 Martin Liska <mliska@suse.cz>
7720
7721 PR sanitizer/82484
7722 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
7723 volatile arguments.
7724
7725 2017-10-11 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7726
7727 * config.gcc (default_gnu_indirect_function): Default to yes for
7728 arm*-*-linux* with glibc.
7729
7730 2017-10-11 Richard Biener <rguenther@suse.de>
7731
7732 * tree-scalar-evolution.c (get_scalar_evolution): Handle
7733 default-defs and types we do not want to analyze.
7734 (interpret_loop_phi): Replace unreachable code with an assert.
7735 (compute_scalar_evolution_in_loop): Remove and inline ...
7736 (analyze_scalar_evolution_1): ... here, replacing condition with
7737 what makes the intent clearer. Remove handling of cases
7738 get_scalar_evolution now handles.
7739
7740 2017-10-10 Jim Wilson <wilson@tuliptree.org>
7741
7742 PR rtl-optimization/81434
7743 * haifa-sched.c (prune_ready_list): Init min_cost_group to 0. Update
7744 comment for main loop. In sched_group_found if, also add checks for
7745 pass and min_cost_group.
7746
7747 2017-10-10 Segher Boessenkool <segher@kernel.crashing.org>
7748
7749 * config/rs6000/rs6000.c (TARGET_INSN_COST): New.
7750 (rs6000_insn_cost): New function.
7751 * config/rs6000/rs6000.md (cost): New attribute.
7752
7753 2017-10-10 Jakub Jelinek <jakub@redhat.com>
7754 H.J. Lu <hongjiu.lu@intel.com>
7755
7756 PR target/79565
7757 PR target/82483
7758 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Add
7759 OPTION_MASK_ISA_MMX for __builtin_ia32_maskmovq,
7760 __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi.
7761 (ix86_expand_builtin): Treat OPTION_MASK_ISA_MMX similarly
7762 to OPTION_MASK_ISA_AVX512VL - builtins that have both
7763 OPTION_MASK_ISA_MMX and some other bit set require both
7764 mmx and the ISAs without the mmx bit.
7765 * config/i386/i386-builtin.def (__builtin_ia32_cvtps2pi,
7766 __builtin_ia32_cvttps2pi, __builtin_ia32_cvtpi2ps,
7767 __builtin_ia32_pavgb, __builtin_ia32_pavgw, __builtin_ia32_pmulhuw,
7768 __builtin_ia32_pmaxub, __builtin_ia32_pmaxsw, __builtin_ia32_pminub,
7769 __builtin_ia32_pminsw, __builtin_ia32_psadbw, __builtin_ia32_pmovmskb,
7770 __builtin_ia32_pshufw, __builtin_ia32_cvtpd2pi,
7771 __builtin_ia32_cvttpd2pi, __builtin_ia32_cvtpi2pd,
7772 __builtin_ia32_pmuludq, __builtin_ia32_pabsb, __builtin_ia32_pabsw,
7773 __builtin_ia32_pabsd, __builtin_ia32_phaddw, __builtin_ia32_phaddd,
7774 __builtin_ia32_phaddsw, __builtin_ia32_phsubw, __builtin_ia32_phsubd,
7775 __builtin_ia32_phsubsw, __builtin_ia32_pmaddubsw,
7776 __builtin_ia32_pmulhrsw, __builtin_ia32_pshufb, __builtin_ia32_psignb,
7777 __builtin_ia32_psignw, __builtin_ia32_psignd, __builtin_ia32_movntq,
7778 __builtin_ia32_paddq, __builtin_ia32_psubq, __builtin_ia32_palignr):
7779 Add OPTION_MASK_ISA_MMX.
7780
7781 2017-10-10 Andreas Tobler <andreast@gcc.gnu.org>
7782
7783 * config.gcc (armv7*-*-freebsd*): New target.
7784 (armv6*-*-freebsd*): Remove obsolete TARGET_FREEBSD_ARMv6 define.
7785
7786 2017-10-10 Jan Hubicka <hubicka@ucw.cz>
7787
7788 * x86-tune.def (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI,
7789 X86_TUNE_ADJUST_UNROLL, X86_TUNE_ONE_IF_CONV_INSN): Move to right
7790 spot in the file.
7791
7792 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
7793
7794 * wide-int.h (wide_int_ref_storage): Make host_dependent_precision
7795 a template parameter.
7796 (WIDE_INT_REF_FOR): Update accordingly.
7797 * tree.h (wi::int_traits <const_tree>): Delete.
7798 (wi::tree_to_widest_ref, wi::tree_to_offset_ref): New typedefs.
7799 (wi::to_widest, wi::to_offset): Use them. Expand commentary.
7800 (wi::tree_to_wide_ref): New typedef.
7801 (wi::to_wide): New function.
7802 * calls.c (get_size_range): Use wi::to_wide when operating on
7803 trees as wide_ints.
7804 * cgraph.c (cgraph_node::create_thunk): Likewise.
7805 * config/i386/i386.c (ix86_data_alignment): Likewise.
7806 (ix86_local_alignment): Likewise.
7807 * dbxout.c (stabstr_O): Likewise.
7808 * dwarf2out.c (add_scalar_info, gen_enumeration_type_die): Likewise.
7809 * expr.c (const_vector_from_tree): Likewise.
7810 * fold-const-call.c (host_size_t_cst_p, fold_const_call_1): Likewise.
7811 * fold-const.c (may_negate_without_overflow_p, negate_expr_p)
7812 (fold_negate_expr_1, int_const_binop_1, const_binop)
7813 (fold_convert_const_int_from_real, optimize_bit_field_compare)
7814 (all_ones_mask_p, sign_bit_p, unextend, extract_muldiv_1)
7815 (fold_div_compare, fold_single_bit_test, fold_plusminus_mult_expr)
7816 (pointer_may_wrap_p, expr_not_equal_to, fold_binary_loc)
7817 (fold_ternary_loc, multiple_of_p, fold_negate_const, fold_abs_const)
7818 (fold_not_const, round_up_loc): Likewise.
7819 * gimple-fold.c (gimple_fold_indirect_ref): Likewise.
7820 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Likewise.
7821 (alloca_call_type): Likewise.
7822 * gimple.c (preprocess_case_label_vec_for_gimple): Likewise.
7823 * godump.c (go_output_typedef): Likewise.
7824 * graphite-sese-to-poly.c (tree_int_to_gmp): Likewise.
7825 * internal-fn.c (get_min_precision): Likewise.
7826 * ipa-cp.c (ipcp_store_vr_results): Likewise.
7827 * ipa-polymorphic-call.c
7828 (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Likewise.
7829 * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Likewise.
7830 (ipa_modify_call_arguments): Likewise.
7831 * match.pd: Likewise.
7832 * omp-low.c (scan_omp_1_op, lower_omp_ordered_clauses): Likewise.
7833 * print-tree.c (print_node_brief, print_node): Likewise.
7834 * stmt.c (expand_case): Likewise.
7835 * stor-layout.c (layout_type): Likewise.
7836 * tree-affine.c (tree_to_aff_combination): Likewise.
7837 * tree-cfg.c (group_case_labels_stmt): Likewise.
7838 * tree-data-ref.c (dr_analyze_indices): Likewise.
7839 (prune_runtime_alias_test_list): Likewise.
7840 * tree-dump.c (dequeue_and_dump): Likewise.
7841 * tree-inline.c (remap_gimple_op_r, copy_tree_body_r): Likewise.
7842 * tree-predcom.c (is_inv_store_elimination_chain): Likewise.
7843 * tree-pretty-print.c (dump_generic_node): Likewise.
7844 * tree-scalar-evolution.c (iv_can_overflow_p): Likewise.
7845 (simple_iv_with_niters): Likewise.
7846 * tree-ssa-address.c (addr_for_mem_ref): Likewise.
7847 * tree-ssa-ccp.c (ccp_finalize, evaluate_stmt): Likewise.
7848 * tree-ssa-loop-ivopts.c (constant_multiple_of): Likewise.
7849 * tree-ssa-loop-niter.c (split_to_var_and_offset)
7850 (refine_value_range_using_guard, number_of_iterations_ne_max)
7851 (number_of_iterations_lt_to_ne, number_of_iterations_lt)
7852 (get_cst_init_from_scev, record_nonwrapping_iv)
7853 (scev_var_range_cant_overflow): Likewise.
7854 * tree-ssa-phiopt.c (minmax_replacement): Likewise.
7855 * tree-ssa-pre.c (compute_avail): Likewise.
7856 * tree-ssa-sccvn.c (vn_reference_fold_indirect): Likewise.
7857 (vn_reference_maybe_forwprop_address, valueized_wider_op): Likewise.
7858 * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise.
7859 * tree-ssa-uninit.c (is_pred_expr_subset_of): Likewise.
7860 * tree-ssanames.c (set_nonzero_bits, get_nonzero_bits): Likewise.
7861 * tree-switch-conversion.c (collect_switch_conv_info, array_value_type)
7862 (dump_case_nodes, try_switch_expansion): Likewise.
7863 * tree-vect-loop-manip.c (vect_gen_vector_loop_niters): Likewise.
7864 (vect_do_peeling): Likewise.
7865 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
7866 * tree-vect-stmts.c (vectorizable_load): Likewise.
7867 * tree-vrp.c (compare_values_warnv, vrp_int_const_binop): Likewise.
7868 (zero_nonzero_bits_from_vr, ranges_from_anti_range): Likewise.
7869 (extract_range_from_binary_expr_1, adjust_range_with_scev): Likewise.
7870 (overflow_comparison_p_1, register_edge_assert_for_2): Likewise.
7871 (is_masked_range_test, find_switch_asserts, maybe_set_nonzero_bits)
7872 (vrp_evaluate_conditional_warnv_with_ops, intersect_ranges): Likewise.
7873 (range_fits_type_p, two_valued_val_range_p, vrp_finalize): Likewise.
7874 (evrp_dom_walker::before_dom_children): Likewise.
7875 * tree.c (cache_integer_cst, real_value_from_int_cst, integer_zerop)
7876 (integer_all_onesp, integer_pow2p, integer_nonzerop, tree_log2)
7877 (tree_floor_log2, tree_ctz, mem_ref_offset, tree_int_cst_sign_bit)
7878 (tree_int_cst_sgn, get_unwidened, int_fits_type_p): Likewise.
7879 (get_type_static_bounds, num_ending_zeros, drop_tree_overflow)
7880 (get_range_pos_neg): Likewise.
7881 * ubsan.c (ubsan_expand_ptr_ifn): Likewise.
7882 * config/darwin.c (darwin_mergeable_constant_section): Likewise.
7883 * config/aarch64/aarch64.c (aapcs_vfp_sub_candidate): Likewise.
7884 * config/arm/arm.c (aapcs_vfp_sub_candidate): Likewise.
7885 * config/avr/avr.c (avr_fold_builtin): Likewise.
7886 * config/bfin/bfin.c (bfin_local_alignment): Likewise.
7887 * config/msp430/msp430.c (msp430_attr): Likewise.
7888 * config/nds32/nds32.c (nds32_insert_attributes): Likewise.
7889 * config/powerpcspe/powerpcspe-c.c
7890 (altivec_resolve_overloaded_builtin): Likewise.
7891 * config/powerpcspe/powerpcspe.c (rs6000_aggregate_candidate)
7892 (rs6000_expand_ternop_builtin): Likewise.
7893 * config/rs6000/rs6000-c.c
7894 (altivec_resolve_overloaded_builtin): Likewise.
7895 * config/rs6000/rs6000.c (rs6000_aggregate_candidate): Likewise.
7896 (rs6000_expand_ternop_builtin): Likewise.
7897 * config/s390/s390.c (s390_handle_hotpatch_attribute): Likewise.
7898
7899 2017-10-10 Bin Cheng <bin.cheng@arm.com>
7900
7901 * tree-vect-loop-manip.c (rename_variables_in_bb): Rename PHI nodes
7902 when copying loop nest with only one inner loop.
7903
7904 2017-10-10 Richard Biener <rguenther@suse.de>
7905
7906 * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Avoid compacting
7907 blocks if SCEV is active.
7908 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Remove
7909 dead code.
7910 (analyze_scalar_evolution): Handle cached evolutions the obvious way.
7911 (scev_initialize): Assert we are not yet initialized.
7912
7913 2017-10-10 Bin Cheng <bin.cheng@arm.com>
7914
7915 * tree-loop-distribution.c (generate_loops_for_partition): Remove
7916 inner loop's exit stmt by making it always exit the loop, otherwise
7917 we would generate an infinite empty loop.
7918
7919 2017-10-10 Bin Cheng <bin.cheng@arm.com>
7920
7921 * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip
7922 renaming variables in new preheader if it's deleted.
7923
7924 2017-10-10 Bin Cheng <bin.cheng@arm.com>
7925
7926 * tree-loop-distribution.c (struct partition): Remove unused field
7927 loops of the structure.
7928 (partition_alloc, partition_free): Ditto.
7929 (build_rdg_partition_for_vertex): Ditto.
7930
7931 2017-10-09 Jeff Law <law@redhat.com>
7932
7933 * targhooks.c (default_stack_clash_protection_final_dynamic_probe): Fix
7934 return type to match prototype and documentation.
7935
7936 2010-10-09 Segher Boessenkool <segher@kernel.crashing.org>
7937
7938 * config/rs6000/rs6000.c (processor_costs): Move to ...
7939 * config/rs6000/rs6000.h: ... here.
7940 (rs6000_cost): Declare.
7941
7942 2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
7943
7944 * except.c (setjmp_fn): New global variable.
7945 (init_eh): Initialize it if DONT_USE_BUILTIN_SETJMP is defined.
7946 (sjlj_emit_function_enter): Call it instead of BUILTIN_SETJMP
7947 if DONT_USE_BUILTIN_SETJMP is defined.
7948
7949 2017-10-09 Segher Boessenkool <segher@kernel.crashing.org>
7950
7951 * target.def (insn_cost): New hook.
7952 * doc/tm.texi.in (TARGET_INSN_COST): New hook.
7953 * doc/tm.texi: Regenerate.
7954 * rtlanal.c (insn_cost): Use the new hook.
7955
7956 2017-10-09 Segher Boessenkool <segher@kernel.crashing.org>
7957
7958 * combine.c (combine_validate_cost): Compute the new insn_cost,
7959 not just pattern_cost.
7960 (try_combine): Adjust comment.
7961
7962 2017-10-09 Segher Boessenkool <segher@kernel.crashing.org>
7963
7964 * cfgrtl.c (rtl_account_profile_record): Replace insn_rtx_cost with
7965 insn_cost.
7966 * combine.c (uid_insn_cost): Adjust comment.
7967 (combine_validate_cost): Adjust comment. Use pattern_cost instead
7968 of insn_rtx_cost
7969 (combine_instructions): Use insn_cost instead of insn_rtx_cost.
7970 * dse.c (find_shift_sequence): Ditto.
7971 * ifcvt.c (cheap_bb_rtx_cost_p): Ditto.
7972 (bb_valid_for_noce_process_p): Use pattern_cost.
7973 * rtl.h (insn_rtx_cost): Delete.
7974 (pattern_cost): New prototype.
7975 (insn_cost): New prototype.
7976 * rtlanal.c (insn_rtx_cost): Rename to...
7977 (pattern_cost): ... this.
7978 (insn_cost): New.
7979
7980 2017-10-09 Uros Bizjak <ubizjak@gmail.com>
7981
7982 * config/i386/i386.md (*jcc_2): Remove insn pattern.
7983 (*jcc<mode>_0_r_i387): Ditto.
7984 (*jccxf_r_i387): Ditto.
7985 (*jcc<mode>_r_i387): Ditto.
7986 (*jccu<mode>_r_i387): Ditto.
7987 (*jcc<X87MODEF:mode>_<SWI24:mode>_r_i387): Ditto.
7988 (*jcc): Rename from *jcc_1.
7989
7990 2017-10-09 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7991
7992 * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Process
7993 deferred rescans after the lvx/stvx recombination pre-pass.
7994
7995 2017-10-09 Michael Meissner <meissner@linux.vnet.ibm.com>
7996
7997 * config/rs6000/amo.h: New include file to provide ISA 3.0 atomic
7998 memory operation instruction support.
7999 * config.gcc (powerpc*-*-*): Include amo.h as an extra header.
8000 (rs6000-ibm-aix[789]*): Likewise.
8001 * doc/extend.texi (PowerPC Atomic Memory Operation Functions):
8002 Document new functions.
8003
8004 2017-10-09 Richard Biener <rguenther@suse.de>
8005
8006 PR tree-optimization/82397
8007 * tree-data-ref.c (data_ref_compare_tree): Make sure to return
8008 equality only for semantically equal trees.
8009
8010 2017-10-09 Richard Biener <rguenther@suse.de>
8011
8012 PR tree-optimization/82449
8013 * sese.c (scev_analyzable_p): Check whether the SCEV is linear.
8014 * tree-chrec.h (evolution_function_is_constant_p): Adjust to
8015 allow constant addresses.
8016 * tree-chrec.c (scev_is_linear_expression): Constant evolutions
8017 are linear.
8018
8019 2017-10-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8020
8021 * config/s390/s390-builtins.def (vec_nabs, vec_vfi): Fix builtin
8022 flags.
8023
8024 2017-10-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8025
8026 PR target/82463
8027 * config/s390/vecintrin.h (vec_madd, vec_msub): Fix macro
8028 definitions.
8029
8030 2017-10-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8031
8032 PR target/82465
8033 * config/s390/s390-builtins.def (vec_sqrt): Fix builtin flags.
8034
8035 2017-10-09 Jakub Jelinek <jakub@redhat.com>
8036
8037 PR target/82464
8038 * config/s390/s390-builtins.def (s390_vec_xor_flt_a,
8039 s390_vec_xor_flt_b, s390_vec_xor_flt_c): New.
8040
8041 2017-10-09 Richard Sandiford <richard.sandiford@linaro.org>
8042
8043 * wide-int.h (WI_BINARY_OPERATOR_RESULT): New macro.
8044 (WI_BINARY_PREDICATE_RESULT): Likewise.
8045 (wi::binary_traits::operator_result): New type.
8046 (wi::binary_traits::predicate_result): Likewise.
8047 (generic_wide_int::operator~, unary generic_wide_int::operator-)
8048 (generic_wide_int::operator==, generic_wide_int::operator!=)
8049 (generic_wide_int::operator&, generic_wide_int::and_not)
8050 (generic_wide_int::operator|, generic_wide_int::or_not)
8051 (generic_wide_int::operator^, generic_wide_int::operator+
8052 (binary generic_wide_int::operator-, generic_wide_int::operator*):
8053 Delete.
8054 (operator~, unary operator-, operator==, operator!=, operator&)
8055 (operator|, operator^, operator+, binary operator-, operator*): New
8056 functions.
8057 * expr.c (get_inner_reference): Use wi::bit_and_not.
8058 * fold-const.c (fold_binary_loc): Likewise.
8059 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
8060 * tree-ssa-ccp.c (get_value_from_alignment): Likewise.
8061 (bit_value_binop): Likewise.
8062 * tree-ssa-math-opts.c (find_bswap_or_nop_load): Likewise.
8063 * tree-vrp.c (zero_nonzero_bits_from_vr): Likewise.
8064 (extract_range_from_binary_expr_1): Likewise.
8065 (masked_increment): Likewise.
8066 (simplify_bit_ops_using_ranges): Likewise.
8067
8068 2017-10-09 Martin Jambor <mjambor@suse.cz>
8069
8070 PR hsa/82416
8071 * hsa-common.h (hsa_op_with_type): New method extend_int_to_32bit.
8072 * hsa-gen.c (hsa_extend_inttype_to_32bit): New function.
8073 (hsa_type_for_scalar_tree_type): Use it. Always force min32int for
8074 COMPLEX types.
8075 (hsa_fixup_mov_insn_type): New function.
8076 (hsa_op_with_type::get_in_type): Use it.
8077 (hsa_build_append_simple_mov): Likewise. Allow sub-32bit
8078 immediates in an assert.
8079 (hsa_op_with_type::extend_int_to_32bit): New method.
8080 (gen_hsa_insns_for_bitfield): Fixup instruction and intermediary
8081 types. Convert to dest type if necessary.
8082 (gen_hsa_insns_for_bitfield_load): Fixup load type if necessary.
8083 (reg_for_gimple_ssa): Pass false as min32int to
8084 hsa_type_for_scalar_tree_type.
8085 (gen_hsa_addr): Fixup type when creating addresable temporary.
8086 (gen_hsa_cmp_insn_from_gimple): Extend operands if necessary.
8087 (gen_hsa_unary_operation): Extend operands and convert to dest type if
8088 necessary. Call hsa_fixup_mov_insn_type.
8089 (gen_hsa_binary_operation): Changed operand types to hsa_op_with_type,
8090 extend operands and convert to dest type if necessary.
8091 (gen_hsa_insns_for_operation_assignment): Extend operands and convert
8092 to dest type if necessary.
8093 (set_output_in_type): Call hsa_fixup_mov_insn_type. Just ude dest
8094 if conversion nt necessary and size matches.
8095 (gen_hsa_insns_for_load): Call hsa_fixup_mov_insn_type, convert
8096 to dest type if necessary.
8097 (gen_hsa_insns_for_store): Call hsa_fixup_mov_insn_type.
8098 (gen_hsa_insns_for_switch_stmt): Likewise. Also extend operands if
8099 necessary.
8100 (gen_hsa_clrsb): Likewise.
8101 (gen_hsa_ffs): Likewise.
8102 (gen_hsa_divmod): Extend operands and convert to dest type if
8103 necessary.
8104 (gen_hsa_atomic_for_builtin): Change type of op to hsa_op_with_type.
8105
8106 2017-10-08 Segher Boessenkool <segher@kernel.crashing.org>
8107
8108 * config/rs6000/rs6000.md (conditional branch): Clean up formatting.
8109 Remove empty default arguments. Use a brace block as output
8110 statement.
8111 (conditional return): Ditto.
8112 (jump): Ditto.
8113 (indirect_jump): Ditto. Use b%T0 instead of bctr/blr.
8114 (tablejump, tablejumpsi, tablejumpdi, *tablejump<mode>_internal1):
8115 Ditto.
8116 (group_ending_nop): Ditto.
8117 (doloop_end): Ditto.
8118 (ctr<mode>, ctr<mode>_internal1, ctr<mode>_internal2): Ditto.
8119 (splitters for those): Ditto.
8120
8121 2017-10-08 Segher Boessenkool <segher@kernel.crashing.org>
8122
8123 * config/rs6000/rs6000-string.c (expand_strncmp_align_check): Invert
8124 a conditional jump (and the compare for it) so that pc_rtx is the
8125 last operand.
8126 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Adjust
8127 for the deleted and renamed ctr<mode>_internal[234] patterns.
8128 * config/rs6000/rs6000.md: Delete second conditional branch pattern.
8129 Delete second conditional return pattern.
8130 (ctr<mode>_internal2): Delete this second bdnz pattern.
8131 (ctr<mode>_internal3): Rename to ctr<mode>_internal2.
8132 (ctr<mode>_internal4): Delete this second bdz pattern.
8133
8134 2017-10-08 Eric Botcazou <ebotcazou@adacore.com>
8135
8136 * tree-outof-ssa.h (ssaexpand): Add partitions_for_undefined_values.
8137 (always_initialized_rtx_for_ssa_name_p): New predicate.
8138 * tree-outof-ssa.c (remove_ssa_form): Initialize new field of SA.
8139 (finish_out_of_ssa): Free new field of SA.
8140 * tree-ssa-coalesce.h (get_undefined_value_partitions): Declare.
8141 * tree-ssa-coalesce.c: Include tree-ssa.h.
8142 (get_parm_default_def_partitions): Remove extern keyword.
8143 (get_undefined_value_partitions): New function.
8144 * expr.c (expand_expr_real_1) <expand_decl_rtl>: For a SSA_NAME, do
8145 not set SUBREG_PROMOTED_VAR_P on the sub-register if it may contain
8146 uninitialized bits.
8147 * loop-iv.c (iv_get_reaching_def): Disqualify all subregs.
8148
8149 2017-10-08 Eric Botcazou <ebotcazou@adacore.com>
8150
8151 * builtins.def (BUILT_IN_SETJMP): Revert latest change.
8152
8153 2017-10-08 Jan Hubicka <hubicka@ucw.cz>
8154
8155 * config/i386/i386.c (ix86_expand_set_or_movmem): Disable 512bit loops
8156 for targets that preffer 128bit.
8157
8158 2017-10-08 Jan Hubicka <hubicka@ucw.cz>
8159
8160 * config/i386/i386.c (has_dispatch): Disable for Ryzen.
8161
8162 2017-10-08 Olivier Hainque <hainque@adacore.com>
8163
8164 * config/arm/arm.c (arm_set_return_address): Use MEM_VOLATILE_P
8165 on the target mem instead of RTX_FRAME_RELATED_P on the insn to
8166 prevent DSE.
8167 (thumb_set_return_address): Likewise.
8168
8169 2017-10-08 Olivier Hainque <hainque@adacore.com>
8170
8171 * common/config/arm/arm-common.c (arm_except_unwind_info):
8172 Handle DWARF2_UNWIND_INFO.
8173
8174 2017-10-07 Michael Collison <michael.collison@arm.com>
8175
8176 * config/aarch64/aarch64.md (*aarch64_reg_<optab>_minus<mode>3):
8177 New pattern.
8178
8179 2017-10-07 Eric Botcazou <ebotcazou@adacore.com>
8180
8181 * builtins.def (BUILT_IN_SETJMP): Declare as library builtin instead
8182 of GCC builtin if DONT_USE_BUILTIN_SETJMP is defined.
8183 * except.c (sjlj_emit_function_enter): If DONT_USE_BUILTIN_SETJMP is
8184 defined, force the creation of a new block for a dispatch label.
8185
8186 2017-10-07 Jan Hubicka <hubicka@ucw.cz>
8187
8188 * invoke.texi (Wsuggest-attribute=cold): Document.
8189 * common.opt (Wsuggest-attribute=cold): New
8190 * ipa-pure-const.c (warn_function_cold): New function.
8191 * predict.c (compute_function_frequency): Use it.
8192 * predict.h (warn_function_cold): Declare.
8193
8194 2017-10-06 Jan Hubicka <hubicka@ucw.cz>
8195
8196 * tree-switch-conversion.c (do_jump_if_equal, emit_cmp_and_jump_insns):
8197 Update profile.
8198
8199 2017-10-06 Martin Liska <mliska@suse.cz>
8200
8201 * sanopt.c (struct sanopt_tree_triplet_hash): Remove inline
8202 keyword for member functions.
8203 (struct sanopt_tree_couple): New struct.
8204 (struct sanopt_tree_couple_hash): New function.
8205 (struct sanopt_ctx): Add new hash_map.
8206 (has_dominating_ubsan_ptr_check): New function.
8207 (record_ubsan_ptr_check_stmt): Likewise.
8208 (maybe_optimize_ubsan_ptr_ifn): Likewise.
8209 (sanopt_optimize_walker): Handle IFN_UBSAN_PTR.
8210 (pass_sanopt::execute): Handle also SANITIZE_POINTER_OVERFLOW.
8211
8212 2017-10-06 Sudakshina Das <sudi.das@arm.com>
8213
8214 PR target/82440
8215 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Only call
8216 aarch64_simd_valid_immediate on CONST_VECTORs.
8217 (aarch64_reg_or_bic_imm): Likewise.
8218
8219 2017-10-06 Wilco Dijkstra <wdijkstr@arm.com>
8220
8221 PR rtl-optimization/82396
8222 * haifa-sched.c (ready_sort_real): Disable qsort checking.
8223
8224 2017-10-06 Sebastian Pop <sebpop@gmail.com>
8225
8226 * graphite-dependences.c (scop_get_reads): Move code to...
8227 (scop_get_must_writes): Move code to...
8228 (scop_get_may_writes): Move code to...
8229 (scop_get_reads_and_writes): ... here.
8230 (scop_get_dependences): Call scop_get_reads_and_writes.
8231
8232 2017-10-06 Jakub Jelinek <jakub@redhat.com>
8233
8234 PR tree-optimization/82434
8235 * fold-const.h (can_native_encode_type_p,
8236 can_native_encode_string_p): Remove.
8237 * fold-const.c (native_encode_int): Formatting fixes. If ptr is NULL,
8238 don't encode anything, just return what would be otherwise returned.
8239 (native_encode_fixed, native_encode_complex, native_encode_vector):
8240 Likewise.
8241 (native_encode_string): Likewise. Inline by hand
8242 can_native_encode_string_p.
8243 (can_native_encode_type_p): Remove.
8244 (can_native_encode_string_p): Remove.
8245 * tree-vect-stmts.c (vectorizable_store): Instead of testing just
8246 STRING_CSTs using can_native_encode_string_p, test all
8247 CONSTANT_CLASS_P values using native_encode_expr with NULL ptr.
8248 * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Remove last
8249 argument from native_encode_expr.
8250 (rhs_valid_for_store_merging_p): Use native_encode_expr with NULL ptr.
8251 (pass_store_merging::execute): Don't unnecessarily look for 3 stmts,
8252 but just 2.
8253
8254 2017-10-06 Richard Biener <rguenther@suse.de>
8255
8256 PR tree-optimization/82397
8257 * tree-vect-data-refs.c (dr_group_sort_cmp): Do not use
8258 operand_equal_p but rely on data_ref_compare_tree for detecting
8259 equalities.
8260 (vect_analyze_data_ref_accesses): Use data_ref_compare_tree
8261 to match up with dr_group_sort_cmp.
8262
8263 2017-10-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8264
8265 PR target/82322
8266 * config/s390/s390-builtins.def (s390_vfi): Define new overloaded
8267 builtin.
8268 * config/s390/s390-builtin-types.def: Regenerate.
8269
8270 2017-10-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8271
8272 PR target/82317
8273 * config/s390/s390-builtin-types.def: Regenerate.
8274 * config/s390/s390-builtins.def (s390_vfmaxdb_4, s390_vfmindb_4):
8275 Change flag from B_VXE to B_VX.
8276 (s390_vec_min_dbl): Remove B_VXE flag.
8277
8278 2017-10-06 Richard Biener <rguenther@suse.de>
8279
8280 * graphite-isl-ast-to-gimple.c: Include ssa.h and tree-ssa.h.
8281 (translate_isl_ast_to_gimple::translate_pending_phi_nodes,
8282 translate_isl_ast_to_gimple::is_valid_rename,
8283 translate_isl_ast_to_gimple::get_rename,
8284 translate_isl_ast_to_gimple::get_def_bb_for_const,
8285 translate_isl_ast_to_gimple::get_new_name,
8286 translate_isl_ast_to_gimple::collect_all_ssa_names,
8287 translate_isl_ast_to_gimple::copy_loop_phi_args,
8288 translate_isl_ast_to_gimple::collect_all_ssa_names,
8289 translate_isl_ast_to_gimple::copy_loop_phi_args,
8290 translate_isl_ast_to_gimple::copy_loop_phi_nodes,
8291 translate_isl_ast_to_gimple::add_close_phis_to_merge_points,
8292 translate_isl_ast_to_gimple::add_close_phis_to_outer_loops,
8293 translate_isl_ast_to_gimple::copy_loop_close_phi_args,
8294 translate_isl_ast_to_gimple::copy_loop_close_phi_nodes,
8295 translate_isl_ast_to_gimple::copy_cond_phi_args,
8296 translate_isl_ast_to_gimple::copy_cond_phi_nodes,
8297 translate_isl_ast_to_gimple::edge_for_new_close_phis,
8298 translate_isl_ast_to_gimple::add_phi_arg_for_new_expr,
8299 translate_isl_ast_to_gimple::rename_uses,
8300 translate_isl_ast_to_gimple::rename_all_uses): Remove.
8301 (translate_isl_ast_to_gimple::get_rename_from_scev): Simplify.
8302 (set_rename_for_each_def): Likewise.
8303 (graphite_copy_stmts_from_block): Handle debug stmt resetting
8304 here. Handle rewriting SCEV analyzable uses here.
8305 (copy_bb_and_scalar_dependences): Generate code for PHI
8306 copy-in/outs.
8307 (graphite_regenerate_ast_isl): Adjust.
8308 * graphite-scop-detection.c (trivially_empty_bb_p): Move to sese.[ch].
8309 (add_write, add_read): New functions.
8310 (build_cross_bb_scalars_def): Use it and simplify.
8311 (build_cross_bb_scalars_use): Likewise.
8312 (graphite_find_cross_bb_scalar_vars): Inline into...
8313 (try_generate_gimple_bb): ...here. Add dependences for PHIs,
8314 simulating out-of-SSA. Compute liveout and add dependencies.
8315 (build_scops): Force an empty entry block.
8316 * sese.h (sese_info_t::liveout, sese_info_t::debug_liveout): New
8317 members.
8318 (sese_build_liveouts): Declare.
8319 (sese_trivially_empty_bb_p): Likewise.
8320 * sese.c (sese_build_liveouts_bb): Properly handle PHIs,
8321 compute liveout and debug_liveout.
8322 (sese_bad_liveouts_use): Remove.
8323 (sese_reset_debug_liveouts_bb): Likewise.
8324 (sese_reset_debug_liveouts): Rewrite in terms of debug_liveout.
8325 (sese_build_liveouts): Build liveout and debug_liveout and store
8326 it in region.
8327 (new_sese_info): Adjust.
8328 (free_sese_info): Likewise.
8329 (sese_insert_phis_for_liveouts): Reset debug stmts from here,
8330 do not build liveout here.
8331 (move_sese_in_condition): Adjust region entry.
8332 (scev_analyzable_p): Match up with chrec_apply requirements.
8333 (sese_trivially_empty_bb_p): New.
8334 * tree-into-ssa.c (get_reaching_def): Properly support generating
8335 default-defs for incremental rewrite of anonymous names.
8336
8337 2017-10-06 Richard Biener <rguenther@suse.de>
8338
8339 * graphite-sese-to-poly.c (extract_affine): For casts increasing
8340 precision do not perform modulo reduction.
8341
8342 2017-10-06 Richard Biener <rguenther@suse.de>
8343
8344 PR tree-optimization/82436
8345 * tree-vect-slp.c (vect_supported_load_permutation_p): More
8346 conservatively choose the vectorization factor when checking
8347 whether we can perform the required load permutation.
8348 (vect_transform_slp_perm_load): Assert when we may not fail.
8349
8350 2017-10-05 Segher Boessenkool <segher@kernel.crashing.org>
8351
8352 * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Correct error
8353 message for incompatible -msdata=* and -mcall-* options.
8354
8355 2017-10-05 Jan Hubicka <hubicka@ucw.cz>
8356
8357 * config/i386/i386.c (ia32_multipass_dfa_lookahead): Default to issue
8358 rate for post-reload scheduling.
8359
8360 2017-10-05 Tamar Christina <tamar.christina@arm.com>
8361
8362 * doc/sourcebuild.texi (vect_sizes_16B_8B, vect_sizes_32B_16B): New.
8363
8364 2017-10-05 Jan Hubicka <hubicka@ucw.cz>
8365
8366 * config/i386/i386.c (znver1_cost): Set branch_cost to 3 (instead of 2)
8367 to improve monte carlo in scimark.
8368
8369 2017-10-05 Jan Hubicka <hubicka@ucw.cz>
8370
8371 * config/i386/i386.c (ix86_size_cost, i386_cost, i486_cost,
8372 pentium_cost, lakemont_cost, pentiumpro_cost, geode_cost, k6_cost,
8373 athlon_cost, k8_cost, amdfam10_cost, btver1_cost, btver2_cost,
8374 pentium4_cost, nocona_cost): Set reassociation width to 1.
8375 (bdver1_cost, bdver2_cost, bdver3_cost, bdver4_cost): Set reassociation
8376 width to 2 for fp operations and 1 otherwise.
8377 (znver1_cost): Set scalar reassoc width to 4 and vector to 3 and 6
8378 for int and fp.
8379 (atom_cost): Set reassociation width to 2.
8380 (slm_cost, generic_cost): Set fp reassociation width
8381 to 2 and 1 otherwise.
8382 (intel_cost): Set fp reassociation width to 4 and 1 otherwise.
8383 (core_cost): Set fp reassociation width to 4 and vector to 2.
8384 (ix86_reassociation_width): Rewrite using cost table; special case
8385 plus/minus on Zen; honor X86_TUNE_SSE_SPLIT_REGS
8386 and TARGET_AVX128_OPTIMAL.
8387 * config/i386/i386.h (processor_costs): Add
8388 reassoc_int, reassoc_fp, reassoc_vec_int, reassoc_vec_fp.
8389 (TARGET_VECTOR_PARALLEL_EXECUTION, TARGET_REASSOC_INT_TO_PARALLEL,
8390 TARGET_REASSOC_FP_TO_PARALLEL): Remove.
8391 * x86-tune.def (X86_TUNE_REASSOC_INT_TO_PARALLEL): Remove.
8392 (X86_TUNE_REASSOC_FP_TO_PARALLEL): Remove.
8393 (X86_TUNE_VECTOR_PARALLEL_EXECUTION): Remove.
8394
8395 2017-10-05 Nathan Sidwell <nathan@acm.org>
8396
8397 * doc/invoke.texi (Wparentheses): Document C++ MVP behaviour.
8398
8399 2017-10-05 Tamar Christina <tamar.christina@arm.com>
8400
8401 * config/arm/arm.c (arm_test_fpu_data): New.
8402 (arm_run_selftests): Call arm_test_fpu_data.
8403
8404 2017-10-04 Nathan Sidwell <nathan@acm.org>
8405
8406 * toplev.c (toplev::main): Remove excess parens on pretty_printer
8407 decl.
8408 * caller-save.c (insert_save): Remove excess parens on TO_SAVE parm.
8409
8410 2017-10-04 Sudakshina Das <sudi.das@arm.com>
8411
8412 * config/aarch64/aarch64-protos.h (enum simd_immediate_check): New
8413 check type for aarch64_simd_valid_immediate.
8414 (aarch64_output_simd_mov_immediate): Update prototype.
8415 (aarch64_simd_valid_immediate): Update prototype.
8416 * config/aarch64/aarch64-simd.md (orr<mode>3): modified pattern to add
8417 support for ORR-immediate.
8418 (and<mode>3): modified pattern to add support for BIC-immediate.
8419 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Function
8420 now checks for valid immediate for BIC and ORR based on new enum
8421 argument.
8422 (aarch64_output_simd_mov_immediate): Function now used to output
8423 BIC/ORR imm as well based on new enum argument.
8424 * config/aarch64/constraints.md (Do): New vector immediate constraint.
8425 (Db) : Likewise.
8426 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): New predicate.
8427 (aarch64_reg_or_bic_imm): Likewise.
8428
8429 2017-10-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8430
8431 * config/s390/vx-builtins.md ("vec_mergeh<mode>")
8432 ("vec_mergel<mode>"): Change mode iterator to V_128_NOSINGLE.
8433
8434 2017-10-04 Wilco Dijkstra <wdijkstr@arm.com>
8435
8436 Revert r253399:
8437
8438 PR rtl-optimization/82396
8439 * haifa-sched.c (autopref_multipass_init): Simplify
8440 initialization.
8441 (autopref_rank_data): Simplify sort order.
8442 * sched-int.h (autopref_multipass_data_): Remove
8443 multi_mem_insn_p, min_offset and max_offset.
8444
8445 2017-10-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8446
8447 * doc/sourcebuild.texi: Document vect_peeling_profitable.
8448
8449 2017-10-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8450
8451 * doc/sourcebuild.texi: Document vect_intdouble_cvt and
8452 vect_doubleint_cvt.
8453
8454 2017-10-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8455
8456 * doc/sourcebuild.texi: Document vect_long_mult.
8457
8458 2017-10-04 Richard Sandiford <richard.sandiford@linaro.org>
8459
8460 PR tree-optimization/82413
8461 * fold-const.c (build_range_check): Use widest_int when comparing
8462 the maximum ETYPE value with HIGH.
8463
8464 2017-10-04 Wilco Dijkstra <wdijkstr@arm.com>
8465
8466 PR rtl-optimization/82396
8467 * haifa-sched.c (autopref_multipass_init): Simplify
8468 initialization.
8469 (autopref_rank_data): Simplify sort order.
8470 * sched-int.h (autopref_multipass_data_): Remove
8471 multi_mem_insn_p, min_offset and max_offset.
8472
8473 2017-10-04 Jakub Jelinek <jakub@redhat.com>
8474
8475 PR tree-optimization/82381
8476 * tree-ssa-reassoc.c (sort_by_operand_rank): Check for different
8477 oeN->rank first. Return 1 or -1 if one op is SSA_NAME and the other
8478 is not.
8479
8480 PR tree-optimization/82374
8481 * omp-low.c (create_omp_child_function): Copy DECL_ATTRIBUTES,
8482 DECL_FUNCTION_SPECIFIC_OPTIMIZATION,
8483 DECL_FUNCTION_SPECIFIC_TARGET and DECL_FUNCTION_VERSIONED from
8484 current_function_decl to the new decl.
8485
8486 2017-10-03 Michael Meissner <meissner@linux.vnet.ibm.com>
8487
8488 * config/rs6000/rs6000-builtin.def (BU_FLOAT128_2_HW): Define new
8489 helper macro for IEEE float128 hardware built-in functions.
8490 (SQRTF128_ODD): Add built-in functions with the round-to-odd
8491 semantics.
8492 (TRUNCF128_ODD): Likewise.
8493 (ADDF128_ODD): Likewise.
8494 (SUBF128_ODD): Likewise.
8495 (MULF128_ODD): Likewise.
8496 (DIVF128_ODD): Likewise.
8497 (FMAF128_ODD): Likewise.
8498 * config/rs6000/rs6000.md (UNSPEC_ROUND_TO_ODD): Rename to
8499 UNSPEC_TRUNC_ROUND_TO_ODD.
8500 (UNSPEC_TRUNC_ROUND_TO_ODD): Likewise.
8501 (UNSPEC_ADD_ROUND_TO_ODD): New unspec codes for the IEEE 128-bit
8502 floating point round to odd instructions.
8503 (UNSPEC_SUB_ROUND_TO_ODD): Likewise.
8504 (UNSPEC_MUL_ROUND_TO_ODD): Likewise.
8505 (UNSPEC_DIV_ROUND_TO_ODD): Likewise.
8506 (UNSPEC_FMA_ROUND_TO_ODD): Likewise.
8507 (UNSPEC_SQRT_ROUND_TO_ODD): Likewise.
8508 (trunc<mode>sf2_hw): Change the truncate with round to odd
8509 expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.
8510 (add<mode>3_odd): Add insns for IEEE 128-bit floating point round
8511 to odd hardware instructions.
8512 (sub<mode>3_odd): Likewise.
8513 (mul<mode>3_odd): Likewise.
8514 (div<mode>3_odd): Likewise.
8515 (sqrt<mode>2_odd): Likewise.
8516 (fma<mode>4_odd): Likewise.
8517 (fms<mode>4_odd): Likewise.
8518 (nfma<mode>4_odd): Likewise.
8519 (nfms<mode>4_odd): Likewise.
8520 (trunc<mode>df2_odd): Change the truncate with round to odd
8521 expansion to use UNSPEC_TRUNC_ROUND_TO_ODD. Add a generator
8522 function.
8523 * doc/extend.texi (PowerPC built-in functions): Update documentation
8524 for existing IEEE float128-bit built-in functions. Add built-in
8525 functions that generate the IEEE 128-bit floating point round to
8526 odd instructions.
8527
8528 2017-10-03 Segher Boessenkool <segher@kernel.crashing.org>
8529
8530 PR rtl-optimization/77729
8531 * simplify-rtx.c (simplify_binary_operation_1): Delete the (X&C1)|C2
8532 to (X&(C1&~C2))|C2 transformations.
8533
8534 2017-10-03 Martin Jambor <mjambor@suse.cz>
8535
8536 PR tree-optimization/82363
8537 * tree-sra.c (propagate_subaccesses_across_link): In unrecoverable
8538 mismatch, mark lacc written regardless of racc.
8539
8540 2017-10-03 Jakub Jelinek <jakub@redhat.com>
8541
8542 PR tree-optimization/82381
8543 * tree-ssa-reassoc.c (sort_by_operand_rank): Don't check
8544 stmt_to_insert nor wheather SSA_NAMEs are default defs.
8545 Return 1 or -1 if one of bba and bbb is NULL. If bb_rank is equal,
8546 fallthrough into reassoc_stmt_dominates_stmt_p.
8547
8548 PR target/82386
8549 * combine.c (combine_instructions): Don't combine in unreachable
8550 basic blocks.
8551
8552 2017-08-18 Peter Bergner <bergner@vnet.ibm.com>
8553
8554 PR target/80210
8555 * config/rs6000/rs6000.c (rs6000_option_override_internal): Rewrite
8556 function to not use the have_cpu variable. Do not set cpu_index,
8557 rs6000_cpu_index or rs6000_tune_index if we end up using TARGET_DEFAULT
8558 or the default cpu.
8559 (rs6000_valid_attribute_p): Remove duplicate initializations of
8560 old_optimize and func_optimize.
8561 (rs6000_pragma_target_parse): Call rs6000_activate_target_options ().
8562 (rs6000_activate_target_options): Make global.
8563 * config/rs6000/rs6000-protos.h (rs6000_activate_target_options): Add
8564 prototype.
8565
8566 2017-10-02 Jakub Jelinek <jakub@redhat.com>
8567
8568 * tree-dfa.c (get_ref_base_and_extent): Set *pmax_size to -1
8569 if *poffset + *pmax_size overflows in HOST_WIDE_INT.
8570 Set *poffset to 0 and *psize and *pmax_size to -1 if
8571 *poffset + *psize overflows in HOST_WIDE_INT.
8572
8573 PR tree-optimization/82387
8574 PR tree-optimization/82388
8575 PR tree-optimization/82389
8576 * tree-ssa-dse.c (dse_classify_store): Test byte_tracking_enabled
8577 instead of live_bytes non-NULL.
8578
8579 2017-10-02 Georg-Johann Lay <avr@gjlay.de>
8580
8581 PR target/41076
8582 * confg/avr/avr.md (*iorhi3.ashift8-ext.zerox): Add "r,r,0"
8583 alternative.
8584
8585 2017-10-02 Richard Biener <rguenther@suse.de>
8586
8587 * graphite-isl-ast-to-gimple.c (set_codegen_error): With
8588 -fchecking and --param graphite-allow-codegen-errors=0 ICE.
8589 * params.def (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): New param.
8590
8591 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
8592
8593 * tree.h (wi::int_traits <const_tree>::decompose): Assert that the
8594 requested precision matches the type's.
8595 * calls.c (alloc_max_size): Calculate the new candidate size as
8596 a widest_int and use wi::to_widest when comparing it with the
8597 current candidate size.
8598 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Compare with
8599 zero rather than integer_zero_node.
8600 * match.pd: Check for a no-op conversion before using wi::add
8601 rather than after. Use tree_to_uhwi when summing small shift
8602 counts into an unsigned int.
8603
8604 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
8605 Alan Hayward <alan.hayward@arm.com>
8606 David Sherwood <david.sherwood@arm.com>
8607
8608 PR target/71307
8609 * config/aarch64/aarch64.h (POINTER_AND_FP_REGS): New reg class.
8610 (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
8611 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
8612 POINTER_AND_FP_REGS.
8613
8614 2017-10-02 Richard Biener <rguenther@suse.de>
8615
8616 PR tree-optimization/82355
8617 * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
8618 a mapping for the enclosing loop but avoid generating one for
8619 the loop tree root.
8620 (copy_bb_and_scalar_dependences): Remove premature codegen
8621 error on PHIs in blocks duplicated into multiple places.
8622 * graphite-scop-detection.c
8623 (scop_detection::stmt_has_simple_data_refs_p): For a loop not
8624 in the region use it as loop and nest to analyze the DR in.
8625 (try_generate_gimple_bb): Likewise.
8626 * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
8627 (add_loop_constraints): For blocks in a loop not in the region
8628 create a dimension with a single iteration.
8629 * sese.h (gbb_loop_at_index): Remove assert.
8630
8631 2017-10-01 Kevin Buettner <kevinb@redhat.com>
8632
8633 * omp-expand.c (adjust_context_scope): New function.
8634 (expand_parallel_call): Call adjust_context_scope.
8635
8636 2017-10-01 Jeff Law <law@redhat.com>
8637
8638 * tree-ssa-dom.c (optimize_stmt): Make this a method within the
8639 dom_opt_dom_walker class with direct access to private members.
8640 Add comments. Call test_for_singularity.
8641 (dom_opt_dom_walker::before_dom_children): Corresponding changes.
8642 (dom_opt_dom_walker::after_dom_children): Do not lazily initialize
8643 m_dummy_cond anymore.
8644 (class dom_opt_dom_walker): Initialize m_dummy_cond member in the
8645 class ctor.
8646 (pass_dominator:execute): Build the dummy_cond here and pass it
8647 to the dom_opt_dom_walker ctor.
8648 (test_for_singularity): New function.
8649
8650 2017-09-30 Krister Walfridsson <krister.walfridsson@gmail.com>
8651 Maya Rashish <coypu@sdf.org>
8652
8653 * config.gcc (*-*-netbsd*): New variable nbsd_tm_file containing
8654 netbsd.h, netbsd-stdint.h, and netbsd-elf.h.
8655 (alpha*-*-netbsd*) Use nbsd_tm_file.
8656 (arm*-*-netbsdelf*) Likewise.
8657 (i[34567]86-*-netbsdelf*) Likewise.
8658 (x86_64-*-netbsd*) Likewise.
8659 (mips*-*-netbsd*) Likewise.
8660 (powerpc-*-netbsd*) Likewise.
8661 (sh*-*-netbsd*) Likewise.
8662 (sparc-*-netbsdelf*) Likewise.
8663 (sparc64-*-netbsd*) Likewise.
8664 (m68k*-*-netbsdelf*) Use nbsd_tm_file and add CHAR_FAST8/SHORT_FAST16
8665 to tm_defines.
8666 (vax-*-netbsdelf*) Likewise.
8667 * config/netbsd-stdint.h (INT_FAST8_TYPE): Check CHAR_FAST8.
8668 (UINT_FAST8_TYPE) Likewise.
8669 (INT_FAST16_TYPE) Check CHAR_FAST16.
8670 (UINT_FAST16_TYPE) Likewise.
8671
8672 2017-09-30 Jakub Jelinek <jakub@redhat.com>
8673
8674 PR target/82361
8675 * config/i386/i386.md
8676 (TARGET_USE_8BIT_IDIV zext divmodsi4 splitter): New define_split.
8677 (divmodsi4_zext_1, divmodsi4_zext_2, *divmodsi4_zext_1,
8678 *divmodsi4_zext_2): New define_insn_and_split.
8679 (*divmodsi4_noext_zext_1, *divmodsi4_noext_zext_2): New define_insn.
8680 (TARGET_USE_8BIT_IDIV zext udivmodsi4 splitter): New define_split.
8681 (udivmodsi4_zext_1, udivmodsi4_zext_2, *udivmodsi4_zext_1,
8682 *udivmodsi4_zext_2, *udivmodsi4_pow2_zext_1, *udivmodsi4_pow2_zext_2):
8683 New define_insn_and_split.
8684 (*udivmodsi4_noext_zext_1, *udivmodsi4_noext_zext_2): New define_insn.
8685 * config/i386/i386.c (ix86_split_idivmod): Handle operands[0] or
8686 operands[1] having DImode when mode is SImode.
8687
8688 * config/i386/i386.c (ix86_split_idivmod): Use mode instead of
8689 always SImode for DIV and MOD in REG_EQUAL notes.
8690
8691 2017-09-29 Yury Gribov <tetra2005@gmail.com>
8692
8693 PR middle-end/82319
8694 * match.pd: Fix handling of NaNs in pattern.
8695
8696 2017-09-29 Jeff Law <law@redhat.com>
8697
8698 * sbitmap.c (bitmap_bit_in_range_p): New function.
8699 * sbitmap.h (bitmap_bit_in_range_p): Prototype.
8700 * tree-ssa-dse.c (live_bytes_read): New function.
8701 (dse_classify_store): Ignore reads of dead bytes.
8702
8703 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix
8704 typos and whitespace errors.
8705 * config/i386/predicates.md (address_no_seg_operand): Likewise.
8706 * config/s390/s390.c (s390_emit_prologue): Likewise.
8707
8708 2017-09-29 Vladimir Makarov <vmakarov@redhat.com>
8709
8710 PR target/81481
8711 * ira-costs.c (scan_one_insn): Don't take into account PIC equiv
8712 with a symbol for LRA.
8713
8714 2017-09-29 Vladimir Makarov <vmakarov@redhat.com>
8715
8716 PR rtl-optimization/82338
8717 * lra-constraints.c (inherit_in_ebb): Check usage_insns check.
8718
8719 2017-09-29 Alexander Monakov <amonakov@ispras.ru>
8720
8721 * genmodes.c (calc_wider_mode): Suppress qsort macro.
8722 * system.h [CHECKING_P] (qsort): Redirect to qsort_chk.
8723 (qsort_chk): Declare.
8724 * vec.c [CHECKING_P] (qsort_chk_error): New static function.
8725 (qsort_chk): New function.
8726
8727 2017-09-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8728
8729 PR tree-optimization/82337
8730 * gimple-ssa-strength-reduction.c (find_phi_def): Don't record a
8731 phi definition if the PHI result appears in an abnormal PHI.
8732 (find_basis_for_base_expr): Don't record a basis if the LHS of the
8733 basis appears in an abnormal PHI.
8734
8735 2017-09-29 Richard Biener <rguenther@suse.de>
8736
8737 * graphite-isl-ast-to-gimple.c
8738 (translate_isl_ast_to_gimple::set_codegen_error): New function.
8739 (binary_op_to_tree): Use it.
8740 (get_rename_from_scev): Likewise.
8741 (copy_loop_phi_nodes): Likewise.
8742 (copy_bb_and_scalar_dependences): Likewise.
8743 (translate_pending_phi_nodes): Likewise.
8744
8745 2017-09-29 Jakub Jelinek <jakub@redhat.com>
8746
8747 PR target/82339
8748 * config/i386/i386.md (*movdi_internal peephole2): New -Os peephole
8749 for movabsq $(i32 << shift), r64.
8750
8751 2017-09-28 Uros Bizjak <ubizjak@gmail.com>
8752
8753 * config/i386/i386.c (ix86_print_operand_address_as): Do not check
8754 index when encoding %esp as %rsp to avoid 0x67 prefix.
8755
8756 2017-09-28 Sergey Shalnov <Sergey.Shalnov@intel.com>
8757
8758 * config/i386/i386.md (*movsf_internal, *movdf_internal):
8759 Return 256-bit AVX modes for TARGET_PREFER_AVX256.
8760
8761 2017-09-28 Thomas Preud'homme <thomas.preudhomme@arm.com>
8762
8763 * config/arm/arm.c (arm_option_override): Forbid ARMv8-M Security
8764 Extensions with more than 16 double VFP registers.
8765 (cmse_nonsecure_entry_clear_before_return): Remove second entry of
8766 to_clear_mask and all code related to it. Replace the remaining
8767 entry by a sbitmap and adapt code accordingly.
8768
8769 2017-09-28 Henry Linjamäki <henry.linjamaki@parmance.com>
8770
8771 * brig-builtins.def: Change pure attributes to const.
8772
8773 2017-09-28 Joseph Myers <joseph@codesourcery.com>
8774
8775 * config.gcc (default_gnu_indirect_function): Default to yes for
8776 sparc*-*-linux* with glibc.
8777
8778 2017-09-28 Joseph Myers <joseph@codesourcery.com>
8779
8780 * config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
8781 (aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
8782 when creating .init_array and .fini_array sections with priority
8783 specified.
8784
8785 2017-09-27 Christophe Lyon <christophe.lyon@linaro.org>
8786
8787 PR target/71727
8788 * config/aarch64/aarch64.c
8789 (aarch64_builtin_support_vector_misalignment): Always return false
8790 when misalignment is unknown.
8791
8792 2017-09-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
8793
8794 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Revise
8795 this function to return false if the definition used by the swap
8796 instruction is artificial, or if the memory address from which the
8797 constant value is loaded is not represented by a base address held
8798 in a register or if the base address register is a frame or stack
8799 pointer. Additionally, return false if the base address of the
8800 loaded constant is a SYMBOL_REF but is not considered to be a
8801 constant.
8802 (replace_swapped_load_constant): New function.
8803 (rs6000_analyze_swaps): Add a new pass to replace a swap of a
8804 loaded constant vector with a load of a swapped constant vector.
8805
8806 2017-09-27 Carl Love <cel@us.ibm.com>
8807
8808 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
8809 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
8810 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
8811 fctiw instruction.
8812
8813 2017-09-27 Alexander Monakov <amonakov@ispras.ru>
8814
8815 * haifa-sched.c (autopref_rank_for_schedule): Order 'irrelevant' insns
8816 first, always call autopref_rank_data otherwise.
8817
8818 2017-09-27 Richard Biener <rguenther@suse.de>
8819
8820 * graphite-scop-detection.c (find_scop_parameters): Move
8821 loop bound handling ...
8822 (gather_bbs::before_dom_children): ... here, avoiding the need
8823 to build scop_info->loop_nest.
8824 (record_loop_in_sese): Remove.
8825 * sese.h (sese_info_t::loop_nest): Remove.
8826 * sese.c (new_sese_info): Do not allocate loop_nest.
8827 (free_sese_info): Do not free loop_nest.
8828
8829 2017-09-27 Jakub Jelinek <jakub@redhat.com>
8830
8831 PR c++/82159
8832 * gimplify.c (gimplify_modify_expr): Don't optimize away zero sized
8833 lhs from calls if the lhs has addressable type.
8834
8835 2017-09-27 Richard Biener <rguenther@suse.de>
8836
8837 * graphite.h (scop::max_alias_set): New member.
8838 * graphite-scop-detection.c: Remove references to non-existing
8839 --param in comments.
8840 (build_alias_sets): Record the maximum alias set used for drs.
8841 (build_scops): Support zero as unlimited for
8842 --param graphite-max-arrays-per-scop.
8843 * graphite-sese-to-poly.c (add_scalar_version_numbers): Remove
8844 and inline into ...
8845 (build_poly_sr_1): ... here. Compute alias set based on the
8846 maximum alias set used for drs rather than
8847 PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP
8848
8849 2017-09-27 Richard Biener <rguenther@suse.de>
8850
8851 * graphite-optimize-isl.c (get_schedule_for_node_st): Allow
8852 --param loop-block-tile-size=0 to disable tiling.
8853
8854 2017-09-27 Richard Biener <rguenther@suse.de>
8855
8856 * doc/invoke.texi (graphite-max-bbs-per-function): Remove.
8857 (graphite-max-nb-scop-params): Document special value zero.
8858 * domwalk.h (dom_walker::STOP): New symbolical constant.
8859 (dom_walker::dom_walker): Add optional parameter for bb to
8860 RPO mapping.
8861 (dom_walker::~dom_walker): Declare.
8862 (dom_walker::before_dom_children): Document STOP return value.
8863 (dom_walker::m_user_bb_to_rpo): New member.
8864 (dom_walker::m_bb_to_rpo): Likewise.
8865 * domwalk.c (dom_walker::dom_walker): Compute bb to RPO
8866 mapping here if not provided by the user.
8867 (dom_walker::~dom_walker): Free bb to RPO mapping if not
8868 provided by the user.
8869 (dom_walker::STOP): Define.
8870 (dom_walker::walk): Do not compute bb to RPO mapping here.
8871 Support STOP return value from before_dom_children to stop
8872 walking.
8873 * graphite-optimize-isl.c (optimize_isl): If the schedule
8874 is the same still generate code if -fgraphite-identity
8875 or -floop-parallelize-all are given.
8876 * graphite-scop-detection.c: Include cfganal.h.
8877 (gather_bbs::gather_bbs): Get and pass through bb to RPO
8878 mapping.
8879 (gather_bbs::before_dom_children): Return STOP for BBs
8880 not in the region.
8881 (build_scops): Compute bb to RPO mapping and pass it to
8882 the domwalk. Treat --param graphite-max-nb-scop-params=0
8883 as not limiting the number of params.
8884 * graphite.c (graphite_initialize): Remove limit on the
8885 number of basic-blocks in a function.
8886 * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Remove.
8887 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Adjust to documented
8888 default value of 10.
8889
8890 2017-09-26 Michael Meissner <meissner@linux.vnet.ibm.com>
8891
8892 * config/rs6000/vsx.md (peephole for optimizing move SF to GPR):
8893 Adjust code to eliminate needing to do the shift right 32-bits
8894 operation after XSCVDPSPN.
8895
8896 2017-09-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8897
8898 * match.pd ((X / Y) == 0 -> X < Y): New pattern.
8899 ((X / Y) != 0 -> X >= Y): Likewise.
8900
8901 2017-09-26 Carl Love <cel@us.ibm.com>
8902
8903 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_XL_LEN_R,
8904 P9V_BUILTIN_VEC_XST_LEN_R): Add support for builtins
8905 vector unsigned char vec_xl_len_r (unsigned char *, size_t);
8906 void vec_xst_len_r (vector unsigned char, unsigned char *, size_t);
8907 * config/rs6000/altivec.h (vec_xl_len_r, vec_xst_len_r): Add defines.
8908 * config/rs6000/rs6000-builtin.def (XL_LEN_R, XST_LEN_R): Add
8909 definitions and overloading.
8910 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case
8911 statement for P9V_BUILTIN_XST_LEN_R.
8912 (altivec_init_builtins): Add def_builtin for P9V_BUILTIN_STXVLL.
8913 * config/rs6000/vsx.md (lxvll, stxvll, xl_len_r, xst_len_r): Add
8914 define_expand and define_insn for the instructions and builtins.
8915 * doc/extend.texi: Update the built-in documentation file for the new
8916 built-in functions.
8917 * config/rs6000/altivec.md (altivec_lvsl_reg, altivec_lvsr_reg): Add
8918 define_insn for the instructions
8919
8920 2017-09-26 Krister Walfridsson <krister.walfridsson@gmail.com>
8921
8922 PR target/39570
8923 * gcc/config/netbsd-protos.h: New file.
8924 * gcc/config/netbsd.c: New file.
8925 * gcc/config/netbsd.h (SUBTARGET_INIT_BUILTINS): Define.
8926 * gcc/config/t-netbsd: New file.
8927 * gcc/config.gcc (tm_p_file): Add netbsd-protos.h.
8928 (tmake_file) Add t-netbsd.
8929 (extra_objs) Add netbsd.o.
8930
8931 2017-09-26 Janus Weil <janus@gcc.gnu.org>
8932
8933 PR fortran/82143
8934 PR fortran/82324
8935 * doc/sourcebuild.texi: Document fortran_real_10 and fortran_real_16.
8936
8937 2017-09-26 Michael Meissner <meissner@linux.vnet.ibm.com>
8938
8939 * config/rs6000/rs6000.md (extendsi<mode>2): Add a splitter to do
8940 sign extension from a vector register to a GPR by doing a 32-bit
8941 direct move and then an EXTSW.
8942 (extendsi<mode>2 splitter): Likewise.
8943 (movsi_from_sf): Adjust code to eliminate doing a 32-bit shift
8944 right or vector extract after doing XSCVDPSPN. Use
8945 zero_extendsidi2 instead of p8_mfvsrd_4_disf to move the value to
8946 the GPRs.
8947 (movdi_from_sf_zero_ext): Likewise.
8948 (reload_gpr_from_vsxsf): Likewise.
8949 (p8_mfvsrd_4_disf): Delete, no longer used.
8950 (movsi_from_df): Optimize converting a DFmode to a SFmode, and
8951 then needing to move the SFmode to a GPR to use the XSCVDPSP
8952 instruction instead of FRSP and XSCVDPSPN.
8953 * config/rs6000/vsx.md (vsx_xscvspdp_scalar2): Move insn so that
8954 it is adjacent to the other XSCVSPDP insns.
8955 (vsx_xscvdpsp_scalar): Use "ww" constraint instead of "f" to allow
8956 SFmode to be in traditional Altivec registers.
8957 (vsx_xscvdpspn): Eliminate useless alternative constraint.
8958 (vsx_xscvspdpn): Likewise.
8959 (vsx_xscvspdpn_scalar): Likewise.
8960
8961 2017-09-26 Martin Jambor <mjambor@suse.cz>
8962
8963 * tree-sra.c (compare_access_positions): Put integral types first,
8964 stabilize sorting of integral types, remove conditions putting
8965 non-full-precision integers last.
8966 (sort_and_splice_var_accesses): Disable scalarization if a
8967 non-integert would be represented by a non-full-precision integer.
8968
8969 2017-09-26 Joseph Myers <joseph@codesourcery.com>
8970
8971 * config/microblaze/linux.h (TARGET_ASM_FILE_END): Likewise.
8972 * config/pa/pa.h (NEED_INDICATE_EXEC_STACK): Likewise.
8973 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Likewise.
8974 * config/pa/pa.c (pa_hpux_file_end): Rename to pa_file_end.
8975 Define unconditionally, with [ASM_OUTPUT_EXTERNAL_REAL]
8976 conditionals inside the function instead of around it. Call
8977 file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK.
8978 (TARGET_ASM_FILE_END): Define unconditionally to pa_file_end.
8979
8980 2017-09-26 Richard Biener <rguenther@suse.de>
8981
8982 * graphite-scop-detection.c (scop_detection::build_scop_depth): Rewrite,
8983 fold in ...
8984 (scop_detection::build_scop_breadth): ... this. Removed.
8985 (scop_detection::loop_is_valid_in_scop): Fold into single caller.
8986 (scop_detection::harmful_stmt_in_bb): Likewise.
8987 (scop_detection::graphite_can_represent_stmt): Likewise.
8988 (scop_detection::loop_body_is_valid_scop): Likewise. Remove recursion.
8989 (scop_detection::can_represent_loop): Remove recursion, fold in ...
8990 (scop_detection::can_represent_loop_1): ... this. Removed.
8991 (scop_detection::harmful_loop_in_region): Simplify after inlining
8992 the above and remove more quadraticness.
8993 (build_scops): Adjust.
8994 * tree-data-ref.c (loop_nest_has_data_refs): Remove pointless
8995 quadraticness.
8996
8997 2017-09-26 Jakub Jelinek <jakub@redhat.com>
8998
8999 PR target/82267
9000 * config/i386/i386.c (ix86_print_operand_address_as): Only test
9001 REGNO (base) == SP_REG if base is a REG.
9002
9003 PR middle-end/35691
9004 * tree-ssa-reassoc.c (update_range_test): Dump r->exp each time
9005 if it is different SSA_NAME.
9006 (optimize_range_tests_cmp_bitwise): New function.
9007 (optimize_range_tests): Call it.
9008
9009 2017-09-26 Richard Biener <rguenther@suse.de>
9010
9011 PR tree-optimization/82321
9012 * graphite.c (canonicalize_loop_closed_ssa): Properly check
9013 for the def being inside the loop.
9014
9015 2017-09-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9016
9017 * config/s390/vx-builtins.md ("vmslg"): Add missing operand in
9018 assembler output.
9019 * config/s390/s390-builtins.def: Fix constraint on op4.
9020
9021 2017-09-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9022
9023 * config/s390/s390.c (s390_expand_vec_compare): Use the new mode
9024 independent expanders.
9025 * config/s390/vector.md ("vec_cmpuneq", "vec_cmpltgt")
9026 ("vec_ordered", "vec_unordered"): New expanders.
9027
9028 2017-09-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9029
9030 * config/s390/s390.c (s390_preferred_simd_mode): Return V4SFmode
9031 for SFmode.
9032
9033 2017-09-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9034
9035 * config/s390/vector.md ("vec_unpacks_low_v16qi"): Rename to
9036 vec_unpacks_lo_v16qi.
9037 ("vec_unpacku_low_v16qi"): Rename to vec_unpacku_lo_v16qi.
9038
9039 2017-09-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9040
9041 * config/s390/vector.md ("vec_unpacks_lo_v4sf")
9042 ("vec_unpacks_hi_v4sf", "vec_unpacks_lo_v2df")
9043 ("vec_unpacks_hi_v2df", "vec_pack_trunc_v2df"): New expanders.
9044
9045 2017-09-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9046
9047 * config/s390/predicates.md ("const_shift_by_byte_operand"): New
9048 predicate.
9049 * config/s390/vector.md ("*vec_srb<mode>"): Change modes to V_128
9050 and V16QI.
9051 ("*vec_slb<mode>"): New insn pattern.
9052 ("vec_shr_<mode>"): New expander.
9053 * config/s390/vx-builtins.md ("vec_slb<mode>"): Turn into expander
9054 and force the shift count operand to V16QImode.
9055 ("vec_srb<mode>"): Set shift count mode to V16QI.
9056
9057 2017-09-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9058
9059 * config/s390/vector.md ("vec_widen_umult_lo_<mode>")
9060 ("vec_widen_umult_hi_<mode>", "vec_widen_smult_lo_<mode>")
9061 ("vec_widen_smult_hi_<mode>"): New expander definitions.
9062
9063 2017-09-26 Richard Earnshaw <rearnsha@arm.com>
9064
9065 PR target/82175
9066 * config/arm/arm.h (DRIVER_SELF_SPECS): Separate sub-rules with commas.
9067
9068 2017-09-26 Richard Biener <rguenther@suse.de>
9069
9070 PR tree-optimization/82320
9071 * tree-ssa-sccvn.c (set_ssa_val_to): Changing undef to undef
9072 isn't a change.
9073
9074 2017-09-25 Jeff Law <law@redhat.com>
9075
9076 * config/rs6000/rs6000-protos.h (output_probe_stack_range): Update
9077 prototype for new argument.
9078 * config/rs6000/rs6000.c (rs6000_emit_allocate_stack_1): New function,
9079 mostly extracted from rs6000_emit_allocate_stack.
9080 (rs6000_emit_probe_stack_range_stack_clash): New function.
9081 (rs6000_emit_allocate_stack): Call
9082 rs6000_emit_probe_stack_range_stack_clash as needed.
9083 (rs6000_emit_probe_stack_range): Add additional argument
9084 to call to gen_probe_stack_range{si,di}.
9085 (output_probe_stack_range): New.
9086 (output_probe_stack_range_1): Renamed from output_probe_stack_range.
9087 (output_probe_stack_range_stack_clash): New.
9088 (rs6000_emit_prologue): Emit notes into dump file as requested.
9089 * rs6000.md (allocate_stack): Handle -fstack-clash-protection.
9090 (probe_stack_range<P:mode>): Operand 0 is now early-clobbered.
9091 Add additional operand and pass it to output_probe_stack_range.
9092
9093 2017-09-25 Bin Cheng <bin.cheng@arm.com>
9094
9095 PR tree-optimization/82163
9096 * tree-ssa-loop-manip.h (verify_loop_closed_ssa): New parameter.
9097 (checking_verify_loop_closed_ssa): New parameter.
9098 * tree-ssa-loop-manip.c (check_loop_closed_ssa_use): Delete.
9099 (check_loop_closed_ssa_stmt): Delete.
9100 (check_loop_closed_ssa_def, check_loop_closed_ssa_bb): New functions.
9101 (verify_loop_closed_ssa): Check loop closed ssa form for LOOP.
9102 (tree_transform_and_unroll_loop): Check loop closed ssa form only for
9103 changed loops.
9104
9105 2017-09-25 Pekka Jaaskelainen <pekka@parmance.com>
9106
9107 * brig-builtins.def: Treat HSAIL barrier builtins as
9108 setjmp/longjump style functions.
9109
9110 2017-09-25 Richard Sandiford <richard.sandiford@linaro.org>
9111
9112 * target.def (constant_alignment): New hook.
9113 * defaults.h (CONSTANT_ALIGNMENT): Delete.
9114 * doc/tm.texi.in (CONSTANT_ALIGNMENT): Replace with...
9115 (TARGET_CONSTANT_ALIGNMENT): ...this new hook.
9116 * doc/tm.texi: Regenerate.
9117 * targhooks.h (default_constant_alignment): Declare.
9118 (constant_alignment_word_strings): Likewise.
9119 * targhooks.c (default_constant_alignment): New function.
9120 (constant_alignment_word_strings): Likewise.
9121 * builtins.c (get_object_alignment_2): Use targetm.constant_alignment
9122 instead of CONSTANT_ALIGNMENT.
9123 * varasm.c (align_variable, get_variable_align, build_constant_desc)
9124 (force_const_mem): Likewise.
9125 * config/aarch64/aarch64.h (CONSTANT_ALIGNMENT): Delete.
9126 * config/aarch64/aarch64.c (aarch64_constant_alignment): New function.
9127 (aarch64_classify_address): Call it instead of CONSTANT_ALIGNMENT.
9128 (TARGET_CONSTANT_ALIGNMENT): Redefine.
9129 * config/alpha/alpha.h (CONSTANT_ALIGNMENT): Delete commented-out
9130 definition.
9131 * config/arc/arc.h (CONSTANT_ALIGNMENT): Delete.
9132 * config/arc/arc.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9133 constant_alignment_word_strings.
9134 * config/arm/arm.h (CONSTANT_ALIGNMENT_FACTOR): Delete.
9135 (CONSTANT_ALIGNMENT): Likewise.
9136 * config/arm/arm.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9137 (arm_constant_alignment): New function.
9138 * config/bfin/bfin.h (CONSTANT_ALIGNMENT): Delete.
9139 * config/bfin/bfin.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9140 constant_alignment_word_strings.
9141 * config/cr16/cr16.h (CONSTANT_ALIGNMENT): Delete.
9142 * config/cr16/cr16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9143 constant_alignment_word_strings.
9144 * config/cris/cris.h (CONSTANT_ALIGNMENT): Delete.
9145 * config/cris/cris.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9146 (cris_constant_alignment): New function.
9147 * config/epiphany/epiphany.h (CONSTANT_ALIGNMENT): Delete.
9148 * config/epiphany/epiphany.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9149 (epiphany_constant_alignment): New function.
9150 * config/fr30/fr30.h (CONSTANT_ALIGNMENT): Delete.
9151 * config/fr30/fr30.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9152 constant_alignment_word_strings.
9153 * config/frv/frv.h (CONSTANT_ALIGNMENT): Delete.
9154 * config/frv/frv.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9155 constant_alignment_word_strings.
9156 * config/ft32/ft32.h (CONSTANT_ALIGNMENT): Delete.
9157 * config/ft32/ft32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9158 constant_alignment_word_strings.
9159 * config/i386/i386.h (CONSTANT_ALIGNMENT): Delete.
9160 * config/i386/i386-protos.h (ix86_constant_alignment): Delete.
9161 * config/i386/i386.c (ix86_constant_alignment): Make static.
9162 Use the same interface as the target hook.
9163 (TARGET_CONSTANT_ALIGNMENT): Redefine.
9164 * config/ia64/ia64.h (CONSTANT_ALIGNMENT): Delete.
9165 * config/ia64/ia64.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9166 constant_alignment_word_strings.
9167 * config/iq2000/iq2000.h (CONSTANT_ALIGNMENT): Delete.
9168 * config/iq2000/iq2000.c (iq2000_constant_alignment): New function.
9169 (TARGET_CONSTANT_ALIGNMENT): Redefine.
9170 * config/lm32/lm32.h (CONSTANT_ALIGNMENT): Delete.
9171 * config/lm32/lm32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9172 constant_alignment_word_strings.
9173 * config/m32r/m32r.h (CONSTANT_ALIGNMENT): Delete.
9174 * config/m32r/m32r.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9175 constant_alignment_word_strings.
9176 * config/mcore/mcore.h (CONSTANT_ALIGNMENT): Delete.
9177 * config/mcore/mcore.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9178 constant_alignment_word_strings.
9179 * config/microblaze/microblaze.h (CONSTANT_ALIGNMENT): Delete.
9180 * config/microblaze/microblaze.c (microblaze_constant_alignment):
9181 New function.
9182 (TARGET_CONSTANT_ALIGNMENT): Redefine.
9183 * config/mips/mips.h (CONSTANT_ALIGNMENT): Delete.
9184 * config/mips/mips.c (mips_constant_alignment): New function.
9185 (TARGET_CONSTANT_ALIGNMENT): Redefine.
9186 * config/mmix/mmix.h (CONSTANT_ALIGNMENT): Delete.
9187 * config/mmix/mmix-protos.h (mmix_constant_alignment): Delete.
9188 * config/mmix/mmix.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9189 (mmix_constant_alignment): Make static. Use the same interface
9190 as the target hook.
9191 * config/moxie/moxie.h (CONSTANT_ALIGNMENT): Delete.
9192 * config/moxie/moxie.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9193 constant_alignment_word_strings.
9194 * config/nios2/nios2.h (CONSTANT_ALIGNMENT): Delete.
9195 * config/nios2/nios2.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9196 constant_alignment_word_strings.
9197 * config/pa/pa.h (CONSTANT_ALIGNMENT): Delete.
9198 * config/pa/pa.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9199 constant_alignment_word_strings.
9200 * config/powerpcspe/powerpcspe.h (CONSTANT_ALIGNMENT): Delete.
9201 * config/powerpcspe/powerpcspe.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9202 (rs6000_constant_alignment): New function.
9203 * config/riscv/riscv.h (CONSTANT_ALIGNMENT): Delete.
9204 * config/riscv/riscv.c (riscv_constant_alignment): New function.
9205 (TARGET_CONSTANT_ALIGNMENT): Redefine.
9206 * config/rs6000/rs6000.h (CONSTANT_ALIGNMENT): Delete.
9207 * config/rs6000/rs6000.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9208 (rs6000_constant_alignment): New function.
9209 * config/s390/s390.h (CONSTANT_ALIGNMENT): Delete.
9210 * config/s390/s390.c (s390_constant_alignment): New function.
9211 (TARGET_CONSTANT_ALIGNMENT): Redefine.
9212 * config/sh/sh.h (CONSTANT_ALIGNMENT): Delete.
9213 * config/sh/sh.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9214 constant_alignment_word_strings.
9215 * config/sparc/sparc.h (CONSTANT_ALIGNMENT): Delete.
9216 * config/sparc/sparc.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9217 (sparc_constant_alignment): New function.
9218 * config/spu/spu.h (CONSTANT_ALIGNMENT): Delete.
9219 * config/spu/spu.c (spu_constant_alignment): New function.
9220 (TARGET_CONSTANT_ALIGNMENT): Redefine.
9221 * config/stormy16/stormy16.h (CONSTANT_ALIGNMENT): Delete.
9222 * config/stormy16/stormy16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9223 constant_alignment_word_strings.
9224 * config/tilegx/tilegx.h (CONSTANT_ALIGNMENT): Delete.
9225 * config/tilegx/tilegx.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9226 constant_alignment_word_strings.
9227 * config/tilepro/tilepro.h (CONSTANT_ALIGNMENT): Delete.
9228 * config/tilepro/tilepro.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
9229 constant_alignment_word_strings.
9230 * config/visium/visium.h (CONSTANT_ALIGNMENT): Delete.
9231 * config/visium/visium.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9232 (visium_constant_alignment): New function.
9233 * config/xtensa/xtensa.h (CONSTANT_ALIGNMENT): Delete.
9234 * config/xtensa/xtensa.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
9235 (xtensa_constant_alignment): New function.
9236 * system.h (CONSTANT_ALIGNMENT): Poison.
9237
9238 2017-09-25 Will Schmidt <will_schmidt@vnet.ibm.com>
9239
9240 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
9241 for early folding of vector stores (ALTIVEC_BUILTIN_ST_*).
9242 (rs6000_builtin_valid_without_lhs): New helper function.
9243 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9244 Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_ST.
9245
9246 2017-09-25 Richard Sandiford <richard.sandiford@linaro.org>
9247
9248 * target.h (vec_perm_indices): Use unsigned short rather than
9249 unsigned char.
9250 (auto_vec_perm_indices): Likewise.
9251 * config/aarch64/aarch64.c (aarch64_vectorize_vec_perm_const_ok):
9252 Use unsigned int rather than unsigned char.
9253 * config/arm/arm.c (arm_vectorize_vec_perm_const_ok): Likewise.
9254
9255 2017-09-25 Richard Biener <rguenther@suse.de>
9256
9257 * cfgloop.h (sort_sibling_loops): Declare.
9258 * cfgloop.c (sort_sibling_loops_cmp): New helper.
9259 (sort_sibling_loops): New function sorting the sibling loop list
9260 in RPO order.
9261 * graphite.c (graphite_transform_loops): Sort sibling loops.
9262
9263 2017-09-25 Richard Sandiford <richard.sandifird@linaro.org>
9264
9265 * target.def (vec_perm_const_ok): Change sel parameter to
9266 vec_perm_indices.
9267 * optabs-query.c (can_vec_perm_p): Update accordingly.
9268 * doc/tm.texi: Regenerate.
9269 * config/aarch64/aarch64.c (expand_vec_perm_d): Change perm to
9270 auto_vec_perm_indices and remove separate nelt field.
9271 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
9272 (aarch64_evpc_ext, aarch64_evpc_rev, aarch64_evpc_dup)
9273 (aarch64_evpc_tbl, aarch64_expand_vec_perm_const_1)
9274 (aarch64_expand_vec_perm_const): Update accordingly.
9275 (aarch64_vectorize_vec_perm_const_ok): Likewise. Change sel
9276 to vec_perm_indices.
9277 * config/arm/arm.c (expand_vec_perm_d): Change perm to
9278 auto_vec_perm_indices and remove separate nelt field.
9279 (arm_evpc_neon_vuzp, arm_evpc_neon_vzip, arm_evpc_neon_vrev)
9280 (arm_evpc_neon_vtrn, arm_evpc_neon_vext, arm_evpc_neon_vtbl)
9281 (arm_expand_vec_perm_const_1, arm_expand_vec_perm_const): Update
9282 accordingly.
9283 (arm_vectorize_vec_perm_const_ok): Likewise. Change sel
9284 to vec_perm_indices.
9285 * config/i386/i386.c (ix86_vectorize_vec_perm_const_ok): Change
9286 sel to vec_perm_indices.
9287 * config/ia64/ia64.c (ia64_vectorize_vec_perm_const_ok): Likewise.
9288 * config/mips/mips.c (mips_vectorize_vec_perm_const_ok): Likewise.
9289 * config/powerpcspe/powerpcspe.c (rs6000_vectorize_vec_perm_const_ok):
9290 Likewise.
9291 * config/rs6000/rs6000.c (rs6000_vectorize_vec_perm_const_ok):
9292 Likewise.
9293
9294 2017-09-25 Pierre-Marie de Rodat <derodat@adacore.com>
9295
9296 PR debug/82155
9297 * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
9298 on the FUNCTION_DECL function context if it has a DIE that is a
9299 declaration.
9300
9301 2017-09-25 Richard Biener <rguenther@suse.de>
9302
9303 PR tree-optimization/82285
9304 * tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
9305 enumeral types.
9306
9307 2017-09-25 Tom de Vries <tom@codesourcery.com>
9308
9309 PR target/80035
9310 PR target/81069
9311 * config/nvptx/nvptx.c (nvptx_output_call_insn): Add exit after call to
9312 noreturn function.
9313
9314 2017-09-25 Richard Biener <rguenther@suse.de>
9315
9316 * graphite-optimize-isl.c (optimize_isl): Fail and dump if
9317 ISL errors other than isl_error_quota happen. Dump if the
9318 schedule is the same.
9319 * graphite-sese-to-poly.c (build_poly_scop): Fail on ISL
9320 errors instead of aborting inside ISL.
9321
9322 2017-09-25 Iain Sandoe <iain@codesourcery.com>
9323
9324 PR target/80556
9325 * config/i386/darwin.h (REAL_LIB_SPEC): New; put libSystem ahead
9326 of libgcc_eh for m64.
9327 * config/i386/darwin64.h: Likewise.
9328
9329 2017-09-25 Richard Biener <rguenther@suse.de>
9330
9331 PR middle-end/82144
9332 * dwarf2out.c (gen_enumeration_type_die): Do not add alignment
9333 attribute for incomplete types nor twice for complete ones.
9334
9335 2017-09-24 Uros Bizjak <ubizjak@gmail.com>
9336
9337 PR target/82267
9338 * config/i386/i386.c (ix86_print_operand_address_as): Encode
9339 %esp as %rsp to avoid 0x67 prefix if there is no index or base
9340 register.
9341
9342 2017-09-23 Uros Bizjak <ubizjak@gmail.com>
9343
9344 PR bootstrap/82306
9345 * config/i386/i386.opt (mprefer-avx256): Use
9346 ix86_target_flags variable.
9347 * config/i386/i386.c (ix86_target_string): Move
9348 -mprefer-avx256 to flag2_opts.
9349
9350 2017-09-22 Jakub Jelinek <jakub@redhat.com>
9351
9352 PR middle-end/35691
9353 * match.pd: Simplify x == -1 & y == -1 into (x & y) == -1
9354 and x != -1 | y != -1 into (x & y) != -1.
9355
9356 2017-09-22 Steve Ellcey <sellcey@cavium.com>
9357
9358 * config.gcc: Add new case statement to set
9359 default_gnu_indirect_function. Remove it from x86_64-*-linux*,
9360 i[34567]86-*, powerpc*-*-linux*spe*, powerpc*-*-linux*, s390-*-linux*,
9361 s390x-*-linux* case statements. Added aarch64 to the list of
9362 supported architectures.
9363
9364 2017-09-22 Richard Sandiford <richard.sandiford@linaro.org>
9365
9366 PR tree-optimization/82289
9367 * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Check
9368 STMT_VINFO_RELEVANT_P.
9369
9370 2017-09-22 Richard Sandiford <richard.sandiford@linaro.org>
9371 Alan Hayward <alan.hayward@arm.com>
9372 David Sherwood <david.sherwood@arm.com>
9373
9374 * tree-vrp.c (extract_range_from_multiplicative_op_1): Assert
9375 for VR_RANGE only; don't allow VR_ANTI_RANGE.
9376 (extract_range_from_binary_expr_1): Don't call
9377 extract_range_from_multiplicative_op_1 if !range_int_cst_p.
9378
9379 2017-09-22 Richard Sandiford <richard.sandiford@linaro.org>
9380 Alan Hayward <alan.hayward@arm.com>
9381 David Sherwood <david.sherwood@arm.com>
9382
9383 * target.def (preferred_vector_alignment): New hook.
9384 * doc/tm.texi.in (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): New
9385 hook.
9386 * doc/tm.texi: Regenerate.
9387 * targhooks.h (default_preferred_vector_alignment): Declare.
9388 * targhooks.c (default_preferred_vector_alignment): New function.
9389 * tree-vectorizer.h (dataref_aux): Add a target_alignment field.
9390 Expand commentary.
9391 (DR_TARGET_ALIGNMENT): New macro.
9392 (aligned_access_p): Update commentary.
9393 (vect_known_alignment_in_bytes): New function.
9394 * tree-vect-data-refs.c (vect_calculate_required_alignment): New
9395 function.
9396 (vect_compute_data_ref_alignment): Set DR_TARGET_ALIGNMENT.
9397 Calculate the misalignment based on the target alignment rather than
9398 the vector size.
9399 (vect_update_misalignment_for_peel): Use DR_TARGET_ALIGMENT
9400 rather than TYPE_ALIGN / BITS_PER_UNIT to update the misalignment.
9401 (vect_enhance_data_refs_alignment): Mask the byte misalignment with
9402 the target alignment, rather than masking the element misalignment
9403 with the number of elements in a vector. Also use the target
9404 alignment when calculating the maximum number of peels.
9405 (vect_find_same_alignment_drs): Use vect_calculate_required_alignment
9406 instead of TYPE_ALIGN_UNIT.
9407 (vect_duplicate_ssa_name_ptr_info): Remove stmt_info parameter.
9408 Measure DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT.
9409 (vect_create_addr_base_for_vector_ref): Update call accordingly.
9410 (vect_create_data_ref_ptr): Likewise.
9411 (vect_setup_realignment): Realign by ANDing with
9412 -DR_TARGET_MISALIGNMENT.
9413 * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Calculate
9414 the number of peels based on DR_TARGET_ALIGNMENT.
9415 * tree-vect-stmts.c (get_group_load_store_type): Compare the gap
9416 with the guaranteed alignment boundary when deciding whether
9417 overrun is OK.
9418 (vectorizable_mask_load_store): Interpret DR_MISALIGNMENT
9419 relative to DR_TARGET_ALIGNMENT instead of TYPE_ALIGN_UNIT.
9420 (ensure_base_align): Remove stmt_info parameter. Get the
9421 target base alignment from DR_TARGET_ALIGNMENT.
9422 (vectorizable_store): Update call accordingly. Interpret
9423 DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT instead of
9424 TYPE_ALIGN_UNIT.
9425 (vectorizable_load): Likewise.
9426
9427 2017-09-22 Richard Sandiford <richard.sandiford@linaro.org>
9428 Alan Hayward <alan.hayward@arm.com>
9429 David Sherwood <david.sherwood@arm.com>
9430
9431 * tree-vectorizer.h (vect_get_scalar_dr_size): New function.
9432 * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use it.
9433 (vect_enhance_data_refs_alignment): Likewise.
9434
9435 2017-09-22 Richard Earnshaw <richard.earnshaw@arm.com>
9436
9437 * config/arm/parsecpu.awk (fatal): Note that we've encountered an
9438 error. Only quit immediately if parsing is complete.
9439 (BEGIN): Initialize fatal_err and parse_done.
9440 (begin fpu, end fpu): Check number of arguments.
9441 (begin arch, end arch): Likewise.
9442 (begin cpu, end cpu): Likewise.
9443 (cname, tune for, tune flags, architecture, fpu, option): Likewise.
9444 (optalias): Likewise.
9445
9446 2017-09-22 Richard Earnshaw <richard.earnshaw@arm.com>
9447
9448 * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
9449 * config/arm/arm-isa.h: Delete. Move definitions to ...
9450 * arm-cpus.in: ... here. Use new feature and fgroup values.
9451 * config/arm/arm.c (arm_option_override): Use lower case for feature
9452 bit names.
9453 * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
9454 (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
9455 * config/arm/parsecpu.awk (END): Add new command 'isa'.
9456 (isa_pfx): Delete.
9457 (print_isa_bits_for): New function.
9458 (gen_isa): New function.
9459 (gen_comm_data): Use print_isa_bits_for.
9460 (define feature): New keyword.
9461 (define fgroup): New keyword.
9462 * config/arm/t-arm (TM_H): Remove.
9463 (GTM_H): Add arm-isa.h.
9464 (arm-isa.h): Add rule to generate file.
9465 * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
9466 case for feature bit names.
9467
9468 2017-09-22 Richard Biener <rguenther@suse.de>
9469
9470 * graphite-isl-ast-to-gimple.c (graphite_verify): Inline into
9471 single caller.
9472 (graphite_regenerate_ast_isl): Do not reset SCEV. Move debug
9473 print of no dependency loops ...
9474 * graphite.c (graphite_transform_loops): ... here.
9475 (canonicalize_loop_closed_ssa_form): Work from inner to outer
9476 loops.
9477 (same_close_phi_node, remove_duplicate_close_phi,
9478 make_close_phi_nodes_unique, defined_in_loop_p): Fold into ...
9479 (canonicalize_loop_closed_ssa): ... here and simplify.
9480 * graphite-optimize-isl.c: Include tree-vectorizer.h.
9481 (optimize_isl): Use dump_printf_loc to tell when we stopped
9482 optimizing because of an ISL timeout.
9483
9484 2017-09-22 Richard Biener <rguenther@suse.de>
9485
9486 PR tree-optimization/82291
9487 * tree-if-conv.c (predicate_mem_writes): Make sure to
9488 remove writes in blocks predicated with false.
9489
9490 2017-09-22 Richard Biener <rguenther@suse.de>
9491
9492 * sese.c: Include cfganal.h.
9493 (if_region_set_false_region): Remove.
9494 (create_if_region_on_edge): Likewise.
9495 (move_sese_in_condition): Re-implement without destroying
9496 dominators.
9497
9498 2017-09-22 Richard Biener <rguenther@suse.de>
9499
9500 * graphite-isl-ast-to-gimple.c (translate_pending_phi_nodes):
9501 Verify both BBs contain loop PHI nodes before dispatching to
9502 copy_loop_phi_args.
9503 (graphite_regenerate_ast_isl): Do not recompute dominators,
9504 do not verify three times. Restructure for clarity.
9505 * graphite-scop-detection.c (same_close_phi_node,
9506 remove_duplicate_close_phi, make_close_phi_nodes_unique,
9507 defined_in_loop_p, canonicalize_loop_closed_ssa,
9508 canonicalize_loop_closed_ssa_form): Simplify, remove excess
9509 checking and SSA rewrite, move to ...
9510 * graphite.c: ... here. Include ssa.h and tree-ssa-loop-manip.h.
9511 (graphite_initialize): Do not pass in ctx, do not reset the
9512 SCEV cache, compute only dominators.
9513 (graphite_transform_loops): Allocate ISL ctx after
9514 graphite_initialize. Call canonicalize_loop_closed_ssa_form.
9515 Maintain post-dominators only around build_scops.
9516 * sese.c (if_region_set_false_region): Make static. Free
9517 and recompute dominators.
9518 (move_sese_in_condition): Assert we don't get called with
9519 post-dominators computed.
9520 * sese.h (if_region_set_false_region): Remove.
9521
9522 2017-09-22 Sergey Shalnov <sergey.shalnov@intel.com>
9523
9524 * config/i386/sse.md ("mov<mode>_internal"): Use <sseinsnmode>
9525 mode attribute for TARGET_AVX512VL.
9526
9527 2017-09-21 Sergey Shalnov <sergey.shalnov@intel.com>
9528
9529 * config/i386/i386.opt (mprefer-avx256): New option.
9530 * config/i386/i386.c (ix86_target_string): Add -mprefer-avx256
9531 to flag_opts.
9532 (ix86_preferred_simd_mode): Return 256-bit AVX modes
9533 for TARGET_PREFER_AVX256.
9534 * doc/invoke.texi (x86 Options): Document -mprefer-avx256.
9535
9536 2017-09-21 Jeff Law <law@redhat.com>
9537
9538 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash):
9539 Fix dump output if the only stack space is for pushed registers.
9540
9541 2017-09-21 Richard Sandiford <richard.sandiford@linaro.org>
9542
9543 * config/spu/spu.c (spu_sched_adjust_cost): Update after renaming
9544 of insn_cost.
9545
9546 2017-09-21 Martin Sebor <msebor@redhat.com>
9547
9548 PR c/81882
9549 * doc/extend.texi (attribute ifunc): Avoid relying on ill-formed
9550 code (in C++) or code that triggers warnings.
9551
9552 2017-09-21 Eric Botcazou <ebotcazou@adacore.com>
9553
9554 * stor-layout.c (bit_from_pos): Do not distribute the conversion.
9555
9556 2017-09-21 Segher Boessenkool <segher@kernel.crashing.org>
9557
9558 * haifa-sched.c: Rename insn_cost to insn_sched_cost.
9559 * sched-rgn.c: Ditto.
9560 * sel-sched-ir.c: Ditto.
9561
9562 2017-09-21 Alexander Monakov <amonakov@ispras.ru>
9563
9564 * toplev.h (set_random_seed): Adjust return type.
9565 * toplev.c (init_local_tick): Move eager initialization of random_seed
9566 to get_random_seed. Adjust comment.
9567 (init_random_seed): Inline to get_random_seed, delete.
9568 (get_random_seed): Initialize random_seed lazily.
9569 (set_random_seed): Do not return previous value.
9570 (print_switch_value): Do not call get_random_seed.
9571
9572 2017-09-21 Evgeny Kudryashov <kudryashov@ispras.ru>
9573
9574 * cgraph.c (delete_function_version): New, broken out from...
9575 (cgraph_node::delete_function_version): ...here. Rename to
9576 cgraph_node::delete_function_version_by_decl. Update all uses.
9577 (cgraph_node::remove): Call delete_function_version.
9578
9579 2017-09-21 Jakub Jelinek <jakub@redhat.com>
9580
9581 PR sanitizer/81715
9582 * tree-inline.c (expand_call_inline): Emit clobber stmts for
9583 VAR_DECLs to which addressable non-volatile parameters are mapped
9584 and for id->retvar after the return value assignment. Clear
9585 id->retval and id->retbnd after inlining.
9586
9587 2017-09-21 Richard Biener <rguenther@suse.de>
9588
9589 PR tree-optimization/82276
9590 PR tree-optimization/82244
9591 * tree-vrp.c (build_assert_expr_for): Set
9592 SSA_NAME_OCCURS_IN_ABNORMAL_PHI if the variable we assert on
9593 has it set.
9594 (remove_range_assertions): Revert earlier change.
9595
9596 2017-09-21 Wilco Dijkstra <wdijkstr@arm.com>
9597
9598 PR target/71951
9599 * config/aarch64/aarch64.h (LIBGCC2_UNWIND_ATTRIBUTE): Define.
9600
9601 2017-09-21 Richard Biener <rguenther@suse.de>
9602
9603 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
9604 Restore valid IL after code generation errors.
9605 * graphite.c (graphite_transform_loops): Diagnose code
9606 generation issues as MSG_MISSED_OPTIMIZATION and continue
9607 with processing SCOPs.
9608
9609 2017-09-21 Richard Sandiford <richard.sandiford@linaro.org>
9610 Alan Hayward <alan.hayward@arm.com>
9611 David Sherwood <david.sherwood@arm.com>
9612
9613 * calls.c (compute_argument_addresses): Use simplify_gen_binary
9614 rather than choosing between plus_constant and gen_rtx_<CODE>.
9615 * expr.c (emit_push_insn): Likewise.
9616 (expand_expr_real_2): Likewise.
9617
9618 2017-09-21 Richard Sandiford <richard.sandiford@linaro.org>
9619 Alan Hayward <alan.hayward@arm.com>
9620 David Sherwood <david.sherwood@arm.com>
9621
9622 * loop-unroll.c (split_iv): Call copy_rtx on the step.
9623
9624 2017-09-21 Richard Sandiford <richard.sandiford@linaro.org>
9625 Alan Hayward <alan.hayward@arm.com>
9626 David Sherwood <david.sherwood@arm.com>
9627
9628 * tree.c (find_atomic_core_type): Check tree_fits_uhwi_p before
9629 calling tree_to_uhwi.
9630
9631 2017-09-21 Richard Sandiford <richard.sandiford@linaro.org>
9632 Alan Hayward <alan.hayward@arm.com>
9633 David Sherwood <david.sherwood@arm.com>
9634
9635 * tree-ssa-ccp.c (get_value_for_expr): Use a positive test for
9636 INTEGER_CST rather than a negative test for ADDR_EXPR.
9637
9638 2017-09-21 Richard Sandiford <richard.sandiford@linaro.org>
9639 Alan Hayward <alan.hayward@arm.com>
9640 David Sherwood <david.sherwood@arm.com>
9641
9642 * tree-vrp.c (extract_range_from_binary_expr_1): Check
9643 int_cst_rangeN before calling value_range_constant_singleton (&vrN).
9644
9645 2017-09-21 Richard Biener <rguenther@suse.de>
9646
9647 PR tree-optimization/71351
9648 * graphite-isl-ast-to-gimple.c (translate_isl_ast_to_gimple::
9649 graphite_create_new_loop_guard): Remove, fold remaining parts
9650 into caller ...
9651 (translate_isl_ast_node_for): ... here and simplify.
9652
9653 2017-09-21 Jakub Jelinek <jakub@redhat.com>
9654
9655 PR target/82260
9656 * config/i386/i386.md (*movqi_internal): Replace (=q,q) alternative
9657 with (=Q,Q), (=R,R) and (=r,r) alternatives, only enable the
9658 latter two for 64-bit, renumber alternatives, for -Os imov (=q,n)
9659 alternative always use QI mode, for -Os imov (=R,R) alternative
9660 always use SI mode, for imov (=Q,Q) or (=r,r) alternatives
9661 ignore -Os.
9662
9663 2017-09-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9664 Jeff Law <law@redhat.com>
9665
9666 * config/s390/s390.c (MIN_UNROLL_PROBES): Define.
9667 (allocate_stack_space): New function, partially extracted from
9668 s390_emit_prologue.
9669 (s390_emit_prologue): Track offset to most recent stack probe.
9670 Code to allocate space moved into allocate_stack_space.
9671 Dump actions when no stack is allocated.
9672 (s390_prologue_plus_offset): New function.
9673 (s390_emit_stack_probe): Likewise.
9674
9675 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
9676
9677 * common.opt (Wa, Wl, Wp, g, gz=): Add
9678 RejectNegative.
9679 (gno-column-info): Remove.
9680 (gcolumn-info): Drop RejectNegative.
9681 (gno-): New prefix.
9682 (gno-record-gcc-switches): Remove.
9683 (grecord-gcc-switches): Drop RejectNegative.
9684 (gno-split-dwarf): Remove.
9685 (gsplit-dwarf): Drop RejectNegative.
9686 (gno-strict-dwarf): Remove.
9687 (gstrict-dwarf): Drop RejectNegative.
9688 * config/darwin.opt (gfull, gused): Add RejectNegative.
9689 * dwarf2out.c (gen_producer_string): Drop
9690 gno-record-gcc-switches handler.
9691 * optc-gen.awk: Add g to prefixes with negative forms.
9692 * opts-common.c (remapping_prefix_p): New.
9693 (find_opt): Check it.
9694 (generate_canonical_option): Test g prefix.
9695 (option_map): Add -gno- mapping.
9696 (add_misspelling_candidates): Check remapping_prefix_p.
9697
9698 2017-09-20 Jeff Law <law@redhat.com>
9699
9700 * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Fix
9701 thinko in stack clash protection support.
9702
9703 * explow.c (compute_stack_clash_protection_loop_data): Use
9704 CONST_INT_P instead of explicit test. Verify object is a
9705 CONST_INT_P before looking at INTVAL.
9706 (anti_adjust_stack_and_probe_stack_clash): Use CONST_INT_P
9707 instead of explicit test.
9708
9709 2017-09-20 Segher Boessenkool <segher@kernel.crashing.org>
9710
9711 PR target/77687
9712 * config/rs6000/rs6000.md (stack_restore_tie): Store to a scratch
9713 address instead of to r1 and r11.
9714
9715 2017-09-20 Sebastian Peryt <sebastian.peryt@intel.com>
9716
9717 * config.gcc: Support "knm".
9718 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "knm".
9719 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9720 PROCESSOR_KNM.
9721 * config/i386/i386.c (m_KNM): Define.
9722 (processor_target_table): Add "knm".
9723 (PTA_KNM): Define.
9724 (ix86_option_override_internal): Add "knm".
9725 (ix86_issue_rate): Add PROCESSOR_KNM.
9726 (ix86_adjust_cost): Ditto.
9727 (ia32_multipass_dfa_lookahead): Ditto.
9728 (get_builtin_code_for_version): Handle PROCESSOR_KNM.
9729 (fold_builtin_cpu): Add M_INTEL_KNM.
9730 * config/i386/i386.h (processor_costs): Define TARGET_KNM.
9731 (processor_type): Add PROCESSOR_KNM.
9732 * config/i386/x86-tune.def: Add m_KNM.
9733 * doc/invoke.texi: Add knm as x86 -march=/-mtune= CPU type.
9734
9735 2017-09-20 Richard Biener <rguenther@suse.de>
9736
9737 PR tree-optimization/80213
9738 * graphite-scop-detection.c (trivially_empty_bb_p): Labels
9739 are allowed in empty BBs as well.
9740 (canonicalize_loop_closed_ssa): Also look for other complex
9741 edges.
9742 (scop_detection::get_sese): Include the loop-closed PHI block
9743 in loop SESEs.
9744 (scop_detection::merge_sese): Remove code adding extra blocks.
9745 (scop_detection::region_has_one_loop): Adjust for get_sese changes.
9746 (build_scops): Assert the final returned scop is invalid.
9747
9748 2017-09-20 Richard Biener <rguenther@suse.de>
9749
9750 PR tree-optimization/82264
9751 * tree-ssa-sccvn.c (vn_phi_eq): Use safe_dyn_cast to check
9752 for GIMPLE_CONDs.
9753 (vn_phi_lookup): Likewise.
9754 (vn_phi_insert): Likewise.
9755
9756 2017-09-20 Jakub Jelinek <jakub@redhat.com>
9757
9758 * dwarf2out.c (tree_add_const_value_attribute): For INTEGER_CST
9759 that fits into uhwi or shwi, add DW_AT_const_value regardless
9760 of early_dwarf without going through RTL, using add_AT_unsigned
9761 or add_AT_int.
9762
9763 * dwarf2out.c (DEBUG_LTO_DWO_INFO_SECTION): Reorder defines.
9764 (DEBUG_LTO_ABBREV_SECTION): Likewise.
9765 (DEBUG_LTO_MACINFO_SECTION): Likewise.
9766 (DEBUG_MACRO_SECTION): Likewise.
9767 (DEBUG_LTO_MACRO_SECTION): Likewise.
9768 (DEBUG_STR_DWO_SECTION): Likewise.
9769 (DEBUG_LTO_STR_DWO_SECTION): Likewise.
9770 (DEBUG_LTO_LINE_SECTION): Drop .dwo suffix from the name.
9771 (DEBUG_LTO_DWO_LINE_SECTION): Define.
9772 (DEBUG_LTO_LINE_STR_SECTION): Define.
9773 (init_sections_and_labels): Initialize debug_line_str_section
9774 variable. Initialize debug_loc_section for -gdwarf-5 to
9775 DEBUG_LOCLISTS_SECTION. Formatting fixes.
9776
9777 2017-09-20 Richard Biener <rguenther@suse.de>
9778
9779 * graphite-sese-to-poly.c (extract_affine): Properly handle
9780 POINTER_PLUS_EXPR, BIT_NOT_EXPR and conversion to signed.
9781
9782 2017-09-20 Richard Biener <rguenther@suse.de>
9783
9784 PR tree-optimization/81373
9785 * graphite-scop-detection.c (build_cross_bb_scalars_def):
9786 Force SESE live-out defs to be handled even if they are
9787 scev_analyzable_p.
9788
9789 2017-09-19 Jeff Law <law@redhat.com>
9790
9791 * combine-stack-adj.c (combine_stack_adjustments_for_block): Do
9792 nothing for stack adjustments with REG_STACK_CHECK.
9793 * sched-deps.c (parse_add_or_inc): Reject insns with
9794 REG_STACK_CHECK from dependency breaking.
9795 * config/i386/i386.c (pro_epilogue_adjust_stack): Return insn.
9796 (ix86_adjust_satck_and_probe_stack_clash): Add REG_STACK_NOTEs.
9797 * reg-notes.def (STACK_CHECK): New note.
9798
9799 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): New.
9800 (ix86_expand_prologue): Dump stack clash info as needed.
9801 Call ix86_adjust_stack_and_probe_stack_clash as needed.
9802
9803 * function.c (dump_stack_clash_frame_info): New function.
9804 * function.h (dump_stack_clash_frame_info): Prototype.
9805 (enum stack_clash_probes): New enum.
9806
9807 * config/alpha/alpha.c (alpha_expand_prologue): Also check
9808 flag_stack_clash_protection.
9809 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Likewise.
9810 (arm_expand_prologue, thumb1_expand_prologue): Likewise.
9811 (arm_frame_pointer_required): Likewise.
9812 * config/ia64/ia64.c (ia64_compute_frame_size): Likewise.
9813 (ia64_expand_prologue): Likewise.
9814 * config/mips/mips.c (mips_expand_prologue): Likewise.
9815 * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Likewise.
9816 * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
9817 (sparc_flat_expand_prologue): Likewise.
9818 * config/spu/spu.c (spu_expand_prologue): Likewise.
9819
9820 * explow.c: Include "params.h".
9821 (anti_adjust_stack_and_probe_stack_clash): New function.
9822 (get_stack_check_protect): Likewise.
9823 (compute_stack_clash_protection_loop_data): Likewise.
9824 (emit_stack_clash_protection_loop_start): Likewise.
9825 (emit_stack_clash_protection_loop_end): Likewise.
9826 (allocate_dynamic_stack_space): Use get_stack_check_protect.
9827 Use anti_adjust_stack_and_probe_stack_clash.
9828 * explow.h (compute_stack_clash_protection_loop_data): Prototype.
9829 (emit_stack_clash_protection_loop_start): Likewise.
9830 (emit_stack_clash_protection_loop_end): Likewise.
9831 * rtl.h (get_stack_check_protect): Prototype.
9832 * target.def (stack_clash_protection_final_dynamic_probe): New hook.
9833 * targhooks.c (default_stack_clash_protection_final_dynamic_probe): New.
9834 * targhooks.h (default_stack_clash_protection_final_dynamic_probe):
9835 Prototype.
9836 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE):
9837 Add @hook.
9838 * doc/tm.texi: Rebuilt.
9839 * config/aarch64/aarch64.c (aarch64_expand_prologue): Use
9840 get_stack_check_protect.
9841 * config/alpha/alpha.c (alpha_expand_prologue): Likewise.
9842 * config/arm/arm.c (arm_expand_prologue): Likewise.
9843 (arm_frame_pointer_required): Likewise.
9844 * config/i386/i386.c (ix86_expand_prologue): Likewise.
9845 * config/ia64/ia64.c (ia64_expand_prologue): Likewise.
9846 * config/mips/mips.c (mips_expand_prologue): Likewise.
9847 * config/powerpcspe/powerpcspe.c (rs6000_emit_prologue): Likewise.
9848 * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
9849 * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
9850 (sparc_flat_expand_prologue): Likewise.
9851
9852 * common.opt (-fstack-clash-protection): New option.
9853 * flag-types.h (enum stack_check_type): Note difference between
9854 -fstack-check= and -fstack-clash-protection.
9855 * params.def (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE): New PARAM.
9856 (PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Likewise.
9857 * toplev.c (process_options): Issue warnings/errors for cases
9858 not handled with -fstack-clash-protection.
9859 * doc/invoke.texi (-fstack-clash-protection): Document new option.
9860 (-fstack-check): Note additional problem with -fstack-check=generic.
9861 Note that -fstack-check is primarily for Ada and refer users
9862 to -fstack-clash-protection for stack-clash-protection.
9863 Document new params for stack clash protection.
9864
9865 2017-09-19 Uros Bizjak <ubizjak@gmail.com>
9866
9867 * config/i386/i386.c (ix86_split_long_move): Do not handle
9868 address used for LEA in a special way.
9869
9870 2017-09-19 Segher Boessenkool <segher@kernel.crashing.org>
9871
9872 * simplify-rtx.c (simplify_binary_operation_1): Fix typo in comment.
9873
9874 2017-09-19 Martin Sebor <msebor@redhat.com>
9875
9876 PR c/81854
9877 * cgraphunit.c (handle_alias_pairs): Reject aliases between functions
9878 of incompatible types.
9879
9880 2017-09-19 Will Schmidt <will_schmidt@vnet.ibm.com>
9881
9882 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
9883 for early folding of vector loads (ALTIVEC_BUILTIN_LVX_*).
9884 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9885 Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_LD.
9886
9887 2017-09-19 Richard Biener <rguenther@suse.de>
9888
9889 PR tree-optimization/82244
9890 * tree-vrp.c (remove_range_assertions): Do not propagate
9891 a constant to abnormals but replace the assert with a copy.
9892
9893 2017-09-19 Alexander Monakov <amonakov@ispras.ru>
9894
9895 PR rtl-optimization/57878
9896 PR rtl-optimization/68988
9897 * lra-assigns.c (reload_pseudo_compare_func): Remove fragmentation
9898 avoidance test involving non_reload_pseudos. Move frequency test
9899 below the general fragmentation avoidance test.
9900
9901 2017-09-19 Richard Biener <rguenther@suse.de>
9902
9903 PR tree-optimization/69728
9904 * graphite-sese-to-poly.c (schedule_error): New global.
9905 (add_loop_schedule): Handle empty domain by failing the
9906 schedule.
9907 (build_original_schedule): Handle schedule_error.
9908
9909 2017-09-19 Richard Biener <rguenther@suse.de>
9910
9911 * graphite-scop-detection.c (scop_detection::can_represent_loop):
9912 Do not iterate to sibling loops but only to siblings of inner
9913 loops.
9914
9915 2017-09-18 Andreas Schwab <schwab@linux-m68k.org>
9916
9917 PR target/81613
9918 * config/m68k/m68k.md (moveq feeding equality comparison): Check
9919 that the registers are different.
9920
9921 2017-09-18 Uros Bizjak <ubizjak@gmail.com>
9922
9923 * config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H
9924 to processor_model and "amdfam17h" to arch_names_table.
9925 * doc/extend.texi (__builtin_cpu_is): Document amdfam17h CPU name.
9926
9927 2017-09-18 Jakub Jelinek <jakub@redhat.com>
9928
9929 PR c/82234
9930 * doc/extend.texi: Add @findex entry for __builtin_shuffle.
9931
9932 2017-09-18 Richard Sandiford <richard.sandiford@linaro.org>
9933 Alan Hayward <alan.hayward@arm.com>
9934 David Sherwood <david.sherwood@arm.com>
9935
9936 * tree-vectorizer.h (vect_slp_analyze_operations): Replace parameters
9937 with a vec_info *.
9938 * tree-vect-loop.c (vect_analyze_loop_operations): Update call
9939 accordingly.
9940 * tree-vect-slp.c (vect_slp_analyze_node_operations): Add vec_info *
9941 parameter. Set SLP_TREE_NUMBER_OF_VEC_STMTS here rather than in
9942 vect_schedule_slp_instance.
9943 (vect_slp_analyze_operations): Replace parameters with a vec_info *.
9944 Update call to vect_slp_analyze_node_operations. Simplify return
9945 value.
9946 (vect_slp_analyze_bb_1): Update call accordingly.
9947 (vect_schedule_slp_instance): Remove vectorization_factor parameter.
9948 Don't calculate SLP_TREE_NUMBER_OF_VEC_STMTS here.
9949 (vect_schedule_slp): Update call accordingly.
9950
9951 2017-09-18 Richard Sandiford <richard.sandiford@linaro.org>
9952 Alan Hayward <alan.hayward@arm.com>
9953 David Sherwood <david.sherwood@arm.com>
9954
9955 * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Cope
9956 with types that aren't in fact scalar.
9957
9958 2017-09-18 Richard Sandiford <richard.sandiford@linaro.org>
9959
9960 * tree-vect-slp.c (vect_record_max_nunits): New function,
9961 split out from...
9962 (vect_build_slp_tree_1): ...here.
9963 (vect_build_slp_tree_2): Call it for phis too.
9964
9965 2017-09-18 Richard Sandiford <richard.sandiford@linaro.org>
9966
9967 * tree-vect-stmts.c (vectorizable_mask_load_store): Pass mask_vectype
9968 to vect_get_vec_def_for_operand when getting the mask operand.
9969
9970 2017-09-18 Richard Sandiford <richard.sandiford@linaro.org>
9971 Alan Hayward <alan.hayward@arm.com>
9972 David Sherwood <david.sherwood@arm.com>
9973
9974 * tree-vect-loop.c (vectorizable_live_operation): Fix type of
9975 bitstart.
9976
9977 2017-09-18 Richard Sandiford <richard.sandiford@linaro.org>
9978 Alan Hayward <alan.hayward@arm.com>
9979 David Sherwood <david.sherwood@arm.com>
9980
9981 * tree-vect-loop.c (vectorizable_live_operation): Fix element size
9982 calculation for vector booleans.
9983
9984 2017-09-18 Richard Sandiford <richard.sandiford@linaro.org>
9985 Alan Hayward <alan.hayward@arm.com>
9986 David Sherwood <david.sherwood@arm.com>
9987
9988 * tree-vect-stmts.c (can_vectorize_live_stmts): New function,
9989 split out from...
9990 (vect_transform_stmt): ...here.
9991 (vect_analyze_stmt): Use it instead of calling
9992 vectorizable_live_operation directly.
9993
9994 2017-09-18 Cesar Philippidis <cesar@codesourcery.com>
9995
9996 * omp-offload.c (oacc_xform_loop): Enable SIMD vectorization on
9997 non-SIMT targets in acc vector loops.
9998
9999 2017-09-18 Claudiu Zissulescu <claziss@synopsys.com>
10000
10001 * configure.ac: Add arc and check if assembler supports gdwarf2.
10002 * configure: Regenerate.
10003
10004 2017-09-18 Richard Biener <rguenther@suse.de>
10005
10006 PR tree-optimization/82220
10007 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Exclude
10008 epilogue niters from the min_profitable_iters compute.
10009
10010 2017-09-18 Jakub Jelinek <jakub@redhat.com>
10011
10012 PR target/82145
10013 * config/i386/i386.c (ix86_init_large_pic_reg): Revert 2017-09-01
10014 changes. Turn CODE_LABEL into NOTE_INSN_DELETED_LABEL immediately.
10015 (ix86_init_pic_reg): Revert 2017-09-01 changes.
10016
10017 2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
10018
10019 PR target/81361
10020 * dwarf2cfi.c (add_cfis_to_fde): Do not generate DW_CFA_set_loc after
10021 switching to a new text section.
10022
10023 2017-09-18 Richard Biener <rguenther@suse.de>
10024
10025 * graphite-scop-detection.c (scop_detection::stmt_has_simple_data_ref):
10026 Simplify.
10027 (build_alias_set): Reject aliases with no access function.
10028
10029 2017-09-18 Richard Biener <rguenther@suse.de>
10030
10031 PR tree-optimization/79622
10032 * graphite-scop-detection.c (build_cross_bb_scalars_def): Properly
10033 handle PHIs.
10034 (build_cross_bb_scalars_use): Likewise.
10035
10036 2017-09-18 Pierre-Marie de Rodat <derodat@adacore.com>
10037
10038 * cgraph.h (cgraph_thunk_info): Fix a typo in a comment.
10039
10040 2017-09-18 Alan Modra <amodra@gmail.com>
10041
10042 PR target/81996
10043 * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use
10044 stack_pointer_rtx for count 0. Update comments. Break up
10045 large rtl expression.
10046
10047 2017-09-17 Daniel Santos <daniel.santos@pobox.com>
10048
10049 * config/i386/i386.c (xlogue_layout::STUB_NAME_MAX_LEN):
10050 Increase to 20 bytes.
10051 (xlogue_layout::s_stub_names): Add an additional size-2 diminsion.
10052 (xlogue_layout::get_stub_name): Modify to select the appropairate sse
10053 or avx version of the stub.
10054
10055 2017-09-17 H.J. Lu <hongjiu.lu@intel.com>
10056
10057 PR target/82166
10058 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Properly
10059 compute the minimum stack alignment. Also update preferred stack
10060 boundary for leaf functions.
10061
10062 2017-09-16 Richard Sandiford <richard.sandiford@linaro.org>
10063
10064 PR tree-optimization/82228
10065 * tree-vect-loop.c (vectorizable_live_operation): Move initialization
10066 of ncopies.
10067
10068 2017-09-16 Chung-Ju Wu <jasonwucj@gmail.com>
10069
10070 * common/config/nds32/nds32-common.c
10071 (nds32_option_optimization_table): Refine formatting.
10072 (nds32_option_optimization_table): Use -fsched-pressure and
10073 -fomit-frame-pointer for specific optimization level.
10074
10075 2017-09-16 Chung-Ju Wu <jasonwucj@gmail.com>
10076
10077 * config/nds32/nds32.c: Refine formatting and comments.
10078 * config/nds32/nds32.h: Likewise.
10079 * config/nds32/nds32.md: Likewise.
10080 * config/nds32/nds32-cost.c: Likewise.
10081 * config/nds32/nds32-isr.c: Likewise.
10082 * config/nds32/nds32-md-auxiliary.c: Likewise.
10083 * config/nds32/nds32-multiple.md: Likewise.
10084 * config/nds32/nds32-predicates.c: Likewise.
10085
10086 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
10087 Jakub Jelinek <jakub@redhat.com>
10088
10089 Add support for -std=c++2a.
10090 * doc/cpp.texi (__cplusplus): Document value for -std=c++2a
10091 or -std=gnu+2a.
10092 * doc/invoke.texi: Document -std=c++2a and -std=gnu++2a.
10093
10094 2017-09-15 Steve Ellcey <sellcey@cavium.com>
10095
10096 PR target/82066
10097 * doc/extend.texi (Common Function Attributes): Add
10098 references to ARM, AArch64, and S/390 specific attributes.
10099 (Function Specific Option Pragmas): Add AArch64 and S/390
10100 to list of back ends that support the target pragma.
10101
10102 2017-09-15 Nathan Sidwell <nathan@acm.org>
10103
10104 * doc/standards.texi: Fix C++17 description. Update URLs for
10105 C++11 & 14.
10106
10107 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
10108
10109 * common.opt (Wcast-align=strict): New warning option.
10110 * doc/invoke.texi: Document -Wcast-align=strict.
10111
10112 2017-09-15 Pierre-Marie de Rodat <derodat@adacore.com>
10113
10114 * cgraph.h (cgraph_thunk_info): Add comments.
10115 * cgraph.c (cgraph_node::create_thunk): Adjust comment, make
10116 assert for VIRTUAL_* arguments stricter.
10117
10118 2017-09-15 Jackson Woodruff <jackson.woodruff@arm.com>
10119
10120 PR tree-optimization/71026
10121 * match.pd: Move RDIV patterns from fold-const.c
10122 * fold-const.c (distribute_real_division): Removed.
10123 (fold_binary_loc): Remove calls to distribute_real_divison.
10124
10125 2017-09-15 Jakub Jelinek <jakub@redhat.com>
10126
10127 * doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
10128 c++1z and gnu++1z as deprecated. Change other references to
10129 -std=c++1z to -std=c++17 and -std=gnu++1z to -std=gnu++17.
10130 Change -Wc++1z-compat to -Wc++17-compat.
10131 * doc/cpp.texi: Document -std=c++17 defines __cplusplus 201703L.
10132 * dwarf2out.c (highest_c_language): Handle C++17.
10133 (gen_compile_unit_die): Likewise.
10134
10135 2017-09-15 Jakub Jelinek <jakub@redhat.com>
10136
10137 PR rtl-optimization/82192
10138 * combine.c (make_extraction): Don't look through non-paradoxical
10139 SUBREGs or TRUNCATE if pos + len is or might be bigger than
10140 inner's mode.
10141
10142 2017-09-15 Richard Sandiford <richard.sandiford@linaro.org>
10143 Alan Hayward <alan.hayward@arm.com>
10144 David Sherwood <david.sherwood@arm.com>
10145
10146 * target.def (function_arg_offset): New hook.
10147 * targhooks.h (default_function_arg_offset): Declare.
10148 * targhooks.c (default_function_arg_offset): New function.
10149 * function.c (locate_and_pad_parm): Use
10150 targetm.calls.function_arg_offset instead of FUNCTION_ARG_OFFSET.
10151 * doc/tm.texi.in (FUNCTION_ARG_OFFSET): Replace with...
10152 (TARGET_FUNCTION_ARG_OFFSET): ...this.
10153 * doc/tm.texi: Regenerate.
10154 * config/spu/spu.h (FUNCTION_ARG_OFFSET): Delete.
10155 * config/spu/spu.c (spu_function_arg_offset): New function.
10156 (TARGET_FUNCTION_ARG_OFFSET): Redefine.
10157 * system.h (FUNCTION_ARG_OFFSET): Poison.
10158
10159 2017-09-15 Richard Sandiford <richard.sandiford@linaro.org>
10160 Alan Hayard <alan.hayward@arm.com>
10161 David Sherwood <david.sherwood@arm.com>
10162
10163 * target.def (truly_noop_truncation): New hook.
10164 (mode_rep_extended): Refer to TARGET_TRULY_NOOP_TRUNCATION rather
10165 than TRULY_NOOP_TRUNCATION.
10166 * hooks.h (hook_bool_uint_uint_true): Declare.
10167 * hooks.c (hook_bool_uint_uint_true): New function.
10168 * doc/tm.texi.in (TRULY_NOOP_TRUNCATION): Replace with...
10169 (TARGET_TRULY_NOOP_TRUNCATION): ...this.
10170 * doc/tm.texi: Regenerate.
10171 * combine.c (make_extraction): Refer to TARGET_TRULY_NOOP_TRUNCATION
10172 rather than TRULY_NOOP_TRUNCATION in comments.
10173 (simplify_comparison): Likewise.
10174 (record_truncated_value): Likewise.
10175 * expmed.c (extract_bit_field_1): Likewise.
10176 (extract_split_bit_field): Likewise.
10177 * convert.c (convert_to_integer_1): Use targetm.truly_noop_truncation
10178 instead of TRULY_NOOP_TRUNCATION.
10179 * function.c (assign_parm_setup_block): Likewise.
10180 * machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Likewise.
10181 * rtlhooks.c: Include target.h.
10182 * config/aarch64/aarch64.h (TRULY_NOOP_TRUNCATION): Delete.
10183 * config/alpha/alpha.h (TRULY_NOOP_TRUNCATION): Delete.
10184 * config/arc/arc.h (TRULY_NOOP_TRUNCATION): Delete.
10185 * config/arm/arm.h (TRULY_NOOP_TRUNCATION): Delete.
10186 * config/avr/avr.h (TRULY_NOOP_TRUNCATION): Delete.
10187 * config/bfin/bfin.h (TRULY_NOOP_TRUNCATION): Delete.
10188 * config/c6x/c6x.h (TRULY_NOOP_TRUNCATION): Delete.
10189 * config/cr16/cr16.h (TRULY_NOOP_TRUNCATION): Delete.
10190 * config/cris/cris.h (TRULY_NOOP_TRUNCATION): Delete.
10191 * config/epiphany/epiphany.h (TRULY_NOOP_TRUNCATION): Delete.
10192 * config/fr30/fr30.h (TRULY_NOOP_TRUNCATION): Delete.
10193 * config/frv/frv.h (TRULY_NOOP_TRUNCATION): Delete.
10194 * config/ft32/ft32.h (TRULY_NOOP_TRUNCATION): Delete.
10195 * config/h8300/h8300.h (TRULY_NOOP_TRUNCATION): Delete.
10196 * config/i386/i386.h (TRULY_NOOP_TRUNCATION): Delete.
10197 * config/ia64/ia64.h (TRULY_NOOP_TRUNCATION): Delete.
10198 * config/iq2000/iq2000.h (TRULY_NOOP_TRUNCATION): Delete.
10199 * config/lm32/lm32.h (TRULY_NOOP_TRUNCATION): Delete.
10200 * config/m32c/m32c.h (TRULY_NOOP_TRUNCATION): Delete.
10201 * config/m32r/m32r.h (TRULY_NOOP_TRUNCATION): Delete.
10202 * config/m68k/m68k.h (TRULY_NOOP_TRUNCATION): Delete.
10203 * config/mcore/mcore.h (TRULY_NOOP_TRUNCATION): Delete.
10204 * config/microblaze/microblaze.h (TRULY_NOOP_TRUNCATION): Delete.
10205 * config/mips/mips.h (TRULY_NOOP_TRUNCATION): Delete.
10206 * config/mips/mips.c (mips_truly_noop_truncation): New function.
10207 (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
10208 * config/mips/mips.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
10209 rather than TRULY_NOOP_TRUNCATION in comments.
10210 * config/mmix/mmix.h (TRULY_NOOP_TRUNCATION): Delete.
10211 * config/mn10300/mn10300.h (TRULY_NOOP_TRUNCATION): Delete.
10212 * config/moxie/moxie.h (TRULY_NOOP_TRUNCATION): Delete.
10213 * config/msp430/msp430.h (TRULY_NOOP_TRUNCATION): Delete.
10214 * config/nds32/nds32.h (TRULY_NOOP_TRUNCATION): Delete.
10215 * config/nios2/nios2.h (TRULY_NOOP_TRUNCATION): Delete.
10216 * config/nvptx/nvptx.h (TRULY_NOOP_TRUNCATION): Delete.
10217 * config/pa/pa.h (TRULY_NOOP_TRUNCATION): Delete.
10218 * config/pdp11/pdp11.h (TRULY_NOOP_TRUNCATION): Delete.
10219 * config/powerpcspe/powerpcspe.h (TRULY_NOOP_TRUNCATION): Delete.
10220 * config/riscv/riscv.h (TRULY_NOOP_TRUNCATION): Delete.
10221 * config/riscv/riscv.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
10222 rather than TRULY_NOOP_TRUNCATION in comments.
10223 * config/rl78/rl78.h (TRULY_NOOP_TRUNCATION): Delete.
10224 * config/rs6000/rs6000.h (TRULY_NOOP_TRUNCATION): Delete.
10225 * config/rx/rx.h (TRULY_NOOP_TRUNCATION): Delete.
10226 * config/s390/s390.h (TRULY_NOOP_TRUNCATION): Delete.
10227 * config/sh/sh.h (MAYBE_BASE_REGISTER_RTX_P): Remove
10228 TRULY_NOOP_TRUNCATION condition.
10229 (MAYBE_INDEX_REGISTER_RTX_P): Likewise.
10230 (TRULY_NOOP_TRUNCATION): Delete.
10231 * config/sparc/sparc.h (TRULY_NOOP_TRUNCATION): Delete.
10232 * config/spu/spu.h (TRULY_NOOP_TRUNCATION): Delete.
10233 * config/spu/spu.c (spu_truly_noop_truncation): New function.
10234 (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
10235 * config/stormy16/stormy16.h (TRULY_NOOP_TRUNCATION): Delete.
10236 * config/tilegx/tilegx.h (TRULY_NOOP_TRUNCATION): Delete.
10237 * config/tilegx/tilegx.c (tilegx_truly_noop_truncation): New fuction.
10238 (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
10239 * config/tilegx/tilegx.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
10240 rather than TRULY_NOOP_TRUNCATION in comments.
10241 * config/tilepro/tilepro.h (TRULY_NOOP_TRUNCATION): Delete.
10242 * config/v850/v850.h (TRULY_NOOP_TRUNCATION): Delete.
10243 * config/vax/vax.h (TRULY_NOOP_TRUNCATION): Delete.
10244 * config/visium/visium.h (TRULY_NOOP_TRUNCATION): Delete.
10245 * config/xtensa/xtensa.h (TRULY_NOOP_TRUNCATION): Delete.
10246 * system.h (TRULY_NOOP_TRUNCATION): Poison.
10247
10248 2017-09-15 Christophe Lyon <christophe.lyon@linaro.org>
10249
10250 PR target/67591
10251 * config/arm/arm.md (*cmp_and): Add enabled_for_depr_it attribute.
10252 (*cmp_ior): Likewise.
10253 (*ior_scc_scc): Add alternative for enabled_for_depr_it attribute.
10254 (*ior_scc_scc_cmp): Likewise.
10255 (*and_scc_scc): Likewise.
10256 (*and_scc_scc_cmp): Likewise.
10257
10258 2017-09-15 Richard Sandiford <richard.sandiford@linaro.org>
10259 Alan Hayard <alan.hayward@arm.com>
10260 David Sherwood <david.sherwood@arm.com>
10261
10262 * target.def (can_change_mode_class): New hook.
10263 (mode_rep_extended): Refer to it instead of CANNOT_CHANGE_MODE_CLASS.
10264 (hard_regno_nregs): Likewise.
10265 * hooks.h (hook_bool_mode_mode_reg_class_t_true): Declare.
10266 * hooks.c (hook_bool_mode_mode_reg_class_t_true): New function.
10267 * doc/tm.texi.in (CANNOT_CHANGE_MODE_CLASS): Replace with...
10268 (TARGET_CAN_CHANGE_MODE_CLASS): ...this.
10269 (LOAD_EXTEND_OP): Update accordingly.
10270 * doc/tm.texi: Regenerate.
10271 * doc/rtl.texi: Refer to TARGET_CAN_CHANGE_MODE_CLASS instead of
10272 CANNOT_CHANGE_MODE_CLASS.
10273 * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Replace with...
10274 (REG_CAN_CHANGE_MODE_P): ...this new macro.
10275 * combine.c (simplify_set): Update accordingly.
10276 * emit-rtl.c (validate_subreg): Likewise.
10277 * recog.c (general_operand): Likewise.
10278 * regcprop.c (mode_change_ok): Likewise.
10279 * reload1.c (choose_reload_regs): Likewise.
10280 (inherit_piecemeal_p): Likewise.
10281 * rtlanal.c (simplify_subreg_regno): Likewise.
10282 * postreload.c (reload_cse_simplify_set): Use REG_CAN_CHANGE_MODE_P
10283 instead of CANNOT_CHANGE_MODE_CLASS.
10284 (reload_cse_simplify_operands): Likewise.
10285 * reload.c (push_reload): Use targetm.can_change_mode_class
10286 instead of CANNOT_CHANGE_MODE_CLASS.
10287 (push_reload): Likewise. Also use REG_CAN_CHANGE_MODE_P instead of
10288 REG_CANNOT_CHANGE_MODE_P.
10289 * config/alpha/alpha.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10290 * config/alpha/alpha.c (alpha_can_change_mode_class): New function.
10291 (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10292 * config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10293 * config/arm/arm.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10294 (arm_can_change_mode_class): New function.
10295 * config/arm/neon.md: Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
10296 than CANNOT_CHANGE_MODE_CLASS in comments.
10297 * config/i386/i386.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10298 * config/i386/i386-protos.h (ix86_cannot_change_mode_class): Delete.
10299 * config/i386/i386.c (ix86_cannot_change_mode_class): Replace with...
10300 (ix86_can_change_mode_class): ...this new function, inverting the
10301 sense of the return value.
10302 (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10303 * config/ia64/ia64.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10304 * config/ia64/ia64.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10305 (ia64_can_change_mode_class): New function.
10306 * config/m32c/m32c.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10307 * config/m32c/m32c-protos.h (m32c_cannot_change_mode_class): Delete.
10308 * config/m32c/m32c.c (m32c_cannot_change_mode_class): Replace with...
10309 (m32c_can_change_mode_class): ...this new function, inverting the
10310 sense of the return value.
10311 (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10312 * config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10313 * config/mips/mips-protos.h (mips_cannot_change_mode_class): Delete.
10314 * config/mips/mips.c (mips_cannot_change_mode_class): Replace with...
10315 (mips_can_change_mode_class): ...this new function, inverting the
10316 sense of the return value.
10317 (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10318 * config/msp430/msp430.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10319 * config/msp430/msp430.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10320 (msp430_can_change_mode_class): New function.
10321 * config/nvptx/nvptx.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10322 * config/nvptx/nvptx.c (nvptx_can_change_mode_class): New function.
10323 (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10324 * config/pa/pa32-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10325 * config/pa/pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10326 * config/pa/pa-protos.h (pa_cannot_change_mode_class): Delete.
10327 * config/pa/pa.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10328 (pa_cannot_change_mode_class): Replace with...
10329 (pa_can_change_mode_class): ...this new function, inverting the
10330 sense of the return value.
10331 (pa_modes_tieable_p): Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
10332 than CANNOT_CHANGE_MODE_CLASS in comments.
10333 * config/pdp11/pdp11.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10334 * config/pdp11/pdp11-protos.h (pdp11_cannot_change_mode_class): Delete.
10335 * config/pdp11/pdp11.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10336 (pdp11_cannot_change_mode_class): Replace with...
10337 (pdp11_can_change_mode_class): ...this new function, inverting the
10338 sense of the return value.
10339 * config/powerpcspe/powerpcspe.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10340 * config/powerpcspe/powerpcspe-protos.h
10341 (rs6000_cannot_change_mode_class_ptr): Delete.
10342 * config/powerpcspe/powerpcspe.c
10343 (rs6000_cannot_change_mode_class_ptr): Delete.
10344 (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10345 (rs6000_option_override_internal): Assign to
10346 targetm.can_change_mode_class instead of
10347 rs6000_cannot_change_mode_class_ptr.
10348 (rs6000_cannot_change_mode_class): Replace with...
10349 (rs6000_can_change_mode_class): ...this new function, inverting the
10350 sense of the return value.
10351 (rs6000_debug_cannot_change_mode_class): Replace with...
10352 (rs6000_debug_can_change_mode_class): ...this new function.
10353 * config/riscv/riscv.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10354 * config/riscv/riscv.c (riscv_can_change_mode_class): New function.
10355 (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10356 * config/rs6000/rs6000.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10357 * config/rs6000/rs6000-protos.h (rs6000_cannot_change_mode_class_ptr):
10358 Delete.
10359 * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class_ptr): Delete.
10360 (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10361 (rs6000_option_override_internal): Assign to
10362 targetm.can_change_mode_class instead of
10363 rs6000_cannot_change_mode_class_ptr.
10364 (rs6000_cannot_change_mode_class): Replace with...
10365 (rs6000_can_change_mode_class): ...this new function, inverting the
10366 sense of the return value.
10367 (rs6000_debug_cannot_change_mode_class): Replace with...
10368 (rs6000_debug_can_change_mode_class): ...this new function.
10369 * config/s390/s390.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10370 * config/s390/s390-protos.h (s390_cannot_change_mode_class): Delete.
10371 * config/s390/s390.c (s390_cannot_change_mode_class): Replace with...
10372 (s390_can_change_mode_class): ...this new function, inverting the
10373 sense of the return value.
10374 (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10375 * config/sh/sh.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10376 * config/sh/sh-protos.h (sh_cannot_change_mode_class): Delete.
10377 * config/sh/sh.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10378 (sh_cannot_change_mode_class): Replace with...
10379 (sh_can_change_mode_class): ...this new function, inverting the
10380 sense of the return value.
10381 * config/sparc/sparc.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10382 * config/sparc/sparc.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10383 (sparc_can_change_mode_class): New function.
10384 * config/spu/spu.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10385 * config/spu/spu.c (spu_can_change_mode_class): New function.
10386 (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10387 * config/visium/visium.h (CANNOT_CHANGE_MODE_CLASS): Delete.
10388 * config/visium/visium.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
10389 (visium_can_change_mode_class): New function.
10390 * system.h (CANNOT_CHANGE_MODE_CLASS): Poison.
10391
10392 2017-09-15 Richard Biener <rguenther@suse.de>
10393
10394 PR tree-optimization/82217
10395 * tree-ssa-sccvn.c (visit_phi): Properly handle all VN_TOP
10396 but not undefined case.
10397
10398 2017-09-15 Jakub Jelinek <jakub@redhat.com>
10399
10400 PR target/82145
10401 * postreload.c (reload_cse_simplify_operands): Skip
10402 NOTE_INSN_DELETED_LABEL similarly to skipping CODE_LABEL.
10403
10404 2017-09-15 Richard Biener <rguenther@suse.de>
10405
10406 PR tree-optimization/68823
10407 * graphite-scop-detection.c (build_alias_set): If we have a
10408 possible dependence check whether we can handle them by just
10409 looking at the DRs DR_ACCESS_FNs.
10410 (build_scops): If build_alias_set fails, fail the SCOP.
10411
10412 2017-09-14 Michael Meissner <meissner@linux.vnet.ibm.com>
10413
10414 * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1_HW): New macros
10415 to support float128 built-in functions that require the ISA 3.0
10416 hardware.
10417 (BU_FLOAT128_3_HW): Likewise.
10418 (SQRTF128): Add support for the IEEE 128-bit square root and fma
10419 built-in functions.
10420 (FMAF128): Likewise.
10421 (FMAQ): Likewise.
10422 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
10423 support for built-in functions that need the ISA 3.0 IEEE 128-bit
10424 floating point instructions.
10425 (rs6000_invalid_builtin): Likewise.
10426 (rs6000_builtin_mask_names): Likewise.
10427 * config/rs6000/rs6000.h (MASK_FLOAT128_HW): Likewise.
10428 (RS6000_BTM_FLOAT128_HW): Likewise.
10429 (RS6000_BTM_COMMON): Likewise.
10430 * config/rs6000/rs6000.md (fma<mode>4_hw): Add a generator
10431 function.
10432 * doc/extend.texi (RS/6000 built-in functions): Document the
10433 IEEE 128-bit floating point square root and fused multiply-add
10434 built-in functions.
10435
10436 2017-09-14 Pat Haugen <pthaugen@us.ibm.com>
10437
10438 * config/rs6000/rs6000.c (rs6000_set_up_by_prologue): Make sure the TOC
10439 reg (r2) isn't in the set of registers defined in the prologue.
10440
10441 2017-09-14 Richard Sandiford <richard.sandiford@linaro.org>
10442 Alan Hayward <alan.hayward@arm.com>
10443 David Sherwood <david.sherwood@arm.com>
10444
10445 * tree-vectorizer.h (_loop_vec_info): Add max_vectorization_factor.
10446 (LOOP_VINFO_MAX_VECT_FACTOR): New macro.
10447 (LOOP_VINFO_ORIG_VECT_FACTOR): Replace with...
10448 (LOOP_VINFO_ORIG_MAX_VECT_FACTOR): ...this new macro.
10449 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Update
10450 accordingly.
10451 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10452 max_vectorization_factor.
10453 (vect_analyze_loop_2): Set LOOP_VINFO_MAX_VECT_FACTOR.
10454
10455 2017-09-14 Richard Sandiford <richard.sandiford@linaro.org>
10456 Alan Hayward <alan.hayward@arm.com>
10457 David Sherwood <david.sherwood@arm.com>
10458
10459 * tree-vectorizer.h (vect_min_worthwhile_factor): Delete.
10460 (vect_worthwhile_without_simd_p): Declare.
10461 * tree-vect-loop.c (vect_worthwhile_without_simd_p): New function.
10462 (vectorizable_reduction): Use it.
10463 * tree-vect-stmts.c (vectorizable_shift): Likewise.
10464 (vectorizable_operation): Likewise.
10465
10466 2017-09-14 Richard Sandiford <richard.sandiford@linaro.org>
10467 Alan Hayward <alan.hayward@arm.com>
10468 David Sherwood <david.sherwood@arm.com>
10469
10470 * tree-vectorizer.h (vect_get_num_copies): New function.
10471 * tree-vect-data-refs.c (vect_get_data_access_cost): Use it.
10472 * tree-vect-loop.c (vectorizable_reduction): Likewise.
10473 (vectorizable_induction): Likewise.
10474 (vectorizable_live_operation): Likewise.
10475 * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
10476 (vectorizable_bswap): Likewise.
10477 (vectorizable_call): Likewise.
10478 (vectorizable_conversion): Likewise.
10479 (vectorizable_assignment): Likewise.
10480 (vectorizable_shift): Likewise.
10481 (vectorizable_operation): Likewise.
10482 (vectorizable_store): Likewise.
10483 (vectorizable_load): Likewise.
10484 (vectorizable_condition): Likewise.
10485 (vectorizable_comparison): Likewise.
10486 (vect_analyze_stmt): Pass the slp node to vectorizable_live_operation.
10487
10488 2017-09-14 Richard Sandiford <richard.sandiford@linaro.org>
10489 Alan Hayward <alan.hayward@arm.com>
10490 David Sherwood <david.sherwood@arm.com>
10491
10492 * tree-vect-loop.c (vectorizable_induction): Use gimple_build instead
10493 of vect_init_vector.
10494
10495 2017-09-14 Richard Sandiford <richard.sandiford@linaro.org>
10496 Alan Hayward <alan.hayward@arm.com>
10497 David Sherwood <david.sherwood@arm.com>
10498
10499 * gimple-fold.h (gimple_build_vector_from_val): Declare, and provide
10500 an inline wrapper that provides a location.
10501 (gimple_build_vector): Likewise.
10502 * gimple-fold.c (gimple_build_vector_from_val): New function.
10503 (gimple_build_vector): Likewise.
10504 * tree-vect-loop.c (get_initial_def_for_reduction): Use the new
10505 functions to build the initial value. Always return a gimple value.
10506 (get_initial_defs_for_reduction): Likewise. Only compute
10507 neutral_vec once.
10508 (vect_create_epilog_for_reduction): Don't call force_gimple_operand or
10509 vect_init_vector on the results from get_initial_def(s)_for_reduction.
10510 (vectorizable_induction): Use gimple_build_vector rather than
10511 vect_init_vector.
10512
10513 2017-09-14 Richard Sandiford <richard.sandiford@linaro.org>
10514 Alan Hayward <alan.hayward@arm.com>
10515 David Sherwood <david.sherwood@arm.com>
10516
10517 * target.h (vec_perm_indices): New typedef.
10518 (auto_vec_perm_indices): Likewise.
10519 * optabs-query.h: Include target.h
10520 (can_vec_perm_p): Take a vec_perm_indices *.
10521 * optabs-query.c (can_vec_perm_p): Likewise.
10522 (can_mult_highpart_p): Update accordingly. Use auto_vec_perm_indices.
10523 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
10524 * tree-vect-generic.c (lower_vec_perm): Likewise.
10525 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
10526 (vect_grouped_load_supported): Likewise.
10527 (vect_shift_permute_load_chain): Likewise.
10528 (vect_permute_store_chain): Use auto_vec_perm_indices.
10529 (vect_permute_load_chain): Likewise.
10530 * fold-const.c (fold_vec_perm): Take vec_perm_indices.
10531 (fold_ternary_loc): Update accordingly. Use auto_vec_perm_indices.
10532 Update uses of can_vec_perm_p.
10533 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Replace the
10534 mode with a number of elements. Take a vec_perm_indices *.
10535 (vect_create_epilog_for_reduction): Update accordingly.
10536 Use auto_vec_perm_indices.
10537 (have_whole_vector_shift): Likewise. Update call to can_vec_perm_p.
10538 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
10539 (vect_transform_slp_perm_load): Likewise.
10540 (vect_schedule_slp_instance): Use auto_vec_perm_indices.
10541 * tree-vectorizer.h (vect_gen_perm_mask_any): Take a vec_perm_indices.
10542 (vect_gen_perm_mask_checked): Likewise.
10543 * tree-vect-stmts.c (vect_gen_perm_mask_any): Take a vec_perm_indices.
10544 (vect_gen_perm_mask_checked): Likewise.
10545 (vectorizable_mask_load_store): Use auto_vec_perm_indices.
10546 (vectorizable_store): Likewise.
10547 (vectorizable_load): Likewise.
10548 (perm_mask_for_reverse): Likewise. Update call to can_vec_perm_p.
10549 (vectorizable_bswap): Likewise.
10550
10551 2017-09-14 Richard Sandiford <richard.sandiford@linaro.org>
10552 Alan Hayward <alan.hayward@arm.com>
10553 David Sherwood <david.sherwood@arm.com>
10554
10555 * tree.h (build_vector): Take a vec<tree> instead of a tree *.
10556 * tree.c (build_vector): Likewise.
10557 (build_vector_from_ctor): Update accordingly.
10558 (build_vector_from_val): Likewise.
10559 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
10560 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
10561 * tree-vect-generic.c (add_rshift): Likewise.
10562 (expand_vector_divmod): Likewise.
10563 (optimize_vector_constructor): Likewise.
10564 * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
10565 (vect_transform_slp_perm_load): Likewise.
10566 (vect_schedule_slp_instance): Likewise.
10567 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
10568 (vectorizable_call): Likewise.
10569 (vect_gen_perm_mask_any): Likewise. Add elements in order.
10570 * expmed.c (make_tree): Likewise.
10571 * fold-const.c (fold_negate_expr_1): Use auto_vec<tree> when building
10572 a vector passed to build_vector.
10573 (fold_convert_const): Likewise.
10574 (exact_inverse): Likewise.
10575 (fold_ternary_loc): Likewise.
10576 (fold_relational_const): Likewise.
10577 (const_binop): Likewise. Use VECTOR_CST_ELT directly when operating
10578 on VECTOR_CSTs, rather than going through vec_cst_ctor_to_array.
10579 (const_unop): Likewise. Store the reduction accumulator in a
10580 variable rather than an array.
10581 (vec_cst_ctor_to_array): Take the number of elements as a parameter.
10582 (fold_vec_perm): Update calls accordingly. Use auto_vec<tree> for
10583 the new vector, rather than constructing it after the input arrays.
10584 (native_interpret_vector): Use auto_vec<tree> when building
10585 a vector passed to build_vector. Add elements in order.
10586 * tree-vect-loop.c (get_initial_defs_for_reduction): Use
10587 auto_vec<tree> when building a vector passed to build_vector.
10588 (vect_create_epilog_for_reduction): Likewise.
10589 (vectorizable_induction): Likewise.
10590 (get_initial_def_for_reduction): Likewise. Fix indentation of
10591 case statements.
10592 * config/sparc/sparc.c (sparc_handle_vis_mul8x16): Change n_elts
10593 to a vec<tree> *.
10594 (sparc_fold_builtin): Use auto_vec<tree> when building a vector
10595 passed to build_vector.
10596
10597 2017-09-14 Richard Sandiford <richard.sandiford@linaro.org>
10598 Alan Hayward <alan.hayward@arm.com>
10599 David Sherwood <david.sherwood@arm.com>
10600
10601 * tree-core.h (tree_base::u): Add an "nelts" field.
10602 (tree_vector): Use VECTOR_CST_NELTS as the length.
10603 * tree.c (tree_size): Likewise.
10604 (make_vector): Initialize VECTOR_CST_NELTS.
10605 * tree.h (VECTOR_CST_NELTS): Use the u.nelts field.
10606 * cfgexpand.c (expand_debug_expr): Use VECTOR_CST_NELTS instead of
10607 TYPE_VECTOR_SUBPARTS.
10608 * expr.c (const_vector_mask_from_tree): Consistently use "units"
10609 as the number of units, setting it from VECTOR_CST_NELTS.
10610 (const_vector_from_tree): Likewise.
10611 * fold-const.c (negate_expr_p): Use VECTOR_CST_NELTS instead of
10612 TYPE_VECTOR_SUBPARTS for the number of elements in a VECTOR_CST.
10613 (fold_negate_expr_1): Likewise.
10614 (fold_convert_const): Likewise.
10615 (const_binop): Likewise. Differentiate the number of output and
10616 input elements.
10617 (const_unop): Likewise.
10618 (fold_ternary_loc): Use VECTOR_CST_NELTS for the number of elements
10619 in a VECTOR_CST, asserting that it is the same as TYPE_VECTOR_SUBPARTS
10620 in cases that did the opposite.
10621
10622 2017-09-14 Richard Biener <rguenther@suse.de>
10623
10624 * tree-ssa-sccvn.c (visit_phi): Merge undefined values similar
10625 to VN_TOP.
10626
10627 2017-09-14 Eric Botcazou <ebotcazou@adacore.com>
10628
10629 * dwarf2out.c (dwarf2out_source_line): Remove superfluous test.
10630
10631 2017-09-14 Jakub Jelinek <jakub@redhat.com>
10632
10633 PR target/81325
10634 * cfgbuild.c (find_bb_boundaries): Ignore debug insns in decisions
10635 if and where to split a bb, except for splitting before debug insn
10636 sequences followed by non-label real insn. Delete debug insns
10637 in between basic blocks.
10638
10639 * combine.c (make_compound_operation_int): Formatting fixes.
10640
10641 * config/alpha/elf.h (LINK_EH_SPEC): Add -static-pie support.
10642 * config/alpha/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
10643 * config/netbsd.h (LINK_EH_SPEC): Likewise.
10644 * config/sol2.h (LINK_EH_SPEC): Likewise.
10645 * config/arm/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
10646 * config/s390/linux.h (LINK_SPEC): Likewise.
10647 * config/freebsd.h (LINK_EH_SPEC): Likewise.
10648 * config/openbsd.h (LINK_EH_SPEC): Likewise.
10649 * config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
10650 * config/aarch64/aarch64-linux.h (LINUX_TARGET_LINK_SPEC): Likewise.
10651 * config/powerpcspe/sysv4.h (LINK_EH_SPEC): Likewise.
10652 * config/bfin/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
10653 * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Fix a typo.
10654 * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Formatting fix.
10655
10656 2017-09-13 Jakub Jelinek <jakub@redhat.com>
10657
10658 * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Add -static-pie
10659 support.
10660 (ENDFILE_LINUX_SPEC): Likewise.
10661 (LINK_EH_SPEC): Likewise.
10662 * config/rs6000/linux64.h (LINK_SHLIB_SPEC): Likewise.
10663 (LINK_OS_LINUX_SPEC32): Likewise.
10664 (LINK_OS_LINUX_SPEC64): Likewise.
10665 * config/rs6000/linux.h (LINK_SHLIB_SPEC): Likewise.
10666 (LINK_OS_LINUX_SPEC): Likewise.
10667
10668 2017-09-13 Martin Liska <mliska@suse.cz>
10669
10670 PR middle-end/82154
10671 * stmt.c (expand_sjlj_dispatch_table): Use CASE_LOW when
10672 CASE_HIGH is NULL_TREE.
10673
10674 2017-09-13 Richard Sandiford <richard.sandiford@linaro.org>
10675 Alan Hayward <alan.hayward@arm.com>
10676 David Sherwood <david.sherwood@arm.com>
10677
10678 * target.def (secondary_memory_needed): New hook.
10679 (secondary_reload): Refer to TARGET_SECONDARY_MEMORY_NEEDED
10680 instead of SECONDARY_MEMORY_NEEDED.
10681 (secondary_memory_needed_mode): Likewise.
10682 * hooks.h (hook_bool_mode_reg_class_t_reg_class_t_false): Declare.
10683 * hooks.c (hook_bool_mode_reg_class_t_reg_class_t_false): New function.
10684 * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED): Replace with...
10685 (TARGET_SECONDARY_MEMORY_NEEDED): ...this.
10686 (SECONDARY_MEMORY_NEEDED_RTX): Update reference accordingly.
10687 * doc/tm.texi: Regenerate.
10688 * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED): Delete.
10689 * config/alpha/alpha.c (alpha_secondary_memory_needed): New function.
10690 (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
10691 * config/i386/i386.h (SECONDARY_MEMORY_NEEDED): Delete.
10692 * config/i386/i386-protos.h (ix86_secondary_memory_needed): Delete.
10693 * config/i386/i386.c (inline_secondary_memory_needed): Put the
10694 mode argument first and change the reg_class arguments to reg_class_t.
10695 (ix86_secondary_memory_needed): Likewise. Remove the strict parameter.
10696 Make static. Update the call to inline_secondary_memory_needed.
10697 (ix86_register_move_cost): Update the call to
10698 inline_secondary_memory_needed.
10699 (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
10700 * config/ia64/ia64.h (SECONDARY_MEMORY_NEEDED): Delete commented-out
10701 definition.
10702 * config/ia64/ia64.c (spill_xfmode_rfmode_operand): Refer to
10703 TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
10704 in comment.
10705 * config/mips/mips.h (SECONDARY_MEMORY_NEEDED): Delete.
10706 * config/mips/mips-protos.h (mips_secondary_memory_needed): Delete.
10707 * config/mips/mips.c (mips_secondary_memory_needed): Make static
10708 and match hook interface. Add comment from mips.h.
10709 (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
10710 * config/mmix/mmix.md (truncdfsf2): Refer to
10711 TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
10712 in comment.
10713 * config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED): Rename to...
10714 (PA_SECONDARY_MEMORY_NEEDED): ...this, and put the mode argument first.
10715 * config/pa/pa.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
10716 (pa_secondary_memory_needed): New function.
10717 * config/pdp11/pdp11.h (SECONDARY_MEMORY_NEEDED): Delete.
10718 * config/pdp11/pdp11-protos.h (pdp11_secondary_memory_needed): Delete.
10719 * config/pdp11/pdp11.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
10720 (pdp11_secondary_memory_needed): Make static and match hook interface.
10721 * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED): Delete.
10722 * config/powerpcspe/powerpcspe-protos.h
10723 (rs6000_secondary_memory_needed_ptr): Delete.
10724 * config/powerpcspe/powerpcspe.c (rs6000_secondary_memory_needed_ptr):
10725 Delete.
10726 (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
10727 (rs6000_option_override_internal): Assign to
10728 targetm.secondary_memory_needed rather than
10729 rs6000_secondary_memory_needed_ptr.
10730 (rs6000_secondary_memory_needed): Match hook interface.
10731 (rs6000_debug_secondary_memory_needed): Likewise.
10732 * config/riscv/riscv.h (SECONDARY_MEMORY_NEEDED): Delete.
10733 * config/riscv/riscv.c (riscv_secondary_memory_needed): New function.
10734 (riscv_register_move_cost): Use it instead of SECONDARY_MEMORY_NEEDED.
10735 (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
10736 * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED): Delete.
10737 * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_ptr):
10738 Delete.
10739 * config/rs6000/rs6000.c (rs6000_secondary_memory_needed_ptr): Delete.
10740 (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
10741 (rs6000_option_override_internal): Assign to
10742 targetm.secondary_memory_needed rather than
10743 rs6000_secondary_memory_needed_ptr.
10744 (rs6000_secondary_memory_needed): Match hook interface.
10745 (rs6000_debug_secondary_memory_needed): Likewise.
10746 * config/s390/s390.h (SECONDARY_MEMORY_NEEDED): Delete.
10747 * config/s390/s390.c (s390_secondary_memory_needed): New function.
10748 (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
10749 * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Delete.
10750 * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
10751 (sparc_secondary_memory_needed): New function.
10752 * lra-constraints.c (check_and_process_move): Refer to
10753 TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
10754 in comment.
10755 (curr_insn_transform): Likewise.
10756 (process_alt_operands): Use targetm.secondary_memory_needed
10757 instead of TARGET_SECONDARY_MEMORY_NEEDED.
10758 (check_secondary_memory_needed_p): Likewise.
10759 (choose_split_class): Likewise.
10760 * reload.c: Unconditionally include code that was previously
10761 conditional on SECONDARY_MEMORY_NEEDED.
10762 (push_secondary_reload): Use targetm.secondary_memory_needed
10763 instead of TARGET_SECONDARY_MEMORY_NEEDED.
10764 (push_reload): Likewise.
10765 * reload1.c: Unconditionally include code that was previously
10766 conditional on SECONDARY_MEMORY_NEEDED.
10767 (choose_reload_regs): Use targetm.secondary_memory_needed
10768 instead of TARGET_SECONDARY_MEMORY_NEEDED.
10769 (gen_reload): Likewise.
10770 * system.h (SECONDARY_MEMORY_NEEDED): Poison.
10771
10772 2017-09-13 Richard Sandiford <richard.sandiford@linaro.org>
10773 Alan Hayward <alan.hayward@arm.com>
10774 David Sherwood <david.sherwood@arm.com>
10775
10776 * target.def (secondary_memory_needed_mode): New hook:
10777 * targhooks.c (default_secondary_memory_needed_mode): Declare.
10778 * targhooks.h (default_secondary_memory_needed_mode): New function.
10779 * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED_MODE): Replace with...
10780 (TARGET_SECONDARY_MEMORY_NEEDED_MODE): ...this.
10781 * doc/tm.texi: Regenerate.
10782 * lra-constraints.c (check_and_process_move): Use
10783 targetm.secondary_memory_needed_mode instead of
10784 TARGET_SECONDARY_MEMORY_NEEDED_MODE.
10785 (curr_insn_transform): Likewise.
10786 * reload.c (get_secondary_mem): Likewise.
10787 * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
10788 * config/alpha/alpha.c (alpha_secondary_memory_needed_mode): New
10789 function.
10790 (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
10791 * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
10792 * config/i386/i386.c (ix86_secondary_memory_needed_mode): New function.
10793 (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
10794 * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED_MODE):
10795 Delete.
10796 * config/powerpcspe/powerpcspe-protos.h
10797 (rs6000_secondary_memory_needed_mode): Delete.
10798 * config/powerpcspe/powerpcspe.c
10799 (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
10800 (rs6000_secondary_memory_needed_mode): Make static.
10801 * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
10802 * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_mode):
10803 Delete.
10804 * config/rs6000/rs6000.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
10805 Redefine.
10806 (rs6000_secondary_memory_needed_mode): Make static.
10807 * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
10808 * config/s390/s390.c (s390_secondary_memory_needed_mode): New function.
10809 (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
10810 * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
10811 * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
10812 Redefine.
10813 (sparc_secondary_memory_needed_mode): New function.
10814 * system.h (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Poison.
10815
10816 2017-09-13 Jackson Woodruff <jackson.woodruff@arm.com>
10817
10818 * config/aarch64/constraints.md (Umq): New constraint.
10819 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>):
10820 Change to use Umq.
10821 (mov<mode>): Update condition.
10822
10823 2017-09-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10824
10825 * gimple-ssa-store-merging.c (sort_by_bitpos): Compare store order
10826 when bitposition is the same.
10827
10828 2017-09-13 Richard Biener <rguenther@suse.de>
10829
10830 * dwarf2out.c (output_die_symbol): Remove.
10831 (output_die): Do not output a DIEs symbol.
10832
10833 2017-09-13 Richard Biener <rguenther@suse.de>
10834
10835 PR middle-end/82128
10836 * gimple-fold.c (gimple_fold_call): Update SSA name in-place to
10837 default-def to avoid breaking iterator update with the weird
10838 interaction with cgraph_update_edges_for_call_stmt_node.
10839
10840 2017-09-13 Richard Biener <rguenther@suse.de>
10841
10842 * tree-cfg.c (verify_gimple_assign_binary): Add verification
10843 for WIDEN_SUM_EXPR, VEC_WIDEN_MULT_{HI,LO,EVEN,ODD}_EXPR,
10844 VEC_PACK_{TRUNC,SAT,FIX_TRUNC}_EXPR.
10845 (verify_gimple_assign_ternary): Add verification for DOT_PROD_EXPR.
10846
10847 2017-09-13 Kugan Vivekanandarajah <kuganv@linaro.org>
10848
10849 * config/aarch64/aarch64.c (aarch64_override_options_after_change_1):
10850 Disable pc relative literal load irrespective of
10851 TARGET_FIX_ERR_A53_84341 for default.
10852
10853 2017-09-12 Eric Botcazou <ebotcazou@adacore.com>
10854
10855 * config/sparc/sparc.c (output_return): Output the source location of
10856 the insn in the delay slot, if any.
10857 (output_sibcall): Likewise.
10858
10859 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
10860
10861 PR driver/81498
10862 * common.opt (-static-pie): New alias.
10863 (shared): Negate static-pie.
10864 (-no-pie): Update help text.
10865 (-pie): Likewise.
10866 (static-pie): New option.
10867 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add
10868 -static-pie support.
10869 (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
10870 (LINK_EH_SPEC): Likewise.
10871 (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
10872 * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
10873 * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
10874 * gcc.c (LINK_COMMAND_SPEC): Likewise.
10875 (init_gcc_specs): Likewise.
10876 (init_spec): Likewise.
10877 (display_help): Update help message for -pie.
10878 * doc/invoke.texi: Update -pie, -no-pie and -static. Document
10879 -static-pie.
10880
10881 2017-09-12 Wilco Dijkstra <wdijkstr@arm.com>
10882
10883 * config/aarch64/aarch64.md (movsi_aarch64): Remove all '*'.
10884 (movdi_aarch64): Likewise.
10885 (movti_aarch64): Likewise.
10886
10887 2017-09-12 Simon Wright <simon@pushface.org>
10888
10889 PR target/80204
10890 * config/darwin-driver.c (darwin_find_version_from_kernel): Eliminate
10891 calculation of the minor version, always output as 0.
10892
10893 2017-09-12 Jakub Jelinek <jakub@redhat.com>
10894
10895 PR target/82112
10896 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
10897 ALTIVEC_BUILTIN_VEC_LD if arg1 has array type call default_conversion
10898 on it early, rather than manual conversion late. For
10899 ALTIVEC_BUILTIN_VEC_ST if arg2 has array type call default_conversion
10900 instead of performing manual conversion.
10901
10902 2017-09-12 Carl Love <cel@us.ibm.com>
10903
10904 * config/rs6000/altivec.md (vec_widen_umult_even_v4si,
10905 vec_widen_smult_even_v4si): Add define expands for vmuleuw, vmulesw,
10906 vmulouw, vmulosw.
10907 * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
10908 VMULOSW): Add definitions.
10909 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
10910 ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
10911 ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
10912 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
10913 builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
10914
10915 2017-09-12 James Greenhalgh <james.greenhalgh@arm.com>
10916
10917 * config/aarch64/aarch64.md (movdi_aarch64): Set load/store
10918 types correctly.
10919 (movti_aarch64): Likewise.
10920 (movdf_aarch64): Likewise.
10921 (movtf_aarch64): Likewise.
10922 (load_pairdi): Likewise.
10923 (store_pairdi): Likewise.
10924 (load_pairdf): Likewise.
10925 (store_pairdf): Likewise.
10926 (loadwb_pair<GPI:mode>_<P:mode>): Likewise.
10927 (storewb_pair<GPI:mode>_<P:mode>): Likewise.
10928 (ldr_got_small_<mode>): Likewise.
10929 (ldr_got_small_28k_<mode>): Likewise.
10930 (ldr_got_tiny): Likewise.
10931 * config/aarch64/iterators.md (ldst_sz): New.
10932 (ldpstp_sz): Likewise.
10933 * config/aarch64/thunderx.md (thunderx_storepair): Split store_8
10934 to store_16.
10935 (thunderx_load): Split load_8 to load_16.
10936 * config/aarch64/thunderx2t99.md (thunderx2t99_loadpair): Split
10937 load_8 to load_16.
10938 (thunderx2t99_storepair_basic): Split store_8 to store_16.
10939 * config/arm/xgene1.md (xgene1_load_pair): Split load_8 to load_16.
10940 (xgene1_store_pair): Split store_8 to store_16.
10941 * config/aarch64/falkor.md (falkor_ld_3_ld): Split load_8 to load_16.
10942 (falkor_st_0_st_sd): Split store_8 to store_16.
10943
10944 2017-09-12 James Greenhalgh <james.greenhalgh@arm.com>
10945
10946 * config/arm/types.md (type): Rename load1/2/3/4 to load_4/8/12/16
10947 and store1/2/3/4 to store_4/8/12/16.
10948 * config/aarch64/aarch64.md: Update for rename.
10949 * config/arm/arm.md: Likewise.: Likewise.
10950 * config/arm/arm.c: Likewise.
10951 * config/arm/thumb1.md: Likewise.
10952 * config/arm/thumb2.md: Likewise.
10953 * config/arm/vfp.md: Likewise.
10954 * config/arm/arm-generic.md: Likewise.
10955 * config/arm/arm1020e.md: Likewise.
10956 * config/arm/arm1026ejs.md: Likewise.
10957 * config/arm/arm1136jfs.md: Likewise.
10958 * config/arm/arm926ejs.md: Likewise.
10959 * config/arm/cortex-a15.md: Likewise.
10960 * config/arm/cortex-a17.md: Likewise.
10961 * config/arm/cortex-a5.md: Likewise.
10962 * config/arm/cortex-a53.md: Likewise.
10963 * config/arm/cortex-a57.md: Likewise.
10964 * config/arm/cortex-a7.md: Likewise.
10965 * config/arm/cortex-a8.md: Likewise.
10966 * config/arm/cortex-a9.md: Likewise.
10967 * config/arm/cortex-m4.md: Likewise.
10968 * config/arm/cortex-m7.md: Likewise.
10969 * config/arm/cortex-r4.md: Likewise.
10970 * config/arm/exynos-m1.md: Likewise.
10971 * config/arm/fa526.md: Likewise.
10972 * config/arm/fa606te.md: Likewise.
10973 * config/arm/fa626te.md: Likewise.
10974 * config/arm/fa726te.md: Likewise.
10975 * config/arm/fmp626.md: Likewise.
10976 * config/arm/iwmmxt.md: Likewise.
10977 * config/arm/ldmstm.md: Likewise.
10978 * config/arm/marvell-pj4.md: Likewise.
10979 * config/arm/xgene1.md: Likewise.
10980 * config/aarch64/thunderx.md: Likewise.
10981 * config/aarch64/thunderx2t99.md: Likewise.
10982 * config/aarch64/falkor.md: Likewise.
10983
10984 2017-09-12 Martin Liska <mliska@suse.cz>
10985
10986 * attribs.c (private_lookup_attribute): New function.
10987 * attribs.h (private_lookup_attribute): Declared here.
10988 (lookup_attribute): Called from this place.
10989
10990 2017-09-12 Richard Biener <rguenther@suse.de>
10991
10992 PR tree-optimization/82157
10993 * tree-ssa-pre.c (remove_dead_inserted_code): Do not remove
10994 stmts with side-effects.
10995
10996 2017-09-12 Richard Sandiford <richard.sandiford@linaro.org>
10997 Alan Hayward <alan.hayward@arm.com>
10998 David Sherwood <david.sherwood@arm.com>
10999
11000 * target.def (hard_regno_nregs): New hook.
11001 (class_max_nregs): Refer to it instead of HARD_REGNO_NREGS.
11002 * targhooks.h (default_hard_regno_nregs): Declare.
11003 * targhooks.c (default_hard_regno_nregs): New function.
11004 * doc/tm.texi.in (HARD_REGNO_NREGS): Replace with...
11005 (TARGET_HARD_REGNO_NREGS): ...this hook.
11006 (HARD_REGNO_NREGS_HAS_PADDING): Update accordingly.
11007 (CLASS_MAX_NREGS): Likewise.
11008 * doc/tm.texi: Regenerate.
11009 * reginfo.c (init_reg_modes_target): Use targetm.hard_regno_nregs
11010 instead of HARD_REGNO_NREGS.
11011 * rtl.h (REG_NREGS): Refer to TARGET_HARD_REGNO_NREGS rather than
11012 HARD_REGNO_NREGS in the comment.
11013 * config/aarch64/aarch64.h (HARD_REGNO_NREGS): Delete.
11014 * config/aarch64/aarch64-protos.h (aarch64_hard_regno_nregs): Delete.
11015 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs): Make static.
11016 Return an unsigned int.
11017 (TARGET_HARD_REGNO_NREGS): Redefine.
11018 * config/alpha/alpha.h (HARD_REGNO_NREGS): Delete.
11019 * config/arc/arc.h (HARD_REGNO_NREGS): Delete.
11020 * config/arc/arc.c (TARGET_HARD_REGNO_NREGS): Redefine.
11021 (arc_hard_regno_nregs): New function.
11022 * config/arm/arm.h (HARD_REGNO_NREGS): Delete.
11023 * config/arm/arm.c (TARGET_HARD_REGNO_NREGS): Redefine.
11024 (arm_hard_regno_nregs): New function.
11025 * config/avr/avr.h (HARD_REGNO_NREGS): Delete.
11026 * config/bfin/bfin.h (HARD_REGNO_NREGS): Delete.
11027 * config/bfin/bfin.c (bfin_hard_regno_nregs): New function.
11028 (TARGET_HARD_REGNO_NREGS): Redefine.
11029 * config/c6x/c6x.h (HARD_REGNO_NREGS): Delete.
11030 * config/cr16/cr16.h (LONG_REG_P): Use targetm.hard_regno_nregs.
11031 (HARD_REGNO_NREGS): Delete.
11032 * config/cr16/cr16.c (TARGET_HARD_REGNO_NREGS): Redefine.
11033 (cr16_hard_regno_nregs): New function.
11034 (cr16_memory_move_cost): Use it instead of HARD_REGNO_NREGS.
11035 * config/cris/cris.h (HARD_REGNO_NREGS): Delete.
11036 * config/cris/cris.c (TARGET_HARD_REGNO_NREGS): Redefine.
11037 (cris_hard_regno_nregs): New function.
11038 * config/epiphany/epiphany.h (HARD_REGNO_NREGS): Delete.
11039 * config/fr30/fr30.h (HARD_REGNO_NREGS): Delete.
11040 (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
11041 * config/frv/frv.h (HARD_REGNO_NREGS): Delete.
11042 (CLASS_MAX_NREGS): Remove outdated copy of documentation.
11043 * config/frv/frv-protos.h (frv_hard_regno_nregs): Delete.
11044 * config/frv/frv.c (TARGET_HARD_REGNO_NREGS): Redefine.
11045 (frv_hard_regno_nregs): Make static. Take and return an
11046 unsigned int.
11047 (frv_class_max_nregs): Remove outdated copy of documentation.
11048 * config/ft32/ft32.h (HARD_REGNO_NREGS): Delete.
11049 * config/h8300/h8300.h (HARD_REGNO_NREGS): Delete.
11050 * config/h8300/h8300-protos.h (h8300_hard_regno_nregs): Delete.
11051 * config/h8300/h8300.c (h8300_hard_regno_nregs): Delete.
11052 * config/i386/i386.h (HARD_REGNO_NREGS): Delete.
11053 * config/i386/i386.c (ix86_hard_regno_nregs): New function.
11054 (TARGET_HARD_REGNO_NREGS): Redefine.
11055 * config/ia64/ia64.h (HARD_REGNO_NREGS): Delete.
11056 (CLASS_MAX_NREGS): Update comment.
11057 * config/ia64/ia64.c (TARGET_HARD_REGNO_NREGS): Redefine.
11058 (ia64_hard_regno_nregs): New function.
11059 * config/iq2000/iq2000.h (HARD_REGNO_NREGS): Delete.
11060 * config/lm32/lm32.h (HARD_REGNO_NREGS): Delete.
11061 * config/m32c/m32c.h (HARD_REGNO_NREGS): Delete.
11062 * config/m32c/m32c-protos.h (m32c_hard_regno_nregs): Delete.
11063 * config/m32c/m32c.c (m32c_hard_regno_nregs_1): Take and return
11064 an unsigned int.
11065 (m32c_hard_regno_nregs): Likewise. Make static.
11066 (TARGET_HARD_REGNO_NREGS): Redefine.
11067 * config/m32r/m32r.h (HARD_REGNO_NREGS): Delete.
11068 * config/m68k/m68k.h (HARD_REGNO_NREGS): Delete.
11069 * config/m68k/m68k.c (TARGET_HARD_REGNO_NREGS): Redefine.
11070 (m68k_hard_regno_nregs): New function.
11071 * config/mcore/mcore.h (HARD_REGNO_NREGS): Delete.
11072 * config/microblaze/microblaze.h (HARD_REGNO_NREGS): Delete.
11073 * config/mips/mips.h (HARD_REGNO_NREGS): Delete.
11074 * config/mips/mips-protos.h (mips_hard_regno_nregs): Delete.
11075 * config/mips/mips.c (mips_hard_regno_nregs): Make static.
11076 Take and return an unsigned int.
11077 (TARGET_HARD_REGNO_NREGS): Redefine.
11078 * config/mmix/mmix.h (HARD_REGNO_NREGS): Delete.
11079 (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
11080 * config/mn10300/mn10300.h (HARD_REGNO_NREGS): Delete.
11081 * config/moxie/moxie.h (HARD_REGNO_NREGS): Delete.
11082 * config/msp430/msp430.h (HARD_REGNO_NREGS): Delete.
11083 * config/msp430/msp430-protos.h (msp430_hard_regno_nregs): Delete.
11084 * config/msp430/msp430.c (TARGET_HARD_REGNO_NREGS): Redefine.
11085 (msp430_hard_regno_nregs): Make static. Take and return an
11086 unsigned int.
11087 * config/nds32/nds32.h (HARD_REGNO_NREGS): Delete.
11088 * config/nds32/nds32-protos.h (nds32_hard_regno_nregs): Delete.
11089 * config/nds32/nds32.c (nds32_hard_regno_nregs): Delete.
11090 (nds32_hard_regno_mode_ok): Use targetm.hard_regno_nregs.
11091 * config/nios2/nios2.h (HARD_REGNO_NREGS): Delete.
11092 * config/nvptx/nvptx.h (HARD_REGNO_NREGS): Delete.
11093 * config/nvptx/nvptx.c (nvptx_hard_regno_nregs): New function.
11094 (TARGET_HARD_REGNO_NREGS): Redefine.
11095 * config/pa/pa32-regs.h (HARD_REGNO_NREGS): Rename to...
11096 (PA_HARD_REGNO_NREGS): ...this.
11097 * config/pa/pa64-regs.h (HARD_REGNO_NREGS): Rename to...
11098 (PA_HARD_REGNO_NREGS): ...this.
11099 * config/pa/pa.c (TARGET_HARD_REGNO_NREGS): Redefine.
11100 (pa_hard_regno_nregs): New function.
11101 * config/pdp11/pdp11.h (HARD_REGNO_NREGS): Delete.
11102 * config/pdp11/pdp11.c (TARGET_HARD_REGNO_NREGS): Redefine.
11103 (pdp11_hard_regno_nregs): New function.
11104 * config/powerpcspe/powerpcspe.h (HARD_REGNO_NREGS): Delete.
11105 * config/powerpcspe/powerpcspe.c (TARGET_HARD_REGNO_NREGS): Redefine.
11106 (rs6000_hard_regno_nregs_hook): New function.
11107 * config/riscv/riscv.h (HARD_REGNO_NREGS): Delete.
11108 * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
11109 * config/riscv/riscv.c (riscv_hard_regno_nregs): Make static.
11110 Take and return an unsigned int. Move earlier in file.
11111 (TARGET_HARD_REGNO_NREGS): Redefine.
11112 * config/rl78/rl78.h (HARD_REGNO_NREGS): Delete.
11113 * config/rl78/rl78-protos.h (rl78_hard_regno_nregs): Delete.
11114 * config/rl78/rl78.c (TARGET_HARD_REGNO_NREGS): Reefine.
11115 (rl78_hard_regno_nregs): Make static. Take and return an
11116 unsigned int.
11117 * config/rs6000/rs6000.h (HARD_REGNO_NREGS): Delete.
11118 * config/rs6000/rs6000.c (TARGET_HARD_REGNO_NREGS): Redefine.
11119 (rs6000_hard_regno_nregs_hook): New function.
11120 * config/rx/rx.h (HARD_REGNO_NREGS): Delete.
11121 * config/rx/rx.c (rx_hard_regno_nregs): New function.
11122 (TARGET_HARD_REGNO_NREGS): Redefine.
11123 * config/s390/s390.h (HARD_REGNO_NREGS): Delete.
11124 * config/s390/s390.c (REGNO_PAIR_OK): Use s390_hard_regno_nregs
11125 instead of HARD_REGNO_NREGS.
11126 (s390_hard_regno_nregs): New function.
11127 (s390_hard_regno_mode_ok): Add comment from s390.h.
11128 (TARGET_HARD_REGNO_NREGS): Redefine.
11129 * config/sh/sh.h (HARD_REGNO_NREGS): Delete.
11130 * config/sh/sh.c (TARGET_HARD_REGNO_NREGS): Redefine.
11131 (sh_hard_regno_nregs): New function.
11132 (sh_pass_in_reg_p): Use it.
11133 * config/sparc/sparc.h (HARD_REGNO_NREGS): Delete.
11134 * config/sparc/sparc.c (TARGET_HARD_REGNO_NREGS): Redefine.
11135 (sparc_hard_regno_nregs): New function.
11136 * config/spu/spu.h (HARD_REGNO_NREGS): Delete.
11137 * config/spu/spu.c (spu_hard_regno_nregs): New function.
11138 (spu_function_arg_advance): Use it, supplying a valid register number.
11139 (TARGET_HARD_REGNO_NREGS): Redefine.
11140 * config/stormy16/stormy16.h (HARD_REGNO_NREGS): Delete.
11141 * config/tilegx/tilegx.h (HARD_REGNO_NREGS): Delete.
11142 * config/tilepro/tilepro.h (HARD_REGNO_NREGS): Delete.
11143 * config/v850/v850.h (HARD_REGNO_NREGS): Delete.
11144 * config/vax/vax.h (HARD_REGNO_NREGS): Delete.
11145 * config/visium/visium.h (HARD_REGNO_NREGS): Delete.
11146 (CLASS_MAX_NREGS): Remove copy of old documentation.
11147 * config/visium/visium.c (TARGET_HARD_REGNO_NREGS): Redefine.
11148 (visium_hard_regno_nregs): New function.
11149 (visium_hard_regno_mode_ok): Use it instead of HARD_REGNO_NREGS.
11150 * config/xtensa/xtensa.h (HARD_REGNO_NREGS): Delete.
11151 * config/xtensa/xtensa.c (TARGET_HARD_REGNO_NREGS): Redefine.
11152 xtensa_hard_regno_nregs): New function.
11153 * system.h (HARD_REGNO_NREGS): Poison.
11154
11155 2017-09-12 Richard Sandiford <richard.sandiford@linaro.org>
11156
11157 * config/arm/arm.h (THUMB_SECONDARY_INPUT_RELOAD_CLASS): Use
11158 hard_regno_nregs instead of HARD_REGNO_NREGS.
11159 (THUMB_SECONDARY_OUTPUT_RELOAD_CLASS): Likewise.
11160 * config/c6x/c6x.c (c6x_expand_prologue): Likewise.
11161 (c6x_expand_epilogue): Likewise.
11162 * config/frv/frv.c (frv_alloc_temp_reg): Likewise.
11163 (frv_read_iacc_argument): Likewise.
11164 * config/sh/sh.c: Include regs.h.
11165 (sh_print_operand): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
11166 (regs_used): Likewise.
11167 (output_stack_adjust): Likewise.
11168 * config/xtensa/xtensa.c (xtensa_copy_incoming_a7): Likewise.
11169 * expmed.c: Include regs.h.
11170 (store_bit_field_1): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
11171 * ree.c: Include regs.h.
11172 (combine_reaching_defs): Use hard_regno_nregs instead of
11173 HARD_REGNO_NREGS.
11174 (add_removable_extension): Likewise.
11175
11176 2017-09-12 Richard Sandiford <richard.sandiford@linaro.org>
11177
11178 * regs.h (hard_regno_nregs): Turn into a function.
11179 (end_hard_regno): Update accordingly.
11180 * caller-save.c (setup_save_areas): Likewise.
11181 (save_call_clobbered_regs): Likewise.
11182 (replace_reg_with_saved_mem): Likewise.
11183 (insert_restore): Likewise.
11184 (insert_save): Likewise.
11185 * combine.c (can_change_dest_mode): Likewise.
11186 (move_deaths): Likewise.
11187 (distribute_notes): Likewise.
11188 * config/mips/mips.c (mips_hard_regno_call_part_clobbered): Likewise.
11189 * config/powerpcspe/powerpcspe.c (rs6000_cannot_change_mode_class)
11190 (rs6000_split_multireg_move): Likewise.
11191 (rs6000_register_move_cost): Likewise.
11192 (rs6000_memory_move_cost): Likewise.
11193 * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class): Likewise.
11194 (rs6000_split_multireg_move): Likewise.
11195 (rs6000_register_move_cost): Likewise.
11196 (rs6000_memory_move_cost): Likewise.
11197 * cselib.c (cselib_reset_table): Likewise.
11198 (cselib_lookup_1): Likewise.
11199 * emit-rtl.c (set_mode_and_regno): Likewise.
11200 * function.c (aggregate_value_p): Likewise.
11201 * ira-color.c (setup_profitable_hard_regs): Likewise.
11202 (check_hard_reg_p): Likewise.
11203 (calculate_saved_nregs): Likewise.
11204 (assign_hard_reg): Likewise.
11205 (improve_allocation): Likewise.
11206 (calculate_spill_cost): Likewise.
11207 * ira-emit.c (modify_move_list): Likewise.
11208 * ira-int.h (ira_hard_reg_set_intersection_p): Likewise.
11209 (ira_hard_reg_in_set_p): Likewise.
11210 * ira.c (setup_reg_mode_hard_regset): Likewise.
11211 (clarify_prohibited_class_mode_regs): Likewise.
11212 (check_allocation): Likewise.
11213 * lra-assigns.c (find_hard_regno_for_1): Likewise.
11214 (lra_setup_reg_renumber): Likewise.
11215 (setup_try_hard_regno_pseudos): Likewise.
11216 (spill_for): Likewise.
11217 (assign_hard_regno): Likewise.
11218 (setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
11219 * lra-constraints.c (in_class_p): Likewise.
11220 (lra_constraint_offset): Likewise.
11221 (simplify_operand_subreg): Likewise.
11222 (lra_constraints): Likewise.
11223 (split_reg): Likewise.
11224 (split_if_necessary): Likewise.
11225 (invariant_p): Likewise.
11226 (inherit_in_ebb): Likewise.
11227 * lra-lives.c (process_bb_lives): Likewise.
11228 * lra-remat.c (reg_overlap_for_remat_p): Likewise.
11229 (get_hard_regs): Likewise.
11230 (do_remat): Likewise.
11231 * lra-spills.c (assign_spill_hard_regs): Likewise.
11232 * mode-switching.c (create_pre_exit): Likewise.
11233 * postreload.c (reload_combine_recognize_pattern): Likewise.
11234 * recog.c (peep2_find_free_register): Likewise.
11235 * regcprop.c (kill_value_regno): Likewise.
11236 (set_value_regno): Likewise.
11237 (copy_value): Likewise.
11238 (maybe_mode_change): Likewise.
11239 (find_oldest_value_reg): Likewise.
11240 (copyprop_hardreg_forward_1): Likewise.
11241 * regrename.c (check_new_reg_p): Likewise.
11242 (regrename_do_replace): Likewise.
11243 * reload.c (push_reload): Likewise.
11244 (combine_reloads): Likewise.
11245 (find_dummy_reload): Likewise.
11246 (operands_match_p): Likewise.
11247 (find_reloads): Likewise.
11248 (find_equiv_reg): Likewise.
11249 (reload_adjust_reg_for_mode): Likewise.
11250 * reload1.c (count_pseudo): Likewise.
11251 (count_spilled_pseudo): Likewise.
11252 (find_reg): Likewise.
11253 (clear_reload_reg_in_use): Likewise.
11254 (free_for_value_p): Likewise.
11255 (allocate_reload_reg): Likewise.
11256 (choose_reload_regs): Likewise.
11257 (reload_adjust_reg_for_temp): Likewise.
11258 (emit_reload_insns): Likewise.
11259 (delete_output_reload): Likewise.
11260 * rtlanal.c (subreg_get_info): Likewise.
11261 * sched-deps.c (sched_analyze_reg): Likewise.
11262 * sel-sched.c (init_regs_for_mode): Likewise.
11263 (mark_unavailable_hard_regs): Likewise.
11264 (choose_best_reg_1): Likewise.
11265 (verify_target_availability): Likewise.
11266 * valtrack.c (dead_debug_insert_temp): Likewise.
11267 * var-tracking.c (track_loc_p): Likewise.
11268 (emit_note_insn_var_location): Likewise.
11269 * varasm.c (make_decl_rtl): Likewise.
11270 * reginfo.c (choose_hard_reg_mode): Likewise.
11271 (init_reg_modes_target): Refer directly to
11272 this_target_regs->x_hard_regno_nregs.
11273
11274 2017-09-12 Richard Sandiford <richard.sandiford@linaro.org>
11275
11276 * ira-costs.c (record_operand_costs): Use in_hard_reg_set_p
11277 instead of hard_regno_nregs.
11278
11279 2017-09-12 Richard Sandiford <richard.sandiford@linaro.org>
11280
11281 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Use
11282 end_hard_regno instead of hard_regno_nregs.
11283 * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
11284 * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): Likewise.
11285 * config/visium/visium.c (visium_hard_regno_mode_ok): Likewise.
11286 * ira-color.c (improve_allocation): Likewise.
11287 * lra-assigns.c (find_hard_regno_for_1): Likewise.
11288 * lra-lives.c (mark_regno_live): Likewise.
11289 (mark_regno_dead): Likewise.
11290 * lra-remat.c (operand_to_remat): Likewise.
11291 * lra.c (collect_non_operand_hard_regs): Likewise.
11292 * postreload.c (reload_combine_note_store): Likewise.
11293 (move2add_valid_value_p): Likewise.
11294 * reload.c (regno_clobbered_p): Likewise.
11295
11296 2017-09-12 Richard Sandiford <richard.sandiford@linaro.org>
11297
11298 * config/frv/frv.c (FOR_EACH_REGNO): Use END_REGNO instead of
11299 hard_regno_nregs.
11300 * config/v850/v850.c (v850_reorg): Likewise.
11301 * reload.c (refers_to_regno_for_reload_p): Likewise.
11302 (find_equiv_reg): Likewise.
11303 * reload1.c (reload_reg_reaches_end_p): Likewise.
11304
11305 2017-09-12 Richard Sandiford <richard.sandiford@linaro.org>
11306
11307 * caller-save.c (add_used_regs): Use REG_NREGS instead of
11308 hard_regno_nregs.
11309 * config/aarch64/aarch64.c (aarch64_split_combinev16qi): Likewise.
11310 * config/arm/arm.c (output_move_neon): Likewise.
11311 (arm_attr_length_move_neon): Likewise.
11312 (neon_split_vcombine): Likewise.
11313 * config/c6x/c6x.c (c6x_mark_reg_read): Likewise.
11314 (c6x_mark_reg_written): Likewise.
11315 (c6x_dwarf_register_span): Likewise.
11316 * config/i386/i386.c (ix86_save_reg): Likewise.
11317 * config/ia64/ia64.c (mark_reg_gr_used_mask): Likewise.
11318 (rws_access_reg): Likewise.
11319 * config/s390/s390.c (s390_call_saved_register_used): Likewise.
11320 * mode-switching.c (create_pre_exit): Likewise.
11321 * ree.c (combine_reaching_defs): Likewise.
11322 (add_removable_extension): Likewise.
11323 * regcprop.c (find_oldest_value_reg): Likewise.
11324 (copyprop_hardreg_forward_1): Likewise.
11325 * reload.c (reload_inner_reg_of_subreg): Likewise.
11326 (push_reload): Likewise.
11327 (combine_reloads): Likewise.
11328 (find_dummy_reload): Likewise.
11329 (reload_adjust_reg_for_mode): Likewise.
11330 * reload1.c (find_reload_regs): Likewise.
11331 (forget_old_reloads_1): Likewise.
11332 (reload_reg_free_for_value_p): Likewise.
11333 (reload_adjust_reg_for_temp): Likewise.
11334 (emit_reload_insns): Likewise.
11335 (delete_output_reload): Likewise.
11336 * sel-sched.c (choose_best_reg_1): Likewise.
11337 (choose_best_pseudo_reg): Likewise.
11338
11339 2017-09-12 Richard Sandiford <richard.sandiford@linaro.org>
11340 Alan Hayward <alan.hayward@arm.com>
11341 David Sherwood <david.sherwood@arm.com>
11342
11343 * defaults.h (SLOW_UNALIGNED_ACCESS): Delete.
11344 * target.def (slow_unaligned_access): New hook.
11345 * targhooks.h (default_slow_unaligned_access): Declare.
11346 * targhooks.c (default_slow_unaligned_access): New function.
11347 * doc/tm.texi.in (SLOW_UNALIGNED_ACCESS): Replace with...
11348 (TARGET_SLOW_UNALIGNED_ACCESS): ...this.
11349 * doc/tm.texi: Regenerate.
11350 * config/alpha/alpha.h (SLOW_UNALIGNED_ACCESS): Delete.
11351 * config/arm/arm.h (SLOW_UNALIGNED_ACCESS): Delete.
11352 * config/i386/i386.h (SLOW_UNALIGNED_ACCESS): Delete commented-out
11353 definition.
11354 * config/powerpcspe/powerpcspe.h (SLOW_UNALIGNED_ACCESS): Delete.
11355 * config/powerpcspe/powerpcspe.c (TARGET_SLOW_UNALIGNED_ACCESS):
11356 Redefine.
11357 (rs6000_slow_unaligned_access): New function.
11358 (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
11359 (expand_block_compare): Likewise.
11360 (expand_strn_compare): Likewise.
11361 (rs6000_rtx_costs): Likewise.
11362 * config/riscv/riscv.h (SLOW_UNALIGNED_ACCESS): Delete.
11363 (riscv_slow_unaligned_access): Likewise.
11364 * config/riscv/riscv.c (riscv_slow_unaligned_access): Rename to...
11365 (riscv_slow_unaligned_access_p): ...this and make static.
11366 (riscv_option_override): Update accordingly.
11367 (riscv_slow_unaligned_access): New function.
11368 (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
11369 * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Delete.
11370 * config/rs6000/rs6000.c (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
11371 (rs6000_slow_unaligned_access): New function.
11372 (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
11373 (rs6000_rtx_costs): Likewise.
11374 * config/rs6000/rs6000-string.c (expand_block_compare)
11375 (expand_strn_compare): Use targetm.slow_unaligned_access instead
11376 of SLOW_UNALIGNED_ACCESS.
11377 * config/tilegx/tilegx.h (SLOW_UNALIGNED_ACCESS): Delete.
11378 * config/tilepro/tilepro.h (SLOW_UNALIGNED_ACCESS): Delete.
11379 * calls.c (expand_call): Use targetm.slow_unaligned_access instead
11380 of SLOW_UNALIGNED_ACCESS.
11381 * expmed.c (simple_mem_bitfield_p): Likewise.
11382 * expr.c (alignment_for_piecewise_move): Likewise.
11383 (emit_group_load_1): Likewise.
11384 (emit_group_store): Likewise.
11385 (copy_blkmode_from_reg): Likewise.
11386 (emit_push_insn): Likewise.
11387 (expand_assignment): Likewise.
11388 (store_field): Likewise.
11389 (expand_expr_real_1): Likewise.
11390 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
11391 * lra-constraints.c (simplify_operand_subreg): Likewise.
11392 * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
11393 * gimple-ssa-store-merging.c: Likewise in block comment at start
11394 of file.
11395 * tree-ssa-strlen.c: Include target.h.
11396 (handle_builtin_memcmp): Use targetm.slow_unaligned_access instead
11397 of SLOW_UNALIGNED_ACCESS.
11398 * system.h (SLOW_UNALIGNED_ACCESS): Poison.
11399
11400 2017-09-12 Richard Sandiford <richard.sandiford@linaro.org>
11401
11402 PR rtl-optimization/82185
11403 * expmed.c (emit_store_flag_int): Only test tem if it has been
11404 initialized.
11405
11406 2017-09-12 Richard Biener <rguenther@suse.de>
11407
11408 PR middle-end/82149
11409 * match.pd ((FTYPE) N CMP CST): Fix typo.
11410
11411 2017-09-12 Simon Atanasyan <simon.atanasyan@imgtec.com>
11412
11413 * config/mips/mips.c (mips_attribute_table): Add 'short_call'
11414 attribute.
11415 (mips_near_type_p): Add 'short_call' attribute as a synonym
11416 for 'near'.
11417 * doc/extend.texi (short_call): Document new function attribute.
11418
11419 2017-09-12 Jakub Jelinek <jakub@redhat.com>
11420
11421 PR target/82112
11422 * c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()
11423 assertion check that in the condition.
11424 (get_atomic_generic_size): Likewise. Before testing if parameter
11425 has pointer type, if it has array type, call for C++
11426 default_conversion to perform array-to-pointer conversion.
11427
11428 2017-09-12 Richard Biener <rguenther@suse.de>
11429
11430 * tree-vect-generic.c (expand_vector_operations_1): Do nothing
11431 for operations we cannot scalarize.
11432
11433 2017-09-12 Aldy Hernandez <aldyh@redhat.com>
11434
11435 * tree-ssa-threadbackward.c (fsm_find_thread_path): Make GC
11436 vectors heap vectors. Clean up comments.
11437 Make visited_bbs a reference.
11438 (profitable_jump_thread_path): Make GC
11439 vectors heap vectors. Clean up comments.
11440 Misc cleanups.
11441 (convert_and_register_jump_thread_path): Make GC vectors heap
11442 vectors.
11443 (check_subpath_and_update_thread_path): Same. Clean up comments.
11444 Make visited_bbs a reference.
11445 (handle_phi): Abstract common code to to
11446 register_jump_thread_path_if_profitable.
11447 Rename VAR_BB to DEF_BB.
11448 Update comments.
11449 Make GC vectors heap vectors.
11450 Make visited_bbs a reference.
11451 (handle_assignment): Same.
11452 (register_jump_thread_path_if_profitable): New.
11453 (fsm_find_control_statement_thread_paths): Rename VAR_BB to
11454 DEF_BB.
11455 Make GC vectors heap vectors. Clean up comments.
11456 Make visited_bbs a reference.
11457 (find_jump_threads_backwards): Make visited_bbs live in the stack.
11458 * tree-ssa-threadupdate.c (delete_jump_thread_path): Fix typo in
11459 comment.
11460
11461 2017-09-11 Max Filippov <jcmvbkbc@gmail.com>
11462
11463 PR target/82181
11464 * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
11465 words of E_DImode object are reachable by xtensa_uimm8x4 access.
11466
11467 2017-09-11 Vidya Praveen <vidyapraveen@arm.com>
11468
11469 Revert r251800 and r251799.
11470
11471 2017-09-11 Martin Jambor <mjambor@suse.cz>
11472
11473 PR hsa/82119
11474 * hsa-gen.c (gen_hsa_phi_from_gimple_phi): Process ADDR_EXPRs in
11475 arguments in advance.
11476 * hsa-regalloc.c (naive_process_phi): New parameter predecessors,
11477 use it to find predecessor edges.
11478 (naive_outof_ssa): Collect vector of predecessors.
11479
11480 2017-09-08 Jason Merrill <jason@redhat.com>
11481
11482 PR c++/70029 - ICE with ref-qualifier and -flto
11483 * langhooks.h (struct lang_hooks_for_types): Add
11484 copy_lang_qualifiers.
11485 * attribs.c (build_type_attribute_qual_variant): Use it.
11486 * langhooks-def.h (LANG_HOOKS_COPY_LANG_QUALIFIERS): Default to
11487 NULL.
11488 (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
11489 * tree.c (verify_type): Re-enable TYPE_CANONICAL main variant check.
11490
11491 2017-09-08 Eric Botcazou <ebotcazou@adacore.com>
11492
11493 PR target/81988
11494 * config/sparc/sparc.md (mulsi3): Rename into *mulsi3_sp32.
11495 (*mulsi3_sp64): New instruction.
11496 (mulsi3): New expander.
11497
11498 2017-09-08 Uros Bizjak <ubizjak@gmail.com>
11499
11500 * config/alpha/alpha.c (alpha_print_operand) <case 'S'>: Remove.
11501
11502 2017-09-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11503
11504 * sancov.c: Include memmodel.h.
11505
11506 2017-09-07 Eric Botcazou <ebotcazou@adacore.com>
11507
11508 PR target/80897
11509 * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Deal with too
11510 large offsets.
11511
11512 2017-09-07 Carl Love <cel@us.ibm.com>
11513
11514 * config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
11515 the sldi instruction.
11516
11517 2017-09-07 David Edelsohn <dje.gcc@gmail.com>
11518
11519 * sancov.c: Include tm_p.h.
11520
11521 2017-09-07 Jakub Jelinek <jakub@redhat.com>
11522
11523 PR target/81979
11524 * output.h (switch_to_other_text_partition): New declaration.
11525 * varasm.c (switch_to_other_text_partition): New function.
11526 * config/rs6000/rs6000.c (uses_TOC): Return 2 if
11527 NOTE_INSN_SWITCH_TEXT_SECTIONS is seen before finding load_toc_* insn.
11528 (rs6000_elf_declare_function_name): If uses_TOC returned 2, switch
11529 to the other text partition before emitting LCL label and switch back
11530 after emitting the word after it.
11531
11532 2017-09-07 Richard Biener <rguenther@suse.de>
11533
11534 * passes.def (pass_split_crit_edges): Remove instance before PRE.
11535 * tree-ssa-pre.c (pass_pre::execute): Instead manually split
11536 critical edges here, after loop init.
11537 (pass_data_pre): Remove PROP_no_crit_edges flags.
11538 * tree-ssa-sccvn.c (vn_reference_lookup_3): Use vn_valueize
11539 for valueization of call args to avoid leaking VN_TOP.
11540 (visit_use): Assert we do not visit default defs.
11541 (init_scc_vn): Use build_decl for VN_TOP to make name nicer.
11542 Use error_mark_node to more easily detect leaking VN_TOP.
11543 All default-defs are varying, not VN_TOP. Mark them visited.
11544 (run_scc_vn): Make code match comment.
11545
11546 2017-09-07 Michael Meissner <meissner@linux.vnet.ibm.com>
11547
11548 * config/rs6000/rs6000-cpus.def (OTHER_VSX_VECTOR_MASKS): Delete
11549 OPTION_MASK_FLOAT128_KEYWORD.
11550 (POWERPC_MASKS): Likewise.
11551 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Delete
11552 support for the -mfloat128-type option, and make -mfloat128
11553 default on PowerPC Linux systems. Define or undefine
11554 __FLOAT128__ and __FLOAT128_HARDWARE__ for the current options.
11555 Define __float128 to be __ieee128 if IEEE 128-bit support is
11556 enabled, or undefine it.
11557 (rs6000_cpu_cpp_builtins): Delete defining __FLOAT128__ here.
11558 Delete defining __FLOAT128_TYPE__.
11559 * config/rs6000/rs6000.opt (x_TARGET_FLOAT128_TYPE): Delete the
11560 -mfloat128-type option and make -mfloat128 default on PowerPC
11561 Linux systems.
11562 (TARGET_FLOAT128_TYPE): Likewise.
11563 (-mfloat128-type): Likewise.
11564 * config/rs6000/rs6000.c (rs6000_option_override_internal):
11565 Delete the -mfloat128-type option and make -mfloat128 default on
11566 PowerPC Linux systems. Always use __ieee128 to be the keyword for
11567 the IEEE 128-bit type, and map __float128 to __ieee128 if IEEE
11568 128-bit floating point is enabled. Change tests from using
11569 -mfloat128-type to -mfloat128.
11570 (rs6000_mangle_type): Use the correct mangling for the __float128
11571 type even if normal long double is restricted to 64-bits.
11572 (floatn_mode): Enable the _Float128 type by default on VSX Linux
11573 systems.
11574 * config/rs6000/rs6000.h (MASK_FLOAT128_TYPE): Delete.
11575 (MASK_FLOAT128_KEYWORD): Define new shortcut macro.
11576 (RS6000BTM_FLOAT128): Define in terms of -mfloat128, not
11577 -mfloat128-type.
11578 * doc/invoke.texi (RS/6000 and PowerPC Options): Update
11579 documentation for -mfloat128.
11580
11581 2017-09-06 Olivier Hainque <hainque@adacore.com>
11582
11583 * config.gcc (powerpc-wrs-vxworksspe): Now match as vxworks*spe.
11584
11585 2017-09-06 Wish Wu <wishwu007@gmail.com>
11586 Jakub Jelinek <jakub@redhat.com>
11587
11588 * asan.c (initialize_sanitizer_builtins): Add
11589 BT_FN_VOID_UINT8_UINT8, BT_FN_VOID_UINT16_UINT16,
11590 BT_FN_VOID_UINT32_UINT32, BT_FN_VOID_UINT64_UINT64,
11591 BT_FN_VOID_FLOAT_FLOAT, BT_FN_VOID_DOUBLE_DOUBLE and
11592 BT_FN_VOID_UINT64_PTR variables.
11593 * builtin-types.def (BT_FN_VOID_UINT8_UINT8): New fn type.
11594 (BT_FN_VOID_UINT16_UINT16): Likewise.
11595 (BT_FN_VOID_UINT32_UINT32): Likewise.
11596 (BT_FN_VOID_FLOAT_FLOAT): Likewise.
11597 (BT_FN_VOID_DOUBLE_DOUBLE): Likewise.
11598 (BT_FN_VOID_UINT64_PTR): Likewise.
11599 * common.opt (flag_sanitize_coverage): New variable.
11600 (fsanitize-coverage=trace-pc): Remove.
11601 (fsanitize-coverage=): Add.
11602 * flag-types.h (enum sanitize_coverage_code): New enum.
11603 * fold-const.c (fold_range_test): Disable non-short-circuit
11604 optimization if flag_sanitize_coverage.
11605 (fold_truth_andor): Likewise.
11606 * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
11607 * opts.c (COVERAGE_SANITIZER_OPT): Define.
11608 (coverage_sanitizer_opts): New array.
11609 (get_closest_sanitizer_option): Add OPTS argument, handle also
11610 OPT_fsanitize_coverage_.
11611 (parse_sanitizer_options): Adjusted to also handle
11612 OPT_fsanitize_coverage_.
11613 (common_handle_option): Add OPT_fsanitize_coverage_.
11614 * sancov.c (instrument_comparison, instrument_switch): New function.
11615 (sancov_pass): Add trace-cmp support.
11616 * sanitizer.def (BUILT_IN_SANITIZER_COV_TRACE_CMP1,
11617 BUILT_IN_SANITIZER_COV_TRACE_CMP2, BUILT_IN_SANITIZER_COV_TRACE_CMP4,
11618 BUILT_IN_SANITIZER_COV_TRACE_CMP8,
11619 BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP1,
11620 BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP2,
11621 BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP4,
11622 BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP8,
11623 BUILT_IN_SANITIZER_COV_TRACE_CMPF, BUILT_IN_SANITIZER_COV_TRACE_CMPD,
11624 BUILT_IN_SANITIZER_COV_TRACE_SWITCH): New builtins.
11625 * doc/invoke.texi: Document -fsanitize-coverage=trace-cmp.
11626
11627 2017-09-06 Richard Earnshaw <rearnsha@arm.com>
11628
11629 * config/arm/parsecpu.awk (fatal): Note that we've encountered an
11630 error. Only quit immediately if parsing is complete.
11631 (BEGIN): Initialize fatal_err and parse_done.
11632 (begin fpu, end fpu): Check number of arguments.
11633 (begin arch, end arch): Likewise.
11634 (begin cpu, end cpu): Likewise.
11635 (cname, tune for, tune flags, architecture, fpu, option): Likewise.
11636 (optalias): Likewise.
11637
11638 2017-09-06 Richard Earnshaw <rearnsha@arm.com>
11639
11640 * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
11641 * config/arm/arm-isa.h: Delete. Move definitions to ...
11642 * arm-cpus.in: ... here. Use new feature and fgroup values.
11643 * config/arm/arm.c (arm_option_override): Use lower case for feature
11644 bit names.
11645 * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
11646 (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
11647 * config/arm/parsecpu.awk (END): Add new command 'isa'.
11648 (isa_pfx): Delete.
11649 (print_isa_bits_for): New function.
11650 (gen_isa): New function.
11651 (gen_comm_data): Use print_isa_bits_for.
11652 (define feature): New keyword.
11653 (define fgroup): New keyword.
11654 * config/arm/t-arm (OPTIONS_H_EXTRA): Add arm-isa.h
11655 (arm-isa.h): Add rule to generate file.
11656 * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
11657 case for feature bit names.
11658
11659 2017-09-06 Richard Biener <rguenther@suse.de>
11660
11661 * tree-ssa-pre.c (NECESSARY): Remove.
11662 (create_expression_by_pieces): Do not touch pass-local flags.
11663 (insert_into_preds_of_block): Likewise.
11664 (do_pre_regular_insertion): Likewise.
11665 (eliminate_insert): Likewise.
11666 (eliminate_dom_walker::before_dom_children): Likewise.
11667 (fini_eliminate): Do not look at inserted_exprs.
11668 (mark_operand_necessary): Remove.
11669 (remove_dead_inserted_code): Replace with simple work-list
11670 algorithm based on inserted_exprs and SSA uses.
11671 (pass_pre::execute): Re-order fini_eliminate and
11672 remove_dead_inserted_code.
11673
11674 2017-09-06 Olivier Hainque <hainque@adacore.com>
11675
11676 * config/powerpcspe/vxworks.h (VXCPU_FOR_8548): Correct definition
11677 for VxWorks 7. Adjust surrounding comments.
11678
11679 2017-09-06 Richard Biener <rguenther@suse.de>
11680
11681 * gimple-ssa-strength-reduction.c
11682 (find_candidates_dom_walker::before_dom_children): Also allow
11683 pointer types.
11684
11685 2017-09-06 Richard Biener <rguenther@suse.de>
11686
11687 PR tree-optimization/82108
11688 * tree-vect-stmts.c (vectorizable_load): Fix pointer adjustment
11689 for gap in the non-permutation SLP case.
11690
11691 2017-09-06 Martin Jambor <mjambor@suse.cz>
11692
11693 PR tree-optimization/82078
11694 * tree-sra.c (sort_and_splice_var_accesses): Move call to
11695 add_access_to_work_queue...
11696 (build_accesses_from_assign): ...here.
11697 (propagate_all_subaccesses): Make sure racc is the group
11698 representative, if there is one.
11699
11700 2017-09-06 Jakub Jelinek <jakub@redhat.com>
11701
11702 PR middle-end/82095
11703 * varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars with
11704 NULL DECL_INITIAL.
11705
11706 2017-09-06 Richard Biener <rguenther@suse.de>
11707
11708 * gimple-ssa-strength-reduction.c
11709 (find_candidates_dom_walker::before_doom_children): Use a
11710 type and not a mode check.
11711
11712 2017-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
11713
11714 PR target/77308
11715 * config/arm/predicates.md (arm_general_adddi_operand): Create new
11716 non-vfp predicate.
11717 * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Use new predicates.
11718
11719 2017-09-05 Jeff Law <law@redhat.com>
11720
11721 PR tree-optimization/64910
11722 * tree-ssa-reassoc.c (reassociate_bb): Restrict last change to
11723 cases where we have 3 or more operands.
11724
11725 2017-09-05 Jakub Jelinek <jakub@redhat.com>
11726
11727 PR middle-end/81768
11728 * omp-low.c (lower_omp_for): Recompute tree invariant if
11729 gimple_omp_for_initial/final is ADDR_EXPR.
11730
11731 PR middle-end/81768
11732 * omp-expand.c (expand_omp_simd): Force second operands of COND_EXPR
11733 into gimple val before gimplification fo the COND_EXPR.
11734
11735 2017-09-05 Aldy Hernandez <aldyh@redhat.com>
11736
11737 * tree-ssa-threadupdate.c (duplicate_thread_path): Remove unused
11738 REGION_COPY argument.
11739 (thread_through_all_blocks): Remove unused argument to
11740 duplicate_thread_path.
11741
11742 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
11743 Alan Hayward <alan.hayward@arm.com>
11744 David Sherwood <david.sherwood@arm.com>
11745
11746 * config/aarch64/aarch64-protos.h (aarch64_gen_adjusted_ldpstp):
11747 Take a scalar_mode rather than a machine_mode.
11748 (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
11749 * config/aarch64/aarch64.c (aarch64_simd_container_mode): Likewise.
11750 (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
11751 (aarch64_gen_adjusted_ldpstp): Likewise.
11752 (aarch64_expand_vector_init): Use scalar_mode instead of machine_mode.
11753
11754 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
11755 Alan Hayward <alan.hayward@arm.com>
11756 David Sherwood <david.sherwood@arm.com>
11757
11758 * config/aarch64/aarch64-protos.h (aarch64_is_extend_from_extract):
11759 Take a scalar_int_mode instead of a machine_mode.
11760 (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
11761 (aarch64_output_scalar_simd_mov_immediate): Likewise.
11762 (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
11763 (aarch64_simd_attr_length_rglist): Delete.
11764 * config/aarch64/aarch64.c (aarch64_is_extend_from_extract): Take
11765 a scalar_int_mode instead of a machine_mode.
11766 (aarch64_add_offset): Likewise.
11767 (aarch64_internal_mov_immediate): Likewise
11768 (aarch64_add_constant_internal): Likewise.
11769 (aarch64_add_constant): Likewise.
11770 (aarch64_movw_imm): Likewise.
11771 (aarch64_rtx_arith_op_extract_p): Likewise.
11772 (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
11773 (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
11774 Remove assert that the mode isn't a vector.
11775 (aarch64_output_scalar_simd_mov_immediate): Likewise.
11776 (aarch64_expand_mov_immediate): Update calls after above changes.
11777 (aarch64_output_casesi): Use as_a <scalar_int_mode>.
11778 (aarch64_and_bitmask_imm): Check for scalar integer modes.
11779 (aarch64_move_imm): Likewise.
11780 (aarch64_can_const_movi_rtx_p): Likewise.
11781 (aarch64_strip_extend): Likewise.
11782 (aarch64_extr_rtx_p): Likewise.
11783 (aarch64_rtx_costs): Likewise, using wode_mode as the mode of
11784 a CONST_INT when the mode parameter is VOIDmode.
11785 (aarch64_float_const_rtx_p): Use scalar_int_mode for a temporary.
11786
11787 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
11788
11789 * machmode.h (bitwise_mode_for_mode): Return opt_mode.
11790 * stor-layout.c (bitwise_mode_for_mode): Likewise.
11791 (bitwise_type_for_mode): Update accordingly.
11792
11793 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
11794
11795 * stor-layout.h (mode_for_size_tree): Return an opt_mode.
11796 * stor-layout.c (mode_for_size_tree): Likewise.
11797 (mode_for_array): Update accordingly.
11798 (layout_decl): Likewise.
11799 (compute_record_mode): Likewise. Only set the mode once.
11800
11801 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
11802
11803 * target.def (get_mask_mode): Change return type to opt_mode.
11804 Expand commentary.
11805 * doc/tm.texi: Regenerate.
11806 * targhooks.h (default_get_mask_mode): Return an opt_mode.
11807 * targhooks.c (default_get_mask_mode): Likewise.
11808 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
11809 * optabs-query.c (can_vec_mask_load_store_p): Update use of
11810 targetm.get_mask_mode.
11811 * tree.c (build_truth_vector_type): Likewise.
11812
11813 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
11814
11815 * machmode.h (mode_for_vector): Return an opt_mode.
11816 * stor-layout.c (mode_for_vector): Likewise.
11817 (mode_for_int_vector): Update accordingly.
11818 (layout_type): Likewise.
11819 * config/i386/i386.c (emit_memmov): Likewise.
11820 (ix86_expand_set_or_movmem): Likewise.
11821 (ix86_expand_vector_init): Likewise.
11822 (ix86_get_mask_mode): Likewise.
11823 * config/powerpcspe/powerpcspe.c (rs6000_expand_vec_perm_const_1):
11824 Likewise.
11825 * config/rs6000/rs6000.c (rs6000_expand_vec_perm_const_1): Likewise.
11826 * expmed.c (extract_bit_field_1): Likewise.
11827 * expr.c (expand_expr_real_2): Likewise.
11828 * optabs-query.c (can_vec_perm_p): Likewise.
11829 (can_vec_mask_load_store_p): Likewise.
11830 * optabs.c (expand_vec_perm): Likewise.
11831 * targhooks.c (default_get_mask_mode): Likewise.
11832 * tree-vect-stmts.c (vectorizable_store): Likewise.
11833 (vectorizable_load): Likewise.
11834 (get_vectype_for_scalar_type_and_size): Likewise.
11835
11836 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
11837
11838 * machmode.h (mode_for_int_vector): New function.
11839 * stor-layout.c (mode_for_int_vector): Likewise.
11840 * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Use it.
11841 * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Likewise.
11842 * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
11843 * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
11844 (s390_expand_vcond): Likewise.
11845
11846 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
11847
11848 * machmode.h (opt_machine_mode): New type.
11849 (opt_mode<T>): Allow construction from anything that can be
11850 converted to a T.
11851 (is_a, as_a, dyn_cast): Add overloads for opt_mode.
11852 (mode_for_size): Return an opt_machine_mode.
11853 * stor-layout.c (mode_for_size): Likewise.
11854 (mode_for_size_tree): Update call accordingly.
11855 (bitwise_mode_for_mode): Likewise.
11856 (make_fract_type): Likewise.
11857 (make_accum_type): Likewise.
11858 * caller-save.c (replace_reg_with_saved_mem): Update call
11859 accordingly.
11860 * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
11861 * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
11862 * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
11863 * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
11864 * expmed.c (extract_bit_field_1): Likewise.
11865 * reload.c (get_secondary_mem): Likewise.
11866 * varasm.c (assemble_integer): Likewise.
11867 * lower-subreg.c (simplify_subreg_concatn): Likewise. Move
11868 early-out.
11869
11870 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
11871
11872 * machmode.h (decimal_float_mode_for_size): New function.
11873 * real.h (REAL_VALUE_TO_TARGET_LONG_DOUBLE): Use float_mode_for_size.
11874 (REAL_VALUE_TO_TARGET_DOUBLE): Likewise.
11875 (REAL_VALUE_TO_TARGET_SINGLE): Likewise.
11876 (REAL_VALUE_TO_TARGET_DECIMAL128): Use decimal_float_mode_for_size.
11877 (REAL_VALUE_TO_TARGET_DECIMAL64): Likewise.
11878 (REAL_VALUE_TO_TARGET_DECIMAL32): Likewise.
11879
11880 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
11881
11882 * builtins.c (expand_builtin_powi): Use int_mode_for_size.
11883 (get_builtin_sync_mode): Likewise.
11884 (expand_ifn_atomic_compare_exchange): Likewise.
11885 (expand_builtin_atomic_clear): Likewise.
11886 (expand_builtin_atomic_test_and_set): Likewise.
11887 (fold_builtin_atomic_always_lock_free): Likewise.
11888 * calls.c (compute_argument_addresses): Likewise.
11889 (emit_library_call_value_1): Likewise.
11890 (store_one_arg): Likewise.
11891 * combine.c (combine_instructions): Likewise.
11892 * config/aarch64/aarch64.c (aarch64_function_value): Likewise.
11893 * config/arm/arm.c (arm_function_value): Likewise.
11894 (aapcs_allocate_return_reg): Likewise.
11895 * config/c6x/c6x.c (c6x_expand_movmem): Likewise.
11896 * config/i386/i386.c (construct_container): Likewise.
11897 (ix86_gimplify_va_arg): Likewise.
11898 (ix86_expand_sse_cmp): Likewise.
11899 (emit_memmov): Likewise.
11900 (emit_memset): Likewise.
11901 (expand_small_movmem_or_setmem): Likewise.
11902 (ix86_expand_pextr): Likewise.
11903 (ix86_expand_pinsr): Likewise.
11904 * config/lm32/lm32.c (lm32_block_move_inline): Likewise.
11905 * config/microblaze/microblaze.c (microblaze_block_move_straight):
11906 Likewise.
11907 * config/mips/mips.c (mips_function_value_1) Likewise.
11908 (mips_block_move_straight): Likewise.
11909 (mips_expand_ins_as_unaligned_store): Likewise.
11910 * config/powerpcspe/powerpcspe.c
11911 (rs6000_darwin64_record_arg_advance_flush): Likewise.
11912 (rs6000_darwin64_record_arg_flush): Likewise.
11913 * config/rs6000/rs6000.c
11914 (rs6000_darwin64_record_arg_advance_flush): Likewise.
11915 (rs6000_darwin64_record_arg_flush): Likewise.
11916 * config/sparc/sparc.c (sparc_function_arg_1): Likewise.
11917 (sparc_function_value_1): Likewise.
11918 * config/spu/spu.c (adjust_operand): Likewise.
11919 (spu_emit_branch_or_set): Likewise.
11920 (arith_immediate_p): Likewise.
11921 * emit-rtl.c (gen_lowpart_common): Likewise.
11922 * expr.c (expand_expr_real_1): Likewise.
11923 * function.c (assign_parm_setup_block): Likewise.
11924 * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
11925 * reload1.c (alter_reg): Likewise.
11926 * stor-layout.c (mode_for_vector): Likewise.
11927 (layout_type): Likewise.
11928
11929 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org>
11930
11931 * config/spu/spu.c (exp2_immediate_p): Use int_mode_for_mode.
11932 (spu_convert_move): Likewise.
11933 * lower-subreg.c (resolve_simple_move): Likewise.
11934
11935 2017-09-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11936
11937 PR target/81833
11938 * config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
11939 define_insn to a define_expand.
11940 (altivec_vsum2sws_direct): New define_insn.
11941 (altivec_vsumsws): Convert from a define_insn to a define_expand.
11942
11943 2017-09-05 Wilco Dijkstra <wdijkstr@arm.com>
11944
11945 * config/arm/arm.c (arm_option_params_internal): Improve setting of
11946 max_insns_skipped.
11947
11948 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
11949
11950 PR target/59501
11951 PR target/81624
11952 PR target/81769
11953 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
11954 realign stack if stack alignment needed is less than incoming
11955 stack boundary.
11956
11957 2017-09-05 Marek Polacek <polacek@redhat.com>
11958
11959 PR sanitizer/82072
11960 * convert.c (convert_to_integer_1) <case NEGATE_EXPR>: Move the ubsan
11961 check earlier.
11962
11963 2017-09-05 Wilco Dijkstra <wdijkstr@arm.com>
11964
11965 * explow.c (get_dynamic_stack_size): Improve dynamic alignment.
11966
11967 2017-09-05 Richard Biener <rguenther@suse.de>
11968
11969 PR tree-optimization/82084
11970 * fold-const.c (can_native_encode_string_p): Handle wide characters.
11971
11972 2017-09-05 Richard Biener <rguenther@suse.de>
11973
11974 PR tree-optimization/82102
11975 * tree-ssa-pre.c (fini_eliminate): Check if lhs is NULL.
11976
11977 2017-09-05 Martin Liska <mliska@suse.cz>
11978
11979 PR tree-optimization/82032
11980 * tree-cfg.c (generate_range_test): New function.
11981 * tree-cfg.h (generate_range_test): Declared here.
11982 * tree-cfgcleanup.c (convert_single_case_switch): New function.
11983 (cleanup_control_expr_graph): Use it.
11984 * tree-switch-conversion.c (try_switch_expansion): Remove
11985 assert.
11986 (emit_case_nodes): Use generate_range_test.
11987
11988 2017-09-04 Uros Bizjak <ubizjak@gmail.com>
11989
11990 PR target/82098
11991 * config/i386/i386.md (*<btsc><mode>_mask): Add
11992 TARGET_USE_BT to insn constraint.
11993 (*btr<mode>_mask): Ditto.
11994
11995 2017-09-04 Wilco Dijkstra <wdijkstr@arm.com>
11996
11997 * config/arm/arm.c (arm_legitimate_index_p): Add comment.
11998 (thumb2_legitimate_index_p): Use correct range for DI/DF mode.
11999
12000 2017-09-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
12001
12002 PR target/77308
12003 * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Split early except for
12004 TARGET_NEON and TARGET_IWMMXT.
12005 (anddi3, iordi3, xordi3, one_cmpldi2): Split while expanding except for
12006 TARGET_NEON and TARGET_IWMMXT.
12007 (*one_cmpldi2_insn): Moved the body of one_cmpldi2 here.
12008
12009 2017-09-04 Uros Bizjak <ubizjak@gmail.com>
12010
12011 * config/i386/i386-protos.h (ix86_tls_address_pattern_p) New prototype.
12012 (ix86_rewrite_tls_address): Ditto.
12013 * config/i386/i386.c (ix86_tls_address_pattern_p) New function.
12014 (ix86_rewrite_tls_address_1): Ditto.
12015 (ix86_rewrite_tls_address): Ditto.
12016 * config/i386/predicates.md (tls_address_pattern): New predicate.
12017 * config/i386/i386.md (TLS address splitter): New splitter.
12018
12019 2017-09-04 Richard Biener <rguenther@suse.de>
12020
12021 PR tree-optimization/82084
12022 * fold-const.h (can_native_encode_string_p): Declare.
12023 * fold-const.c (can_native_encode_string_p): Factor out from ...
12024 (native_encode_string): ... here.
12025 * tree-vect-stmts.c (vectorizable_store): Call it to avoid
12026 vectorizing stores from constants we later cannot handle.
12027
12028 2017-09-04 Marek Polacek <polacek@redhat.com>
12029
12030 PR c/81783
12031 * doc/invoke.texi: Update -Wtautological-compare documentation.
12032
12033 2017-09-04 Jeff Law <law@redhat.com>
12034
12035 PR tree-optimization/64910
12036 * tree-ssa-reassoc.c (reassociate_bb): For bitwise binary ops,
12037 swap the first and last operand if the last is a constant.
12038
12039 2017-09-04 Marek Polacek <polacek@redhat.com>
12040
12041 PR sanitizer/82072
12042 * convert.c (do_narrow): When sanitizing signed integer overflows,
12043 bail out for signed types.
12044 (convert_to_integer_1) <case NEGATE_EXPR>: Likewise.
12045
12046 2017-09-04 Richard Biener <rguenther@suse.de>
12047
12048 PR tree-optimization/82060
12049 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
12050 Move devirtualization after stmt folding and before EH/AB/noreturn
12051 cleanup to get the stmt refs canonicalized. Use a bool instead
12052 of gimple_modified_p since that doesn't work for NOPs. Schedule
12053 NOPs generated by folding for removal.
12054
12055 2017-09-04 Richard Sandiford <richard.sandiford@linaro.org>
12056 Alan Hayward <alan.hayward@arm.com>
12057 David Sherwood <david.sherwood@arm.com>
12058
12059 * coretypes.h (pad_direction): New enum.
12060 * defaults.h (DEFAULT_FUNCTION_ARG_PADDING): Delete.
12061 (FUNCTION_ARG_PADDING): Likewise.
12062 * target.def (function_arg_padding): New hook.
12063 * targhooks.h (default_function_arg_padding): Declare.
12064 * targhooks.c (default_function_arg_padding): New function.
12065 * doc/tm.texi.in (FUNCTION_ARG_PADDING): Replace with...
12066 (TARGET_FUNCTION_ARG_PADDING): ...this.
12067 * doc/tm.texi: Regenerate.
12068 * calls.c (store_unaligned_arguments_into_pseudos): Use pad_direction
12069 instead of direction.
12070 (compute_argument_addresses): Likewise.
12071 (load_register_parameters): Likewise.
12072 (emit_library_call_value_1): Likewise.
12073 (store_one_arg): Use targetm.calls.function_arg_padding instead
12074 of FUNCTION_ARG_PADDING.
12075 (must_pass_in_stack_var_size_or_pad): Likewise.
12076 * expr.c (emit_group_load_1): Use pad_direction instead of direction.
12077 (emit_group_store): Likewise.
12078 (emit_single_push_insn_1): Use targetm.calls.function_arg_padding
12079 instead of FUNCTION_ARG_PADDING.
12080 (emit_push_insn): Likewise, and propagate enum change throughout
12081 function.
12082 * function.h (direction): Delete.
12083 (locate_and_pad_arg_data::where_pad): Use pad_direction instead
12084 of direction.
12085 * function.c (assign_parm_find_stack_rtl): Likewise.
12086 (assign_parm_setup_block_p): Likewise.
12087 (assign_parm_setup_block): Likewise.
12088 (gimplify_parameters): Likewise.
12089 (locate_and_pad_parm): Use targetm.calls.function_arg_padding
12090 instead of FUNCTION_ARG_PADDING, and propagate enum change throughout
12091 function.
12092 * config/aarch64/aarch64.h (FUNCTION_ARG_PADDING): Delete.
12093 (BLOCK_REG_PADDING): Use pad_direction instead of direction.
12094 * config/aarch64/aarch64-protos.h (aarch64_pad_arg_upward): Delete.
12095 * config/aarch64/aarch64.c (aarch64_pad_arg_upward): Replace with...
12096 (aarch64_function_arg_padding): ...this new function.
12097 (aarch64_gimplify_va_arg_expr): Use pad_direction instead of direction.
12098 (TARGET_FUNCTION_ARG_PADDING): Redefine.
12099 * config/arm/arm.h (FUNCTION_ARG_PADDING): Delete.
12100 (BLOCK_REG_PADDING): Use pad_direction instead of direction.
12101 * config/arm/arm-protos.h (arm_pad_arg_upward): Delete.
12102 * config/arm/arm.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
12103 (arm_pad_arg_upward): Replace with...
12104 (arm_function_arg_padding): ...this new function.
12105 * config/c6x/c6x.h (BLOCK_REG_PADDING): Use pad_direction instead
12106 of direction.
12107 * config/ia64/hpux.h (FUNCTION_ARG_PADDING): Delete.
12108 * config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): Delete.
12109 * config/ia64/ia64.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
12110 (ia64_hpux_function_arg_padding): Replace with...
12111 (ia64_function_arg_padding): ...this new function. Use pad_direction
12112 instead of direction. Check for TARGET_HPUX.
12113 * config/iq2000/iq2000.h (FUNCTION_ARG_PADDING): Delete.
12114 * config/iq2000/iq2000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
12115 (iq2000_function_arg_padding): New function.
12116 * config/mips/mips-protos.h (mips_pad_arg_upward): Delete.
12117 * config/mips/mips.c (mips_pad_arg_upward): Replace with...
12118 (mips_function_arg_padding): ...this new function.
12119 (mips_pad_reg_upward): Update accordingly.
12120 (TARGET_FUNCTION_ARG_PADDING): Redefine.
12121 * config/mips/mips.h (PAD_VARARGS_DOWN): Use
12122 targetm.calls.function_arg_padding.
12123 (FUNCTION_ARG_PADDING): Delete.
12124 (BLOCK_REG_PADDING): Use pad_direction instead of direction.
12125 * config/nios2/nios2.h (FUNCTION_ARG_PADDING): Delete.
12126 (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
12127 * config/nios2/nios2-protos.h (nios2_function_arg_padding): Delete.
12128 (nios2_block_reg_padding): Return pad_direction instead of direction.
12129 * config/nios2/nios2.c (nios2_block_reg_padding): Return pad_direction
12130 instead of direction.
12131 (nios2_function_arg_padding): Likewise. Make static.
12132 (TARGET_FUNCTION_ARG_PADDING): Redefine.
12133 * config/pa/pa.h (FUNCTION_ARG_PADDING): Delete.
12134 (BLOCK_REG_PADDING): Use targetm.calls.function_arg_padding.
12135 * config/pa/pa-protos.h (pa_function_arg_padding): Delete.
12136 * config/pa/pa.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
12137 (pa_function_arg_padding): Make static. Return pad_direction instead
12138 of direction.
12139 * config/powerpcspe/powerpcspe.h (FUNCTION_ARG_PADDING): Delete.
12140 (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
12141 * config/powerpcspe/aix.h (BLOCK_REG_PADDING): Use pad_direction
12142 instead of direction. Use targetm.calls.function_arg_padding.
12143 * config/powerpcspe/darwin.h (BLOCK_REG_PADDING): Likewise.
12144 * config/powerpcspe/freebsd64.h (BLOCK_REG_PADDING): Likewise.
12145 * config/powerpcspe/linux64.h (BLOCK_REG_PADDING): Likewise.
12146 * config/powerpcspe/powerpcspe-protos.h (function_arg_padding): Delete.
12147 * config/powerpcspe/powerpcspe.c (TARGET_FUNCTION_ARG_PADDING):
12148 Redefine.
12149 (function_arg_padding): Rename to...
12150 (rs6000_function_arg_padding): ...this. Make static. Return
12151 pad_direction instead of direction.
12152 (rs6000_return_in_msb): Use rs6000_function_arg_padding.
12153 * config/rs6000/rs6000.h (FUNCTION_ARG_PADDING): Delete.
12154 (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
12155 * config/rs6000/aix.h (BLOCK_REG_PADDING): Use pad_direction
12156 instead of direction. Use targetm.calls.function_arg_padding.
12157 * config/rs6000/darwin.h (BLOCK_REG_PADDING): Likewise.
12158 * config/rs6000/freebsd64.h (BLOCK_REG_PADDING): Likewise.
12159 * config/rs6000/linux64.h (BLOCK_REG_PADDING): Likewise.
12160 * config/rs6000/rs6000-protos.h (function_arg_padding): Delete.
12161 * config/rs6000/rs6000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
12162 (function_arg_padding): Rename to...
12163 (rs6000_function_arg_padding): ...this. Make static. Return
12164 pad_direction instead of direction.
12165 (rs6000_return_in_msb): Use rs6000_function_arg_padding.
12166 * config/s390/s390.h (FUNCTION_ARG_PADDING): Delete.
12167 * config/s390/s390.c (s390_function_arg_padding): New function.
12168 (TARGET_FUNCTION_ARG_PADDING): Redefine.
12169 * config/sparc/sparc.h (FUNCTION_ARG_PADDING): Delete.
12170 * config/sparc/sparc-protos.h (function_arg_padding): Delete.
12171 * config/sparc/sparc.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
12172 (function_arg_padding): Rename to...
12173 (sparc_function_arg_padding): ...this. Make static. Return
12174 pad_direction instead of direction.
12175 * config/spu/spu.h (FUNCTION_ARG_PADDING): Delete.
12176 * config/spu/spu.c (spu_function_arg_padding): New function.
12177 (TARGET_FUNCTION_ARG_PADDING): Redefine.
12178 * system.h (FUNCTION_ARG_PADDING): Poison.
12179
12180 2017-09-04 Richard Sandiford <richard.sandiford@linaro.org>
12181 Alan Hayward <alan.hayward@arm.com>
12182 David Sherwood <david.sherwood@arm.com>
12183
12184 * target.def (modes_tieable_p): New hook.
12185 * doc/tm.texi (MODES_TIEABLE_P): Replace with...
12186 (TARGET_MODES_TIEABLE_P): ...this.
12187 * doc/tm.texi.in: Regenerate.
12188 * hooks.h (hook_bool_mode_mode_true): Declare.
12189 * hooks.c (hook_bool_mode_mode_true): New function.
12190 * combine.c (subst): Use targetm.modes_tieable_p instead of
12191 MODES_TIEABLE_P.
12192 * dse.c (find_shift_sequence): Likewise.
12193 * expmed.c (extract_low_bits): Likewise.
12194 * lower-subreg.c: Include target.h.
12195 (find_decomposable_subregs): Use targetm.modes_tieable_p instead of
12196 MODES_TIEABLE_P.
12197 * rtlanal.c (rtx_cost): Likewise.
12198 * config/aarch64/aarch64.h (MODES_TIEABLE_P): Delete.
12199 * config/aarch64/aarch64-protos.h (aarch64_modes_tieable_p): Delete.
12200 * config/aarch64/aarch64.c (aarch64_modes_tieable_p): Make static.
12201 (TARGET_MODES_TIEABLE_P): Redefine.
12202 * config/alpha/alpha.h (MODES_TIEABLE_P): Delete.
12203 * config/alpha/alpha.c (alpha_modes_tieable_p): New function.
12204 (TARGET_MODES_TIEABLE_P): Redefine.
12205 * config/arc/arc.h (MODES_TIEABLE_P): Delete.
12206 * config/arc/arc.c (TARGET_MODES_TIEABLE_P): Redefine.
12207 (arc_modes_tieable_p): New function.
12208 * config/arm/arm.h (MODES_TIEABLE_P): Delete.
12209 * config/arm/arm-protos.h (arm_modes_tieable_p): Delete.
12210 * config/arm/arm.c (TARGET_MODES_TIEABLE_P): Redefine.
12211 (arm_modes_tieable_p): Make static.
12212 * config/avr/avr.h (MODES_TIEABLE_P): Delete.
12213 * config/bfin/bfin.h (MODES_TIEABLE_P): Delete.
12214 * config/bfin/bfin.c (bfin_modes_tieable_p): New function.
12215 (TARGET_MODES_TIEABLE_P): Redefine.
12216 * config/c6x/c6x.h (MODES_TIEABLE_P): Delete.
12217 * config/c6x/c6x.c (c6x_modes_tieable_p): New function.
12218 (TARGET_MODES_TIEABLE_P): Redefine.
12219 * config/cr16/cr16.h (MODES_TIEABLE_P): Delete.
12220 * config/cr16/cr16.c (TARGET_MODES_TIEABLE_P): Redefine.
12221 (cr16_modes_tieable_p): New function.
12222 * config/cris/cris.h (MODES_TIEABLE_P): Delete.
12223 * config/epiphany/epiphany.h (MODES_TIEABLE_P): Delete.
12224 * config/fr30/fr30.h (MODES_TIEABLE_P): Delete.
12225 (TRULY_NOOP_TRUNCATION): Update comment.
12226 * config/frv/frv.h (MODES_TIEABLE_P): Delete.
12227 (TRULY_NOOP_TRUNCATION): Update comment.
12228 * config/frv/frv.c (TARGET_MODES_TIEABLE_P): Redefine.
12229 (frv_modes_tieable_p): New function.
12230 * config/ft32/ft32.h (MODES_TIEABLE_P): Delete.
12231 * config/h8300/h8300.h (MODES_TIEABLE_P): Delete.
12232 * config/h8300/h8300.c (h8300_modes_tieable_p): New function.
12233 (TARGET_MODES_TIEABLE_P): Redefine.
12234 * config/i386/i386.h (MODES_TIEABLE_P): Delete.
12235 * config/i386/i386-protos.h (ix86_modes_tieable_p): Delete.
12236 * config/i386/i386.c (ix86_modes_tieable_p): Make static.
12237 (TARGET_MODES_TIEABLE_P): Redefine.
12238 * config/ia64/ia64.h (MODES_TIEABLE_P): Delete.
12239 * config/ia64/ia64.c (TARGET_MODES_TIEABLE_P): Redefine.
12240 (ia64_modes_tieable_p): New function.
12241 * config/iq2000/iq2000.h (MODES_TIEABLE_P): Delete.
12242 * config/iq2000/iq2000.c (TARGET_MODES_TIEABLE_P): Redefine.
12243 (iq2000_modes_tieable_p): New function.
12244 * config/lm32/lm32.h (MODES_TIEABLE_P): Delete.
12245 * config/lm32/lm32.c (TARGET_MODES_TIEABLE_P): Redefine.
12246 (lm32_modes_tieable_p): New function.
12247 * config/m32c/m32c.h (MODES_TIEABLE_P): Delete.
12248 * config/m32c/m32c-protos.h (m32c_modes_tieable_p): Delete.
12249 * config/m32c/m32c.c (m32c_modes_tieable_p): Make static.
12250 (TARGET_MODES_TIEABLE_P): Redefine.
12251 * config/m32r/m32r.h (MODES_TIEABLE_P): Delete.
12252 * config/m32r/m32r.c (TARGET_MODES_TIEABLE_P): Redefine.
12253 (m32r_modes_tieable_p): New function.
12254 * config/m68k/m68k.h (MODES_TIEABLE_P): Delete.
12255 * config/m68k/m68k.c (TARGET_MODES_TIEABLE_P): Redefine.
12256 (m68k_modes_tieable_p): New function.
12257 * config/mcore/mcore.h (MODES_TIEABLE_P): Delete.
12258 * config/mcore/mcore.c (TARGET_MODES_TIEABLE_P): Redefine.
12259 (mcore_modes_tieable_p): New function.
12260 * config/microblaze/microblaze.h (MODES_TIEABLE_P): Delete.
12261 * config/microblaze/microblaze.c (microblaze_modes_tieable_p): New
12262 function.
12263 (TARGET_MODES_TIEABLE_P): Redefine.
12264 * config/mips/mips.h (MODES_TIEABLE_P): Delete.
12265 * config/mips/mips-protos.h (mips_modes_tieable_p): Delete.
12266 * config/mips/mips.c (mips_modes_tieable_p): Make static.
12267 (TARGET_MODES_TIEABLE_P): Redefine.
12268 * config/mmix/mmix.h (MODES_TIEABLE_P): Delete.
12269 * config/mn10300/mn10300.h (MODES_TIEABLE_P): Delete.
12270 * config/mn10300/mn10300-protos.h (mn10300_modes_tieable): Delete.
12271 * config/mn10300/mn10300.c (mn10300_modes_tieable): Rename to...
12272 (mn10300_modes_tieable_p): ...this and make static.
12273 (TARGET_MODES_TIEABLE_P): Redefine.
12274 * config/moxie/moxie.h (MODES_TIEABLE_P): Delete.
12275 * config/msp430/msp430.h (MODES_TIEABLE_P): Delete.
12276 * config/msp430/msp430-protos.h (msp430_modes_tieable_p): Delete.
12277 * config/msp430/msp430.c (TARGET_MODES_TIEABLE_P): Redefine.
12278 (msp430_modes_tieable_p): Make static.
12279 * config/nds32/nds32.h (MODES_TIEABLE_P): Delete.
12280 * config/nds32/nds32.c (nds32_modes_tieable_p): New function.
12281 (TARGET_MODES_TIEABLE_P): Redefine.
12282 * config/nios2/nios2.h (MODES_TIEABLE_P): Delete.
12283 * config/nvptx/nvptx.h (MODES_TIEABLE_P): Delete.
12284 * config/nvptx/nvptx.c (nvptx_modes_tieable_p): New function.
12285 (TARGET_MODES_TIEABLE_P): Redefine.
12286 * config/pa/pa.h (MODES_TIEABLE_P): Delete.
12287 * config/pa/pa-protos.h (pa_modes_tieable_p): Delete.
12288 * config/pa/pa.c (pa_modes_tieable_p): Make static.
12289 (TARGET_MODES_TIEABLE_P): Redefine.
12290 * config/pdp11/pdp11.h (MODES_TIEABLE_P): Delete.
12291 * config/pdp11/pdp11.c (TARGET_MODES_TIEABLE_P): Redefine.
12292 (pdp11_modes_tieable_p): New function.
12293 * config/powerpcspe/powerpcspe.h (MODES_TIEABLE_P): Delete.
12294 * config/powerpcspe/powerpcspe.c (TARGET_MODES_TIEABLE_P): Redefine.
12295 (rs6000_modes_tieable_p): New function.
12296 (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
12297 * config/powerpcspe/powerpcspe.md: Update comment.
12298 * config/riscv/riscv.h (MODES_TIEABLE_P): Delete.
12299 * config/riscv/riscv.c (riscv_modes_tieable_p): New function.
12300 (TARGET_MODES_TIEABLE_P): Redefine.
12301 * config/rl78/rl78.h (MODES_TIEABLE_P): Delete.
12302 * config/rl78/rl78.c (TARGET_MODES_TIEABLE_P): Redefine.
12303 (rl78_modes_tieable_p): New function.
12304 * config/rs6000/rs6000.h (MODES_TIEABLE_P): Delete.
12305 * config/rs6000/rs6000.c (TARGET_MODES_TIEABLE_P): Redefine.
12306 (rs6000_modes_tieable_p): New function.
12307 (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
12308 * config/rs6000/rs6000.md: Update comment.
12309 * config/rx/rx.h (MODES_TIEABLE_P): Delete.
12310 * config/rx/rx.c (rx_modes_tieable_p): New function.
12311 (TARGET_MODES_TIEABLE_P): Redefine.
12312 * config/s390/s390.h (MODES_TIEABLE_P): Delete.
12313 * config/s390/s390.c (s390_modes_tieable_p): New function.
12314 (TARGET_MODES_TIEABLE_P): Redefine.
12315 * config/sh/sh.h (MODES_TIEABLE_P): Delete.
12316 * config/sh/sh.c (TARGET_MODES_TIEABLE_P): Redefine.
12317 (sh_modes_tieable_p): New function.
12318 * config/sparc/sparc.h (MODES_TIEABLE_P): Delete.
12319 * config/sparc/sparc-protos.h (sparc_modes_tieable_p): Delete.
12320 * config/sparc/sparc.c (TARGET_MODES_TIEABLE_P): Redefine.
12321 (sparc_modes_tieable_p): Make static.
12322 * config/spu/spu.h (MODES_TIEABLE_P): Delete.
12323 * config/spu/spu.c (spu_modes_tieable_p): New function.
12324 (TARGET_MODES_TIEABLE_P): Redefine.
12325 * config/stormy16/stormy16.h (MODES_TIEABLE_P): Delete.
12326 * config/stormy16/stormy16.c (xstormy16_modes_tieable_p): New function.
12327 (TARGET_MODES_TIEABLE_P): Redefine.
12328 * config/tilegx/tilegx.h (MODES_TIEABLE_P): Delete.
12329 * config/tilepro/tilepro.h (MODES_TIEABLE_P): Delete.
12330 * config/v850/v850.h (MODES_TIEABLE_P): Delete.
12331 * config/v850/v850.c (v850_modes_tieable_p): New function.
12332 (TARGET_MODES_TIEABLE_P): Redefine.
12333 * config/vax/vax.h (MODES_TIEABLE_P): Delete.
12334 * config/visium/visium.h (MODES_TIEABLE_P): Delete.
12335 * config/visium/visium.c (TARGET_MODES_TIEABLE_P): Redefine.
12336 (visium_modes_tieable_p): New function.
12337 * config/xtensa/xtensa.h (MODES_TIEABLE_P): Delete.
12338 * config/xtensa/xtensa.c (TARGET_MODES_TIEABLE_P): Redefine.
12339 (xtensa_modes_tieable_p): New function.
12340 * system.h (MODES_TIEABLE_P): Poison.
12341
12342 2017-09-04 Richard Sandiford <richard.sandiford@linaro.org>
12343 Alan Hayward <alan.hayward@arm.com>
12344 David Sherwood <david.sherwood@arm.com>
12345
12346 * target.def (hard_regno_mode_ok): New hook.
12347 * doc/tm.texi (HARD_REGNO_MODE_OK): Replace with...
12348 (TARGET_HARD_REGNO_MODE_OK): ...this.
12349 * doc/tm.texi.in: Regenerate.
12350 * hooks.h (hook_bool_uint_mode_true): Declare.
12351 * hooks.c (hook_bool_uint_mode_true): New function.
12352 * doc/md.texi: Refer to targetm.hard_regno_mode_ok instead of
12353 HARD_REGNO_MODE_OK.
12354 * genpreds.c (write_insn_preds_c): Add an include of target.h.
12355 * alias.c (init_alias_target): Use targetm.hard_regno_mode_ok
12356 instead of HARD_REGNO_MODE_OK.
12357 * caller-save.c: Include target.h.
12358 (reg_save_code): Use targetm.hard_regno_mode_ok instead of
12359 HARD_REGNO_MODE_OK.
12360 * combine.c (can_combine_p): Likewise.
12361 (combinable_i3pat): Likewise.
12362 (can_change_dest_mode): Likewise.
12363 * expr.c (init_expr_target): Likewise.
12364 (convert_move): Likewise.
12365 (convert_modes): Likewise.
12366 * ira.c (setup_prohibited_class_mode_regs): Likewise.
12367 (setup_prohibited_mode_move_regs): Likewise.
12368 * ira.h (target_ira): Likewise.
12369 * lra-assigns.c (find_hard_regno_for_1): Likewise.
12370 * lra-constraints.c (process_alt_operands): Likewise.
12371 (split_reg): Likewise.
12372 * recog.c (peep2_find_free_register): Likewise.
12373 * ree.c (combine_reaching_defs): Likewise.
12374 * regcprop.c (maybe_mode_change): Likewise.
12375 * reginfo.c (init_reg_sets_1): Likewise.
12376 (choose_hard_reg_mode): Likewise.
12377 (simplifiable_subregs): Likewise.
12378 * regrename.c (check_new_reg_p): Likewise.
12379 * reload.c (find_valid_class): Likewise.
12380 (find_valid_class_1): Likewise.
12381 (reload_inner_reg_of_subreg): Likewise.
12382 (push_reload): Likewise.
12383 (combine_reloads): Likewise.
12384 (find_dummy_reload): Likewise.
12385 (find_reloads): Likewise.
12386 * reload1.c (find_reg): Likewise.
12387 (set_reload_reg): Likewise.
12388 (allocate_reload_reg): Likewise.
12389 (choose_reload_regs): Likewise.
12390 (reload_adjust_reg_for_temp): Likewise.
12391 * rtlanal.c (subreg_size_offset_from_lsb): Likewise.
12392 (simplify_subreg_regno): Likewise.
12393 * sel-sched.c (init_regs_for_mode): Likewise.
12394 * varasm.c (make_decl_rtl): Likewise.
12395 * config/aarch64/aarch64.h (HARD_REGNO_MODE_OK): Delete.
12396 (MODES_TIEABLE_P): Use targetm.hard_regno_mode_ok instead of
12397 HARD_REGNO_MODE_OK.
12398 * config/aarch64/aarch64-protos.h (aarch64_hard_regno_mode_ok): Delete.
12399 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Make static.
12400 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12401 * config/alpha/alpha.h (HARD_REGNO_MODE_OK): Delete.
12402 * config/alpha/alpha.c (alpha_hard_regno_mode_ok): New function.
12403 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12404 * config/arc/arc.h (arc_hard_regno_mode_ok): Delete.
12405 (arc_mode_class): Delete.
12406 (HARD_REGNO_MODE_OK): Delete.
12407 * config/arc/arc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12408 (arc_hard_regno_mode_ok): Rename old array to...
12409 (arc_hard_regno_mode_ok_modes): ...this.
12410 (arc_conditional_register_usage): Update accordingly.
12411 (arc_mode_class): Make static.
12412 (arc_hard_regno_mode_ok): New function.
12413 * config/arm/arm.h (HARD_REGNO_MODE_OK): Delete.
12414 * config/arm/arm-protos.h (arm_hard_regno_mode_ok): Delete.
12415 * config/arm/arm.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12416 (arm_hard_regno_mode_ok): Make static.
12417 * config/arm/arm.md (movdi): Use targetm.hard_regno_mode_ok instead of
12418 HARD_REGNO_MODE_OK.
12419 * config/avr/avr-protos.h (avr_hard_regno_mode_ok): Delete.
12420 * config/avr/avr.h (HARD_REGNO_MODE_OK): Delete.
12421 * config/avr/avr.c (avr_hard_regno_mode_ok): Make static and
12422 return a bool.
12423 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12424 * config/bfin/bfin-protos.h (hard_regno_mode_ok): Delete.
12425 * config/bfin/bfin.h (HARD_REGNO_MODE_OK): Delete.
12426 * config/bfin/bfin.c (hard_regno_mode_ok): Rename to...
12427 (bfin_hard_regno_mode_ok): ...this. Make static and return a bool.
12428 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12429 * config/bfin/predicates.md (valid_reg_operand): Use
12430 targetm.hard_regno_mode_ok instead of HARD_REGNO_MODE_OK.
12431 * config/c6x/c6x.h (HARD_REGNO_MODE_OK): Delete.
12432 * config/c6x/c6x.c (c6x_hard_regno_mode_ok): New function.
12433 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12434 * config/cr16/cr16.h (HARD_REGNO_MODE_OK): Delete.
12435 * config/cr16/cr16-protos.h (cr16_hard_regno_mode_ok): Delete.
12436 * config/cr16/cr16.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12437 (cr16_hard_regno_mode_ok): Make static and return a bool.
12438 * config/cris/cris.h (HARD_REGNO_MODE_OK): Delete.
12439 * config/cris/cris.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12440 (cris_hard_regno_mode_ok): New function.
12441 * config/epiphany/epiphany.h (epiphany_hard_regno_mode_ok): Delete.
12442 (epiphany_mode_class): Delete.
12443 (HARD_REGNO_MODE_OK): Delete.
12444 * config/epiphany/epiphany-protos.h (hard_regno_mode_ok): Delete.
12445 * config/epiphany/epiphany.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12446 (hard_regno_mode_ok): Rename to...
12447 (epiphany_hard_regno_mode_ok): ...this. Make static and return a bool.
12448 * config/fr30/fr30.h (HARD_REGNO_MODE_OK): Delete.
12449 * config/fr30/fr30.md: Refer to targetm.hard_regno_mode_ok instead of
12450 HARD_REGNO_MODE_OK.
12451 * config/frv/frv.h (HARD_REGNO_MODE_OK): Delete.
12452 * config/frv/frv-protos.h (frv_hard_regno_mode_ok): Delete.
12453 * config/frv/frv.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12454 (frv_hard_regno_mode_ok): Make static and return a bool.
12455 * config/frv/frv.md: Refer to targetm.hard_regno_mode_ok instead of
12456 HARD_REGNO_MODE_OK.
12457 * config/ft32/ft32.h (HARD_REGNO_MODE_OK): Delete.
12458 * config/h8300/h8300.h (HARD_REGNO_MODE_OK): Delete.
12459 * config/h8300/h8300-protos.h (h8300_hard_regno_mode_ok): Delete.
12460 * config/h8300/h8300.c (h8300_hard_regno_mode_ok): Make static
12461 and return a bool.
12462 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12463 * config/i386/i386.h (HARD_REGNO_MODE_OK): Delete.
12464 * config/i386/i386-protos.h (ix86_hard_regno_mode_ok): Delete.
12465 * config/i386/i386.c (ix86_hard_regno_mode_ok): Make static and
12466 return a bool.
12467 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12468 * config/ia64/ia64.h (HARD_REGNO_MODE_OK): Delete.
12469 * config/ia64/ia64.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12470 (ia64_hard_regno_mode_ok): New function.
12471 * config/iq2000/iq2000.h (HARD_REGNO_MODE_OK): Delete.
12472 * config/iq2000/iq2000.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12473 (iq2000_hard_regno_mode_ok): New function.
12474 * config/lm32/lm32.h (HARD_REGNO_MODE_OK): Delete.
12475 * config/lm32/lm32.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12476 (lm32_hard_regno_mode_ok): New function.
12477 * config/m32c/m32c.h (HARD_REGNO_MODE_OK): Delete.
12478 * config/m32c/m32c-protos.h (m32c_hard_regno_ok): Delete.
12479 * config/m32c/m32c.c (class_can_hold_mode): Use m32c_hard_regno_mode_ok
12480 instead of HARD_REGNO_MODE_OK.
12481 (m32c_hard_regno_ok): Rename to...
12482 (m32c_hard_regno_mode_ok): ...this. Make static and return a bool.
12483 (m32c_cannot_change_mode_class): Update accordingly.
12484 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12485 * config/m32r/m32r.h (m32r_hard_regno_mode_ok): Delete.
12486 (m32r_mode_class): Delete.
12487 (HARD_REGNO_MODE_OK): Delete.
12488 * config/m32r/m32r.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12489 (m32r_hard_regno_mode_ok): Rename to...
12490 (m32r_hard_regno_modes): ...this.
12491 (m32r_mode_class): Make static.
12492 (m32r_hard_regno_mode_ok): New function.
12493 * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Delete.
12494 * config/m68k/m68k-protos.h (m68k_regno_mode_ok): Delete.
12495 * config/m68k/m68k.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12496 (m68k_hard_regno_mode_ok): Make static.
12497 * config/mcore/mcore.h (HARD_REGNO_MODE_OK): Delete.
12498 * config/mcore/mcore.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12499 (mcore_hard_regno_mode_ok): New function.
12500 * config/microblaze/microblaze.h (microblaze_hard_regno_mode_ok)
12501 (HARD_REGNO_MODE_OK): Delete.
12502 * config/microblaze/microblaze.c (microblaze_hard_regno_mode_ok):
12503 Rename to...
12504 (microblaze_hard_regno_mode_ok_p): ...this and make static.
12505 (microblaze_hard_regno_mode_ok): New function.
12506 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12507 * config/mips/mips.h (HARD_REGNO_MODE_OK): Delete.
12508 (mips_hard_regno_mode_ok): Delete.
12509 * config/mips/mips.c (mips_hard_regno_mode_ok): Rename to...
12510 (mips_hard_regno_mode_ok_p): ...this and make static.
12511 (mips_hard_regno_mode_ok_p): Rename to...
12512 (mips_hard_regno_mode_ok_uncached): ...this.
12513 (mips_hard_regno_mode_ok): New function.
12514 (mips_class_max_nregs): Use mips_hard_regno_mode_ok instead
12515 of HARD_REGNO_MODE_OK.
12516 (mips_option_override): Update after above name changes.
12517 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12518 * config/mmix/mmix.h (HARD_REGNO_MODE_OK): Delete.
12519 * config/mn10300/mn10300.h (HARD_REGNO_MODE_OK): Delete.
12520 * config/mn10300/mn10300-protos.h (mn10300_hard_regno_mode_ok): Delete.
12521 * config/mn10300/mn10300.c (mn10300_hard_regno_mode_ok): Make static.
12522 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12523 * config/moxie/moxie.h (HARD_REGNO_MODE_OK): Delete.
12524 * config/msp430/msp430.h (HARD_REGNO_MODE_OK): Delete.
12525 * config/msp430/msp430-protos.h (msp430_hard_regno_mode_ok): Delete.
12526 * config/msp430/msp430.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12527 (msp430_hard_regno_mode_ok): Make static and return a bool.
12528 * config/nds32/nds32.h (HARD_REGNO_MODE_OK): Delete.
12529 * config/nds32/nds32-protos.h (nds32_hard_regno_mode_ok): Delete.
12530 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Make static
12531 and return a bool.
12532 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12533 * config/nios2/nios2.h (HARD_REGNO_MODE_OK): Delete.
12534 * config/nvptx/nvptx.h (HARD_REGNO_MODE_OK): Delete.
12535 * config/pa/pa.h (MODES_TIEABLE_P): Update commentary.
12536 * config/pa/pa32-regs.h (HARD_REGNO_MODE_OK): Rename to...
12537 (PA_HARD_REGNO_MODE_OK): ...this
12538 * config/pa/pa64-regs.h (HARD_REGNO_MODE_OK): Rename to...
12539 (PA_HARD_REGNO_MODE_OK): ...this.
12540 * config/pa/pa.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12541 (pa_hard_regno_mode_ok): New function.
12542 * config/pdp11/pdp11.h (HARD_REGNO_MODE_OK): Delete.
12543 * config/pdp11/pdp11.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12544 (pdp11_hard_regno_mode_ok): New function.
12545 * config/powerpcspe/powerpcspe.h (HARD_REGNO_MODE_OK): Delete.
12546 * config/powerpcspe/powerpcspe-protos.h (rs6000_hard_regno_mode_ok_p):
12547 Delete.
12548 * config/powerpcspe/powerpcspe.c (rs6000_hard_regno_mode_ok_p):
12549 Make static.
12550 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12551 (rs6000_hard_regno_mode_ok): Rename to...
12552 (rs6000_hard_regno_mode_ok_uncached): ...this.
12553 (rs6000_init_hard_regno_mode_ok): Update accordingly.
12554 (rs6000_hard_regno_mode_ok): New function.
12555 * config/riscv/riscv.h (HARD_REGNO_MODE_OK): Delete.
12556 * config/riscv/riscv-protos.h (riscv_hard_regno_mode_ok_p): Delete.
12557 * config/riscv/riscv.c (riscv_hard_regno_mode_ok_p): Rename to...
12558 (riscv_hard_regno_mode_ok): ...this and make static.
12559 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12560 * config/rl78/rl78.h (HARD_REGNO_MODE_OK): Delete.
12561 * config/rl78/rl78-protos.h (rl78_hard_regno_mode_ok): Delete.
12562 * config/rl78/rl78.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12563 (rl78_hard_regno_mode_ok): Make static and return bool.
12564 * config/rs6000/rs6000.h (HARD_REGNO_MODE_OK): Delete.
12565 * config/rs6000/rs6000-protos.h (rs6000_hard_regno_mode_ok_p):
12566 Delete.
12567 * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok_p): Make static.
12568 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12569 (rs6000_hard_regno_mode_ok): Rename to...
12570 (rs6000_hard_regno_mode_ok_uncached): ...this.
12571 (rs6000_init_hard_regno_mode_ok): Update accordingly.
12572 (rs6000_hard_regno_mode_ok): New function.
12573 * config/rx/rx.h (HARD_REGNO_MODE_OK): Delete.
12574 * config/rx/rx.c (rx_hard_regno_mode_ok): New function.
12575 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12576 * config/s390/s390.h (HARD_REGNO_MODE_OK): Delete.
12577 * config/s390/s390-protos.h (s390_hard_regno_mode_ok): Delete.
12578 * config/s390/s390.c (s390_hard_regno_mode_ok): Make static.
12579 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12580 * config/sh/sh.h (HARD_REGNO_MODE_OK): Delete.
12581 * config/sh/sh-protos.h (sh_hard_regno_mode_ok): Delete.
12582 * config/sh/sh.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12583 (sh_hard_regno_mode_ok): Make static.
12584 * config/sparc/constraints.md: Refer to targetm.hard_regno_mode_ok
12585 instead of HARD_REGNO_MODE_OK.
12586 * config/sparc/sparc.h (hard_regno_mode_classes): Delete.
12587 (sparc_mode_class): Delete.
12588 (HARD_REGNO_MODE_OK): Delete.
12589 * config/sparc/sparc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12590 (hard_regno_mode_classes): Make static.
12591 (sparc_mode_class): Likewise.
12592 (sparc_hard_regno_mode_ok): New function.
12593 * config/spu/spu.h (HARD_REGNO_MODE_OK): Delete.
12594 * config/stormy16/stormy16.h (HARD_REGNO_MODE_OK): Delete.
12595 * config/stormy16/stormy16.c (xstormy16_hard_regno_mode_ok): New
12596 function.
12597 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12598 * config/tilegx/tilegx.h (HARD_REGNO_MODE_OK): Delete.
12599 * config/tilepro/tilepro.h (HARD_REGNO_MODE_OK): Delete.
12600 * config/v850/v850.h (HARD_REGNO_MODE_OK): Delete.
12601 * config/v850/v850.c (v850_hard_regno_mode_ok): New function.
12602 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12603 * config/vax/vax.h (HARD_REGNO_MODE_OK): Delete.
12604 * config/visium/visium.h (HARD_REGNO_MODE_OK): Delete.
12605 * config/visium/visium.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
12606 (visium_hard_regno_mode_ok): New function.
12607 * config/visium/visium.md: Refer to targetm.hard_regno_mode_ok
12608 instead of HARD_REGNO_MODE_OK.
12609 * config/xtensa/xtensa.h (xtensa_hard_regno_mode_ok): Delete.
12610 (HARD_REGNO_MODE_OK): Delete.
12611 * config/xtensa/xtensa.c (xtensa_hard_regno_mode_ok): Rename to...
12612 (xtensa_hard_regno_mode_ok_p): ...this and make static.
12613 (xtensa_option_override): Update accordingly.
12614 (TARGET_HARD_REGNO_MODE_OK): Redefine.
12615 (xtensa_hard_regno_mode_ok): New function.
12616 * system.h (HARD_REGNO_MODE_OK): Poison.
12617
12618 2017-09-04 Richard Sandiford <richard.sandiford@linaro.org>
12619 Alan Hayward <alan.hayward@arm.com>
12620 David Sherwood <david.sherwood@arm.com>
12621
12622 * target.def (hard_regno_call_part_clobbered): New hook.
12623 * doc/tm.texi.in (HARD_REGNO_CALL_PART_CLOBBERED): Replace with...
12624 (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): ...this hook.
12625 * doc/tm.texi: Regenerate.
12626 * hooks.h (hook_bool_uint_mode_false): Declare.
12627 * hooks.c (hook_bool_uint_mode_false): New function.
12628 * regs.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
12629 * cselib.c (cselib_process_insn): Use
12630 targetm.hard_regno_call_part_clobbered instead of
12631 HARD_REGNO_CALL_PART_CLOBBERED.
12632 * ira-conflicts.c (ira_build_conflicts): Likewise.
12633 * ira-costs.c (ira_tune_allocno_costs): Likewise.
12634 * lra-constraints.c (need_for_call_save_p): Likewise.
12635 * lra-lives.c: Include target.h.
12636 (check_pseudos_live_through_calls): Use
12637 targetm.hard_regno_call_part_clobbered instead of
12638 HARD_REGNO_CALL_PART_CLOBBERED.
12639 * regcprop.c: Include target.h.
12640 (copyprop_hardreg_forward_1): Use
12641 targetm.hard_regno_call_part_clobbered instead of
12642 HARD_REGNO_CALL_PART_CLOBBERED.
12643 * reginfo.c (choose_hard_reg_mode): Likewise.
12644 * regrename.c (check_new_reg_p): Likewise.
12645 * reload.c (find_equiv_reg): Likewise.
12646 * reload1.c (emit_reload_insns): Likewise.
12647 * sched-deps.c (deps_analyze_insn): Likewise.
12648 * sel-sched.c (init_regs_for_mode): Likewise.
12649 (mark_unavailable_hard_regs): Likewise.
12650 * targhooks.c (default_dwarf_frame_reg_mode): Likewise.
12651 * config/aarch64/aarch64.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
12652 * config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered):
12653 New function.
12654 (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
12655 * config/avr/avr.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
12656 * config/avr/avr-protos.h (avr_hard_regno_call_part_clobbered):
12657 Delete.
12658 * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Make static
12659 and return a bool.
12660 (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
12661 * config/i386/i386.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
12662 * config/i386/i386.c (ix86_hard_regno_call_part_clobbered): New
12663 function.
12664 (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
12665 * config/mips/mips.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
12666 * config/mips/mips.c (mips_hard_regno_call_part_clobbered): New
12667 function.
12668 (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
12669 * config/powerpcspe/powerpcspe.h (HARD_REGNO_CALL_PART_CLOBBERED):
12670 Delete.
12671 * config/powerpcspe/powerpcspe.c
12672 (rs6000_hard_regno_call_part_clobbered): New function.
12673 (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
12674 * config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
12675 * config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered):
12676 New function.
12677 (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
12678 * config/s390/s390.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
12679 * config/s390/s390.c (s390_hard_regno_call_part_clobbered): New
12680 function.
12681 (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
12682 * config/sh/sh.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
12683 * system.h (HARD_REGNO_CALL_PART_CLOBBERED): Poison.
12684
12685 2017-09-04 Richard Sandiford <richard.sandiford@linaro.org>
12686 Alan Hayward <alan.hayward@arm.com>
12687 David Sherwood <david.sherwood@arm.com>
12688
12689 * rtl.h (subreg_memory_offset): Declare.
12690 * emit-rtl.c (subreg_memory_offset): New function.
12691 * expmed.c (store_bit_field_1): Use it.
12692 * expr.c (undefined_operand_subword_p): Likewise.
12693 * simplify-rtx.c (simplify_subreg): Likewise.
12694
12695 2017-09-04 Alexander Monakov <amonakov@ispras.ru>
12696
12697 PR rtl-optimization/57448
12698 PR target/67458
12699 PR target/81316
12700 * optabs.c (expand_atomic_load): Place compiler memory barriers if
12701 using atomic_load pattern.
12702 (expand_atomic_store): Likewise.
12703
12704 2017-09-04 Jakub Jelinek <jakub@redhat.com>
12705
12706 PR sanitizer/81981
12707 * gimple-fold.c (gimple_fold_call): Optimize away useless UBSAN_PTR
12708 and UBSAN_BOUNDS internal calls. Clean up IFN_UBSAN_OBJECT_SIZE
12709 handling. Use replace_call_with_value with NULL instead of
12710 gsi_replace, unlink_stmt_vdef and release_defs.
12711
12712 * gdbhooks.py (OptMachineModePrinter.to_string): Use 8 spaces
12713 instead of tab.
12714
12715 * lra-remat.c (reg_overlap_for_remat_p): Fix a pasto.
12716
12717 2017-09-04 Richard Sandiford <richard.sandiford@linaro.org>
12718
12719 PR bootstrap/82045
12720 * rtl.h (emit_library_call_value_1): Declare.
12721 (emit_library_call): Replace declaration with a series of overloads.
12722 Remove the parameter count argument.
12723 (emit_library_call_value): Likewise.
12724 * calls.c (emit_library_call_value_1): Make global. Replace varargs
12725 with an "rtx_mode_t *".
12726 (emit_library_call_value): Delete.
12727 (emit_library_call): Likewise.
12728 * asan.c (asan_emit_stack_protection): Update calls accordingly.
12729 (asan_emit_allocas_unpoison): Likewise.
12730 * builtins.c (expand_builtin_powi): Likewise.
12731 (expand_asan_emit_allocas_unpoison): Likewise.
12732 * cfgexpand.c (expand_main_function): Likewise.
12733 * config/aarch64/aarch64.c (aarch64_trampoline_init): Likewise.
12734 * config/aarch64/aarch64.h (PROFILE_HOOK): Likewise.
12735 * config/alpha/alpha.c (alpha_trampoline_init): Likewise.
12736 * config/arm/arm.c (arm_trampoline_init): Likewise.
12737 (arm_call_tls_get_addr): Likewise.
12738 (arm_expand_divmod_libfunc): Likewise.
12739 * config/bfin/bfin.md (umulsi3_highpart): Likewise.
12740 (smulsi3_highpart): Likewise.
12741 * config/c6x/c6x.c (c6x_initialize_trampoline): Likewise.
12742 (c6x_expand_compare): Likewise.
12743 (c6x_expand_movmem): Likewise.
12744 * config/frv/frv.c (frv_trampoline_init): Likewise.
12745 * config/i386/i386.c (ix86_trampoline_init): Likewise.
12746 (ix86_expand_divmod_libfunc): Likewise.
12747 * config/ia64/ia64.c (ia64_expand_tls_address): Likewise.
12748 (ia64_expand_compare): Likewise.
12749 (ia64_profile_hook): Likewise.
12750 * config/ia64/ia64.md (save_stack_nonlocal): Likewise.
12751 (nonlocal_goto): Likewise.
12752 (restore_stack_nonlocal): Likewise.
12753 * config/m32r/m32r.c (block_move_call): Likewise.
12754 (m32r_trampoline_init): Likewise.
12755 * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise.
12756 * config/m68k/m68k.c (m68k_call_tls_get_addr): Likewise.
12757 (m68k_call_m68k_read_tp): Likewise.
12758 * config/microblaze/microblaze.c (microblaze_call_tls_get_addr)
12759 (microblaze_expand_divide): Likewise.
12760 * config/mips/mips.h (mips_args): Likewise.
12761 * config/mips/sdemtk.h (mips_sync_icache): Likewise.
12762 (MIPS_ICACHE_SYNC): Likewise.
12763 * config/nios2/nios2.c (nios2_emit_expensive_div): Likewise.
12764 (nios2_trampoline_init): Likewise.
12765 * config/pa/pa.c (hppa_tls_call): Likewise.
12766 (pa_trampoline_init): Likewise.
12767 * config/pa/pa.md (canonicalize_funcptr_for_compare): Likewise.
12768 * config/powerpcspe/powerpcspe.c (rs6000_legitimize_tls_address)
12769 (expand_strn_compare): Likewise.
12770 (rs6000_generate_compare): Likewise.
12771 (rs6000_expand_float128_convert): Likewise.
12772 (output_profile_hook): Likewise.
12773 (rs6000_trampoline_init): Likewise.
12774 * config/powerpcspe/powerpcspe.md (neg<mode>2): Likewise.
12775 * config/riscv/riscv.h (PROFILE_HOOK): Likewise.
12776 * config/rs6000/rs6000-string.c (expand_strn_compare): Likewise.
12777 * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.
12778 (rs6000_generate_compare): Likewise.
12779 (rs6000_expand_float128_convert): Likewise.
12780 (output_profile_hook): Likewise.
12781 (rs6000_trampoline_init): Likewise.
12782 * config/rs6000/rs6000.md (neg<mode>2): Likewise.
12783 * config/sh/sh.c (sh_trampoline_init): Likewise.
12784 * config/sparc/sparc.c (emit_soft_tfmode_libcall): Likewise.
12785 (sparc_emit_float_lib_cmp): Likewise.
12786 (sparc32_initialize_trampoline): Likewise.
12787 (sparc64_initialize_trampoline): Likewise.
12788 (sparc_profile_hook): Likewise.
12789 * config/spu/spu.c (ea_load_store): Likewise.
12790 * config/spu/spu.md (floatunssidf2): Likewise.
12791 * config/tilegx/tilegx.c (tilegx_trampoline_init): Likewise.
12792 * config/tilepro/tilepro.c (tilepro_trampoline_init): Likewise.
12793 * config/visium/visium.c (expand_block_move_4): Likewise.
12794 (expand_block_move_2): Likewise.
12795 (expand_block_move_1): Likewise.
12796 (expand_block_set_4): Likewise.
12797 (expand_block_set_2): Likewise.
12798 (expand_block_set_1): Likewise.
12799 (visium_trampoline_init): Likewise.
12800 (visium_profile_hook): Likewise.
12801 * config/xtensa/xtensa.c (xtensa_expand_nonlocal_goto): Likewise.
12802 (xtensa_setup_frame_addresses): Likewise.
12803 (xtensa_trampoline_init): Likewise.
12804 * except.c (sjlj_emit_function_enter): Likewise.
12805 (sjlj_emit_function_exit): Likewise.
12806 * explow.c (allocate_dynamic_stack_space): Likewise.
12807 (probe_stack_range): Likewise.
12808 * expr.c (convert_mode_scalar): Likewise.
12809 * optabs.c (expand_binop): Likewise.
12810 (expand_twoval_binop_libfunc): Likewise.
12811 (expand_unop): Likewise.
12812 (prepare_cmp_insn): Likewise.
12813 (prepare_float_lib_cmp): Likewise.
12814 (expand_float): Likewise.
12815 (expand_fix): Likewise.
12816 (expand_fixed_convert): Likewise.
12817 (maybe_emit_sync_lock_test_and_set): Likewise.
12818 (expand_atomic_compare_and_swap): Likewise.
12819 (expand_mem_thread_fence): Likewise.
12820 (expand_atomic_fetch_op): Likewise.
12821
12822 2017-09-03 Gerald Pfeifer <gerald@pfeifer.com>
12823
12824 * doc/generic.texi (OpenACC): Adjust URL.
12825 * doc/invoke.texi (C Dialect Options): Ditto.
12826
12827 2017-09-03 Uros Bizjak <ubizjak@gmail.com>
12828
12829 * config/i386/i386.md (*bt<mode>): Use nonimmediate_operand
12830 predicate for operand 1. Add (m,<S>) constraint.
12831 (*jcc_bt<mode>): Use nonimmediate_operand predicate for operand 1.
12832 Prevent memory operand 1 with register operand 2.
12833
12834 2017-09-01 Segher Boessenkool <segher@kernel.crashing.org>
12835
12836 PR rtl-optimization/82024
12837 * combine.c (try_combine): If the combination result is a PARALLEL,
12838 and we only need to retain the SET in there that would be placed
12839 at I2, check that we can place that at I3 instead, before doing so.
12840
12841 2017-09-01 Jakub Jelinek <jakub@redhat.com>
12842
12843 PR target/81766
12844 * config/i386/i386.c (ix86_init_large_pic_reg): Return label
12845 instead of void.
12846 (ix86_init_pic_reg): Remember label from ix86_init_large_pic_reg,
12847 if non-NULL and preceded by NOTE_INSN_BASIC_BLOCK, swap the note
12848 and label.
12849
12850 2017-09-01 Joerg Sonnenberger <joerg@bec.de>
12851 Jeff Law <law@redhat.com>
12852
12853 * varasm.c (bss_initializer_p): Do not put constants into .bss
12854 (categorize_decl_for_section): Handle bss_initializer_p returning
12855 false when DECL_INITIAL is NULL.
12856
12857 2017-09-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12858
12859 PR target/82012
12860 * config/s390/s390.c (s390_can_inline_p): New function.
12861
12862 2017-09-01 Jeff Law <law@redhat.com>
12863
12864 PR tree-optimization/82052
12865 * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
12866 Always initialize the returned slot after a hash table miss
12867 when INSERT is true.
12868
12869 2017-09-01 Alexander Monakov <amonakov@ispras.ru>
12870
12871 * config/s390/s390.md (mem_signal_fence): Remove.
12872 * doc/md.texi (mem_signal_fence): Remove.
12873 * optabs.c (expand_mem_signal_fence): Remove uses of mem_signal_fence.
12874 Update comments.
12875 * target-insns.def (mem_signal_fence): Remove.
12876
12877 2017-09-01 Jakub Jelinek <jakub@redhat.com>
12878
12879 PR sanitizer/81902
12880 * doc/invoke.texi: Document -fsanitize=pointer-overflow.
12881
12882 PR sanitizer/81923
12883 * asan.c (create_odr_indicator): Strip name encoding from assembler
12884 name before appending it after __odr_asan_.
12885
12886 2017-09-01 Martin Liska <mliska@suse.cz>
12887
12888 PR tree-optimization/82059
12889 * gimple-ssa-isolate-paths.c (isolate_path): Add profile and
12890 frequency only when an edge is redirected.
12891
12892 2017-09-01 Claudiu Zissulescu <claziss@synopsys.com>
12893
12894 * config/arc/arc-c.c (__ARC_LPC_WIDTH__): Add builtin define.
12895 * config/arc/arc.c (ARC_MAX_LOOP_LENGTH): Define.
12896 (arc_conditional_register_usage): Remove ARC600 lp_count
12897 exception.
12898 (arc_file_start): Emit Tag_ARC_CPU_variation.
12899 (arc_can_use_doloop_p): New conditions to use ZOLs.
12900 (hwloop_fail): New function.
12901 (hwloop_optimize): Likewise.
12902 (hwloop_pattern_reg): Likewise.
12903 (arc_doloop_hooks): New struct, to be used with reorg_loops.
12904 (arc_reorg_loops): New function, calls reorg_loops.
12905 (arc_reorg): Call arc_reorg_loops. Remove old ZOL handling.
12906 (arc600_corereg_hazard): Remove ZOL checking, case handled by
12907 hwloop_optimize.
12908 (arc_loop_hazard): Remove function, functionality moved into
12909 hwloop_optimize.
12910 (arc_hazard): Remove arc_loop_hazard call.
12911 (arc_adjust_insn_length): Remove ZOL handling, functionality moved
12912 into hwloop_optimize.
12913 (arc_label_align): Remove ZOL handling.
12914 * config/arc/arc.h (LOOP_ALIGN): Changed to 0.
12915 * config/arc/arc.md (doloop_begin): Remove pattern.
12916 (doloop_begin_i): Likewise.
12917 (doloop_end_i): Likewise.
12918 (doloop_fallback): Likewise.
12919 (doloop_fallback_m): Likewise.
12920 (doloop_end): Reimplement expand.
12921 (arc_lp): New pattern for LP instruction.
12922 (loop_end): New pattern.
12923 (loop_fail): Likewise.
12924 (decrement_and_branch_until_zero): Likewise.
12925 * config/arc/arc.opt (mlpc-width): New option.
12926 * doc/invoke.texi (mlpc-width): Document option.
12927
12928 2017-09-01 Claudiu Zissulescu <claziss@synopsys.com>
12929
12930 * config/arc/arc.c (arc_ifcvt): Remove use of merge_blocks call.
12931 (arc_ccfsm_advance): Fix checking for delay slots.
12932 (arc_reorg): Add rtl dump after each call to arc_ifcvt.
12933
12934 2017-09-01 Claudiu Zissulescu <claziss@synopsys.com>
12935
12936 * config/arc/arc.md (movqi_insn): Add stores to save constant long
12937 immediates.
12938 (movhi_insn): Update store instruction constraint which are saving
12939 6-bit short immediates.
12940 (movsi_insn): Consider also short scaled load operations.
12941 (zero_extendhisi2_i): Use Usd constraint instead of T.
12942 (extendhisi2_i): Add q constraint.
12943 (arc_clzsi2): Add type and length attributes.
12944 (arc_ctzsi2): Likewise.
12945 * config/arc/constraints.md (Usc): Update constraint, the
12946 assembler can parse two relocations for a single instruction.
12947
12948 2017-09-01 Claudiu Zissulescu <claziss@synopsys.com>
12949
12950 * config/arc/arc.c (arc_use_anchors_for_symbol_p): New function.
12951 (TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.
12952
12953 2017-08-31 Olivier Hainque <hainque@adacore.com>
12954
12955 * config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now
12956 match as powerpc-wrs-vxworks*.
12957
12958 2017-08-31 James Greenhalgh <james.greenhalgh@arm.com>
12959
12960 * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): Fix
12961 register constraint for by-element operand.
12962 (aarch64_mls_elt_merge<mode>): Likewise.
12963
12964 2017-08-31 Claudiu Zissulescu <claziss@synopsys.com>
12965
12966 * config/arc/arc.c (arc_can_follow_jump): Check for short
12967 branches.
12968
12969 2017-08-31 Claudiu Zissulescu <claziss@synopsys.com>
12970
12971 * config.gcc: Use g.opt for arc.
12972 * config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted,
12973 functionality moved to ...
12974 (legitimate_scaled_address_p): New function, ...here.
12975 (LEGITIMATE_SMALL_DATA_OFFSET_P): New define.
12976 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Use the above define.
12977 (legitimate_offset_address_p): Delete TARGET_NO_SDATA_SET
12978 condition.
12979 (arc_override_options): Handle G option.
12980 (arc_output_pic_addr_const): Correct function definition.
12981 (arc_legitimate_address_p): Use legitimate_scaled_address_p.
12982 (arc_decl_anon_ns_mem_p): Delete.
12983 (arc_in_small_data_p): Overhaul this function to take into
12984 consideration the value given via G option.
12985 (arc_rewrite_small_data_1): Renamed and corrected old
12986 arc_rewrite_small_data function.
12987 (arc_rewrite_small_data): New function.
12988 (small_data_pattern): Don't use pic_offset_table_rtx.
12989 * config/arc/arc.h (CC1_SPEC): Recognize G option.
12990 * config/arc/simdext.md (movmisalignv2hi): Use
12991 prepare_move_operands function.
12992 (mov*): Likewise.
12993 (movmisalign*): Likewise.
12994 * doc/invoke.texi (ARC options): Document -G option.
12995
12996 2017-08-31 Claudiu Zissulescu <claziss@synopsys.com>
12997
12998 * config/arc/arc-protos.h (compact_sda_memory_operand): Update
12999 prototype.
13000 * config/arc/arc.c (arc_print_operand): Output scalled address for
13001 sdata whenever is possible.
13002 (arc_in_small_data_p): Allow sdata for 64bit datum when double
13003 load/stores are available.
13004 (compact_sda_memory_operand): Check for the alignment required by
13005 code density instructions.
13006 * config/arc/arc.md (movsi_insn): Use newly introduced Us0
13007 constraint.
13008 * config/arc/constraints.md (Usd): Update constraint.
13009 (Us0): New constraint.
13010 (Usc): Update constraint.
13011
13012 2017-08-31 Richard Biener <rguenther@suse.de>
13013
13014 PR middle-end/82054
13015 * dwarf2out.c (dwarf2out_early_global_decl): Process each
13016 function only once.
13017
13018 2017-08-31 Tamar Christina <tamar.christina@arm.com>
13019
13020 * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins):
13021 Resize type_signature.
13022
13023 2017-08-31 Richard Sandiford <richard.sandiford@linaro.org>
13024 Alan Hayward <alan.hayward@arm.com>
13025 David Sherwood <david.sherwood@arm.com>
13026
13027 * config/aarch64/aarch64.c (aarch64_base_register_rtx_p): Only allow
13028 subregs whose inner modes can be stored in GPRs.
13029 (aarch64_classify_index): Likewise.
13030
13031 2017-08-31 Richard Sandiford <richard.sandiford@linaro.org>
13032 Alan Hayward <alan.hayward@arm.com>
13033 David Sherwood <david.sherwood@arm.com>
13034
13035 * config/aarch64/iterators.md (V_cmp_result): Rename to...
13036 (V_INT_EQUIV): ...this.
13037 (v_cmp_result): Rename to...
13038 (v_int_equiv): ...this.
13039 * config/aarch64/aarch64.md (xorsign<mode>3): Update accordingly.
13040 * config/aarch64/aarch64-simd.md (xorsign<mode>3): Likewise.
13041 (copysign<mode>3): Likewise.
13042 (aarch64_simd_bsl<mode>_internal): Likewise.
13043 (aarch64_simd_bsl<mode>): Likewise.
13044 (vec_cmp<mode><mode>): Likewise.
13045 (vcond<mode><mode>): Likewise.
13046 (vcond<v_cmp_mixed><mode>): Likewise.
13047 (vcondu<mode><v_cmp_mixed>): Likewise.
13048 (aarch64_cm<optab><mode>): Likewise.
13049 (aarch64_cmtst<mode>): Likewise.
13050 (aarch64_fac<optab><mode>): Likewise.
13051 (vec_perm_const<mode>): Likewise.
13052 (vcond_mask_<mode><v_cmp_result>): Rename to...
13053 (vcond_mask_<mode><v_int_equiv>): ...this.
13054 (vec_cmp<mode><v_cmp_result>): Rename to...
13055 (vec_cmp<mode><v_int_equiv>): ...this.
13056
13057 2017-08-31 Richard Sandiford <richard.sandiford@linaro.org>
13058 Alan Hayward <alan.hayward@arm.com>
13059 David Sherwood <david.sherwood@arm.com>
13060
13061 * config/aarch64/aarch64-modes.def: Remove 32-, 48- and 64-byte
13062 vector modes.
13063 * config/aarch64/iterators.md (VRL2, VRL3, VRL4): Delete.
13064 * config/aarch64/aarch64.md (UNSPEC_LD2_DREG, UNSPEC_LD3_DREG)
13065 (UNSPEC_LD4_DREG): New unspecs.
13066 * config/aarch64/aarch64-simd.md (aarch64_ld2<mode>_dreg_le)
13067 (aarch64_ld2<mode>_dreg_be): Replace with...
13068 (aarch64_ld2<mode>_dreg): ...this pattern and use the new DREG
13069 unspec.
13070 (aarch64_ld3<mode>_dreg_le)
13071 (aarch64_ld3<mode>_dreg_be): Replace with...
13072 (aarch64_ld3<mode>_dreg): ...this pattern and use the new DREG
13073 unspec.
13074 (aarch64_ld4<mode>_dreg_le)
13075 (aarch64_ld4<mode>_dreg_be): Replace with...
13076 (aarch64_ld4<mode>_dreg): ...this pattern and use the new DREG
13077 unspec.
13078
13079 2017-08-30 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13080
13081 PR tree-optimization/81987
13082 * gimple-ssa-strength-reduction.c (insert_initializers): Don't
13083 insert an initializer in a location not dominated by the stride
13084 definition.
13085
13086 2017-08-30 Eric Botcazou <ebotcazou@adacore.com>
13087
13088 * tree-eh.c (lower_try_finally_switch): Set the location of the finally
13089 on the entire header of the finally block in the fallthru case.
13090
13091 2017-08-30 Eric Botcazou <ebotcazou@adacore.com>
13092
13093 * varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.
13094
13095 2017-08-30 Pat Haugen <pthaugen@us.ibm.com>
13096
13097 * config/rs6000/rs6000.c (rs6000_emit_prologue_move_from_cr): Rename from
13098 rs6000_emit_move_from_cr and call renamed function.
13099 (rs6000_emit_prologue): Call renamed functions.
13100 * config/rs6000/rs6000.md (prologue_movesi_from_cr): Rename from
13101 movesi_from_cr, remove volatile CRs.
13102
13103 2017-08-30 Jon Beniston <jon@beniston.com>
13104 Richard Biener <rguenther@suse.de>
13105
13106 * tree-vect-patterns.c (vect_pattern_recog_1): Use VECTOR_TYPE_P instead
13107 of VECTOR_MODE_P check.
13108 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Allow single
13109 element vector types.
13110
13111 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13112
13113 * df.h (df_read_modify_subreg_p): Remove in favor of...
13114 * rtl.h (read_modify_subreg_p): ...this new function. Take a
13115 const_rtx instead of an rtx.
13116 * cprop.c (local_cprop_find_used_regs): Update accordingly.
13117 * df-problems.c (df_word_lr_mark_ref): Likewise.
13118 * ira-lives.c (mark_pseudo_reg_live): Likewise.
13119 (mark_pseudo_reg_dead): Likewise.
13120 (mark_ref_dead): Likewise.
13121 * reginfo.c (init_subregs_of_mode): Likewise.
13122 * sched-deps.c (sched_analyze_1): Likewise.
13123 * df-scan.c (df_def_record_1): Likewise.
13124 (df_uses_record): Likewise.
13125 (df_read_modify_subreg_p): Remove in favor of...
13126 * rtlanal.c (read_modify_subreg_p): ...this new function. Take a
13127 const_rtx instead of an rtx.
13128
13129 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13130 Alan Hayward <alan.hayward@arm.com>
13131 David Sherwood <david.sherwood@arm.com>
13132
13133 * rtl.h (partial_subreg_p): New function.
13134 * caller-save.c (save_call_clobbered_regs): Use it.
13135 * calls.c (expand_call): Likewise.
13136 * combine.c (combinable_i3pat): Likewise.
13137 (simplify_set): Likewise.
13138 (make_extraction): Likewise.
13139 (make_compound_operation_int): Likewise.
13140 (gen_lowpart_or_truncate): Likewise.
13141 (force_to_mode): Likewise.
13142 (make_field_assignment): Likewise.
13143 (reg_truncated_to_mode): Likewise.
13144 (record_truncated_value): Likewise.
13145 (move_deaths): Likewise.
13146 * cse.c (record_jump_cond): Likewise.
13147 (cse_insn): Likewise.
13148 * cselib.c (cselib_lookup_1): Likewise.
13149 * expmed.c (extract_bit_field_using_extv): Likewise.
13150 * function.c (assign_parm_setup_reg): Likewise.
13151 * ifcvt.c (noce_convert_multiple_sets): Likewise.
13152 * ira-build.c (create_insn_allocnos): Likewise.
13153 * lra-coalesce.c (merge_pseudos): Likewise.
13154 * lra-constraints.c (match_reload): Likewise.
13155 (simplify_operand_subreg): Likewise.
13156 (curr_insn_transform): Likewise.
13157 * lra-lives.c (process_bb_lives): Likewise.
13158 * lra.c (new_insn_reg): Likewise.
13159 (lra_substitute_pseudo): Likewise.
13160 * regcprop.c (mode_change_ok): Likewise.
13161 (maybe_mode_change): Likewise.
13162 (copyprop_hardreg_forward_1): Likewise.
13163 * reload.c (push_reload): Likewise.
13164 (find_reloads): Likewise.
13165 (find_reloads_subreg_address): Likewise.
13166 * reload1.c (alter_reg): Likewise.
13167 (eliminate_regs_1): Likewise.
13168 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13169
13170 2017-08-30 David Edelsohn <dje.gcc@gmail.com>
13171
13172 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Revert
13173 back to if statements, including unpack.
13174
13175 2017-08-30 Martin Liska <mliska@suse.cz>
13176
13177 PR inline-asm/82001
13178 * ipa-icf-gimple.c (func_checker::compare_tree_list_operand):
13179 Rename to ...
13180 (func_checker::compare_asm_inputs_outputs): ... this function.
13181 (func_checker::compare_gimple_asm): Use the function to compare
13182 also ASM constrains.
13183 * ipa-icf-gimple.h: Rename the function.
13184
13185 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13186 Alan Hayward <alan.hayward@arm.com>
13187 David Sherwood <david.sherwood@arm.com>
13188
13189 * coretypes.h (complex_mode): New type.
13190 * gdbhooks.py (build_pretty_printer): Handle it.
13191 * machmode.h (complex_mode): New class.
13192 (complex_mode::includes_p): New function.
13193 (is_complex_int_mode): Likewise.
13194 (is_complex_float_mode): Likewise.
13195 * genmodes.c (get_mode_class): Handle complex mode classes.
13196 * function.c (expand_function_end): Use is_complex_int_mode.
13197
13198 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13199 Alan Hayward <alan.hayward@arm.com>
13200 David Sherwood <david.sherwood@arm.com>
13201
13202 * coretypes.h (scalar_mode_pod): New typedef.
13203 * gdbhooks.py (build_pretty_printer): Handle it.
13204 * machmode.h (gt_ggc_mx, gt_pch_nx): New functions.
13205 * fixed-value.h (fixed_value::mode): Change type to scalar_mode_pod.
13206 * fold-const.c (fold_convert_const_int_from_fixed): Use scalar_mode.
13207 * tree-streamer-in.c (unpack_ts_fixed_cst_value_fields): Use
13208 as_a <scalar_mode>.
13209
13210 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13211 Alan Hayward <alan.hayward@arm.com>
13212 David Sherwood <david.sherwood@arm.com>
13213
13214 * machmode.h (mode_for_vector): Take a scalar_mode instead
13215 of a machine_mode.
13216 * stor-layout.c (mode_for_vector): Likewise.
13217 * explow.c (promote_mode): Use as_a <scalar_mode>.
13218 * sdbout.c (sdbout_parms): Use is_a <scalar_mode>.
13219
13220 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13221 Alan Hayward <alan.hayward@arm.com>
13222 David Sherwood <david.sherwood@arm.com>
13223
13224 * target.def (preferred_simd_mode): Take a scalar_mode
13225 instead of a machine_mode.
13226 * targhooks.h (default_preferred_simd_mode): Likewise.
13227 * targhooks.c (default_preferred_simd_mode): Likewise.
13228 * config/arc/arc.c (arc_preferred_simd_mode): Likewise.
13229 * config/arm/arm.c (arm_preferred_simd_mode): Likewise.
13230 * config/c6x/c6x.c (c6x_preferred_simd_mode): Likewise.
13231 * config/epiphany/epiphany.c (epiphany_preferred_simd_mode): Likewise.
13232 * config/i386/i386.c (ix86_preferred_simd_mode): Likewise.
13233 * config/mips/mips.c (mips_preferred_simd_mode): Likewise.
13234 * config/nvptx/nvptx.c (nvptx_preferred_simd_mode): Likewise.
13235 * config/powerpcspe/powerpcspe.c (rs6000_preferred_simd_mode):
13236 Likewise.
13237 * config/rs6000/rs6000.c (rs6000_preferred_simd_mode): Likewise.
13238 * config/s390/s390.c (s390_preferred_simd_mode): Likewise.
13239 * config/sparc/sparc.c (sparc_preferred_simd_mode): Likewise.
13240 * config/aarch64/aarch64.c (aarch64_preferred_simd_mode): Likewise.
13241 (aarch64_simd_scalar_immediate_valid_for_move): Update accordingly.
13242 * doc/tm.texi: Regenerate.
13243 * optabs-query.c (can_vec_mask_load_store_p): Return false for
13244 non-scalar modes.
13245
13246 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13247 Alan Hayward <alan.hayward@arm.com>
13248 David Sherwood <david.sherwood@arm.com>
13249
13250 * target.def (scalar_mode_supported_p): Take a scalar_mode
13251 instead of a machine_mode.
13252 * targhooks.h (default_scalar_mode_supported_p): Likewise.
13253 * targhooks.c (default_scalar_mode_supported_p): Likewise.
13254 * config/aarch64/aarch64.c (aarch64_scalar_mode_supported_p): Likewise.
13255 * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
13256 * config/arm/arm.c (arm_scalar_mode_supported_p): Likewise.
13257 * config/avr/avr.c (avr_scalar_mode_supported_p): Likewise.
13258 * config/c6x/c6x.c (c6x_scalar_mode_supported_p): Likewise.
13259 * config/i386/i386.c (ix86_scalar_mode_supported_p): Likewise.
13260 * config/ia64/ia64.c (ia64_scalar_mode_supported_p): Likewise.
13261 * config/mips/mips.c (mips_scalar_mode_supported_p): Likewise.
13262 * config/msp430/msp430.c (msp430_scalar_mode_supported_p): Likewise.
13263 * config/pa/pa.c (pa_scalar_mode_supported_p): Likewise.
13264 * config/pdp11/pdp11.c (pdp11_scalar_mode_supported_p): Likewise.
13265 * config/powerpcspe/powerpcspe.c (rs6000_scalar_mode_supported_p):
13266 Likewise.
13267 * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Likewise.
13268 * config/s390/s390.c (s390_scalar_mode_supported_p): Likewise.
13269 * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
13270 * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
13271 * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p):
13272 Likewise.
13273 * doc/tm.texi: Regenerate.
13274
13275 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13276 Alan Hayward <alan.hayward@arm.com>
13277 David Sherwood <david.sherwood@arm.com>
13278
13279 * coretypes.h (opt_scalar_mode): New typedef.
13280 * gdbhooks.py (build_pretty_printers): Handle it.
13281 * machmode.h (mode_iterator::get_2xwider): Add overload for
13282 opt_mode<T>.
13283 * emit-rtl.c (init_emit_once): Use opt_scalar_mode when iterating
13284 over scalar modes.
13285 * expr.c (convert_mode_scalar): Likewise.
13286 * omp-low.c (omp_clause_aligned_alignment): Likewise.
13287 * optabs.c (expand_float): Likewise.
13288 (expand_fix): Likewise.
13289 * tree-vect-stmts.c (vectorizable_conversion): Likewise.
13290
13291 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13292 Alan Hayward <alan.hayward@arm.com>
13293 David Sherwood <david.sherwood@arm.com>
13294
13295 * optabs.c (expand_float): Explicitly check for scalars before
13296 using a branching expansion.
13297 (expand_fix): Likewise.
13298
13299 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13300 Alan Hayward <alan.hayward@arm.com>
13301 David Sherwood <david.sherwood@arm.com>
13302
13303 * expr.c (convert_mode): Split scalar handling out into...
13304 (convert_mode_scalar): ...this new function. Treat the modes
13305 as scalar_modes.
13306
13307 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13308 Alan Hayward <alan.hayward@arm.com>
13309 David Sherwood <david.sherwood@arm.com>
13310
13311 * omp-expand.c (expand_omp_atomic): Use is_int_mode, is_float_mode
13312 and scalar_mode.
13313 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Likewise.
13314
13315 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13316 Alan Hayward <alan.hayward@arm.com>
13317 David Sherwood <david.sherwood@arm.com>
13318
13319 * fixed-value.h (fixed_from_double_int): Take a scalar_mode
13320 rather than a machine_mode.
13321 (fixed_from_string): Likewise.
13322 (fixed_convert): Likewise.
13323 (fixed_convert_from_int): Likewise.
13324 (fixed_convert_from_real): Likewise.
13325 (real_convert_from_fixed): Likewise.
13326 * fixed-value.c (fixed_from_double_int): Likewise.
13327 (fixed_from_string): Likewise.
13328 (fixed_convert): Likewise.
13329 (fixed_convert_from_int): Likewise.
13330 (fixed_convert_from_real): Likewise.
13331 (real_convert_from_fixed): Likewise.
13332 * config/avr/avr.c (avr_out_round): Use as_a <scalar_mode>.
13333
13334 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13335 Alan Hayward <alan.hayward@arm.com>
13336 David Sherwood <david.sherwood@arm.com>
13337
13338 * emit-rtl.c (immed_double_const): Use is_a <scalar_mode> instead
13339 of separate mode class checks. Do not allow vector modes here.
13340 (immed_wide_int_const): Use as_a <scalar_mode>.
13341 * explow.c (trunc_int_for_mode): Likewise.
13342 * rtl.h (wi::int_traits<rtx_mode_t>::get_precision): Likewise.
13343 (wi::shwi): Likewise.
13344 (wi::min_value): Likewise.
13345 (wi::max_value): Likewise.
13346 * dwarf2out.c (loc_descriptor): Likewise.
13347 * simplify-rtx.c (simplify_immed_subreg): Fix rtx_mode_t argument
13348 for CONST_WIDE_INT.
13349
13350 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13351 Alan Hayward <alan.hayward@arm.com>
13352 David Sherwood <david.sherwood@arm.com>
13353
13354 * tree.h (SCALAR_TYPE_MODE): New macro.
13355 * expr.c (expand_expr_addr_expr_1): Use it.
13356 (expand_expr_real_2): Likewise.
13357 * fold-const.c (fold_convert_const_fixed_from_fixed): Likeise.
13358 (fold_convert_const_fixed_from_int): Likewise.
13359 (fold_convert_const_fixed_from_real): Likewise.
13360 (native_encode_fixed): Likewise
13361 (native_encode_complex): Likewise
13362 (native_encode_vector): Likewise.
13363 (native_interpret_fixed): Likewise.
13364 (native_interpret_real): Likewise.
13365 (native_interpret_complex): Likewise.
13366 (native_interpret_vector): Likewise.
13367 * omp-simd-clone.c (simd_clone_adjust_return_type): Likewise.
13368 (simd_clone_adjust_argument_types): Likewise.
13369 (simd_clone_init_simd_arrays): Likewise.
13370 (simd_clone_adjust): Likewise.
13371 * stor-layout.c (layout_type): Likewise.
13372 * tree.c (build_minus_one_cst): Likewise.
13373 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
13374 * tree-inline.c (estimate_move_cost): Likewise.
13375 * tree-ssa-math-opts.c (convert_plusminus_to_widen): Likewise.
13376 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise.
13377 (vectorizable_reduction): Likewise.
13378 * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Likewise.
13379 (vect_recog_mixed_size_cond_pattern): Likewise.
13380 (check_bool_pattern): Likewise.
13381 (adjust_bool_pattern): Likewise.
13382 (search_type_for_mask_1): Likewise.
13383 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
13384 * tree-vect-stmts.c (vectorizable_conversion): Likewise.
13385 (vectorizable_load): Likewise.
13386 (vectorizable_store): Likewise.
13387 * ubsan.c (ubsan_encode_value): Likewise.
13388 * varasm.c (output_constant): Likewise.
13389
13390 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13391 Alan Hayward <alan.hayward@arm.com>
13392 David Sherwood <david.sherwood@arm.com>
13393
13394 * coretypes.h (scalar_mode): New class.
13395 * machmode.h (scalar_mode): Likewise.
13396 (scalar_mode::includes_p): New function.
13397 (mode_to_inner): Return a scalar_mode rather than a machine_mode.
13398 * gdbhooks.py (build_pretty_printers): Handle scalar_mode.
13399 * genmodes.c (get_mode_class): Handle remaining scalar modes.
13400 * cfgexpand.c (expand_debug_expr): Use scalar_mode.
13401 * expmed.c (store_bit_field_1): Likewise.
13402 (extract_bit_field_1): Likewise.
13403 * expr.c (write_complex_part): Likewise.
13404 (read_complex_part): Likewise.
13405 (emit_move_complex_push): Likewise.
13406 (expand_expr_real_2): Likewise.
13407 * function.c (assign_parm_setup_reg): Likewise.
13408 (assign_parms_unsplit_complex): Likewise.
13409 * optabs.c (expand_binop): Likewise.
13410 * rtlanal.c (subreg_get_info): Likewise.
13411 * simplify-rtx.c (simplify_immed_subreg): Likewise.
13412 * varasm.c (output_constant_pool_2): Likewise.
13413
13414 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13415 Alan Hayward <alan.hayward@arm.com>
13416 David Sherwood <david.sherwood@arm.com>
13417
13418 * expmed.c (extract_high_half): Use scalar_int_mode and remove
13419 assertion.
13420 (expmed_mult_highpart_optab): Likewise.
13421 (expmed_mult_highpart): Likewise.
13422
13423 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13424 Alan Hayward <alan.hayward@arm.com>
13425 David Sherwood <david.sherwood@arm.com>
13426
13427 * builtins.h (builtin_strncpy_read_str): Take a scalar_int_mode
13428 instead of a machine_mode.
13429 (builtin_memset_read_str): Likewise.
13430 * builtins.c (c_readstr): Likewise.
13431 (builtin_memcpy_read_str): Likewise.
13432 (builtin_strncpy_read_str): Likewise.
13433 (builtin_memset_read_str): Likewise.
13434 (builtin_memset_gen_str): Likewise.
13435 (expand_builtin_signbit): Use scalar_int_mode for local variables.
13436 * cfgexpand.c (convert_debug_memory_address): Take a scalar_int_mode
13437 instead of a machine_mode.
13438 * combine.c (simplify_if_then_else): Use scalar_int_mode for local
13439 variables.
13440 (make_extraction): Likewise.
13441 (try_widen_shift_mode): Take and return scalar_int_modes instead
13442 of machine_modes.
13443 * config/aarch64/aarch64.c (aarch64_libgcc_cmp_return_mode): Return
13444 a scalar_int_mode instead of a machine_mode.
13445 * config/avr/avr.c (avr_addr_space_address_mode): Likewise.
13446 (avr_addr_space_pointer_mode): Likewise.
13447 * config/cr16/cr16.c (cr16_unwind_word_mode): Likewise.
13448 * config/msp430/msp430.c (msp430_addr_space_pointer_mode): Likewise.
13449 (msp430_unwind_word_mode): Likewise.
13450 * config/spu/spu.c (spu_unwind_word_mode): Likewise.
13451 (spu_addr_space_pointer_mode): Likewise.
13452 (spu_addr_space_address_mode): Likewise.
13453 (spu_libgcc_cmp_return_mode): Likewise.
13454 (spu_libgcc_shift_count_mode): Likewise.
13455 * config/rl78/rl78.c (rl78_addr_space_address_mode): Likewise.
13456 (rl78_addr_space_pointer_mode): Likewise.
13457 (fl78_unwind_word_mode): Likewise.
13458 (rl78_valid_pointer_mode): Take a scalar_int_mode instead of a
13459 machine_mode.
13460 * config/alpha/alpha.c (vms_valid_pointer_mode): Likewise.
13461 * config/ia64/ia64.c (ia64_vms_valid_pointer_mode): Likewise.
13462 * config/mips/mips.c (mips_mode_rep_extended): Likewise.
13463 (mips_valid_pointer_mode): Likewise.
13464 * config/tilegx/tilegx.c (tilegx_mode_rep_extended): Likewise.
13465 * config/ft32/ft32.c (ft32_valid_pointer_mode): Likewise.
13466 (ft32_addr_space_pointer_mode): Return a scalar_int_mode instead
13467 of a machine_mode.
13468 (ft32_addr_space_address_mode): Likewise.
13469 * config/m32c/m32c.c (m32c_valid_pointer_mode): Take a
13470 scalar_int_mode instead of a machine_mode.
13471 (m32c_addr_space_pointer_mode): Return a scalar_int_mode instead
13472 of a machine_mode.
13473 (m32c_addr_space_address_mode): Likewise.
13474 * config/powerpcspe/powerpcspe.c (rs6000_abi_word_mode): Likewise.
13475 (rs6000_eh_return_filter_mode): Likewise.
13476 * config/rs6000/rs6000.c (rs6000_abi_word_mode): Likewise.
13477 (rs6000_eh_return_filter_mode): Likewise.
13478 * config/s390/s390.c (s390_libgcc_cmp_return_mode): Likewise.
13479 (s390_libgcc_shift_count_mode): Likewise.
13480 (s390_unwind_word_mode): Likewise.
13481 (s390_valid_pointer_mode): Take a scalar_int_mode rather than a
13482 machine_mode.
13483 * target.def (mode_rep_extended): Likewise.
13484 (valid_pointer_mode): Likewise.
13485 (addr_space.valid_pointer_mode): Likewise.
13486 (eh_return_filter_mode): Return a scalar_int_mode rather than
13487 a machine_mode.
13488 (libgcc_cmp_return_mode): Likewise.
13489 (libgcc_shift_count_mode): Likewise.
13490 (unwind_word_mode): Likewise.
13491 (addr_space.pointer_mode): Likewise.
13492 (addr_space.address_mode): Likewise.
13493 * doc/tm.texi: Regenerate.
13494 * dojump.c (prefer_and_bit_test): Take a scalar_int_mode rather than
13495 a machine_mode.
13496 (do_jump): Use scalar_int_mode for local variables.
13497 * dwarf2cfi.c (init_return_column_size): Take a scalar_int_mode
13498 rather than a machine_mode.
13499 * dwarf2out.c (convert_descriptor_to_mode): Likewise.
13500 (scompare_loc_descriptor_wide): Likewise.
13501 (scompare_loc_descriptor_narrow): Likewise.
13502 * emit-rtl.c (adjust_address_1): Use scalar_int_mode for local
13503 variables.
13504 * except.c (sjlj_emit_dispatch_table): Likewise.
13505 (expand_builtin_eh_copy_values): Likewise.
13506 * explow.c (convert_memory_address_addr_space_1): Likewise.
13507 Take a scalar_int_mode rather than a machine_mode.
13508 (convert_memory_address_addr_space): Take a scalar_int_mode rather
13509 than a machine_mode.
13510 (memory_address_addr_space): Use scalar_int_mode for local variables.
13511 * expmed.h (expand_mult_highpart_adjust): Take a scalar_int_mode
13512 rather than a machine_mode.
13513 * expmed.c (mask_rtx): Likewise.
13514 (init_expmed_one_conv): Likewise.
13515 (expand_mult_highpart_adjust): Likewise.
13516 (extract_high_half): Likewise.
13517 (expmed_mult_highpart_optab): Likewise.
13518 (expmed_mult_highpart): Likewise.
13519 (expand_smod_pow2): Likewise.
13520 (expand_sdiv_pow2): Likewise.
13521 (emit_store_flag_int): Likewise.
13522 (adjust_bit_field_mem_for_reg): Use scalar_int_mode for local
13523 variables.
13524 (extract_low_bits): Likewise.
13525 * expr.h (by_pieces_constfn): Take a scalar_int_mode rather than
13526 a machine_mode.
13527 * expr.c (pieces_addr::adjust): Likewise.
13528 (can_store_by_pieces): Likewise.
13529 (store_by_pieces): Likewise.
13530 (clear_by_pieces_1): Likewise.
13531 (expand_expr_addr_expr_1): Likewise.
13532 (expand_expr_addr_expr): Use scalar_int_mode for local variables.
13533 (expand_expr_real_1): Likewise.
13534 (try_casesi): Likewise.
13535 * final.c (shorten_branches): Likewise.
13536 * fold-const.c (fold_convert_const_int_from_fixed): Change the
13537 type of "mode" to machine_mode.
13538 * internal-fn.c (expand_arith_overflow_result_store): Take a
13539 scalar_int_mode rather than a machine_mode.
13540 (expand_mul_overflow): Use scalar_int_mode for local variables.
13541 * loop-doloop.c (doloop_modify): Likewise.
13542 (doloop_optimize): Likewise.
13543 * optabs.c (expand_subword_shift): Take a scalar_int_mode rather
13544 than a machine_mode.
13545 (expand_doubleword_shift_condmove): Likewise.
13546 (expand_doubleword_shift): Likewise.
13547 (expand_doubleword_clz): Likewise.
13548 (expand_doubleword_popcount): Likewise.
13549 (expand_doubleword_parity): Likewise.
13550 (expand_absneg_bit): Use scalar_int_mode for local variables.
13551 (prepare_float_lib_cmp): Likewise.
13552 * rtl.h (convert_memory_address_addr_space_1): Take a scalar_int_mode
13553 rather than a machine_mode.
13554 (convert_memory_address_addr_space): Likewise.
13555 (get_mode_bounds): Likewise.
13556 (get_address_mode): Return a scalar_int_mode rather than a
13557 machine_mode.
13558 * rtlanal.c (get_address_mode): Likewise.
13559 * stor-layout.c (get_mode_bounds): Take a scalar_int_mode rather
13560 than a machine_mode.
13561 * targhooks.c (default_mode_rep_extended): Likewise.
13562 (default_valid_pointer_mode): Likewise.
13563 (default_addr_space_valid_pointer_mode): Likewise.
13564 (default_eh_return_filter_mode): Return a scalar_int_mode rather
13565 than a machine_mode.
13566 (default_libgcc_cmp_return_mode): Likewise.
13567 (default_libgcc_shift_count_mode): Likewise.
13568 (default_unwind_word_mode): Likewise.
13569 (default_addr_space_pointer_mode): Likewise.
13570 (default_addr_space_address_mode): Likewise.
13571 * targhooks.h (default_eh_return_filter_mode): Likewise.
13572 (default_libgcc_cmp_return_mode): Likewise.
13573 (default_libgcc_shift_count_mode): Likewise.
13574 (default_unwind_word_mode): Likewise.
13575 (default_addr_space_pointer_mode): Likewise.
13576 (default_addr_space_address_mode): Likewise.
13577 (default_mode_rep_extended): Take a scalar_int_mode rather than
13578 a machine_mode.
13579 (default_valid_pointer_mode): Likewise.
13580 (default_addr_space_valid_pointer_mode): Likewise.
13581 * tree-ssa-address.c (addr_for_mem_ref): Use scalar_int_mode for
13582 local variables.
13583 * tree-ssa-loop-ivopts.c (get_shiftadd_cost): Take a scalar_int_mode
13584 rather than a machine_mode.
13585 * tree-switch-conversion.c (array_value_type): Use scalar_int_mode
13586 for local variables.
13587 * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
13588 * var-tracking.c (use_narrower_mode): Take a scalar_int_mode rather
13589 than a machine_mode.
13590
13591 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13592 Alan Hayward <alan.hayward@arm.com>
13593 David Sherwood <david.sherwood@arm.com>
13594
13595 * dojump.c (do_jump_by_parts_greater_rtx): Change the type of
13596 the mode argument to scalar_int_mode.
13597 (do_jump_by_parts_zero_rtx): Likewise.
13598 (do_jump_by_parts_equality_rtx): Likewise.
13599 (do_jump_by_parts_greater): Take a mode argument.
13600 (do_jump_by_parts_equality): Likewise.
13601 (do_jump_1): Update calls accordingly.
13602
13603 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13604 Alan Hayward <alan.hayward@arm.com>
13605 David Sherwood <david.sherwood@arm.com>
13606
13607 * is-a.h (safe_dyn_cast): New function.
13608 * rtl.h (rtx_jump_table_data::get_data_mode): New function.
13609 (jump_table_for_label): Likewise.
13610 * final.c (final_addr_vec_align): Take an rtx_jump_table_data *
13611 instead of an rtx_insn *.
13612 (shorten_branches): Use dyn_cast instead of LABEL_P and
13613 JUMP_TABLE_DATA_P. Use jump_table_for_label and
13614 rtx_jump_table_data::get_data_mode.
13615 (final_scan_insn): Likewise.
13616
13617 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13618 Alan Hayward <alan.hayward@arm.com>
13619 David Sherwood <david.sherwood@arm.com>
13620
13621 * combine.c (try_combine): Use is_a <scalar_int_mode> when
13622 trying to combine a full-register integer set with a subreg
13623 integer set.
13624
13625 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13626 Alan Hayward <alan.hayward@arm.com>
13627 David Sherwood <david.sherwood@arm.com>
13628
13629 * expr.c (expand_expr_addr_expr): Add a new_tmode local variable
13630 that is always either address_mode or pointer_mode.
13631
13632 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13633 Alan Hayward <alan.hayward@arm.com>
13634 David Sherwood <david.sherwood@arm.com>
13635
13636 * expr.c (expand_expr_real_2): Use word_mode instead of innermode
13637 when the two are known to be equal.
13638
13639 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13640 Alan Hayward <alan.hayward@arm.com>
13641 David Sherwood <david.sherwood@arm.com>
13642
13643 * simplify-rtx.c (simplify_const_unary_operation): Use
13644 is_a <scalar_int_mode> instead of checking for a nonzero
13645 precision. Forcibly convert op_mode to a scalar_int_mode
13646 in that case. More clearly differentiate the operand and
13647 result modes and use the former when deciding what the value
13648 of a count-bits operation should be. Use is_int_mode instead
13649 of checking for a MODE_INT. Remove redundant check for whether
13650 this mode has a zero precision.
13651
13652 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13653 Alan Hayward <alan.hayward@arm.com>
13654 David Sherwood <david.sherwood@arm.com>
13655
13656 * optabs.c (widen_leading): Change the type of the mode argument
13657 to scalar_int_mode. Use opt_scalar_int_mode for the mode iterator.
13658 (widen_bswap): Likewise.
13659 (expand_parity): Likewise.
13660 (expand_ctz): Change the type of the mode argument to scalar_int_mode.
13661 (expand_ffs): Likewise.
13662 (epand_unop): Check for scalar integer modes before calling the
13663 above routines.
13664
13665 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13666 Alan Hayward <alan.hayward@arm.com>
13667 David Sherwood <david.sherwood@arm.com>
13668
13669 * expr.c (const_scalar_mask_from_tree): Add a mode argument.
13670 Expand commentary.
13671 (expand_expr_real_1): Update call accordingly.
13672
13673 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13674 Alan Hayward <alan.hayward@arm.com>
13675 David Sherwood <david.sherwood@arm.com>
13676
13677 * expmed.c (store_bit_field_using_insv): Add op0_mode and
13678 value_mode arguments. Use scalar_int_mode internally.
13679 (store_bit_field_1): Rename the new integer mode from imode
13680 to op0_mode and use it instead of GET_MODE (op0). Update calls
13681 to store_split_bit_field, store_bit_field_using_insv and
13682 store_fixed_bit_field.
13683 (store_fixed_bit_field): Add op0_mode and value_mode arguments.
13684 Use scalar_int_mode internally. Use a bit count rather than a mode
13685 when calculating the largest bit size for get_best_mode.
13686 Update calls to store_split_bit_field and store_fixed_bit_field_1.
13687 (store_fixed_bit_field_1): Add mode and value_mode arguments.
13688 Remove assertion that OP0 has a scalar integer mode.
13689 (store_split_bit_field): Add op0_mode and value_mode arguments.
13690 Update calls to extract_fixed_bit_field.
13691 (extract_bit_field_using_extv): Add an op0_mode argument.
13692 Use scalar_int_mode internally.
13693 (extract_bit_field_1): Rename the new integer mode from imode to
13694 op0_mode and use it instead of GET_MODE (op0). Update calls to
13695 extract_split_bit_field, extract_bit_field_using_extv and
13696 extract_fixed_bit_field.
13697 (extract_fixed_bit_field): Add an op0_mode argument. Update calls
13698 to extract_split_bit_field and extract_fixed_bit_field_1.
13699 (extract_fixed_bit_field_1): Add a mode argument. Remove assertion
13700 that OP0 has a scalar integer mode. Use as_a <scalar_int_mode>
13701 on the target mode.
13702 (extract_split_bit_field): Add an op0_mode argument. Update call
13703 to extract_fixed_bit_field.
13704
13705 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13706 Alan Hayward <alan.hayward@arm.com>
13707 David Sherwood <david.sherwood@arm.com>
13708
13709 * cse.c (cse_insn): Use opt_scalar_int_mode for the mode iterator.
13710 * explow.c (hard_function_value): Likewise.
13711 * expmed.c (extract_fixed_bit_field_1): Likewise. Move the
13712 convert_to_mode call outside the loop.
13713 * expr.c (alignment_for_piecewise_move): Use opt_scalar_int_mode
13714 for the mode iterator. Require the mode specified by max_pieces
13715 to exist.
13716 (emit_block_move_via_movmem): Use opt_scalar_int_mode for the
13717 mode iterator.
13718 (copy_blkmode_to_reg): Likewise.
13719 (set_storage_via_setmem): Likewise.
13720 * optabs.c (prepare_cmp_insn): Likewise.
13721 * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
13722 * stor-layout.c (finish_bitfield_representative): Likewise.
13723
13724 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13725 Alan Hayward <alan.hayward@arm.com>
13726 David Sherwood <david.sherwood@arm.com>
13727
13728 * rtl.h (subreg_unpromoted_mode, subreg_promoted_mode): New functions.
13729 * expr.c (convert_move): Use them.
13730 (convert_modes): Likewise.
13731 (store_expr_with_bounds): Likewise.
13732
13733 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13734 Alan Hayward <alan.hayward@arm.com>
13735 David Sherwood <david.sherwood@arm.com>
13736
13737 * rtl.h (rtl_hooks::reg_nonzero_bits): Add a scalar_int_mode
13738 parameter for the mode of "x". Remove the "known_x", "known_mode"
13739 and "known_ret" arguments. Change the type of the mode argument
13740 to scalar_int_mode.
13741 (rtl_hooks:reg_num_sign_bit_copies): Likewise.
13742 * combine.c (reg_nonzero_bits_for_combine): Update accordingly.
13743 (reg_num_sign_bit_copies_for_combine): Likewise.
13744 * rtlanal.c (nonzero_bits1): Likewise.
13745 (num_sign_bit_copies1): Likewise.
13746 * rtlhooks-def.h (reg_nonzero_bits_general): Likewise.
13747 (reg_num_sign_bit_copies_general): Likewise.
13748 * rtlhooks.c (reg_num_sign_bit_copies_general): Likewise.
13749 (reg_nonzero_bits_general): Likewise.
13750
13751 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13752 Alan Hayward <alan.hayward@arm.com>
13753 David Sherwood <david.sherwood@arm.com>
13754
13755 * rtlanal.c (num_sign_bit_copies): Handle VOIDmode here rather
13756 than in subroutines. Return 1 for non-integer modes.
13757 (cached_num_sign_bit_copies): Change the type of the mode parameter
13758 to scalar_int_mode.
13759 (num_sign_bit_copies1): Likewise. Remove early exit for other mode
13760 classes. Handle CONST_INT_P first and then check whether X also
13761 has a scalar integer mode. Check the same thing for inner registers
13762 of a SUBREG and for values that are being extended or truncated.
13763
13764 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13765 Alan Hayward <alan.hayward@arm.com>
13766 David Sherwood <david.sherwood@arm.com>
13767
13768 * rtlanal.c (nonzero_bits): Handle VOIDmode here rather than
13769 in subroutines. Return the mode mask for non-integer modes.
13770 (cached_nonzero_bits): Change the type of the mode parameter
13771 to scalar_int_mode.
13772 (nonzero_bits1): Likewise. Remove early exit for other mode
13773 classes. Handle CONST_INT_P first and then check whether X
13774 also has a scalar integer mode.
13775
13776 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13777 Alan Hayward <alan.hayward@arm.com>
13778 David Sherwood <david.sherwood@arm.com>
13779
13780 * expr.c (widest_int_mode_for_size): Make the comment match the code.
13781 Return a scalar_int_mode and assert that the size is greater than
13782 one byte.
13783 (by_pieces_ninsns): Update accordingly and remove VOIDmode handling.
13784 (op_by_pieces_d::op_by_pieces_d): Likewise.
13785 (op_by_pieces_d::run): Likewise.
13786 (can_store_by_pieces): Likewise.
13787
13788 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13789 Alan Hayward <alan.hayward@arm.com>
13790 David Sherwood <david.sherwood@arm.com>
13791
13792 * combine.c (extract_left_shift): Add a mode argument and update
13793 recursive calls.
13794 (make_compound_operation_int): Change the type of the mode parameter
13795 to scalar_int_mode and update the call to extract_left_shift.
13796
13797 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13798 Alan Hayward <alan.hayward@arm.com>
13799 David Sherwood <david.sherwood@arm.com>
13800
13801 * combine.c (simplify_and_const_int): Change the type of the mode
13802 parameter to scalar_int_mode.
13803 (simplify_and_const_int_1): Likewise. Update recursive call.
13804
13805 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13806 Alan Hayward <alan.hayward@arm.com>
13807 David Sherwood <david.sherwood@arm.com>
13808
13809 * combine.c (simplify_compare_const): Check that the mode is a
13810 scalar_int_mode (rather than VOIDmode) before testing its
13811 precision.
13812 (simplify_comparison): Move COMPARISON_P handling out of the
13813 loop and restrict the latter part of the loop to scalar_int_modes.
13814 Check is_a <scalar_int_mode> before calling HWI_COMPUTABLE_MODE_P
13815 and when considering SUBREG_REGs. Use is_int_mode instead of
13816 checking GET_MODE_CLASS against MODE_INT.
13817
13818 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13819 Alan Hayward <alan.hayward@arm.com>
13820 David Sherwood <david.sherwood@arm.com>
13821
13822 * combine.c (try_widen_shift_mode): Move check for equal modes to...
13823 (simplify_shift_const_1): ...here. Use scalar_int_mode for
13824 shift_unit_mode and for modes involved in scalar shifts.
13825
13826 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13827 Alan Hayward <alan.hayward@arm.com>
13828 David Sherwood <david.sherwood@arm.com>
13829
13830 * combine.c (force_int_to_mode): New function, split out from...
13831 (force_to_mode): ...here. Keep xmode up-to-date and use it
13832 instead of GET_MODE (x).
13833
13834 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13835 Alan Hayward <alan.hayward@arm.com>
13836 David Sherwood <david.sherwood@arm.com>
13837
13838 * optabs-query.h (extraction_insn::struct_mode): Change type to
13839 opt_scalar_int_mode and update comment.
13840 (extraction_insn::field_mode): Change type to scalar_int_mode.
13841 (extraction_insn::pos_mode): Likewise.
13842 * combine.c (make_extraction): Update accordingly.
13843 * optabs-query.c (get_traditional_extraction_insn): Likewise.
13844 (get_optab_extraction_insn): Likewise.
13845 * recog.c (simplify_while_replacing): Likewise.
13846 * expmed.c (narrow_bit_field_mem): Change the type of the mode
13847 parameter to opt_scalar_int_mode.
13848
13849 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13850 Alan Hayward <alan.hayward@arm.com>
13851 David Sherwood <david.sherwood@arm.com>
13852
13853 * machmode.h (bit_field_mode_iterator::next_mode): Take a pointer
13854 to a scalar_int_mode instead of a machine_mode.
13855 (bit_field_mode_iterator::m_mode): Change type to opt_scalar_int_mode.
13856 (get_best_mode): Return a boolean and use a pointer argument to store
13857 the selected mode. Replace the limit mode parameter with a bit limit.
13858 * expmed.c (adjust_bit_field_mem_for_reg): Use scalar_int_mode
13859 for the values returned by bit_field_mode_iterator::next_mode.
13860 (store_bit_field): Update call to get_best_mode.
13861 (store_fixed_bit_field): Likewise.
13862 (extract_fixed_bit_field): Likewise.
13863 * expr.c (optimize_bitfield_assignment_op): Likewise.
13864 * fold-const.c (optimize_bit_field_compare): Likewise.
13865 (fold_truth_andor_1): Likewise.
13866 * stor-layout.c (bit_field_mode_iterator::next_mode): As above.
13867 Update for new type of m_mode.
13868 (get_best_mode): As above.
13869
13870 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13871 Alan Hayward <alan.hayward@arm.com>
13872 David Sherwood <david.sherwood@arm.com>
13873
13874 * expmed.c (strict_volatile_bitfield_p): Change the type of fieldmode
13875 to scalar_int_mode. Remove check for SCALAR_INT_MODE_P.
13876 (store_bit_field): Check is_a <scalar_int_mode> before calling
13877 strict_volatile_bitfield_p.
13878 (extract_bit_field): Likewise.
13879
13880 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13881 Alan Hayward <alan.hayward@arm.com>
13882 David Sherwood <david.sherwood@arm.com>
13883
13884 * target.def (cstore_mode): Return a scalar_int_mode.
13885 * doc/tm.texi: Regenerate.
13886 * config/sparc/sparc.c (sparc_cstore_mode): Return a scalar_int_mode.
13887 * targhooks.h (default_cstore_mode): Likewise.
13888 * targhooks.c (default_cstore_mode): Likewise, using a forced
13889 conversion.
13890 * expmed.c (emit_cstore): Expect the target of the cstore to be
13891 a scalar_int_mode.
13892
13893 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13894 Alan Hayward <alan.hayward@arm.com>
13895 David Sherwood <david.sherwood@arm.com>
13896
13897 * cfgloop.h (rtx_iv): Change type of extend_mode and mode to
13898 scalar_int_mode.
13899 (niter_desc): Likewise mode.
13900 (iv_analyze): Add a mode parameter.
13901 (biv_p): Likewise.
13902 (iv_analyze_expr): Pass the mode paraeter before the rtx it describes
13903 and change its type to scalar_int_mode.
13904 * loop-iv.c: Update commentary at head of file.
13905 (iv_constant): Pass the mode paraeter before the rtx it describes
13906 and change its type to scalar_int_mode. Remove VOIDmode handling.
13907 (iv_subreg): Change the type of the mode parameter to scalar_int_mode.
13908 (iv_extend): Likewise.
13909 (shorten_into_mode): Likewise.
13910 (iv_add): Use scalar_int_mode.
13911 (iv_mult): Likewise.
13912 (iv_shift): Likewise.
13913 (canonicalize_iv_subregs): Likewise.
13914 (get_biv_step_1): Pass the outer_mode parameter before the rtx
13915 it describes and change its mode to scalar_int_mode. Also change
13916 the type of the returned inner_mode to scalar_int_mode.
13917 (get_biv_step): Likewise, turning outer_mode from a pointer
13918 into a direct parameter. Update call to get_biv_step_1.
13919 (iv_analyze_biv): Add an outer_mode parameter. Update calls to
13920 iv_constant and get_biv_step.
13921 (iv_analyze_expr): Pass the mode parameter before the rtx it describes
13922 and change its type to scalar_int_mode. Don't initialise iv->mode
13923 to VOIDmode and remove later checks for its still being VOIDmode.
13924 Update calls to iv_analyze_op and iv_analyze_expr. Check
13925 is_a <scalar_int_mode> when changing the mode under consideration.
13926 (iv_analyze_def): Ignore registers that don't have a scalar_int_mode.
13927 Update call to iv_analyze_expr.
13928 (iv_analyze_op): Add a mode parameter. Reject subregs whose
13929 inner register is not also a scalar_int_mode. Update call to
13930 iv_analyze_biv.
13931 (iv_analyze): Add a mode parameter. Update call to iv_analyze_op.
13932 (biv_p): Add a mode parameter. Update call to iv_analyze_biv.
13933 (iv_number_of_iterations): Use is_a <scalar_int_mode> instead of
13934 separate mode class checks. Update calls to iv_analyze. Remove
13935 fix-up of VOIDmodes after iv_analyze_biv.
13936 * loop-unroll.c (analyze_iv_to_split_insn): Reject registers that
13937 don't have a scalar_int_mode. Update call to biv_p.
13938
13939 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13940 Alan Hayward <alan.hayward@arm.com>
13941 David Sherwood <david.sherwood@arm.com>
13942
13943 * cfgexpand.c (convert_debug_memory_address): Use
13944 as_a <scalar_int_mode>.
13945 * combine.c (expand_compound_operation): Likewise.
13946 (make_extraction): Likewise.
13947 (change_zero_ext): Likewise.
13948 (simplify_comparison): Likewise.
13949 * cse.c (cse_insn): Likewise.
13950 * dwarf2out.c (minmax_loc_descriptor): Likewise.
13951 (mem_loc_descriptor): Likewise.
13952 (loc_descriptor): Likewise.
13953 * expmed.c (init_expmed_one_mode): Likewise.
13954 (synth_mult): Likewise.
13955 (emit_store_flag_1): Likewise.
13956 (expand_divmod): Likewise. Use HWI_COMPUTABLE_MODE_P instead
13957 of a comparison with size.
13958 * expr.c (expand_assignment): Use as_a <scalar_int_mode>.
13959 (reduce_to_bit_field_precision): Likewise.
13960 * function.c (expand_function_end): Likewise.
13961 * internal-fn.c (expand_arith_overflow_result_store): Likewise.
13962 * loop-doloop.c (doloop_modify): Likewise.
13963 * optabs.c (expand_binop): Likewise.
13964 (expand_unop): Likewise.
13965 (expand_copysign_absneg): Likewise.
13966 (prepare_cmp_insn): Likewise.
13967 (maybe_legitimize_operand): Likewise.
13968 * recog.c (const_scalar_int_operand): Likewise.
13969 * rtlanal.c (get_address_mode): Likewise.
13970 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13971 (simplify_cond_clz_ctz): Likewise.
13972 * tree-nested.c (get_nl_goto_field): Likewise.
13973 * tree.c (build_vector_type_for_mode): Likewise.
13974 * var-tracking.c (use_narrower_mode): Likewise.
13975
13976 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
13977 Alan Hayward <alan.hayward@arm.com>
13978 David Sherwood <david.sherwood@arm.com>
13979
13980 * tree.h (SCALAR_INT_TYPE_MODE): New macro.
13981 * builtins.c (expand_builtin_signbit): Use it.
13982 * cfgexpand.c (expand_debug_expr): Likewise.
13983 * dojump.c (do_jump): Likewise.
13984 (do_compare_and_jump): Likewise.
13985 * dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Likewise.
13986 * expmed.c (make_tree): Likewise.
13987 * expr.c (expand_expr_real_2): Likewise.
13988 (expand_expr_real_1): Likewise.
13989 (try_casesi): Likewise.
13990 * fold-const-call.c (fold_const_call_ss): Likewise.
13991 * fold-const.c (unextend): Likewise.
13992 (extract_muldiv_1): Likewise.
13993 (fold_single_bit_test): Likewise.
13994 (native_encode_int): Likewise.
13995 (native_encode_string): Likewise.
13996 (native_interpret_int): Likewise.
13997 * gimple-fold.c (gimple_fold_builtin_memset): Likewise.
13998 * internal-fn.c (expand_addsub_overflow): Likewise.
13999 (expand_neg_overflow): Likewise.
14000 (expand_mul_overflow): Likewise.
14001 (expand_arith_overflow): Likewise.
14002 * match.pd: Likewise.
14003 * stor-layout.c (layout_type): Likewise.
14004 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
14005 * tree-ssa-math-opts.c (convert_mult_to_widen): Likewise.
14006 * tree-ssanames.c (get_range_info): Likewise.
14007 * tree-switch-conversion.c (array_value_type) Likewise.
14008 * tree-vect-patterns.c (vect_recog_rotate_pattern): Likewise.
14009 (vect_recog_divmod_pattern): Likewise.
14010 (vect_recog_mixed_size_cond_pattern): Likewise.
14011 * tree-vrp.c (extract_range_basic): Likewise.
14012 (simplify_float_conversion_using_ranges): Likewise.
14013 * tree.c (int_fits_type_p): Likewise.
14014 * ubsan.c (instrument_bool_enum_load): Likewise.
14015 * varasm.c (mergeable_string_section): Likewise.
14016 (narrowing_initializer_constant_valid_p): Likewise.
14017 (output_constant): Likewise.
14018
14019 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14020 Alan Hayward <alan.hayward@arm.com>
14021 David Sherwood <david.sherwood@arm.com>
14022
14023 * machmode.h (NARROWEST_INT_MODE): New macro.
14024 * expr.c (alignment_for_piecewise_move): Use it instead of
14025 GET_CLASS_NARROWEST_MODE (MODE_INT).
14026 (push_block): Likewise.
14027 * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
14028 Likewise.
14029 * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
14030
14031 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14032 Alan Hayward <alan.hayward@arm.com>
14033 David Sherwood <david.sherwood@arm.com>
14034
14035 * postreload.c (move2add_valid_value_p): Change the type of the
14036 mode parameter to scalar_int_mode.
14037 (move2add_use_add2_insn): Add a mode parameter and use it instead
14038 of GET_MODE (reg).
14039 (move2add_use_add3_insn): Likewise.
14040 (reload_cse_move2add): Update accordingly.
14041
14042 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14043 Alan Hayward <alan.hayward@arm.com>
14044 David Sherwood <david.sherwood@arm.com>
14045
14046 * expr.c (expand_expr_real_2): Use scalar_int_mode for the
14047 double-word mode.
14048 * lower-subreg.c (resolve_shift_zext): Use is_a <scalar_int_mode>.
14049 * optabs.c (expand_unop): Likewise.
14050
14051 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14052 Alan Hayward <alan.hayward@arm.com>
14053 David Sherwood <david.sherwood@arm.com>
14054
14055 * dwarf2out.c (typed_binop): Change mode parameter to scalar_int_mode.
14056 (clz_loc_descriptor): Likewise. Remove SCALAR_INT_MODE_P check.
14057 (popcount_loc_descriptor): Likewise.
14058 (bswap_loc_descriptor): Likewise.
14059 (rotate_loc_descriptor): Likewise.
14060 (mem_loc_descriptor): Add is_a <scalar_int_mode> checks before
14061 calling the functions above.
14062
14063 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14064 Alan Hayward <alan.hayward@arm.com>
14065 David Sherwood <david.sherwood@arm.com>
14066
14067 * combine.c (sign_extend_short_imm): Add is_a <scalar_int_mode>
14068 checks.
14069 (try_combine): Likewise.
14070 (simplify_if_then_else): Likewise.
14071 * cse.c (cse_insn): Likewise.
14072 * dwarf2out.c (mem_loc_descriptor): Likewise.
14073 * emit-rtl.c (gen_lowpart_common): Likewise.
14074 * simplify-rtx.c (simplify_truncation): Likewise.
14075 (simplify_binary_operation_1): Likewise.
14076 (simplify_const_relational_operation): Likewise.
14077 (simplify_ternary_operation): Likewise.
14078 * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
14079
14080 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14081 Alan Hayward <alan.hayward@arm.com>
14082 David Sherwood <david.sherwood@arm.com>
14083
14084 * cse.c (cse_insn): Add is_a <scalar_int_mode> checks.
14085 * reload.c (push_reload): Likewise.
14086 (find_reloads): Likewise.
14087
14088 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14089 Alan Hayward <alan.hayward@arm.com>
14090 David Sherwood <david.sherwood@arm.com>
14091
14092 * combine.c (find_split_point): Add is_a <scalar_int_mode> checks.
14093 (make_compound_operation_int): Likewise.
14094 (change_zero_ext): Likewise.
14095 * expr.c (convert_move): Likewise.
14096 (convert_modes): Likewise.
14097 * fwprop.c (forward_propagate_subreg): Likewise.
14098 * loop-iv.c (get_biv_step_1): Likewise.
14099 * optabs.c (widen_operand): Likewise.
14100 * postreload.c (move2add_valid_value_p): Likewise.
14101 * recog.c (simplify_while_replacing): Likewise.
14102 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
14103 (simplify_binary_operation_1): Likewise. Remove redundant
14104 mode equality check.
14105
14106 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14107 Alan Hayward <alan.hayward@arm.com>
14108 David Sherwood <david.sherwood@arm.com>
14109
14110 * combine.c (combine_simplify_rtx): Add checks for
14111 is_a <scalar_int_mode>.
14112 (simplify_if_then_else): Likewise.
14113 (make_field_assignment): Likewise.
14114 (simplify_comparison): Likewise.
14115 * ifcvt.c (noce_try_bitop): Likewise.
14116 * loop-invariant.c (canonicalize_address_mult): Likewise.
14117 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
14118
14119 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14120 Alan Hayward <alan.hayward@arm.com>
14121 David Sherwood <david.sherwood@arm.com>
14122
14123 * gimple-fold.c (gimple_fold_builtin_memory_op): Use
14124 is_a <scalar_int_mode> instead of != BLKmode.
14125
14126 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14127 Alan Hayward <alan.hayward@arm.com>
14128 David Sherwood <david.sherwood@arm.com>
14129
14130 * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>
14131 instead of != VOIDmode.
14132 * combine.c (if_then_else_cond): Likewise.
14133 (change_zero_ext): Likewise.
14134 * dwarf2out.c (mem_loc_descriptor): Likewise.
14135 (loc_descriptor): Likewise.
14136 * rtlanal.c (canonicalize_condition): Likewise.
14137 * simplify-rtx.c (simplify_relational_operation_1): Likewise.
14138
14139 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14140 Alan Hayward <alan.hayward@arm.com>
14141 David Sherwood <david.sherwood@arm.com>
14142
14143 * simplify-rtx.c (simplify_binary_operation_1): Use
14144 is_a <scalar_int_mode> instead of !VECTOR_MODE_P.
14145
14146 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14147 Alan Hayward <alan.hayward@arm.com>
14148 David Sherwood <david.sherwood@arm.com>
14149
14150 * wide-int.h (int_traits<unsigned char>) New class.
14151 (int_traits<unsigned short>) Likewise.
14152 * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>.
14153 Use GET_MODE_UNIT_PRECISION and remove redundant test for
14154 SCALAR_INT_MODE_P.
14155 * combine.c (set_nonzero_bits_and_sign_copies): Use
14156 is_a <scalar_int_mode>.
14157 (find_split_point): Likewise.
14158 (combine_simplify_rtx): Likewise.
14159 (simplify_logical): Likewise.
14160 (expand_compound_operation): Likewise.
14161 (expand_field_assignment): Likewise.
14162 (make_compound_operation): Likewise.
14163 (extended_count): Likewise.
14164 (change_zero_ext): Likewise.
14165 (simplify_comparison): Likewise.
14166 * dwarf2out.c (scompare_loc_descriptor): Likewise.
14167 (ucompare_loc_descriptor): Likewise.
14168 (minmax_loc_descriptor): Likewise.
14169 (mem_loc_descriptor): Likewise.
14170 (loc_descriptor): Likewise.
14171 * expmed.c (init_expmed_one_mode): Likewise.
14172 * lra-constraints.c (lra_constraint_offset): Likewise.
14173 * optabs.c (prepare_libcall_arg): Likewise.
14174 * postreload.c (move2add_note_store): Likewise.
14175 * reload.c (operands_match_p): Likewise.
14176 * rtl.h (load_extend_op): Likewise.
14177 * rtlhooks.c (gen_lowpart_general): Likewise.
14178 * simplify-rtx.c (simplify_truncation): Likewise.
14179 (simplify_unary_operation_1): Likewise.
14180 (simplify_binary_operation_1): Likewise.
14181 (simplify_const_binary_operation): Likewise.
14182 (simplify_const_relational_operation): Likewise.
14183 (simplify_subreg): Likewise.
14184 * stor-layout.c (bitwise_mode_for_mode): Likewise.
14185 * var-tracking.c (adjust_mems): Likewise.
14186 (prepare_call_arguments): Likewise.
14187
14188 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14189 Alan Hayward <alan.hayward@arm.com>
14190 David Sherwood <david.sherwood@arm.com>
14191
14192 * machmode.h (is_int_mode): New fuction.
14193 * combine.c (find_split_point): Use it.
14194 (combine_simplify_rtx): Likewise.
14195 (simplify_if_then_else): Likewise.
14196 (simplify_set): Likewise.
14197 (simplify_shift_const_1): Likewise.
14198 (simplify_comparison): Likewise.
14199 * config/aarch64/aarch64.c (aarch64_rtx_costs): Likewise.
14200 * cse.c (notreg_cost): Likewise.
14201 (cse_insn): Likewise.
14202 * cselib.c (cselib_lookup_1): Likewise.
14203 * dojump.c (do_jump_1): Likewise.
14204 (do_compare_rtx_and_jump): Likewise.
14205 * dse.c (get_call_args): Likewise.
14206 * dwarf2out.c (rtl_for_decl_init): Likewise.
14207 (native_encode_initializer): Likewise.
14208 * expmed.c (emit_store_flag_1): Likewise.
14209 (emit_store_flag): Likewise.
14210 * expr.c (convert_modes): Likewise.
14211 (store_field): Likewise.
14212 (expand_expr_real_1): Likewise.
14213 * fold-const.c (fold_read_from_constant_string): Likewise.
14214 * gimple-ssa-sprintf.c (get_format_string): Likewise.
14215 * optabs-libfuncs.c (gen_int_libfunc): Likewise.
14216 * optabs.c (expand_binop): Likewise.
14217 (expand_unop): Likewise.
14218 (expand_abs_nojump): Likewise.
14219 (expand_one_cmpl_abs_nojump): Likewise.
14220 * simplify-rtx.c (mode_signbit_p): Likewise.
14221 (val_signbit_p): Likewise.
14222 (val_signbit_known_set_p): Likewise.
14223 (val_signbit_known_clear_p): Likewise.
14224 (simplify_relational_operation_1): Likewise.
14225 * tree.c (vector_type_mode): Likewise.
14226
14227 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14228 Alan Hayward <alan.hayward@arm.com>
14229 David Sherwood <david.sherwood@arm.com>
14230
14231 * machmode.h (smallest_mode_for_size): Fix formatting.
14232 (smallest_int_mode_for_size): New function.
14233 * cfgexpand.c (expand_debug_expr): Use smallest_int_mode_for_size
14234 instead of smallest_mode_for_size.
14235 * combine.c (make_extraction): Likewise.
14236 * config/arc/arc.c (arc_expand_movmem): Likewise.
14237 * config/arm/arm.c (arm_expand_divmod_libfunc): Likewise.
14238 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
14239 * config/s390/s390.c (s390_expand_insv): Likewise.
14240 * config/sparc/sparc.c (assign_int_registers): Likewise.
14241 * config/spu/spu.c (spu_function_value): Likewise.
14242 (spu_function_arg): Likewise.
14243 * coverage.c (get_gcov_type): Likewise.
14244 (get_gcov_unsigned_t): Likewise.
14245 * dse.c (find_shift_sequence): Likewise.
14246 * expmed.c (store_bit_field_1): Likewise.
14247 * expr.c (convert_move): Likewise.
14248 (store_field): Likewise.
14249 * internal-fn.c (expand_arith_overflow): Likewise.
14250 * optabs-query.c (get_best_extraction_insn): Likewise.
14251 * optabs.c (expand_twoval_binop_libfunc): Likewise.
14252 * stor-layout.c (layout_type): Likewise.
14253 (initialize_sizetypes): Likewise.
14254 * targhooks.c (default_get_mask_mode): Likewise.
14255 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Likewise.
14256
14257 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14258 Alan Hayward <alan.hayward@arm.com>
14259 David Sherwood <david.sherwood@arm.com>
14260
14261 * machmode.h (opt_mode::else_blk): New function.
14262 (int_mode_for_mode): Declare.
14263 * stor-layout.c (int_mode_for_mode): Return an opt_scalar_int_mode.
14264 * builtins.c (expand_builtin_signbit): Adjust for new int_mode_for_mode
14265 return type.
14266 * cfgexpand.c (expand_debug_expr): Likewise.
14267 * combine.c (gen_lowpart_or_truncate): Likewise.
14268 (gen_lowpart_for_combine): Likewise.
14269 * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Likewise.
14270 * config/avr/avr.c (avr_to_int_mode): Likewise.
14271 (avr_out_plus_1): Likewise.
14272 (avr_out_plus): Likewise.
14273 (avr_out_round): Likewise.
14274 * config/i386/i386.c (ix86_split_to_parts): Likewise.
14275 * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
14276 (s390_expand_vcond): Likewise.
14277 * config/spu/spu.c (spu_split_immediate): Likewise.
14278 (spu_expand_mov): Likewise.
14279 * dse.c (get_stored_val): Likewise.
14280 * expmed.c (store_bit_field_1): Likewise.
14281 (convert_extracted_bit_field): Use int_mode_for_mode instead of
14282 int_mode_for_size.
14283 (extract_bit_field_1): Adjust for new int_mode_for_mode return type.
14284 (extract_low_bits): Likewise.
14285 * expr.c (emit_group_load_1): Likewise. Separate out the BLKmode
14286 handling rather than repeating the check.
14287 (emit_group_store): Likewise.
14288 (emit_move_via_integer): Adjust for new int_mode_for_mode return type.
14289 * optabs.c (expand_absneg_bit): Likewise.
14290 (expand_copysign_absneg): Likewise.
14291 (expand_copysign_bit): Likewise.
14292 * tree-if-conv.c (ifcvt_can_use_mask_load_store): Likewise.
14293 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
14294 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
14295 * var-tracking.c (prepare_call_arguments): Likewise.
14296 * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Use
14297 int_mode_for_mode instead of mode_for_size.
14298 * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
14299
14300 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14301 Alan Hayward <alan.hayward@arm.com>
14302 David Sherwood <david.sherwood@arm.com>
14303
14304 * machmode.h (int_mode_for_size): New function.
14305 * builtins.c (set_builtin_user_assembler_name): Use int_mode_for_size
14306 instead of mode_for_size.
14307 * calls.c (save_fixed_argument_area): Likewise. Make use of BLKmode
14308 explicit.
14309 * combine.c (expand_field_assignment): Use int_mode_for_size
14310 instead of mode_for_size.
14311 (make_extraction): Likewise.
14312 (simplify_shift_const_1): Likewise.
14313 (simplify_comparison): Likewise.
14314 * dojump.c (do_jump): Likewise.
14315 * dwarf2out.c (mem_loc_descriptor): Likewise.
14316 * emit-rtl.c (init_derived_machine_modes): Likewise.
14317 * expmed.c (flip_storage_order): Likewise.
14318 (convert_extracted_bit_field): Likewise.
14319 * expr.c (copy_blkmode_from_reg): Likewise.
14320 * graphite-isl-ast-to-gimple.c (max_mode_int_precision): Likewise.
14321 * internal-fn.c (expand_mul_overflow): Likewise.
14322 * lower-subreg.c (simple_move): Likewise.
14323 * optabs-libfuncs.c (init_optabs): Likewise.
14324 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
14325 * tree.c (vector_type_mode): Likewise.
14326 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
14327 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Likewise.
14328 * tree-vect-generic.c (expand_vector_parallel): Likewise.
14329 * tree-vect-stmts.c (vectorizable_load): Likewise.
14330 (vectorizable_store): Likewise.
14331
14332 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14333 Alan Hayward <alan.hayward@arm.com>
14334 David Sherwood <david.sherwood@arm.com>
14335
14336 * coretypes.h (pod_mode): New type.
14337 (scalar_int_mode_pod): New typedef.
14338 * machmode.h (pod_mode): New class.
14339 (int_n_data_t::m): Change type to scalar_int_mode_pod.
14340 * genmodes.c (emit_mode_int_n): Update accordingly.
14341 * lower-subreg.h (target_lower_subreg): Change type to
14342 scalar_int_mode_pod.
14343 * gdbhooks.py (build_pretty_printer): Handle pod_mode and
14344 scalar_int_mode_pod.
14345
14346 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14347 Alan Hayward <alan.hayward@arm.com>
14348 David Sherwood <david.sherwood@arm.com>
14349
14350 * config/powerpcspe/powerpcspe.h (rs6000_pmode): Change type from
14351 machine_mode to scalar_int_mode.
14352 * config/powerpcspe/powerpcspe.c (rs6000_pmode): Likewise.
14353 (rs6000_option_override_internal): Remove cast to int.
14354 * config/rs6000/rs6000.h (rs6000_pmode): Change type from
14355 machine_mode to scalar_int_mode.
14356 * config/rs6000/rs6000.c (rs6000_pmode): Likewise.
14357 (rs6000_option_override_internal): Remove cast to int.
14358 * config/s390/s390.h (Pmode): Remove cast to machine_mode.
14359 * config/epiphany/epiphany.h (RTX_OK_FOR_OFFSET_P): Add cast
14360 to machine_mode.
14361 * config/s390/s390.c (s390_expand_builtin): Likewise.
14362 * coretypes.h (scalar_int_mode): New type.
14363 (opt_scalar_int_mode): New typedef.
14364 * machmode.h (scalar_int_mode): New class.
14365 (scalar_int_mode::includes_p): New function.
14366 (byte_mode): Change type to scalar_int_mode.
14367 (word_mode): Likewise.
14368 (ptr_mode): Likewise.
14369 * emit-rtl.c (byte_mode): Likewise.
14370 (word_mode): Likewise.
14371 (ptr_mode): Likewise.
14372 (init_derived_machine_modes): Update accordingly.
14373 * genmodes.c (get_mode_class): Return scalar_int_mode for MODE_INT
14374 and MODE_PARTIAL_INT.
14375 * gdbhooks.py (build_pretty_printer): Handle scalar_int_mode and
14376 opt_scalar_int_mode.
14377
14378 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14379 Alan Hayward <alan.hayward@arm.com>
14380 David Sherwood <david.sherwood@arm.com>
14381
14382 * target.def (libgcc_floating_mode_supported_p): Take a
14383 scalar_float_mode.
14384 * doc/tm.texi: Regenerate.
14385 * targhooks.h (default_libgcc_floating_mode_supported_p): Take a
14386 scalar_float_mode.
14387 * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
14388 * config/aarch64/aarch64.c (aarch64_libgcc_floating_mode_supported_p):
14389 Likewise.
14390
14391 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14392 Alan Hayward <alan.hayward@arm.com>
14393 David Sherwood <david.sherwood@arm.com>
14394
14395 * target.def (default_floatn_mode): Return an opt_scalar_float_mode.
14396 * doc/tm.texi: Regenerate.
14397 * config/arm/arm.c (arm_floatn_mode): Return an opt_scalar_float_mode.
14398 * config/powerpcspe/powerpcspe.c (rs6000_floatn_mode): Likewise.
14399 * config/rs6000/rs6000.c (rs6000_floatn_mode): Likewise.
14400 * targhooks.h (default_floatn_mode): Likewise.
14401 * targhooks.c (default_floatn_mode): Likewise.
14402 * tree.c (build_common_tree_nodes): Update accordingly.
14403
14404 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14405 Alan Hayward <alan.hayward@arm.com>
14406 David Sherwood <david.sherwood@arm.com>
14407
14408 * machmode.h (mode_iterator::start): Provide overload for opt_modes.
14409 (mode_iterator::iterate_p): Likewise.
14410 (mode_iterator::get_wider): Likewise.
14411 * expr.c (init_expr_target): Use opt_scalar_float_mode.
14412
14413 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14414 Alan Hayward <alan.hayward@arm.com>
14415 David Sherwood <david.sherwood@arm.com>
14416
14417 * coretypes.h (opt_scalar_float_mode): New typedef.
14418 * machmode.h (float_mode_for_size): New function.
14419 * emit-rtl.c (double_mode): Delete.
14420 (init_emit_once): Use float_mode_for_size.
14421 * stor-layout.c (layout_type): Likewise.
14422 * gdbhooks.py (build_pretty_printer): Handle opt_scalar_float_mode.
14423
14424 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14425 Alan Hayward <alan.hayward@arm.com>
14426 David Sherwood <david.sherwood@arm.com>
14427
14428 * output.h (assemble_real): Take a scalar_float_mode.
14429 * config/arm/arm.c (arm_assemble_integer): Update accordingly.
14430 * config/arm/arm.md (consttable_4): Likewise.
14431 (consttable_8): Likewise.
14432 (consttable_16): Likewise.
14433 * config/mips/mips.md (consttable_float): Likewise.
14434 * config/s390/s390.c (s390_output_pool_entry): Likewise.
14435 * varasm.c (assemble_real): Take a scalar_float_mode.
14436 (output_constant_pool_2): Update accordingly.
14437 (output_constant): Likewise.
14438
14439 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14440 Alan Hayward <alan.hayward@arm.com>
14441 David Sherwood <david.sherwood@arm.com>
14442
14443 * tree.h (SCALAR_FLOAT_TYPE_MODE): New macro.
14444 * builtins.c (expand_builtin_signbit): Use it instead of TYPE_MODE.
14445 * fold-const.c (fold_convert_const_real_from_fixed): Likewise.
14446 (native_encode_real): Likewise.
14447 (native_interpret_real): Likewise.
14448 * hsa-brig.c (emit_immediate_scalar_to_buffer): Likewise.
14449 * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
14450
14451 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14452 Alan Hayward <alan.hayward@arm.com>
14453 David Sherwood <david.sherwood@arm.com>
14454
14455 * optabs-libfuncs.c (gen_trunc_conv_libfunc): Use is_a
14456 <scalar_float_mode>. Simplify.
14457 (gen_extend_conv_libfunc): Likewise.
14458
14459 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14460 Alan Hayward <alan.hayward@arm.com>
14461 David Sherwood <david.sherwood@arm.com>
14462
14463 * coretypes.h (scalar_float_mode): New type.
14464 * machmode.h (mode_traits::from_int): Use machine_mode if
14465 USE_ENUM_MODES is defined.
14466 (is_a): New function.
14467 (as_a): Likewise.
14468 (dyn_cast): Likewise.
14469 (scalar_float_mode): New class.
14470 (scalar_float_mode::includes_p): New function.
14471 (is_float_mode): Likewise.
14472 * gdbhooks.py (MachineModePrinter): New class.
14473 (build_pretty_printer): Use it for scalar_float_mode.
14474 * real.h (FLOAT_MODE_FORMAT): Use as_a <scalar_float_mode>.
14475 (format_helper::format_helper): Turn into a template.
14476 * genmodes.c (get_mode_class): New function.
14477 (emit_insn_modes_h): Give modes the class returned by get_mode_class,
14478 or machine_mode if none.
14479 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Use
14480 as_a <scalar_float_mode>.
14481 * dwarf2out.c (mem_loc_descriptor): Likewise.
14482 (insert_float): Likewise.
14483 (add_const_value_attribute): Likewise.
14484 * simplify-rtx.c (simplify_immed_subreg): Likewise.
14485 * optabs.c (expand_absneg_bit): Take a scalar_float_mode.
14486 (expand_unop): Update accordingly.
14487 (expand_abs_nojump): Likewise.
14488 (expand_copysign_absneg): Take a scalar_float_mode.
14489 (expand_copysign_bit): Likewise.
14490 (expand_copysign): Update accordingly.
14491
14492 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14493 Alan Hayward <alan.hayward@arm.com>
14494 David Sherwood <david.sherwood@arm.com>
14495
14496 * coretypes.h (opt_mode): New class.
14497 * machmode.h (opt_mode): Likewise.
14498 (opt_mode::else_void): New function.
14499 (opt_mode::require): Likewise.
14500 (opt_mode::exists): Likewise.
14501 (GET_MODE_WIDER_MODE): Turn into a function and return an opt_mode.
14502 (GET_MODE_2XWIDER_MODE): Likewise.
14503 (mode_iterator::get_wider): Update accordingly.
14504 (mode_iterator::get_2xwider): Likewise.
14505 (mode_iterator::get_known_wider): Likewise, turning into a template.
14506 * combine.c (make_extraction): Update use of GET_MODE_WIDER_MODE,
14507 forcing a wider mode to exist.
14508 * config/cr16/cr16.h (LONG_REG_P): Likewise.
14509 * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
14510 * config/c6x/c6x.c (c6x_rtx_costs): Update use of
14511 GET_MODE_2XWIDER_MODE, forcing a wider mode to exist.
14512 * lower-subreg.c (init_lower_subreg): Likewise.
14513 * optabs-libfuncs.c (init_sync_libfuncs_1): Likewise, but not
14514 on the final iteration.
14515 * config/i386/i386.c (ix86_expand_set_or_movmem): Check whether
14516 a wider mode exists before asking for a move pattern.
14517 (get_mode_wider_vector): Update use of GET_MODE_WIDER_MODE,
14518 forcing a wider mode to exist.
14519 (expand_vselect_vconcat): Update use of GET_MODE_2XWIDER_MODE,
14520 returning false if no such mode exists.
14521 * config/ia64/ia64.c (expand_vselect_vconcat): Likewise.
14522 * config/mips/mips.c (mips_expand_vselect_vconcat): Likewise.
14523 * expmed.c (init_expmed_one_mode): Update use of GET_MODE_WIDER_MODE.
14524 Avoid checking for a MODE_INT if we already know the mode is not a
14525 SCALAR_INT_MODE_P.
14526 (extract_high_half): Update use of GET_MODE_WIDER_MODE,
14527 forcing a wider mode to exist.
14528 (expmed_mult_highpart_optab): Likewise.
14529 (expmed_mult_highpart): Likewise.
14530 * expr.c (expand_expr_real_2): Update use of GET_MODE_WIDER_MODE,
14531 using else_void.
14532 * lto-streamer-in.c (lto_input_mode_table): Likewise.
14533 * optabs-query.c (find_widening_optab_handler_and_mode): Likewise.
14534 * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
14535 * internal-fn.c (expand_mul_overflow): Update use of
14536 GET_MODE_2XWIDER_MODE.
14537 * omp-low.c (omp_clause_aligned_alignment): Likewise.
14538 * tree-ssa-math-opts.c (convert_mult_to_widen): Update use of
14539 GET_MODE_WIDER_MODE.
14540 (convert_plusminus_to_widen): Likewise.
14541 * tree-switch-conversion.c (array_value_type): Likewise.
14542 * var-tracking.c (emit_note_insn_var_location): Likewise.
14543 * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
14544 Return false inside rather than outside the loop if no wider mode
14545 exists
14546 * optabs.c (expand_binop): Update use of GET_MODE_WIDER_MODE
14547 and GET_MODE_2XWIDER_MODE
14548 (can_compare_p): Use else_void.
14549 * gdbhooks.py (OptMachineModePrinter): New class.
14550 (build_pretty_printer): Use it for opt_mode.
14551
14552 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14553 Alan Hayward <alan.hayward@arm.com>
14554 David Sherwood <david.sherwood@arm.com>
14555
14556 * tree-switch-conversion.c (array_value_type): Only read TYPE_MODE
14557 once. Use get_narrowest_mode instead of GET_CLASS_NARROWEST_MODE.
14558
14559 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14560 Alan Hayward <alan.hayward@arm.com>
14561 David Sherwood <david.sherwood@arm.com>
14562
14563 * machmode.h (mode_traits): New structure.
14564 (get_narrowest_mode): New function.
14565 (mode_iterator::start): Likewise.
14566 (mode_iterator::iterate_p): Likewise.
14567 (mode_iterator::get_wider): Likewise.
14568 (mode_iterator::get_known_wider): Likewise.
14569 (mode_iterator::get_2xwider): Likewise.
14570 (FOR_EACH_MODE_IN_CLASS): New mode iterator.
14571 (FOR_EACH_MODE): Likewise.
14572 (FOR_EACH_MODE_FROM): Likewise.
14573 (FOR_EACH_MODE_UNTIL): Likewise.
14574 (FOR_EACH_WIDER_MODE): Likewise.
14575 (FOR_EACH_2XWIDER_MODE): Likewise.
14576 * builtins.c (expand_builtin_strlen): Use new mode iterators.
14577 * combine.c (simplify_comparison): Likewise
14578 * config/i386/i386.c (type_natural_mode): Likewise.
14579 * cse.c (cse_insn): Likewise.
14580 * dse.c (find_shift_sequence): Likewise.
14581 * emit-rtl.c (init_derived_machine_modes): Likewise.
14582 (init_emit_once): Likewise.
14583 * explow.c (hard_function_value): Likewise.
14584 * expmed.c (extract_fixed_bit_field_1): Likewise.
14585 (extract_bit_field_1): Likewise.
14586 (expand_divmod): Likewise.
14587 (emit_store_flag_1): Likewise.
14588 * expr.c (init_expr_target): Likewise.
14589 (convert_move): Likewise.
14590 (alignment_for_piecewise_move): Likewise.
14591 (widest_int_mode_for_size): Likewise.
14592 (emit_block_move_via_movmem): Likewise.
14593 (copy_blkmode_to_reg): Likewise.
14594 (set_storage_via_setmem): Likewise.
14595 (compress_float_constant): Likewise.
14596 * omp-low.c (omp_clause_aligned_alignment): Likewise.
14597 * optabs-query.c (get_best_extraction_insn): Likewise.
14598 * optabs.c (expand_binop): Likewise.
14599 (expand_twoval_unop): Likewise.
14600 (expand_twoval_binop): Likewise.
14601 (widen_leading): Likewise.
14602 (widen_bswap): Likewise.
14603 (expand_parity): Likewise.
14604 (expand_unop): Likewise.
14605 (prepare_cmp_insn): Likewise.
14606 (prepare_float_lib_cmp): Likewise.
14607 (expand_float): Likewise.
14608 (expand_fix): Likewise.
14609 (expand_sfix_optab): Likewise.
14610 * postreload.c (move2add_use_add2_insn): Likewise.
14611 * reg-stack.c (reg_to_stack): Likewise.
14612 * reginfo.c (choose_hard_reg_mode): Likewise.
14613 * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
14614 * stor-layout.c (mode_for_size): Likewise.
14615 (smallest_mode_for_size): Likewise.
14616 (mode_for_vector): Likewise.
14617 (finish_bitfield_representative): Likewise.
14618 * tree-ssa-math-opts.c (target_supports_divmod_p): Likewise.
14619 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
14620 * tree-vect-stmts.c (vectorizable_conversion): Likewise.
14621 * var-tracking.c (prepare_call_arguments): Likewise.
14622
14623 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14624 Alan Hayward <alan.hayward@arm.com>
14625 David Sherwood <david.sherwood@arm.com>
14626
14627 * genconditions.c (write_header): Add a "#define USE_ENUM_MODES".
14628 * genmodes.c (emit_insn_modes_h): Define FOOmode to E_FOOmode if
14629 USE_ENUM_MODES is defined and to ((void) 0, E_FOOmode) otherwise.
14630 * machmode.h (mode_size): Move earlier in file.
14631 (mode_precision): Likewise.
14632 (mode_inner): Likewise.
14633 (mode_nunits): Likewise.
14634 (mode_unit_size): Likewise.
14635 (unit_unit_precision): Likewise.
14636 (mode_wider): Likewise.
14637 (mode_2xwider): Likewise.
14638 (machine_mode): New class.
14639 (mode_to_bytes): New function.
14640 (mode_to_bits): Likewise.
14641 (mode_to_precision): Likewise.
14642 (mode_to_inner): Likewise.
14643 (mode_to_unit_size): Likewise.
14644 (mode_to_unit_precision): Likewise.
14645 (mode_to_nunits): Likewise.
14646 (GET_MODE_SIZE): Use mode_to_bytes.
14647 (GET_MODE_BITSIZE): Use mode_to_bits.
14648 (GET_MODE_PRECISION): Use mode_to_precision.
14649 (GET_MODE_INNER): Use mode_to_inner.
14650 (GET_MODE_UNIT_SIZE): Use mode_to_unit_size.
14651 (GET_MODE_UNIT_PRECISION): Use mode_to_unit_precision.
14652 (GET_MODE_NUNITS): Use mode_to_nunits.
14653 * system.h (ALWAYS_INLINE): New macro.
14654 * config/powerpcspe/powerpcspe-c.c
14655 (altivec_resolve_overloaded_builtin): Use machine_mode instead of
14656 int for arg1_mode and arg2_mode.
14657
14658 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14659 Alan Hayward <alan.hayward@arm.com>
14660 David Sherwood <david.sherwood@arm.com>
14661
14662 * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
14663 Prefix mode names with E_ in case statements.
14664 * config/aarch64/aarch64-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14665 * config/aarch64/aarch64.c (aarch64_split_simd_combine): Likewise.
14666 (aarch64_split_simd_move): Likewise.
14667 (aarch64_gen_storewb_pair): Likewise.
14668 (aarch64_gen_loadwb_pair): Likewise.
14669 (aarch64_gen_store_pair): Likewise.
14670 (aarch64_gen_load_pair): Likewise.
14671 (aarch64_get_condition_code_1): Likewise.
14672 (aarch64_constant_pool_reload_icode): Likewise.
14673 (get_rsqrte_type): Likewise.
14674 (get_rsqrts_type): Likewise.
14675 (get_recpe_type): Likewise.
14676 (get_recps_type): Likewise.
14677 (aarch64_gimplify_va_arg_expr): Likewise.
14678 (aarch64_simd_container_mode): Likewise.
14679 (aarch64_emit_load_exclusive): Likewise.
14680 (aarch64_emit_store_exclusive): Likewise.
14681 (aarch64_expand_compare_and_swap): Likewise.
14682 (aarch64_gen_atomic_cas): Likewise.
14683 (aarch64_emit_bic): Likewise.
14684 (aarch64_emit_atomic_swap): Likewise.
14685 (aarch64_emit_atomic_load_op): Likewise.
14686 (aarch64_evpc_trn): Likewise.
14687 (aarch64_evpc_uzp): Likewise.
14688 (aarch64_evpc_zip): Likewise.
14689 (aarch64_evpc_ext): Likewise.
14690 (aarch64_evpc_rev): Likewise.
14691 (aarch64_evpc_dup): Likewise.
14692 (aarch64_gen_ccmp_first): Likewise.
14693 (aarch64_gen_ccmp_next): Likewise.
14694 * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
14695 (alpha_emit_xfloating_libcall): Likewise.
14696 (emit_insxl): Likewise.
14697 (alpha_arg_type): Likewise.
14698 * config/arc/arc.c (arc_vector_mode_supported_p): Likewise.
14699 (arc_preferred_simd_mode): Likewise.
14700 (arc_secondary_reload): Likewise.
14701 (get_arc_condition_code): Likewise.
14702 (arc_print_operand): Likewise.
14703 (arc_legitimate_constant_p): Likewise.
14704 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14705 * config/arc/arc.md (casesi_load): Likewise.
14706 (casesi_compact_jump): Likewise.
14707 * config/arc/predicates.md (proper_comparison_operator): Likewise.
14708 (cc_use_register): Likewise.
14709 * config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14710 * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
14711 (arm_init_iwmmxt_builtins): Likewise.
14712 * config/arm/arm.c (thumb1_size_rtx_costs): Likewise.
14713 (neon_expand_vector_init): Likewise.
14714 (arm_attr_length_move_neon): Likewise.
14715 (maybe_get_arm_condition_code): Likewise.
14716 (arm_emit_vector_const): Likewise.
14717 (arm_preferred_simd_mode): Likewise.
14718 (arm_output_iwmmxt_tinsr): Likewise.
14719 (thumb1_output_casesi): Likewise.
14720 (thumb2_output_casesi): Likewise.
14721 (arm_emit_load_exclusive): Likewise.
14722 (arm_emit_store_exclusive): Likewise.
14723 (arm_expand_compare_and_swap): Likewise.
14724 (arm_evpc_neon_vuzp): Likewise.
14725 (arm_evpc_neon_vzip): Likewise.
14726 (arm_evpc_neon_vrev): Likewise.
14727 (arm_evpc_neon_vtrn): Likewise.
14728 (arm_evpc_neon_vext): Likewise.
14729 (arm_validize_comparison): Likewise.
14730 * config/arm/neon.md (neon_vc<cmp_op><mode>): Likewise.
14731 * config/avr/avr-c.c (avr_resolve_overloaded_builtin): Likewise.
14732 * config/avr/avr.c (avr_rtx_costs_1): Likewise.
14733 * config/c6x/c6x.c (c6x_vector_mode_supported_p): Likewise.
14734 (c6x_preferred_simd_mode): Likewise.
14735 * config/epiphany/epiphany.c (get_epiphany_condition_code): Likewise.
14736 (epiphany_rtx_costs): Likewise.
14737 * config/epiphany/predicates.md (proper_comparison_operator):
14738 Likewise.
14739 * config/frv/frv.c (condexec_memory_operand): Likewise.
14740 (frv_emit_move): Likewise.
14741 (output_move_single): Likewise.
14742 (output_condmove_single): Likewise.
14743 (frv_hard_regno_mode_ok): Likewise.
14744 (frv_matching_accg_mode): Likewise.
14745 * config/h8300/h8300.c (split_adds_subs): Likewise.
14746 (h8300_rtx_costs): Likewise.
14747 (h8300_print_operand): Likewise.
14748 (compute_mov_length): Likewise.
14749 (output_logical_op): Likewise.
14750 (compute_logical_op_length): Likewise.
14751 (compute_logical_op_cc): Likewise.
14752 (h8300_shift_needs_scratch_p): Likewise.
14753 (output_a_shift): Likewise.
14754 (compute_a_shift_length): Likewise.
14755 (compute_a_shift_cc): Likewise.
14756 (expand_a_rotate): Likewise.
14757 (output_a_rotate): Likewise.
14758 * config/i386/i386.c (classify_argument): Likewise.
14759 (function_arg_advance_32): Likewise.
14760 (function_arg_32): Likewise.
14761 (function_arg_64): Likewise.
14762 (function_value_64): Likewise.
14763 (ix86_gimplify_va_arg): Likewise.
14764 (ix86_legitimate_constant_p): Likewise.
14765 (put_condition_code): Likewise.
14766 (split_double_mode): Likewise.
14767 (ix86_avx256_split_vector_move_misalign): Likewise.
14768 (ix86_expand_vector_logical_operator): Likewise.
14769 (ix86_split_idivmod): Likewise.
14770 (ix86_expand_adjust_ufix_to_sfix_si): Likewise.
14771 (ix86_build_const_vector): Likewise.
14772 (ix86_build_signbit_mask): Likewise.
14773 (ix86_match_ccmode): Likewise.
14774 (ix86_cc_modes_compatible): Likewise.
14775 (ix86_expand_branch): Likewise.
14776 (ix86_expand_sse_cmp): Likewise.
14777 (ix86_expand_sse_movcc): Likewise.
14778 (ix86_expand_int_sse_cmp): Likewise.
14779 (ix86_expand_vec_perm_vpermi2): Likewise.
14780 (ix86_expand_vec_perm): Likewise.
14781 (ix86_expand_sse_unpack): Likewise.
14782 (ix86_expand_int_addcc): Likewise.
14783 (ix86_split_to_parts): Likewise.
14784 (ix86_vectorize_builtin_gather): Likewise.
14785 (ix86_vectorize_builtin_scatter): Likewise.
14786 (avx_vpermilp_parallel): Likewise.
14787 (inline_memory_move_cost): Likewise.
14788 (ix86_tieable_integer_mode_p): Likewise.
14789 (x86_maybe_negate_const_int): Likewise.
14790 (ix86_expand_vector_init_duplicate): Likewise.
14791 (ix86_expand_vector_init_one_nonzero): Likewise.
14792 (ix86_expand_vector_init_one_var): Likewise.
14793 (ix86_expand_vector_init_concat): Likewise.
14794 (ix86_expand_vector_init_interleave): Likewise.
14795 (ix86_expand_vector_init_general): Likewise.
14796 (ix86_expand_vector_set): Likewise.
14797 (ix86_expand_vector_extract): Likewise.
14798 (emit_reduc_half): Likewise.
14799 (ix86_emit_i387_round): Likewise.
14800 (ix86_mangle_type): Likewise.
14801 (ix86_expand_round_sse4): Likewise.
14802 (expand_vec_perm_blend): Likewise.
14803 (canonicalize_vector_int_perm): Likewise.
14804 (ix86_expand_vec_one_operand_perm_avx512): Likewise.
14805 (expand_vec_perm_1): Likewise.
14806 (expand_vec_perm_interleave3): Likewise.
14807 (expand_vec_perm_even_odd_pack): Likewise.
14808 (expand_vec_perm_even_odd_1): Likewise.
14809 (expand_vec_perm_broadcast_1): Likewise.
14810 (ix86_vectorize_vec_perm_const_ok): Likewise.
14811 (ix86_expand_vecop_qihi): Likewise.
14812 (ix86_expand_mul_widen_hilo): Likewise.
14813 (ix86_expand_sse2_abs): Likewise.
14814 (ix86_expand_pextr): Likewise.
14815 (ix86_expand_pinsr): Likewise.
14816 (ix86_preferred_simd_mode): Likewise.
14817 (ix86_simd_clone_compute_vecsize_and_simdlen): Likewise.
14818 * config/i386/sse.md (*andnot<mode>3): Likewise.
14819 (<mask_codefor><code><mode>3<mask_name>): Likewise.
14820 (*<code><mode>3): Likewise.
14821 * config/ia64/ia64.c (ia64_expand_vecint_compare): Likewise.
14822 (ia64_expand_atomic_op): Likewise.
14823 (ia64_arg_type): Likewise.
14824 (ia64_mode_to_int): Likewise.
14825 (ia64_scalar_mode_supported_p): Likewise.
14826 (ia64_vector_mode_supported_p): Likewise.
14827 (expand_vec_perm_broadcast): Likewise.
14828 * config/iq2000/iq2000.c (iq2000_move_1word): Likewise.
14829 (iq2000_function_arg_advance): Likewise.
14830 (iq2000_function_arg): Likewise.
14831 * config/m32c/m32c.c (m32c_preferred_reload_class): Likewise.
14832 * config/m68k/m68k.c (output_dbcc_and_branch): Likewise.
14833 (m68k_libcall_value): Likewise.
14834 (m68k_function_value): Likewise.
14835 (sched_attr_op_type): Likewise.
14836 * config/mcore/mcore.c (mcore_output_move): Likewise.
14837 * config/microblaze/microblaze.c (microblaze_function_arg_advance):
14838 Likewise.
14839 (microblaze_function_arg): Likewise.
14840 * config/mips/mips.c (mips16_build_call_stub): Likewise.
14841 (mips_print_operand): Likewise.
14842 (mips_mode_ok_for_mov_fmt_p): Likewise.
14843 (mips_vector_mode_supported_p): Likewise.
14844 (mips_preferred_simd_mode): Likewise.
14845 (mips_expand_vpc_loongson_even_odd): Likewise.
14846 (mips_expand_vec_unpack): Likewise.
14847 (mips_expand_vi_broadcast): Likewise.
14848 (mips_expand_vector_init): Likewise.
14849 (mips_expand_vec_reduc): Likewise.
14850 (mips_expand_msa_cmp): Likewise.
14851 * config/mips/mips.md (casesi_internal_mips16_<mode>): Likewise.
14852 * config/mn10300/mn10300.c (mn10300_print_operand): Likewise.
14853 (cc_flags_for_mode): Likewise.
14854 * config/msp430/msp430.c (msp430_print_operand): Likewise.
14855 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Likewise.
14856 (nds32_output_casesi_pc_relative): Likewise.
14857 * config/nds32/nds32.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14858 * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Likewise.
14859 (nvptx_gen_unpack): Likewise.
14860 (nvptx_gen_pack): Likewise.
14861 (nvptx_gen_shuffle): Likewise.
14862 (nvptx_gen_wcast): Likewise.
14863 (nvptx_preferred_simd_mode): Likewise.
14864 * config/pa/pa.c (pa_secondary_reload): Likewise.
14865 * config/pa/predicates.md (base14_operand): Likewise.
14866 * config/powerpcspe/powerpcspe-c.c
14867 (altivec_resolve_overloaded_builtin): Likewise.
14868 * config/powerpcspe/powerpcspe.c (rs6000_setup_reg_addr_masks):
14869 Likewise.
14870 (rs6000_preferred_simd_mode): Likewise.
14871 (output_vec_const_move): Likewise.
14872 (rs6000_expand_vector_extract): Likewise.
14873 (rs6000_split_vec_extract_var): Likewise.
14874 (reg_offset_addressing_ok_p): Likewise.
14875 (rs6000_legitimate_offset_address_p): Likewise.
14876 (rs6000_legitimize_address): Likewise.
14877 (rs6000_emit_set_const): Likewise.
14878 (rs6000_const_vec): Likewise.
14879 (rs6000_emit_move): Likewise.
14880 (spe_build_register_parallel): Likewise.
14881 (rs6000_darwin64_record_arg_recurse): Likewise.
14882 (swap_selector_for_mode): Likewise.
14883 (spe_init_builtins): Likewise.
14884 (paired_init_builtins): Likewise.
14885 (altivec_init_builtins): Likewise.
14886 (do_load_for_compare): Likewise.
14887 (rs6000_generate_compare): Likewise.
14888 (rs6000_expand_float128_convert): Likewise.
14889 (emit_load_locked): Likewise.
14890 (emit_store_conditional): Likewise.
14891 (rs6000_output_function_epilogue): Likewise.
14892 (rs6000_handle_altivec_attribute): Likewise.
14893 (rs6000_function_value): Likewise.
14894 (emit_fusion_gpr_load): Likewise.
14895 (emit_fusion_p9_load): Likewise.
14896 (emit_fusion_p9_store): Likewise.
14897 * config/powerpcspe/predicates.md (easy_fp_constant): Likewise.
14898 (fusion_gpr_mem_load): Likewise.
14899 (fusion_addis_mem_combo_load): Likewise.
14900 (fusion_addis_mem_combo_store): Likewise.
14901 * config/rs6000/predicates.md (easy_fp_constant): Likewise.
14902 (fusion_gpr_mem_load): Likewise.
14903 (fusion_addis_mem_combo_load): Likewise.
14904 (fusion_addis_mem_combo_store): Likewise.
14905 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14906 Likewise.
14907 * config/rs6000/rs6000-string.c (do_load_for_compare): Likewise.
14908 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
14909 (rs6000_preferred_simd_mode): Likewise.
14910 (output_vec_const_move): Likewise.
14911 (rs6000_expand_vector_extract): Likewise.
14912 (rs6000_split_vec_extract_var): Likewise.
14913 (reg_offset_addressing_ok_p): Likewise.
14914 (rs6000_legitimate_offset_address_p): Likewise.
14915 (rs6000_legitimize_address): Likewise.
14916 (rs6000_emit_set_const): Likewise.
14917 (rs6000_const_vec): Likewise.
14918 (rs6000_emit_move): Likewise.
14919 (rs6000_darwin64_record_arg_recurse): Likewise.
14920 (swap_selector_for_mode): Likewise.
14921 (paired_init_builtins): Likewise.
14922 (altivec_init_builtins): Likewise.
14923 (rs6000_expand_float128_convert): Likewise.
14924 (emit_load_locked): Likewise.
14925 (emit_store_conditional): Likewise.
14926 (rs6000_output_function_epilogue): Likewise.
14927 (rs6000_handle_altivec_attribute): Likewise.
14928 (rs6000_function_value): Likewise.
14929 (emit_fusion_gpr_load): Likewise.
14930 (emit_fusion_p9_load): Likewise.
14931 (emit_fusion_p9_store): Likewise.
14932 * config/rx/rx.c (rx_gen_move_template): Likewise.
14933 (flags_from_mode): Likewise.
14934 * config/s390/predicates.md (s390_alc_comparison): Likewise.
14935 (s390_slb_comparison): Likewise.
14936 * config/s390/s390.c (s390_handle_vectorbool_attribute): Likewise.
14937 (s390_vector_mode_supported_p): Likewise.
14938 (s390_cc_modes_compatible): Likewise.
14939 (s390_match_ccmode_set): Likewise.
14940 (s390_canonicalize_comparison): Likewise.
14941 (s390_emit_compare_and_swap): Likewise.
14942 (s390_branch_condition_mask): Likewise.
14943 (s390_rtx_costs): Likewise.
14944 (s390_secondary_reload): Likewise.
14945 (__SECONDARY_RELOAD_CASE): Likewise.
14946 (s390_expand_cs): Likewise.
14947 (s390_preferred_simd_mode): Likewise.
14948 * config/s390/vx-builtins.md (vec_packsu_u<mode>): Likewise.
14949 * config/sh/sh.c (sh_print_operand): Likewise.
14950 (dump_table): Likewise.
14951 (sh_secondary_reload): Likewise.
14952 * config/sh/sh.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14953 * config/sh/sh.md (casesi_worker_1): Likewise.
14954 (casesi_worker_2): Likewise.
14955 * config/sparc/predicates.md (icc_comparison_operator): Likewise.
14956 (fcc_comparison_operator): Likewise.
14957 * config/sparc/sparc.c (sparc_expand_move): Likewise.
14958 (emit_soft_tfmode_cvt): Likewise.
14959 (sparc_preferred_simd_mode): Likewise.
14960 (output_cbranch): Likewise.
14961 (sparc_print_operand): Likewise.
14962 (sparc_expand_vec_perm_bmask): Likewise.
14963 (vector_init_bshuffle): Likewise.
14964 * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
14965 (spu_vector_mode_supported_p): Likewise.
14966 (spu_expand_insv): Likewise.
14967 (spu_emit_branch_or_set): Likewise.
14968 (spu_handle_vector_attribute): Likewise.
14969 (spu_builtin_splats): Likewise.
14970 (spu_builtin_extract): Likewise.
14971 (spu_builtin_promote): Likewise.
14972 (spu_expand_sign_extend): Likewise.
14973 * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
14974 (tilegx_simd_int): Likewise.
14975 * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p): Likewise.
14976 (tilepro_simd_int): Likewise.
14977 * config/v850/v850.c (const_double_split): Likewise.
14978 (v850_print_operand): Likewise.
14979 (ep_memory_offset): Likewise.
14980 * config/vax/vax.c (vax_rtx_costs): Likewise.
14981 (vax_output_int_move): Likewise.
14982 (vax_output_int_add): Likewise.
14983 (vax_output_int_subtract): Likewise.
14984 * config/visium/predicates.md (visium_branch_operator): Likewise.
14985 * config/visium/visium.c (rtx_ok_for_offset_p): Likewise.
14986 (visium_print_operand_address): Likewise.
14987 * config/visium/visium.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
14988 * config/xtensa/xtensa.c (xtensa_mem_offset): Likewise.
14989 (xtensa_expand_conditional_branch): Likewise.
14990 (xtensa_copy_incoming_a7): Likewise.
14991 (xtensa_output_literal): Likewise.
14992 * dfp.c (decimal_real_maxval): Likewise.
14993 * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
14994
14995 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
14996 Alan Hayward <alan.hayward@arm.com>
14997 David Sherwood <david.sherwood@arm.com>
14998
14999 * genmodes.c (mode_size_inline): Add an E_ prefix to mode names.
15000 (mode_nunits_inline): Likewise.
15001 (mode_inner_inline): Likewise.
15002 (mode_unit_size_inline): Likewise.
15003 (mode_unit_precision_inline): Likewise.
15004 (emit_insn_modes_h): Likewise. Also emit a #define of the
15005 unprefixed name.
15006 (emit_mode_wider): Add an E_ prefix to mode names.
15007 (emit_mode_complex): Likewise.
15008 (emit_mode_inner): Likewise.
15009 (emit_mode_adjustments): Likewise.
15010 (emit_mode_int_n): Likewise.
15011 * config/aarch64/aarch64-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP)
15012 (v2si_UP, v2sf_UP, v1df_UP, di_UP, df_UP, v16qi_UP, v8hi_UP, v8hf_UP)
15013 (v4si_UP, v4sf_UP, v2di_UP, v2df_UP, ti_UP, oi_UP, ci_UP, xi_UP)
15014 (si_UP, sf_UP, hi_UP, hf_UP, qi_UP): Likewise.
15015 (CRC32_BUILTIN, ENTRY): Likewise.
15016 * config/aarch64/aarch64.c (aarch64_push_regs): Likewise.
15017 (aarch64_pop_regs): Likewise.
15018 (aarch64_process_components): Likewise.
15019 * config/alpha/alpha.c (alpha_emit_conditional_move): Likewise.
15020 * config/arm/arm-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP, v2si_UP)
15021 (v2sf_UP, di_UP, v16qi_UP, v8hi_UP, v8hf_UP, v4si_UP, v4sf_UP)
15022 (v2di_UP, ti_UP, ei_UP, oi_UP, hf_UP, si_UP, void_UP): Likewise.
15023 * config/arm/arm.c (arm_init_libfuncs): Likewise.
15024 * config/i386/i386-builtin-types.awk (ix86_builtin_type_vect_mode):
15025 Likewise.
15026 * config/i386/i386-builtin.def (pcmpestr): Likewise.
15027 (pcmpistr): Likewise.
15028 * config/microblaze/microblaze.c (double_memory_operand): Likewise.
15029 * config/mmix/mmix.c (mmix_output_condition): Likewise.
15030 * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
15031 Likewise.
15032 * config/rl78/rl78.c (mduc_regs): Likewise.
15033 * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
15034 (htm_expand_builtin): Likewise.
15035 * config/sh/sh.h (REGISTER_NATURAL_MODE): Likewise.
15036 * config/sparc/sparc.c (emit_save_or_restore_regs): Likewise.
15037 * config/xtensa/xtensa.c (print_operand): Likewise.
15038 * expmed.h (NUM_MODE_PARTIAL_INT): Likewise.
15039 (NUM_MODE_VECTOR_INT): Likewise.
15040 * genoutput.c (null_operand): Likewise.
15041 (output_operand_data): Likewise.
15042 * genrecog.c (print_parameter_value): Likewise.
15043 * lra.c (debug_operand_data): Likewise.
15044
15045 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
15046
15047 * dwarf2out.c (scompare_loc_descriptor_wide)
15048 (scompare_loc_descriptor_narrow): New functions, split out from...
15049 (scompare_loc_descriptor): ...here.
15050 * expmed.c (emit_store_flag_int): New function, split out from...
15051 (emit_store_flag): ...here.
15052
15053 2017-08-30 Richard Biener <rguenther@suse.de>
15054
15055 * dwarf2out.c (dwarf2out_finish): Remove setting AT_pubnames.
15056 (dwarf2out_early_finish): Move setting of AT_pubnames from
15057 early debug output to early finish.
15058
15059 2017-08-30 Jozef Lawrynowicz <jozef.l@somniumtech.com>
15060
15061 * gcc/config/msp430/msp430.h: Pass -mcode/data-region to the linker
15062 and -mdata-region to the assembler.
15063
15064 2017-08-30 Richard Biener <rguenther@suse.de>
15065
15066 * dwarf2out.c (add_dwarf_attr): Check we don't add duplicate
15067 attributes.
15068 (gen_subprogram_die): Add DW_AT_object_pointer only early.
15069 (dwarf2out_early_global_decl): Only generate a DIE for the
15070 abstract origin if it doesn't already exist or is a declaration DIE.
15071 (resolve_addr): Do not add the linkage name twice when
15072 generating a stub DIE for the DW_TAG_GNU_call_site target.
15073
15074 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
15075
15076 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
15077 Use machine_mode rather than int for arg1_mode.
15078
15079 2017-08-29 Michael Meissner <meissner@linux.vnet.ibm.com>
15080
15081 PR target/82015
15082 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Insure
15083 that the second argument of the built-in functions to unpack
15084 128-bit scalar types to 64-bit values is 0 or 1. Change to use a
15085 switch statement instead a lot of if statements.
15086 * config/rs6000/rs6000.md (unpack<mode>, FMOVE128_VSX iterator):
15087 Allow 64-bit values to be in Altivec registers as well as
15088 traditional floating point registers.
15089 (pack<mode>, FMOVE128_VSX iterator): Likewise.
15090
15091 2017-08-29 Alexander Monakov <amonakov@ispras.ru>
15092
15093 * ira-costs.c (record_address_regs): Handle both operands of PLUS for
15094 MAX_REGS_PER_ADDRESS == 1.
15095
15096 2017-08-29 Uros Bizjak <ubizjak@gmail.com>
15097
15098 * config/i386/i386.opt (flag_fentry): Do not init to -1.
15099 * config/i386/i386.c (ix86_option_override_internal): Simplify
15100 setting of opts->x_flag_entry.
15101
15102 2017-08-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15103 Jakub Jelinek <jakub@redhat.com>
15104 Richard Biener <rguenther@suse.de>
15105
15106 PR tree-optimization/81503
15107 * gimple-ssa-strength-reduction.c (replace_mult_candidate): Ensure
15108 folded constant fits in the target type; reorder tests for clarity.
15109
15110 2017-08-29 Martin Liska <mliska@suse.cz>
15111
15112 * passes.def: Include pass_lower_switch.
15113 * stmt.c (dump_case_nodes): Remove and move to
15114 tree-switch-conversion.
15115 (case_values_threshold): Likewise.
15116 (expand_switch_as_decision_tree_p): Likewise.
15117 (emit_case_decision_tree): Likewise.
15118 (expand_case): Likewise.
15119 (balance_case_nodes): Likewise.
15120 (node_has_low_bound): Likewise.
15121 (node_has_high_bound): Likewise.
15122 (node_is_bounded): Likewise.
15123 (emit_case_nodes): Likewise.
15124 (struct simple_case_node): New struct.
15125 (add_case_node): Remove.
15126 (emit_case_dispatch_table): Use vector instead of case_list.
15127 (reset_out_edges_aux): Remove.
15128 (compute_cases_per_edge): Likewise.
15129 (expand_case): Build list of simple_case_node.
15130 (expand_sjlj_dispatch_table): Use it.
15131 * tree-switch-conversion.c (struct case_node): Moved from
15132 stmt.c and adjusted.
15133 (emit_case_nodes): Likewise.
15134 (node_has_low_bound): Likewise.
15135 (node_has_high_bound): Likewise.
15136 (node_is_bounded): Likewise.
15137 (case_values_threshold): Likewise.
15138 (reset_out_edges_aux): Likewise.
15139 (compute_cases_per_edge): Likewise.
15140 (add_case_node): Likewise.
15141 (dump_case_nodes): Likewise.
15142 (balance_case_nodes): Likewise.
15143 (expand_switch_as_decision_tree_p): Likewise.
15144 (emit_jump): Likewise.
15145 (emit_case_decision_tree): Likewise.
15146 (try_switch_expansion): Likewise.
15147 (do_jump_if_equal): Likewise.
15148 (emit_cmp_and_jump_insns): Likewise.
15149 (fix_phi_operands_for_edge): New function.
15150 (record_phi_operand_mapping): Likewise.
15151 (class pass_lower_switch): New pass.
15152 (pass_lower_switch::execute): New function.
15153 (make_pass_lower_switch): Likewise.
15154 (conditional_probability):
15155 * timevar.def: Add TV_TREE_SWITCH_LOWERING.
15156 * tree-pass.h: Add make_pass_lower_switch.
15157
15158 2017-08-29 Jozef Lawrynowicz <jozef.l@somniumtech.com>
15159
15160 PR target/80993
15161 * gcc/config/msp430/msp430.c (msp430_attr): Mark interrupt
15162 handlers as used.
15163
15164 2017-08-29 Richard Biener <rguenther@suse.de>
15165
15166 * dwarf2out.c (add_dwarf_attr): When checking is enabled verify
15167 we do not add a DW_AT_inline attribute twice.
15168 (gen_subprogram_die): Remove code setting DW_AT_inline on
15169 DECL_ABSTRACT_P nodes.
15170
15171 2017-08-29 Richard Sandiford <richard.sandiford@linaro.org>
15172
15173 * gimplify.c (gimplify_call_expr): Copy the nothrow flag to
15174 calls to internal functions.
15175 (gimplify_modify_expr): Likewise.
15176 * tree-call-cdce.c (use_internal_fn): Likewise.
15177 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
15178 (convert_to_divmod): Set the nothrow flag.
15179 * tree-if-conv.c (predicate_mem_writes): Likewise.
15180 * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
15181 (vectorizable_call): Likewise.
15182 (vectorizable_store): Likewise.
15183 (vectorizable_load): Likewise.
15184 * tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
15185 (vect_recog_mask_conversion_pattern): Likewise.
15186
15187 2017-08-29 Martin Liska <mliska@suse.cz>
15188
15189 PR other/39851
15190 * gcc.c (driver_handle_option): Add new argument.
15191 * opts-common.c (handle_option): Pass
15192 target_option_override_hook.
15193 * opts-global.c (lang_handle_option): Add new option.
15194 (set_default_handlers): Add new argument.
15195 (decode_options): Likewise.
15196 * opts.c (target_handle_option): Likewise.
15197 (common_handle_option): Call target_option_override_hook.
15198 * opts.h (struct cl_option_handler_func): Add hook for
15199 target option override.
15200 (struct cl_option_handlers): Likewise.
15201 (set_default_handlers): Add new argument.
15202 (decode_options): Likewise.
15203 (common_handle_option): Likewise.
15204 (target_handle_option): Likewise.
15205 * toplev.c (toplev::main): Pass targetm.target_option.override
15206 hook.
15207
15208 2017-08-29 Richard Biener <rguenther@suse.de>
15209 Dominik Infuehr <dominik.infuehr@theobroma-systems.com>
15210
15211 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Properly confine
15212 life to the active subtree.
15213
15214 2017-08-28 Jeff Law <law@redhat.com>
15215
15216 * tree-ssa-dom.c (edge_info::record_simple_equiv): Call
15217 derive_equivalences.
15218 (derive_equivalences_from_bit_ior, record_temporary_equivalences):
15219 Code moved into....
15220 (edge_info::derive_equivalences): New private member function
15221
15222 * tree-ssa-dom.c (class edge_info): Changed from a struct
15223 to a class. Add ctor/dtor, methods and data members.
15224 (edge_info::edge_info): Renamed from allocate_edge_info.
15225 Initialize additional members.
15226 (edge_info::~edge_info): New.
15227 (free_dom_edge_info): Delete the edge info.
15228 (record_edge_info): Use new class & associated member functions.
15229 Tighten forms for testing for edge equivalences.
15230 (record_temporary_equivalences): Iterate over the simple
15231 equivalences rather than assuming there's only one per edge.
15232 (cprop_into_successor_phis): Iterate over the simple
15233 equivalences rather than assuming there's only one per edge.
15234 (optimize_stmt): Use operand_equal_p rather than pointer
15235 equality for mini-DSE code.
15236
15237 2017-08-28 Nathan Sidwell <nathan@acm.org>
15238
15239 * gcc.c (execute): Fold SIGPIPE handling into switch
15240 statement. Adjust internal error message.
15241
15242 2017-08-28 Richard Biener <rguenther@suse.de>
15243
15244 PR debug/81993
15245 * dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
15246 Do nothing for removed DIEs.
15247
15248 2017-08-28 Richard Biener <rguenther@suse.de>
15249
15250 PR tree-optimization/81977
15251 * tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
15252 memcpy.
15253
15254 2017-08-28 Alexander Monakov <amonakov@ispras.ru>
15255
15256 PR target/80640
15257 * doc/md.texi (mem_thread_fence): Remove mention of mode. Rewrite.
15258 * optabs.c (expand_mem_thread_fence): Emit a compiler barrier when
15259 using targetm.gen_mem_thread_fence.
15260
15261 2017-08-27 Uros Bizjak <ubizjak@gmail.com>
15262
15263 PR target/81995
15264 * config/i386/i386.md (*<btsc><mode>): Change operand 2
15265 predicate to register_operand. Reorder operands.
15266 (*btr<mode>): Ditto.
15267 (*<btsc><mode>_mask): Change operand 3 predicate to register_operand.
15268 (*btr<mode>_mask): Ditto.
15269
15270 2017-08-25 Steven Munroe <munroesj@gcc.gnu.org>
15271
15272 * config.gcc (powerpc*-*-*): Add xmmintrin.h and mm_malloc.h.
15273 * config/rs6000/xmmintrin.h: New file.
15274 * config/rs6000/x86intrin.h [__ALTIVEC__]: Include xmmintrin.h.
15275
15276 2017-08-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15277
15278 PR target/81504
15279 * config/rs6000/rs6000-p8swap.c (find_alignment_op): Add reference
15280 parameter and_insn and return it.
15281 (recombine_lvx_pattern): Insert a copy to ensure availability of
15282 the base register of the copied masking operation at the point of
15283 the instruction replacement.
15284 (recombine_stvx_pattern): Likewise.
15285
15286 2017-08-25 Michael Meissner <meissner@linux.vnet.ibm.com>
15287
15288 * config/rs6000/rs6000.opt (-mpower9-dform-scalar): Delete
15289 undocumented switches.
15290 (-mpower9-dform-vector): Likewise.
15291 (-mpower9-dform): Likewise.
15292 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
15293 comments to delete references to -mpower9-dform* switches.
15294 * config/rs6000/predicates.md (vsx_quad_dform_memory_operand):
15295 Delete reference to -mpower9-dform* switches, test for
15296 -mpower9-vector instead.
15297 * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Likewise.
15298 (OTHER_P9_VECTOR_MASKS): Likewise.
15299 (POWERPC_MASKS): Likewise.
15300 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Change
15301 tests against -mpower9-dform* to -mpower9-vector. Delete code
15302 that checked for -mpower9-dform* consistancy with other options.
15303 Add test for -mpower9-misc to enable other power9 switches.
15304 (rs6000_init_hard_regno_mode_ok): Likewise.
15305 (rs6000_option_override_internal): Likewise.
15306 (rs6000_emit_prologue): Likewise.
15307 (rs6000_emit_epilogue): Likewise.
15308 (rs6000_opt_masks): Delete -mpower9-dform-{scalar,vector}.
15309 (rs6000_disable_incompatiable_switches): Delete -mpower9-dform.
15310 (emit_fusion_p9_load): Change tests for -mpower9-dform-scalar
15311 -mpower9-vector.
15312 (emit_fusion_p9_store): Likewise.
15313 * config/rs6000/rs6000.h (TARGET_P9_DFORM_SCALAR): Delete
15314 resetting these macros if the assembler does not support ISA 3.0
15315 instructions.
15316 (TARGET_P9_DFORM_VECTOR): Likewise.
15317 * config/rs6000/rs6000.md (peepholes to optimize altivec memory):
15318 Change to use -mpower9-vector instead of -mpower9-dform-scalar.
15319
15320 2017-08-25 Alan Modra <amodra@gmail.com>
15321
15322 PR rtl-optimization/81747
15323 * cse.c (cse_extended_basic_block): Don't attempt to record
15324 equivalences for degenerate conditional branches that branch
15325 to their fall-through.
15326
15327 2017-08-24 Martin Sebor <msebor@redhat.com>
15328
15329 PR middle-end/81908
15330 * gimple-fold.c (size_must_be_zero_p): New function.
15331 (gimple_fold_builtin_memory_op): Call it.
15332
15333 2017-08-24 Steven Munroe <munroesj@gcc.gnu.org>
15334
15335 * config/rs6000/mm_malloc.h: New file.
15336
15337 2017-08-24 Bin Cheng <bin.cheng@arm.com>
15338
15339 PR tree-optimization/81913
15340 * tree-ssa-loop-niter.c (number_of_iterations_cond): Skip niter
15341 analysis when either IVs in condition can wrap.
15342
15343 2017-08-24 Uros Bizjak <ubizjak@gmail.com>
15344
15345 * dwarf2out.c (MAX_ARTIFICIAL_LABEL_BYTES): Increase to 40.
15346 * dwarf2cfi.c (MAX_ARTIFICIAL_LABEL_BYTES): Remove.
15347
15348 2017-08-24 Richard Biener <rguenther@suse.de>
15349
15350 PR target/81921
15351 * targhooks.c (default_target_can_inline_p): Properly
15352 use target_option_default_node when no DECL_FUNCTION_SPECIFIC_TARGET
15353 is present and always compare.
15354 * config/i386/i386.c (ix86_valid_target_attribute_tree): Do not
15355 infer -mfpmath=sse from TARGET_SSE_P.
15356 (ix86_can_inline_p): Properly use target_option_default_node when
15357 no DECL_FUNCTION_SPECIFIC_TARGET is present and always compare.
15358
15359 2017-08-24 Richard Biener <rguenther@suse.de>
15360
15361 PR debug/81936
15362 * dwarf2out.c (output_die): Handle flag_generate_offload like
15363 flag_generate_lto.
15364 (output_comp_unit): Likewise.
15365 (gen_array_type_die): Likewise.
15366 (dwarf2out_early_finish): Likewise.
15367 (note_variable_value_in_expr): Likewise.
15368 (dwarf2out_finish): Likewise. Adjust assert.
15369 * cgraphunit.c (symbol_table::compile): Move setting of
15370 flag_generate_offload earlier ...
15371 (symbol_table::finalize_compilation_unit): ... here, before
15372 early debug finalization.
15373
15374 2017-08-24 Richard Biener <rguenther@suse.de>
15375
15376 * config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
15377 and ipa-fnsummary.h.
15378 (ix86_can_inline_p): When ix86_fpmath flags do not match
15379 check whether the callee uses FP math at all.
15380
15381 2017-08-24 Aldy Hernandez <aldyh@redhat.com>
15382
15383 PR middle-end/81931
15384 * tree-ssanames.c (get_nonzero_bits): Use element_precision
15385 instead of TYPE_PRECISION.
15386
15387 2017-08-24 Richard Sandiford <richard.sandiford@linaro.org>
15388 Alan Hayward <alan.hayward@arm.com>
15389 David Sherwood <david.sherwood@arm.com>
15390
15391 * combine.c (make_extraction): Use subreg_offset_from_lsb.
15392
15393 2017-08-23 Daniel Santos <daniel.santos@pobox.com>
15394
15395 * config/i386/i386.h (ix86_frame::stack_realign_allocate_offset):
15396 Remove field.
15397 (ix86_frame::stack_realign_allocate): New field.
15398 (struct machine_frame_state): Modify comments.
15399 (machine_frame_state::sp_realigned_fp_end): New field.
15400 * config/i386/i386.c (ix86_compute_frame_layout): Rework stack frame
15401 layout calculation.
15402 (sp_valid_at): Add assertion to assure no attempt to access invalid
15403 offset of a realigned stack.
15404 (fp_valid_at): Likewise.
15405 (choose_baseaddr): Modify comments.
15406 (ix86_emit_outlined_ms2sysv_save): Adjust to changes in
15407 ix86_expand_prologue.
15408 (ix86_expand_prologue): Modify stack realignment and allocation.
15409 (ix86_expand_epilogue): Modify comments.
15410 * doc/sourcebuild.texi: Add documentation for target selectors avx2,
15411 avx2_runtime, avx512f, and avx512f_runtime.
15412
15413 2017-08-23 Uros Bizjak <ubizjak@gmail.com>
15414
15415 * config/i386/i386.opt: Remove unneeded Init(0) initializations.
15416 (mstackrealign): Do not init to -1.
15417 * config/i386/i386.c (ix86_option_override_internal):
15418 Check opts_set, not opts when setting default value of
15419 opts->x_ix86_force_align_arg_pointer.
15420
15421 2017-08-23 Richard Biener <rguenther@suse.de>
15422
15423 * function.c (fndecl_name): Use verbosity 1 (no arguments) for
15424 lang_hooks.decl_printable_name.
15425 * print-rtl-function.c (print_rtx_function): Likewise.
15426 * tree-pretty-print.c (dump_function_header): Likewise.
15427
15428 2017-08-23 Richard Biener <rguenther@suse.de>
15429
15430 PR lto/81940
15431 * dwarf2out.c (dwarf2out_abstract_function): Handle LTO with
15432 -g0 at compile-time.
15433
15434 2017-08-23 Tamar Christina <tamar.christina@arm.com>
15435
15436 PR middle-end/19706
15437 * doc/sourcebuild.texi (Other hardware attributes):
15438 Document xorsign.
15439
15440 2017-08-23 Tamar Christina <tamar.christina@arm.com>
15441
15442 PR middle-end/19706
15443 * tree-ssa-math-opts.c (convert_expand_mult_copysign):
15444 Fix single-use check.
15445
15446 2017-08-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
15447
15448 * gcc.c (execute): Only test for SIGKILL and SIGQUIT if available.
15449
15450 2017-08-22 Daniel Santos <daniel.santos@pobox.com>
15451
15452 * doc/install.texi: Modify to add more details on running selected
15453 tests.
15454
15455 2017-08-22 Daniel Santos <daniel.santos@pobox.com>
15456
15457 * config/i386/i386.c (ix86_option_override_internal): Error when -mx32
15458 is combined with -mabi=ms.
15459 (ix86_function_type_abi): Limit errors for mixing -mx32 with attribute
15460 ms_abi.
15461
15462 2017-08-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15463
15464 PR tree-optimization/81488
15465 * gimple-ssa-strength-reduction (struct slsr_cand_d): Add visited
15466 and cached_basis fields.
15467 (MAX_SPREAD): New constant.
15468 (alloc_cand_and_find_basis): Initialize new fields.
15469 (clear_visited): New function.
15470 (create_phi_basis_1): Rename from create_phi_basis, set visited
15471 and cached_basis fields.
15472 (create_phi_basis): New wrapper function.
15473 (phi_add_costs_1): Rename from phi_add_costs, add spread
15474 parameter, set visited field, short-circuit when limits reached.
15475 (phi_add_costs): New wrapper function.
15476 (record_phi_increments_1): Rename from record_phi_increments, set
15477 visited field.
15478 (record_phi_increments): New wrapper function.
15479 (phi_incr_cost_1): Rename from phi_incr_cost, set visited field.
15480 (phi_incr_cost): New wrapper function.
15481 (all_phi_incrs_profitable_1): Rename from
15482 all_phi_incrs_profitable, set visited field.
15483 (all_phi_incrs_profitable): New wrapper function.
15484
15485 2017-08-22 Richard Sandiford <richard.sandiford@linaro.org>
15486 Alan Hayward <alan.hayward@arm.com>
15487 David Sherwood <david.sherwood@arm.com>
15488
15489 * rtl.h (paradoxical_subreg_p): Define inline, and add a version
15490 that takes the outer and inner modes.
15491 * doc/rtl.texi: Use paradoxical_subreg_p instead of a GET_MODE_SIZE
15492 comparison as the canonical test for a paradoxical subreg.
15493 * combine.c (simplify_set): Use paradoxical_subreg_p.
15494 (make_extraction): Likewise.
15495 (force_to_mode): Likewise.
15496 (rtx_equal_for_field_assignment_p): Likewise.
15497 (gen_lowpart_for_combine): Likewise.
15498 (simplify_comparison): Likewise.
15499 * cse.c (equiv_constant): Likewise.
15500 * expmed.c (store_bit_field_1): Likewise.
15501 * final.c (alter_subreg): Likewise.
15502 * fwprop.c (propagate_rtx): Likewise.
15503 (forward_propagate_subreg): Likewise.
15504 * ira-conflicts.c (ira_build_conflicts): Likewise.
15505 * lower-subreg.c (simplify_gen_subreg_concatn): Likewise.
15506 * lra-constraints.c (curr_insn_transform): Likewise.
15507 (split_reg): Likewise.
15508 * lra-eliminations.c (move_plus_up): Likewise.
15509 (lra_eliminate_regs_1): Likewise.
15510 * recog.c (general_operand): Likewise.
15511 * ree.c (combine_reaching_defs): Likewise.
15512 * reload.c (push_reload): Likewise.
15513 (find_reloads): Likewise.
15514 * reload1.c (elimination_effects): Likewise.
15515 (compute_reload_subreg_offset): Likewise.
15516 (choose_reload_regs): Likewise.
15517 * rtlanal.c (subreg_lsb_1): Likewise.
15518 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
15519 (simplify_subreg): Likewise.
15520 * var-tracking.c (track_loc_p): Likewise.
15521 * emit-rtl.c (byte_lowpart_offset): Likewise.
15522 (paradoxical_subreg_p): Delete out-of-line definition.
15523
15524 2017-08-22 Jeff Law <law@redhat.com>
15525
15526 PR tree-optimization/81741
15527 PR tree-optimization/71947
15528 * tree-ssa-dom.c: Include tree-inline.h.
15529 (record_temporary_equivalences): Only record SSA_NAME = SSA_NAME
15530 equivalences if one is more expensive to compute than the other.
15531 * tree-ssa-scopedtables.h (class const_or_copies): Make
15532 record_const_or_copy_raw method private.
15533 (class avail_exprs_stack): New method simplify_binary_operation.
15534 * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr): Call
15535 avail_exprs_stack::simplify_binary_operation as needed.
15536 (avail_exprs_stack::simplify_binary_operation): New function.
15537
15538 2017-08-22 Sebastian Huber <sebastian.huber@embedded-brains.de>
15539
15540 * config.gcc (powerpc-*-rtems*): Add rs6000/linux64.opt.
15541 * config/rs6000/rtems.h (ASM_PREFERRED_EH_DATA_FORMAT): New define.
15542 (DOT_SYMBOLS): Likewise.
15543 (MINIMAL_TOC_SECTION_ASM_OP): Likewise.
15544 (RELOCATABLE_NEEDS_FIXUP): Likewise.
15545 (RS6000_ABI_NAME): Likewise.
15546 (TARGET_CMODEL): Likewise.
15547 (TOC_SECTION_ASM_OP): Likewise.
15548 (SET_CMODEL): New macro.
15549 (SUBSUBTARGET_OVERRIDE_OPTIONS): Evaluate cmodel options.
15550
15551 2017-08-22 Richard Biener <rguenther@suse.de>
15552
15553 * tree-inline.c (remap_type_1): Change asserts on TYPE_SIZE[_UNIT]
15554 to allow for free-lang-data replacements similar to verify_type_variant.
15555
15556 2017-08-22 Richard Sandiford <richard.sandiford@linaro.org>
15557 Alan Hayward <alan.hayward@arm.com>
15558 David Sherwood <david.sherwood@arm.com>
15559
15560 * config/aarch64/aarch64.md (casesi): Use DImode rather than
15561 VOIDmode for the LABEL_REF.
15562
15563 2017-08-22 Richard Biener <rguenther@suse.de>
15564
15565 * tree-cfg.c (gimple_split_edge): Avoid reallocating target PHI nodes.
15566
15567 2017-08-22 Richard Biener <rguenther@suse.de>
15568
15569 * common.opt (feliminate-dwarf2-dups): Ignore.
15570 * doc/invoke.texi (feliminate-dwarf2-dups): Remove documentation.
15571 * dwarf2out.c (push_new_compile_unit, pop_compile_unit,
15572 same_die_p_wrap, compute_section_prefix,
15573 is_symbol_die, assign_symbol_names, break_out_includes): Remove.
15574 (comdat_symbol_id, comdat_symbol_number): Likewise.
15575 (cu_hash_table_entry, cu_hash_table_entry_hasher, cu_hash_type):
15576 Likewise.
15577 (check_duplicate_cu, record_comdat_symbol_number): Likewise.
15578 (output_die): Mark unreachable path unreachable.
15579 (dwarf2out_start_source_file): Do not create DW_TAG_GNU_BINCL.
15580 (dwarf2out_end_source_file): Do not create DW_TAG_GNU_EINCL.
15581 (dwarf2out_init): Remove code handling flag_eliminate_dwarf2_dups.
15582 (dwarf2out_early_finish): Likewise.
15583
15584 2017-08-22 Aldy Hernandez <aldyh@redhat.com>
15585
15586 * wide-int.h (hwi_with_prec::hwi_with_prec): Sign extend.
15587
15588 2017-08-22 Georg-Johann Lay <avr@gjlay.de>
15589
15590 PR target/81910
15591 * config/avr/avr.c (avr_handle_addr_attribute): Early return if
15592 not VAR_P. Filter attribute warnings with OPT_Wattributes.
15593 (avr_attribute_table) <io, io_low, address>: Initialize
15594 .decl_required with true.
15595
15596 2017-08-21 Michael Meissner <meissner@linux.vnet.ibm.com>
15597
15598 * config/rs6000/rs6000-cpus.def (-mvsx-scalar-float): Delete
15599 undocumented debugging options.
15600 (-mvsx-scalar-double): Likewise.
15601 (-mallow-df-permute): Likewise.
15602 (-mvectorize-builtins): Likewise.
15603 * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
15604 (rs6000_builtin_vectorized_function): Likewise.
15605 (rs6000_builtin_md_vectorized_function): Likewise.
15606 (rs6000_opt_vars): Likewise.
15607
15608 2017-08-21 Uros Bizjak <ubizjak@gmail.com>
15609
15610 PR target/46091
15611 * config/i386/i386.md (*btsq_imm): Rename from *btsq.
15612 (*btrq_imm): Rename from *btrq.
15613 (*btcq_imm): Rename from *btcq.
15614 (btsc): New code attribute.
15615 (*<btsc><mode>): New insn pattern.
15616 (*btr<mode>): Ditto.
15617 (*<btsc><mode>_mask): New insn_and_split pattern.
15618 (*btr<mode>_mask): Ditto.
15619
15620 2017-08-21 Richard Sandiford <richard.sandiford@linaro.org>
15621 Alan Hayward <alan.hayward@arm.com>
15622 David Sherwood <david.sherwood@arm.com>
15623
15624 * function.c (pad_below): Simplify padding calculation.
15625
15626 2017-08-21 Richard Sandiford <richard.sandiford@linaro.org>
15627 Alan Hayward <alan.hayward@arm.com>
15628 David Sherwood <david.sherwood@arm.com>
15629
15630 * target.def (function_prologue): Remove frame size argument.
15631 (function_epilogue): Likewise.
15632 * doc/tm.texi: Regenerate.
15633 * final.c (final_start_function): Update call to function_prologue.
15634 (final_end_function): Update call to function_epilogue.
15635 (default_function_pro_epilogue): Remove frame size argument.
15636 * output.h (default_function_pro_epilogue): Likewise.
15637 * config/arm/arm.c (arm_output_function_epilogue): Likewise.
15638 (arm_output_function_prologue): Likewise.
15639 * config/frv/frv.c (frv_function_prologue): Likewise.
15640 (frv_function_epilogue): Likewise.
15641 * config/i386/i386.c (ix86_output_function_epilogue): Likewise.
15642 * config/ia64/ia64.c (ia64_output_function_prologue): Likewise.
15643 (ia64_output_function_epilogue): Likewise.
15644 * config/m32r/m32r.c (m32r_output_function_prologue): Likewise.
15645 (m32r_output_function_epilogue): Likewise.
15646 * config/microblaze/microblaze.c (microblaze_function_prologue)
15647 (microblaze_function_epilogue): Likewise.
15648 * config/mips/mips.c (mips_output_function_prologue): Likewise.
15649 (mips_output_function_epilogue): Likewise.
15650 * config/mmix/mmix.c (mmix_target_asm_function_prologue): Likewise.
15651 (mmix_target_asm_function_epilogue): Likewise.
15652 * config/msp430/msp430.c (msp430_start_function): Likewise.
15653 * config/nds32/nds32.c (nds32_asm_function_prologue): Likewise.
15654 (nds32_asm_function_epilogue): Likewise.
15655 * config/nios2/nios2.c (nios2_asm_function_prologue): Likewise.
15656 * config/pa/pa.c (pa_output_function_prologue): Likewise.
15657 (pa_output_function_epilogue): Likewise.
15658 * config/powerpcspe/powerpcspe.c (rs6000_output_function_prologue)
15659 (rs6000_output_function_epilogue): Likewise.
15660 * config/rl78/rl78.c (rl78_start_function): Likewise.
15661 * config/rs6000/rs6000.c (rs6000_output_function_prologue): Likewise.
15662 (rs6000_output_function_epilogue): Likewise.
15663 * config/rx/rx.c (rx_output_function_prologue): Likewise.
15664 * config/sh/sh.c (sh_output_function_epilogue): Likewise.
15665 * config/sparc/sparc.c (sparc_asm_function_prologue): Likewise.
15666 (sparc_asm_function_epilogue): Likewise.
15667
15668 2017-08-21 Richard Sandiford <richard.sandiford@linaro.org>
15669
15670 * tree.h (type_has_mode_precision_p): New function.
15671 * convert.c (convert_to_integer_1): Use it.
15672 * expr.c (expand_expr_real_2): Likewise.
15673 (expand_expr_real_1): Likewise.
15674 * fold-const.c (fold_single_bit_test_into_sign_test): Likewise.
15675 * match.pd: Likewise.
15676 * tree-ssa-forwprop.c (simplify_rotate): Likewise.
15677 * tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
15678 * tree-tailcall.c (process_assignment): Likewise.
15679 * tree-vect-loop.c (vectorizable_reduction): Likewise.
15680 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern)
15681 (vect_recog_mult_pattern, vect_recog_divmod_pattern): Likewise.
15682 * tree-vect-stmts.c (vectorizable_conversion): Likewise.
15683 (vectorizable_assignment): Likewise.
15684 (vectorizable_shift): Likewise.
15685 (vectorizable_operation): Likewise.
15686 * tree-vrp.c (register_edge_assert_for_2): Likewise.
15687
15688 2017-08-21 Wilco Dijkstra <wdijkstr@arm.com>
15689
15690 * match.pd: Add pow (C, x) simplification.
15691
15692 2017-08-21 Richard Biener <rguenther@suse.de>
15693
15694 PR tree-optimization/81900
15695 * tree-ssa-pre.c (compute_antic_aux): Properly compute changed
15696 for blocks with abnormal predecessors.
15697 (compute_antic): Do not set visited flag prematurely.
15698
15699 2017-08-21 Georg-Johann Lay <avr@gjlay.de>
15700
15701 PR target/79883
15702 * config/avr/avr.c (avr_set_current_function): Typo in diagnostic.
15703
15704 2017-08-21 Richard Sandiford <richard.sandiford@linaro.org>
15705
15706 * stor-layout.h (vector_type_mode): Move to...
15707 * tree.h (vector_type_mode): ...here.
15708 * stor-layout.c (vector_type_mode): Move to...
15709 * tree.c (vector_type_mode): ...here. Include rtl.h and regs.h.
15710
15711 2017-08-21 Richard Biener <rguenther@suse.de>
15712
15713 * debug.h (struct gcc_debug_hooks): Add die_ref_for_decl and
15714 register_external_die hooks.
15715 (debug_false_tree_charstarstar_uhwistar): Declare.
15716 (debug_nothing_tree_charstar_uhwi): Likewise.
15717 * debug.c (do_nothing_debug_hooks): Adjust.
15718 (debug_false_tree_charstarstar_uhwistar): New do nothing.
15719 (debug_nothing_tree_charstar_uhwi): Likewise.
15720 * dbxout.c (dbx_debug_hooks): Adjust.
15721 (xcoff_debug_hooks): Likewise.
15722 * sdbout.c (sdb_debug_hooks): Likewise.
15723 * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
15724 * dwarf2out.c (macinfo_label_base): New global.
15725 (dwarf2out_register_external_die): New function for the
15726 register_external_die hook.
15727 (dwarf2out_die_ref_for_decl): Likewise for die_ref_for_decl.
15728 (dwarf2_debug_hooks): Use them.
15729 (dwarf2_lineno_debug_hooks): Adjust.
15730 (struct die_struct): Add with_offset flag.
15731 (DEBUG_LTO_DWO_INFO_SECTION, DEBUG_LTO_INFO_SECTION,
15732 DEBUG_LTO_DWO_ABBREV_SECTION, DEBUG_LTO_ABBREV_SECTION,
15733 DEBUG_LTO_DWO_MACINFO_SECTION, DEBUG_LTO_MACINFO_SECTION,
15734 DEBUG_LTO_DWO_MACRO_SECTION, DEBUG_LTO_MACRO_SECTION,
15735 DEBUG_LTO_LINE_SECTION, DEBUG_LTO_DWO_STR_OFFSETS_SECTION,
15736 DEBUG_LTO_STR_DWO_SECTION, DEBUG_STR_LTO_SECTION): New macros
15737 defining section names for the early LTO debug variants.
15738 (reset_indirect_string): New helper.
15739 (add_AT_external_die_ref): Helper for dwarf2out_register_external_die.
15740 (print_dw_val): Add support for offsetted symbol references.
15741 (get_ultimate_context): Split out from is_cxx.
15742 (is_cxx): Use get_ultimate_context.
15743 (is_fortran): Add decl overload.
15744 (compute_comp_unit_symbol): Split out worker from
15745 compute_section_prefix.
15746 (compute_section_prefix): Call compute_comp_unit_symbol and
15747 set comdat_type_p here.
15748 (output_die): Skip DIE symbol output for the LTO added one.
15749 Handle DIE symbol references with offset.
15750 (output_comp_unit): Guard section name mangling properly.
15751 For LTO debug sections emit a symbol at the section beginning
15752 which we use to refer to its DIEs.
15753 (add_abstract_origin_attribute): For DIEs registered via
15754 dwarf2out_register_external_die directly refer to the early
15755 DIE rather than indirectly through the shadow one we created.
15756 Remove obsolete call to dwarf2out_abstract_function for
15757 non-function/block origins.
15758 (gen_array_type_die): When generating early LTO debug do
15759 not emit DW_AT_string_length.
15760 (gen_formal_parameter_die): Do not re-create DIEs for PARM_DECLs
15761 late when in LTO. As suggested place a gcc_unreachable for
15762 the DECL_ABSTRACT_P case.
15763 (gen_subprogram_die): Avoid another specification DIE
15764 for early built declarations/definitions for the late LTO case.
15765 (gen_variable_die): Add type references for late duplicated VLA dies
15766 when in late LTO.
15767 (gen_inlined_subroutine_die): Do not call dwarf2out_abstract_function,
15768 we have the abstract instance already.
15769 (process_scope_var): Adjust decl DIE contexts in LTO which
15770 first puts them in limbo.
15771 (gen_decl_die): Do not generate type DIEs late apart from
15772 types for VLAs or for decls we do not yet have a DIE. Do not
15773 call dwarf2out_abstract_function late.
15774 (dwarf2out_early_global_decl): Make sure to create DIEs
15775 for abstract instances of a decl first.
15776 (dwarf2out_late_global_decl): Adjust comment.
15777 (output_macinfo_op): With multiple macro sections use
15778 macinfo_label_base to distinguish labels.
15779 (output_macinfo): Likewise. Update macinfo_label_base.
15780 Pass in the line info label.
15781 (note_variable_value_in_expr): When generating LTO resolve
15782 all variable values here by generating DIEs as needed.
15783 (init_sections_and_labels): Add early LTO debug flag parameter
15784 and generate different sections and names if set. Add generation
15785 counter for the labels so we can have multiple of them.
15786 (reset_dies): Helper to allow DIEs to be output multiple times.
15787 (dwarf2out_finish): When outputting DIEs to the fat part of an
15788 LTO object first reset DIEs.
15789 (dwarf2out_early_finish): Output early DIEs when generating LTO.
15790 (modified_type_die): Check for decl_ultimate_origin being self
15791 before recursing.
15792 (gen_type_die_with_usage): Likewise.
15793 (gen_typedef_die): Allow decl_ultimate_origin being self.
15794 (set_decl_abstract_flags): Remove.
15795 (set_block_abstract_flags): Likewise.
15796 (dwarf2out_abstract_function): Treat the early generated DIEs
15797 as the abstract copy and only add DW_AT_inline and
15798 DW_AT_artificial here and call set_decl_origin_self.
15799 If the DIE has an abstract origin don't do anything.
15800 * tree.c (free_lang_data): Build a dummy TRANSLATION_UNIT_DECL
15801 if we have none yet (Go fails to build one, PR78628).
15802 (variably_modified_type_p): Prevent endless recursion for Ada
15803 cyclic pointer types.
15804 * lto-streamer-in.c: Include debug.h.
15805 (dref_queue): New global.
15806 (lto_read_tree_1): Stream in DIE references.
15807 (lto_input_tree): Register DIE references.
15808 (input_function): Stream DECL_DEBUG_ARGS.
15809 * lto-streamer-out.c: Include debug.h.
15810 (lto_write_tree_1): Output DIE references.
15811 (DFS::DFS_write_tree_body): Follow DECL_ABSTRACT_ORIGIN.
15812 Force a TRANSLATION_UNIT_DECL DECL_CONTEXT for file-scope decls.
15813 (output_function): Stream DECL_DEBUG_ARGS.
15814 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
15815 Stream DECL_ABSTRACT_ORIGIN.
15816 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
15817 (write_ts_decl_minimal_tree_pointers): Force a TRANSLATION_UNIT_DECL
15818 DECL_CONTEXT for file-scope decls.
15819 * lto-streamer.h (struct dref_entry): Declare.
15820 (dref_queue): Likewise.
15821 * cfgexpand.c (pass_expand::execute): Do not call the
15822 outlining_inline_function hook here.
15823 * lto-wrapper.c (debug_obj): New global.
15824 (tool_cleanup): Unlink it if required.
15825 (debug_objcopy): New function.
15826 (run_gcc): Handle early debug sections in the IL files by
15827 extracting them to separate files, partially linkin them and
15828 feeding the result back as result to the linker.
15829 * config/darwin.h (DEBUG_LTO_INFO_SECTION, DEBUG_LTO_ABBREV_SECTION,
15830 DEBUG_LTO_MACINFO_SECTION, DEBUG_LTO_LINE_SECTION,
15831 DEBUG_STR_LTO_SECTION, DEBUG_LTO_MACRO_SECTION): Put early debug
15832 sections into a separate segment.
15833 * config/darwin.c (darwin_asm_named_section): Handle __GNU_DWARF_LTO
15834 segments.
15835 (darwin_asm_dwarf_section): Likewise.
15836 (darwin_asm_output_dwarf_offset): Likewise.
15837 * config/i386/i386.c (make_resolver_func): Set DECL_IGNORED_P.
15838
15839 2017-08-21 Richard Sandiford <richard.sandiford@linaro.org>
15840 Alan Hayward <alan.hayward@arm.com>
15841 David Sherwood <david.sherwood@arm.com>
15842
15843 * read-md.h (md_reader::record_potential_iterator_use): Replace
15844 pointer argument with an rtx and an index.
15845 * read-rtl.c (iterator_group::apply_iterator): Likewise.
15846 (apply_mode_iterator): Likewise.
15847 (apply_code_iterator): Likewise.
15848 (apply_int_iterator): Likewise.
15849 (apply_subst_iterator): Likewise.
15850 (record_iterator_use): Likewise.
15851 (record_attribute_use): Likewise.
15852 (md_reader::record_potential_iterator_use): Likewise. Update calls
15853 to record_iterator_use and apply_iterator.
15854 (iterator_use): Replace ptr with x and index.
15855 (attribute_use): Likewise.
15856 (apply_attribute_uses): Update calls to apply_iterator.
15857 (apply_iterators): Likewise. Update initialization of iterator_use.
15858 (rtx_reader::read_rtx_code): Update calls to record_iterator_use
15859 and record_potential_iterator_use.
15860 (rtx_reader::read_rtx_operand): Likewise.
15861
15862 2017-08-21 Richard Sandiford <richard.sandiford@linaro.org>
15863 Alan Hayward <alan.hayward@arm.com>
15864 David Sherwood <david.sherwood@arm.com>
15865
15866 * varasm.c (const_rtx_hash_1): Don't hash in the mode of a
15867 CONST_WIDE_INT.
15868
15869 2017-08-21 Richard Biener <rguenther@suse.de>
15870
15871 PR middle-end/81884
15872 * tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
15873 at struct end conservatively when comparing common bases.
15874
15875 2017-08-21 Richard Biener <rguenther@suse.de>
15876
15877 * tree-ssa-loop-im.c (struct lim_aux_data): Add ref index member.
15878 (mem_ref_in_stmt): Remove.
15879 (determine_max_movement): Use ref index to get at the reference.
15880 (invariantness_dom_walker::before_dom_children): Deal with
15881 lim data already initialized.
15882 (gather_mem_refs_stmt): Initialize lim data and record ref index.
15883
15884 2017-08-19 Uros Bizjak <ubizjak@gmail.com>
15885
15886 * config/i386/i386.h (OPTION_MASK_ISA_ROUND): Remove.
15887 (TARGET_ISA_ROUND): Ditto.
15888 (TARGET_ROUND): Ditto.
15889 * config/i386/i386.c: Substitute TARGET_ROUND with TARGET_SSE4_1.
15890 * config/i386/i386.md: Ditto.
15891 * config/i386/sse.md: Ditto.
15892 * config/i386/i386-builtin.def: Substitute OPTION_MASK_ISA_ROUND
15893 with OPTION_MASK_ISA_SSE4_1.
15894
15895 2017-08-19 Uros Bizjak <ubizjak@gmail.com>
15896
15897 PR target/81894
15898 * doc/extend.texi (x86 Built-in Functions): Correct the name of
15899 __builtin_ia32_lzcnt_u16.
15900
15901 2017-08-18 Peter Bergner <bergner@vnet.ibm.com>
15902
15903 PR target/80210
15904 * config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
15905 (rs6000_set_current_function): Rewrite function to use it.
15906
15907 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
15908
15909 PR c/53037
15910 * print-tree.c (print_node): Support DECL_WARN_IF_NOT_ALIGN
15911 and TYPE_WARN_IF_NOT_ALIGN.
15912 * stor-layout.c (do_type_align): Merge DECL_WARN_IF_NOT_ALIGN.
15913 (handle_warn_if_not_align): New.
15914 (place_union_field): Call handle_warn_if_not_align.
15915 (place_field): Call handle_warn_if_not_align.
15916 Copy TYPE_WARN_IF_NOT_ALIGN.
15917 (finish_builtin_struct): Copy TYPE_WARN_IF_NOT_ALIGN.
15918 (layout_type): Likewise.
15919 * tree-core.h (tree_type_common): Add warn_if_not_align. Set
15920 spare to 18.
15921 (tree_decl_common): Add warn_if_not_align.
15922 * tree.c (build_range_type_1): Copy TYPE_WARN_IF_NOT_ALIGN.
15923 * tree.h (TYPE_WARN_IF_NOT_ALIGN): New.
15924 (SET_TYPE_WARN_IF_NOT_ALIGN): Likewise.
15925 (DECL_WARN_IF_NOT_ALIGN): Likewise.
15926 (SET_DECL_WARN_IF_NOT_ALIGN): Likewise.
15927 * doc/extend.texi: Document warn_if_not_aligned attribute.
15928 * doc/invoke.texi: Document -Wif-not-aligned and -Wpacked-not-aligned.
15929
15930 2017-08-17 Martin Liska <mliska@suse.cz>
15931
15932 PR bootstrap/81864
15933 * tree-loop-distribution.c (ddrs_table): Change type to pointer type.
15934 (get_data_dependence): Use it as pointer type.
15935 (distribute_loop): Likewise.
15936
15937 2017-08-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15938
15939 * config/rs6000/altivec.md (UNSPEC_VMRGOW_DIRECT): New constant.
15940 (p8_vmrgew_v4sf_direct): Generalize to p8_vmrgew_<mode>_direct.
15941 (p8_vmrgow_<mode>_direct): New define_insn.
15942 * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Properly
15943 handle endianness for vmrgew and vmrgow permute patterns.
15944
15945 2017-08-17 Peter Bergner <bergner@vnet.ibm.com>
15946
15947 * config/rs6000/altivec.md (VParity): Remove TARGET_VSX_TIMODE.
15948 * config/rs6000/rs6000-cpus.def: Remove comment.
15949 (ISA_2_7_MASKS_SERVER): Delete OPTION_MASK_VSX_TIMODE;
15950 (POWERPC_MASKS): Likewise.
15951 * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Remove unneeded
15952 use of TARGET_VSX_TIMODE.
15953 (rs6000_setup_reg_addr_masks): Change TARGET_VSX_TIMODE to TARGET_VSX.
15954 (rs6000_init_hard_regno_mode_ok): Remove unneeded uses of
15955 TARGET_VSX_TIMODE. Change use of TARGET_VSX_TIMODE to TARGET_VSX.
15956 (rs6000_option_override_internal): Remove dead code.
15957 (rs6000_legitimize_address): Change TARGET_VSX_TIMODE to TARGET_VSX.
15958 (rs6000_legitimize_reload_address): Likewise.
15959 (rs6000_legitimate_address_p): Likewise.
15960 (rs6000_opt_masks): Delete "vsx-timode".
15961 (rs6000_disable_incompatible_switches): Remove mention of -mvsx-timode
15962 from function comment.
15963 * config/rs6000/rs6000.h (MASK_VSX_TIMODE): Delete.
15964 * config/rs6000/rs6000.md (FMOVE128_GPR): Remove TARGET_VSX_TIMODE.
15965 (V16QI, V8HI, V4SI, V4SF, V2DI, V2DF, V1TI): Remove useless empty
15966 condition.
15967 * config/rs6000/rs6000.opt (mvsx-timode): Replace with stub.
15968 * config/rs6000/vector.md (VEC_IP): Remove TARGET_VSX_TIMODE.
15969 * config/rs6000/vsx.md (VSX_LE_128): Likewise.
15970 (VSX_TI): Likewise.
15971 (VSX_M): Likewise.
15972 (define_peephole2): Likewise.
15973
15974 2017-08-17 Martin Sebor <msebor@redhat.com>
15975
15976 PR c/81859
15977 * pretty-print.c (pp_format): Use strnlen in %.*s to avoid reading
15978 past the end of an array.
15979 (test_pp_format): Add test cases.
15980
15981 2017-08-17 Richard Sandiford <richard.sandiford@linaro.org>
15982
15983 * internal-fn.def (CLRSB, CLZ, CTZ, FFS, PARITY, POPCOUNT): Add
15984 missing ECF_NOTHROW flags.
15985
15986 2017-08-17 Peter Bergner <bergner@vnet.ibm.com>
15987
15988 PR target/72804
15989 * config/rs6000/vsx.md (*vsx_le_permute_<mode>): Add support for
15990 operands residing in integer registers.
15991 (*vsx_le_perm_load_<mode>): Likewise.
15992 (*vsx_le_perm_store_<mode>): Likewise.
15993 (define_peephole2): Add peepholes to optimize the above.
15994
15995 2017-08-17 Marek Polacek <polacek@redhat.com>
15996
15997 PR middle-end/81814
15998 * fold-const.c (operand_equal_for_comparison_p): Remove code that used
15999 to mimic what shorten_compare did. Change the return type to bool.
16000 (fold_cond_expr_with_comparison): Update call to
16001 operand_equal_for_comparison_p.
16002 (fold_ternary_loc): Likewise.
16003
16004 2017-08-17 Jackson Woodruff <jackson.woodruff@arm.com>
16005
16006 * aarch64-simd.md (mov<mode>): No longer force zero immediate into
16007 register.
16008 (*aarch64_simd_mov<mode>): Add new case for stp using zero immediate.
16009
16010 2017-08-17 Richard Biener <rguenther@suse.de>
16011
16012 * tree-ssa-structalias.c (solve_graph): When propagating
16013 to successors update the graphs succ edges and avoid duplicate work.
16014
16015 2017-08-17 Maxim Ostapenko <m.ostapenko@samsung.com>
16016
16017 PR target/81861
16018 * config/i386/i386.c (ix86_option_override_internal): Save target
16019 specific options after ix86_stack_protector_guard_reg was changed.
16020
16021 2017-08-17 Richard Biener <rguenther@suse.de>
16022
16023 PR tree-optimization/81827
16024 * tree-ssa-structalias.c (struct variable_info): Add is_reg_var flag.
16025 (new_var_info): Initialize it conservatively.
16026 (get_call_vi): Mark register vars.
16027 (new_scalar_tmp_constraint_exp): Likewise.
16028 (handle_rhs_call): Likewise.
16029 (handle_const_call): Likewise.
16030 (create_function_info_for): Likewise.
16031 (solve_constraints): Sort varinfos to separate register from
16032 non-register vars to pack points-to solution bitmaps during
16033 iteration.
16034
16035 2017-08-17 Marek Polacek <polacek@redhat.com>
16036
16037 * gimplify.c (gimplify_adjust_omp_clauses): Compare with 0 instead of 1.
16038
16039 2017-08-17 Richard Biener <rguenther@suse.de>
16040
16041 * tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p
16042 to true when overflow is undefined and we saturated the result.
16043
16044 2017-08-17 Alan Modra <amodra@gmail.com>
16045
16046 PR target/80938
16047 * config/rs6000/rs6000.c (rs6000_savres_strategy): Revert 2017-08-09.
16048 Don't use store multiple if only one reg needs saving.
16049 (interesting_frame_related_regno): New function.
16050 (rs6000_frame_related): Don't emit frame info for regs that
16051 don't need saving.
16052 (rs6000_emit_epilogue): Likewise.
16053
16054 2017-08-16 Nathan Sidwell <nathan@acm.org>
16055
16056 * tree-core.h (tree_type_non_common): Rename binfo to lang_1.
16057 * tree.h (TYPE_BINFO): Use type_non_common.maxval.
16058 (TYPE_LANG_SLOT_1): Use type_non_common.lang_1, for any type.
16059 * tree.c (free_lang_data_in_type): Use else-if chain. Always
16060 clear TYPE_LANG_1. Remove obsolete member-function stripping.
16061 (find_decls_types_r): Comment about TYPE_MAX_VALUES_RAW.
16062 (verify_type): Adjust for TYPE_BINFO move.
16063 * lto-streamer-out.c (DFS::DFS_write_tree_body): No need to
16064 process TYPE_BINFO directly.
16065 (hash_tree): Likewise.
16066 * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
16067 Likewise.
16068 * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
16069 Likewise.
16070
16071 2017-08-16 David Malcolm <dmalcolm@redhat.com>
16072
16073 * diagnostic-show-locus.c (colorizer::m_caret): Remove unused field.
16074
16075 2017-08-16 Uros Bizjak <ubizjak@gmail.com>
16076
16077 PR target/46091
16078 * config/i386/i386.md (*anddi_1_btr): Change predicates of
16079 operand 0 and operand 1 to nomimmediate_operand. Add "m" constraint.
16080 Add ix86_binary_operator_ok to insn constraint.
16081 (*iordi_1_bts): Ditto.
16082 (*xordi_1_btc): Ditto.
16083 (*btsq): Change predicate of operand 0 to nonimmediate_operand.
16084 Update corresponding peephole2 pattern.
16085 (*btrq): Ditto.
16086 (*btcq): Ditto.
16087
16088 2017-08-16 Bin Cheng <bin.cheng@arm.com>
16089
16090 PR tree-optimization/81832
16091 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Don't
16092 copy loop header which has IFN_LOOP_DIST_ALIAS call.
16093
16094 2017-08-16 Marek Polacek <polacek@redhat.com>
16095
16096 PR middle/81695
16097 * fold-const.c (fold_indirect_ref_1): Restore original behavior
16098 regarding size_zero_node.
16099
16100 2017-08-16 Martin Liska <mliska@suse.cz>
16101
16102 PR target/81753
16103 * config.gcc: Respect previously set extra_objs in case
16104 of darwin target.
16105
16106 2017-08-16 Richard Sandiford <richard.sandiford@linaro.org>
16107
16108 PR tree-optimization/81835
16109 * tree-vect-loop.c (vect_is_simple_reduction): Simply checks for
16110 the phi SSA_NAME. Check that the condition in a COND_EXPR does
16111 not depend on the phi.
16112
16113 2017-08-16 Alan Modra <amodra@gmail.com>
16114
16115 * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Delete
16116 dead code.
16117
16118 2017-08-16 Alan Modra <amodra@gmail.com>
16119
16120 * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Merge..
16121 (save_reg_p): ..into this. Update all callers.
16122 (first_reg_to_save): Simplify.
16123
16124 2017-08-16 Alan Modra <amodra@gmail.com>
16125
16126 * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't restore
16127 fixed regs.
16128
16129 2017-08-15 Joseph Myers <joseph@codesourcery.com>
16130
16131 PR target/78460
16132 PR target/67712
16133 * config/sh/sh-mem.cc (sh_expand_cmpnstr): Only unroll for
16134 constant count if that count is less than 32.
16135
16136 2017-08-15 Nathan Sidwell <nathan@acm.org>
16137
16138 * gcc.c (execute): Emit friendlier message if inferior is killed
16139 by an external cause.
16140
16141 2017-08-15 Richard Biener <rguenther@suse.de>
16142
16143 PR tree-optimization/81790
16144 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Handle both
16145 CONSTRUCTORs from simplifying and VN.
16146
16147 2017-08-14 Martin Sebor <msebor@redhat.com>
16148
16149 * builtin-attrs.def: Add comments.
16150
16151 2017-08-14 Martin Sebor <msebor@redhat.com>
16152
16153 PR c/81117
16154 * doc/extend.texi (attribute nonstring): Document new attribute.
16155
16156 2017-08-14 Martin Sebor <msebor@redhat.com>
16157
16158 PR c/81117
16159 * tree-diagnostic.c (default_tree_printer): Handle %G.
16160 * gimple-pretty-print.h (percent_G_format): Declare new function.
16161 * gimple-pretty-print.c (percent_G_format): Define.
16162 * tree-pretty-print.c (percent_K_format): Add argument.
16163
16164 2017-08-14 Martin Sebor <msebor@redhat.com>
16165
16166 PR translation/79998
16167 * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
16168 Remove a stray space.
16169
16170 2017-08-14 Uros Bizjak <ubizjak@gmail.com>
16171
16172 PR target/46091
16173 * config/i386/i386.md (*anddi_1_btr): New insn_and_split pattern.
16174 (*iordi_1_bts): Ditto.
16175 (*xordi_1_btc): Ditto.
16176
16177 2017-08-14 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16178
16179 PR target/79845
16180 * config/rs6000/linux64.h (INVALID_64BIT): Use quoted strings.
16181 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
16182 Likewise.
16183 * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Use
16184 quoted strings, and make more translator-friendly.
16185 (darwin_rs6000_override_options): Likewise.
16186 (rs6000_option_override_internal): Likewise.
16187 (rs6000_return_in_memory): Fix overlong line.
16188 (init_cmulative_args): Use quoted strings, and make more
16189 translator-friendly.
16190 (rs6000_pass_by_reference): Fix overlong line.
16191 (def_builtin): Use quoted strings.
16192 (altivec_expand_predicate_builtin): Use quoted strings, and make
16193 more translator-friendly.
16194 (htm_expand_builtin): Use quoted strings.
16195 (cpu_expand_builtin): Use quoted strings, and make more
16196 translator-friendly.
16197 (altivec_expand_builtin): Likewise.
16198 (paired_expand_predicate_builtin): Likewise.
16199 (rs6000_invalid_builtin): Likewise.
16200 (builtin_function_type): Use quoted strings.
16201 (rs6000_expand_split_stack_prologue): Use quoted strings, and make
16202 more translator-friendly.
16203 (rs6000_trampoline_init): Likewise.
16204 (rs6000_handle_altivec_attribute): Likewise.
16205 (rs6000_inner_target_options): Use quoted strings.
16206 (rs6000_disable_incompatible_switches): Likewise.
16207 * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Use quoted
16208 strings, and make more translator-friendly.
16209 (SUBSUBTARGET_OVERRIDE_OPTIONS): Use quoted strings.
16210
16211 2017-08-14 Bin Cheng <bin.cheng@arm.com>
16212
16213 PR tree-optimization/81799
16214 * tree-loop-distribution.c (version_loop_by_alias_check): Force
16215 cond_expr to simple gimple operand.
16216
16217 2017-08-14 Wilco Dijkstra <wdijkstr@arm.com>
16218
16219 PR middle-end/46932
16220 * doc/sourcebuild.texi (autoincdec): Add autoincdec description.
16221
16222 2017-08-14 Georg-Johann Lay <avr@gjlay.de>
16223
16224 PR target/81754
16225 PR target/81268
16226 * config/avr/avr.opt (mgas-isr-prologues): New Var avr_gasisr_prologues.
16227 * config/avr/avr.md (gasisr, *gasisr): Use it instead of
16228 TARGET_GASISR_PROLOGUES.
16229 * config/avr/avr.c (avr_option_override): Same.
16230 (avr_pass_pre_proep::execute): Same.
16231
16232 2017-08-13 H.J. Lu <hongjiu.lu@intel.com>
16233
16234 PR target/81820
16235 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Replace
16236 frame pointer with stack pointer - UNITS_PER_WORD in debug insns.
16237
16238 2017-08-13 Uros Bizjak <ubizjak@gmail.com>
16239
16240 * config/i386/i386.md (*load_tp_<mode>): Redefine as
16241 define_insn_and_split. Split to a memory load from 0 in
16242 DEFAULT_TLS_SEG_REG address space. Merge with *load_tp_x32
16243 using PTR mode iterator.
16244 (*load_tp_x32_zext"): Redefine as define_insn_and_split.
16245 Split to a memory load from 0 in DEFAULT_TLS_SEG_REG address space.
16246 (*add_tp_<mode>): Redefine as define_insn_and_split.
16247 Split to an add with a memory load from 0 in DEFAULT_TLS_SEG_REG
16248 address space. Merge with *add_tp_x32 using PTR mode iterator.
16249 (*add_tp_x32_zext"): Redefine as define_insn_and_split.
16250 Split to an add with a memory load from 0 in
16251 DEFAULT_TLS_SEG_REG address space.
16252
16253 2017-08-12 Andrew Pinski <apinski@cavium.com>
16254
16255 * config/aarch64/aarch64-option-extensions.def (rdma):
16256 Fix feature string to what Linux prints out in /proc/cpuinfo.
16257
16258 2017-08-12 Pierre-Marie de Rodat <derodat@adacore.com>
16259
16260 PR ada/79542
16261 * dwarf2out.c (modified_type_die): For C typedef types that have
16262 an ultimate origin, process the ultimate origin instead of the
16263 input type.
16264 (gen_typedef_die): Assert that input DECLs have no ultimate
16265 origin.
16266 (gen_type_die_with_usage): For typedef variants that have an
16267 ultimate origin, just call gen_decl_die on the original DECL.
16268 (process_scope_var): Avoid creating DIEs for local typedefs and
16269 concrete static variables.
16270
16271 2017-08-12 Alan Modra <amodra@gmail.com>
16272
16273 PR target/81170
16274 PR target/81295
16275 * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
16276 match gnu-user.h startfile.
16277 (ENDFILE_LINUX_SPEC): Similarly.
16278
16279 2017-08-11 Thomas Schwinge <thomas@codesourcery.com>
16280
16281 PR lto/81430
16282 * config/nvptx/nvptx.c (nvptx_override_options_after_change):
16283 Remove function.
16284 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Remove definition.
16285
16286 2017-08-11 Tamar Christina <tamar.christina@arm.com>
16287 * config/aarch64/aarch64.md (mov<mode>): Change.
16288 (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
16289 aarch64_reg_or_fp_float into aarch64_reg_or_fp_zero.
16290 * config/aarch64/predicates.md (aarch64_reg_or_fp_float): Removed.
16291
16292 2017-08-11 Eric Botcazou <ebotcazou@adacore.com>
16293
16294 * tree-sra.c (build_access_from_expr_1): Use more precise diagnostics
16295 for storage order barriers.
16296
16297 2017-08-11 Martin Liska <mliska@suse.cz>
16298
16299 PR tree-opt/79987
16300 * tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
16301 variables of void type.
16302
16303 2017-08-11 Martin Liska <mliska@suse.cz>
16304
16305 * asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with
16306 TARGET_SUPPORTS_ALIASES.
16307 * cgraph.c (cgraph_node::create_same_body_alias): Likewise.
16308 * ipa-visibility.c (can_replace_by_local_alias): Likewise.
16309 (optimize_weakref): Likewise.
16310 * symtab.c (symtab_node::noninterposable_alias): Likewise.
16311 * varpool.c (varpool_node::create_extra_name_alias): Likewise.
16312 * defaults.h: Introduce TARGET_SUPPORTS_ALIASES.
16313
16314 2017-08-11 Martin Liska <mliska@suse.cz>
16315
16316 PR ipa/81213
16317 * config/i386/i386.c (make_resolver_func): Do complete
16318 refactoring of the function.
16319
16320 2017-08-10 Uros Bizjak <ubizjak@gmail.com>
16321
16322 PR target/81708
16323 * config/i386/i386.opt (mstack-protector-guard-symbol=): New option
16324 * config/i386/i386.c (ix86_stack_protect_guard): Use
16325 ix86_stack_protect_guard_symbol_str to generate varible declaration.
16326 * doc/invoke.texi (x86 Options): Document
16327 -mstack-protector-guard-symbol= option.
16328
16329 2017-08-10 Uros Bizjak <ubizjak@gmail.com>
16330
16331 * config/i386/i386-protos.h (ix86_split_stack_guard): New prototype.
16332 * config/i386/i386.c (ix86_split_stack_guard): New function.
16333 (ix86_xpand_split_stack_prologue): Call ix86_split_stack_guard.
16334 (ix86_legitimate_address_p) <case UNSPEC_STACK_CHECK>: Remove.
16335 (i386_asm_output_addr_const_extra) <case UNSPEC_STACK_CHECK>: Ditto.
16336 (optput_pic_addr_const): Remove UNSPEC_STACK_CHECK handling.
16337 * config/i386/i386.md (unspec): Remove UNSPEC_STACK_CHECK.
16338 (split_stack_space_check): Call ix86_split_stack_guard.
16339
16340 2017-08-10 Martin Sebor <msebor@redhat.com>
16341
16342 * print-tree.c (print_node): Print location using the established
16343 format %s:%i%i.
16344 Replace spaces with colons.
16345 (debug_raw, debug): Ditto.
16346
16347 2017-08-10 Martin Sebor <msebor@redhat.com>
16348
16349 PR c++/81586
16350 * pretty-print.c (pp_format): Correct the handling of %s precision.
16351
16352 2017-08-10 H.J. Lu <hongjiu.lu@intel.com>
16353
16354 PR target/81736
16355 * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
16356 to ...
16357 (ix86_finalize_stack_frame_flags): This. Also clear
16358 frame_pointer_needed if -fno-omit-frame-pointer is used without
16359 stack access.
16360 (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
16361 with ix86_finalize_stack_frame_flags.
16362 (ix86_expand_epilogue): Likewise.
16363 (ix86_expand_split_stack_prologue): Likewise.
16364 * doc/invoke.texi: Add a note for -fno-omit-frame-pointer.
16365
16366 2017-08-10 Martin Liska <mliska@suse.cz>
16367
16368 PR c++/81355
16369 * c-attribs.c (handle_target_attribute):
16370 Report warning for an empty string argument of target attribute.
16371
16372 2017-08-09 Jakub Jelinek <jakub@redhat.com>
16373
16374 PR c/81687
16375 * omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
16376 LABEL_DECLs.
16377 * tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
16378 or DECL_NONLOCAL labels.
16379 (move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
16380 or DECL_NONLOCAL labels here.
16381
16382 2017-08-09 Will Schmidt <will_schmidt@vnet.ibm.com>
16383
16384 * config/rs6000/rs6000.c (rs6000_option_override_internal): Add blurb
16385 to indicate when early gimple folding has been disabled.
16386 (rs6000_gimple_fold_builtin): Add debug content.
16387 (rs6000_invalid_builtin): Fix whitespace.
16388 (rs6000_expand_builtin): Fix whitespace.
16389 * config/rs6000/rs6000.opt: Add option for -mfold-gimple.
16390
16391 2017-08-09 Segher Boessenkool <segher@kernel.crashing.org>
16392
16393 PR target/80938
16394 * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't use
16395 SAVE_MULTIPLE if not all the registers that saves, should be saved.
16396
16397 2017-08-09 Jim Wilson <jim.wilson@linaro.org>
16398
16399 * config/aarch64/aarch64-cores.def (falkor): Use falkor pipeline.
16400 (qdf24xx): Likewise.
16401 * config/aarch64/aarch64.md: Include falkor.md.
16402 * config/aarch64/falkor.md: New.
16403
16404 2017-08-09 Marek Polacek <polacek@redhat.com>
16405
16406 PR c/81233
16407 * diagnostic-core.h (emit_diagnostic_valist): Add declaration.
16408 * diagnostic.c (emit_diagnostic): Add a comment.
16409 (emit_diagnostic_valist): New function.
16410
16411 2017-08-09 Marek Polacek <polacek@redhat.com>
16412
16413 PR c/81417
16414 * input.c (make_location): New overload.
16415 * input.h (make_location): Declare.
16416
16417 2017-08-08 Alan Modra <amodra@gmail.com>
16418 H.J. Lu <hongjiu.lu@intel.com>
16419
16420 PR driver/81523
16421 * gcc.c (NO_PIE_SPEC): Delete.
16422 (PIE_SPEC): Define as !no-pie/pie. Move static|shared|r
16423 exclusion..
16424 (LINK_PIE_SPEC): ..to here.
16425 (LINK_COMMAND_SPEC): Support -no-pie.
16426 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
16427 chain of crtbegin*.o selection, update for PIE_SPEC changes and
16428 format.
16429 (GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
16430 * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
16431 (ENDFILE_CRTEND_SPEC): Similarly.
16432
16433 2017-08-08 Uros Bizjak <ubizjak@gmail.com>
16434
16435 PR target/81708
16436 * config/i386/i386.opt (mstack-protector-guard-reg=): New option
16437 (mstack-protector-guard-offset=): Ditto.
16438 * config/i386/i386.c (ix86_option_override): Handle
16439 -mstack-protector-guard-reg= and -mstack-protector-guard-offset=
16440 options.
16441 (ix86_stack_protect_guard): Use ix86_stack_protect_guard_reg and
16442 ix86_stack_protect_guard_offset variables.
16443 (TARGET_STACK_PROTECT_GUARD): Always define.
16444 * doc/invoke.texi (x86 Options): Document -mstack-protector-guard-reg=
16445 and -mstack-protector-guard-offset= options.
16446
16447 2017-08-08 Bin Cheng <bin.cheng@arm.com>
16448
16449 * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle
16450 boundary case for the last candidate.
16451
16452 2017-08-08 Bin Cheng <bin.cheng@arm.com>
16453
16454 * doc/invoke.texi: Document -ftree-loop-distribution for O3.
16455 * opts.c (default_options_table): Add OPT_ftree_loop_distribution.
16456
16457 2017-08-08 Tamar Christina <tamar.christina@arm.com>
16458
16459 PR middle-end/19706
16460 * config/aarch64/aarch64.md (xorsign<mode>3): New optabs.
16461 * config/aarch64/aarch64-builtins.c
16462 (aarch64_builtin_vectorized_function): Added CASE_CFN_XORSIGN.
16463 * config/aarch64/aarch64-simd-builtins.def: Added xorsign BINOP.
16464 * config/aarch64/aarch64-simd.md: Added xorsign<mode>3
16465
16466 2017-08-08 Tamar Christina <tamar.christina@arm.com>
16467 Andrew Pinski <pinskia@gmail.com>
16468
16469 PR middle-end/19706
16470 * internal-fn.def (XORSIGN): New.
16471 * optabs.def (xorsign_optab): New.
16472 * tree-ssa-math-opts.c (is_copysign_call_with_1): New.
16473 (convert_expand_mult_copysign): New.
16474 (pass_optimize_widening_mul::execute): Call
16475 convert_expand_mult_copysign.
16476
16477 2017-08-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16478
16479 PR tree-optimization/81354
16480 * gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
16481 Insert on edges rather than explicitly creating landing pads.
16482 (analyze_candidates_and_replace): Commit edge inserts.
16483
16484 2017-08-08 Richard Biener <rguenther@suse.de>
16485
16486 PR middle-end/81719
16487 * tree-ssa-loop-niter.c: Include tree-dfa.h.
16488 (expand_simple_operations): Also look through ADDR_EXPRs with
16489 MEM_REF bases treating them as POINTER_PLUS_EXPR.
16490
16491 2017-08-08 Richard Biener <rguenther@suse.de>
16492
16493 PR tree-optimization/81723
16494 * tree-vect-slp.c (struct bst_traits): New hash traits.
16495 (bst_fail): New global.
16496 (vect_build_slp_tree_2): New worker, split out from ...
16497 (vect_build_slp_tree): ... this now wrapping it with using
16498 bst_fail set to cache SLP tree build fails. Properly handle
16499 max_tree_size.
16500 (vect_analyze_slp_instance): Allocate and free bst_fail.
16501
16502 2017-08-08 Martin Liska <mliska@suse.cz>
16503
16504 PR tree-opt/81696
16505 * ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
16506 LABEL_DECLs that can be from a different function.
16507
16508 2017-08-08 Bin Cheng <bin.cheng@arm.com>
16509
16510 PR tree-optimization/81744
16511 * tree-predcom.c (prepare_finalizers_chain): Deep copy expr of
16512 loop's number of iterations.
16513
16514 2017-08-08 Martin Liska <mliska@suse.cz>
16515
16516 * asan.c: Include header files.
16517 * attribs.c (build_decl_attribute_variant): New function moved
16518 from tree.[ch].
16519 (build_type_attribute_qual_variant): Likewise.
16520 (cmp_attrib_identifiers): Likewise.
16521 (simple_cst_list_equal): Likewise.
16522 (omp_declare_simd_clauses_equal): Likewise.
16523 (attribute_value_equal): Likewise.
16524 (comp_type_attributes): Likewise.
16525 (build_type_attribute_variant): Likewise.
16526 (lookup_ident_attribute): Likewise.
16527 (remove_attribute): Likewise.
16528 (merge_attributes): Likewise.
16529 (merge_type_attributes): Likewise.
16530 (merge_decl_attributes): Likewise.
16531 (merge_dllimport_decl_attributes): Likewise.
16532 (handle_dll_attribute): Likewise.
16533 (attribute_list_equal): Likewise.
16534 (attribute_list_contained): Likewise.
16535 * attribs.h (lookup_attribute): New function moved from tree.[ch].
16536 (lookup_attribute_by_prefix): Likewise.
16537 * bb-reorder.c: Include header files.
16538 * builtins.c: Likewise.
16539 * calls.c: Likewise.
16540 * cfgexpand.c: Likewise.
16541 * cgraph.c: Likewise.
16542 * cgraphunit.c: Likewise.
16543 * convert.c: Likewise.
16544 * dwarf2out.c: Likewise.
16545 * final.c: Likewise.
16546 * fold-const.c: Likewise.
16547 * function.c: Likewise.
16548 * gimple-expr.c: Likewise.
16549 * gimple-fold.c: Likewise.
16550 * gimple-pretty-print.c: Likewise.
16551 * gimple.c: Likewise.
16552 * gimplify.c: Likewise.
16553 * hsa-common.c: Likewise.
16554 * hsa-gen.c: Likewise.
16555 * internal-fn.c: Likewise.
16556 * ipa-chkp.c: Likewise.
16557 * ipa-cp.c: Likewise.
16558 * ipa-devirt.c: Likewise.
16559 * ipa-fnsummary.c: Likewise.
16560 * ipa-inline.c: Likewise.
16561 * ipa-visibility.c: Likewise.
16562 * ipa.c: Likewise.
16563 * lto-cgraph.c: Likewise.
16564 * omp-expand.c: Likewise.
16565 * omp-general.c: Likewise.
16566 * omp-low.c: Likewise.
16567 * omp-offload.c: Likewise.
16568 * omp-simd-clone.c: Likewise.
16569 * opts-global.c: Likewise.
16570 * passes.c: Likewise.
16571 * predict.c: Likewise.
16572 * sancov.c: Likewise.
16573 * sanopt.c: Likewise.
16574 * symtab.c: Likewise.
16575 * toplev.c: Likewise.
16576 * trans-mem.c: Likewise.
16577 * tree-chkp.c: Likewise.
16578 * tree-eh.c: Likewise.
16579 * tree-into-ssa.c: Likewise.
16580 * tree-object-size.c: Likewise.
16581 * tree-parloops.c: Likewise.
16582 * tree-profile.c: Likewise.
16583 * tree-ssa-ccp.c: Likewise.
16584 * tree-ssa-live.c: Likewise.
16585 * tree-ssa-loop.c: Likewise.
16586 * tree-ssa-sccvn.c: Likewise.
16587 * tree-ssa-structalias.c: Likewise.
16588 * tree-ssa.c: Likewise.
16589 * tree-streamer-in.c: Likewise.
16590 * tree-vectorizer.c: Likewise.
16591 * tree-vrp.c: Likewise.
16592 * tsan.c: Likewise.
16593 * ubsan.c: Likewise.
16594 * varasm.c: Likewise.
16595 * varpool.c: Likewise.
16596 * tree.c: Remove functions moved to attribs.[ch].
16597 * tree.h: Likewise.
16598 * config/aarch64/aarch64.c: Add attrs.h header file.
16599 * config/alpha/alpha.c: Likewise.
16600 * config/arc/arc.c: Likewise.
16601 * config/arm/arm.c: Likewise.
16602 * config/avr/avr.c: Likewise.
16603 * config/bfin/bfin.c: Likewise.
16604 * config/c6x/c6x.c: Likewise.
16605 * config/cr16/cr16.c: Likewise.
16606 * config/cris/cris.c: Likewise.
16607 * config/darwin.c: Likewise.
16608 * config/epiphany/epiphany.c: Likewise.
16609 * config/fr30/fr30.c: Likewise.
16610 * config/frv/frv.c: Likewise.
16611 * config/ft32/ft32.c: Likewise.
16612 * config/h8300/h8300.c: Likewise.
16613 * config/i386/winnt.c: Likewise.
16614 * config/ia64/ia64.c: Likewise.
16615 * config/iq2000/iq2000.c: Likewise.
16616 * config/lm32/lm32.c: Likewise.
16617 * config/m32c/m32c.c: Likewise.
16618 * config/m32r/m32r.c: Likewise.
16619 * config/m68k/m68k.c: Likewise.
16620 * config/mcore/mcore.c: Likewise.
16621 * config/microblaze/microblaze.c: Likewise.
16622 * config/mips/mips.c: Likewise.
16623 * config/mmix/mmix.c: Likewise.
16624 * config/mn10300/mn10300.c: Likewise.
16625 * config/moxie/moxie.c: Likewise.
16626 * config/msp430/msp430.c: Likewise.
16627 * config/nds32/nds32-isr.c: Likewise.
16628 * config/nds32/nds32.c: Likewise.
16629 * config/nios2/nios2.c: Likewise.
16630 * config/nvptx/nvptx.c: Likewise.
16631 * config/pa/pa.c: Likewise.
16632 * config/pdp11/pdp11.c: Likewise.
16633 * config/powerpcspe/powerpcspe.c: Likewise.
16634 * config/riscv/riscv.c: Likewise.
16635 * config/rl78/rl78.c: Likewise.
16636 * config/rx/rx.c: Likewise.
16637 * config/s390/s390.c: Likewise.
16638 * config/sh/sh.c: Likewise.
16639 * config/sol2.c: Likewise.
16640 * config/sparc/sparc.c: Likewise.
16641 * config/spu/spu.c: Likewise.
16642 * config/stormy16/stormy16.c: Likewise.
16643 * config/tilegx/tilegx.c: Likewise.
16644 * config/tilepro/tilepro.c: Likewise.
16645 * config/v850/v850.c: Likewise.
16646 * config/vax/vax.c: Likewise.
16647 * config/visium/visium.c: Likewise.
16648 * config/xtensa/xtensa.c: Likewise.
16649
16650 2017-08-07 Michael Meissner <meissner@linux.vnet.ibm.com>
16651
16652 PR target/81593
16653 * config/rs6000/vsx.md (vsx_concat_<mode>, VSX_D): Cleanup
16654 constraints since the -mupper-regs-* switches have been
16655 eliminated.
16656 (vsx_concat_<mode>_1): New combiner insns to recognize inserting
16657 into a vector from a double word element that was extracted from
16658 another vector, and eliminate extra XXPERMDI instructions.
16659 (vsx_concat_<mode>_2): Likewise.
16660 (vsx_concat_<mode>_3): Likewise.
16661 (vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
16662 concat to allow optimizing inserts from previous extracts.
16663
16664 2017-08-07 Uros Bizjak <ubizjak@gmail.com>
16665
16666 * config/i386/i386.c (ix86_stack_protect_guard): Generate
16667 memory reference to a SSP offset in TLS address space.
16668 (ix86_print_operand) <case '@'>: Remove.
16669 (ix86_print_operand_punct_valid_p): Remove '@' code.
16670 * config/i386/i386.md (unspec): Remove UNSPEC_SP_TLS_SET and
16671 UNSPEC_SP_TLS_TEST.
16672 (stack_tls_protect_set_<mode>): Remove.
16673 (stack_protect_set): Do not call gen_stack_tls_protect_set_<mode>.
16674 (stack_tls_protect_test_<mode>): Remove.
16675 (stack_protect_test): Do not call gen_stack_tls_protect_test_<mode>.
16676
16677 2017-08-07 Olivier Hainque <hainque@adacore.com>
16678
16679 PR target/81755
16680 * config/vxworksae.h (VXWORKS_HAVE_TLS): Define.
16681
16682 2017-08-07 Douglas Rupp <rupp@adacore.com>
16683
16684 * Makefile.in (install-mkheaders): Fix typo, where the multi_dir
16685 variable was referenced as multidir in command.
16686
16687 2017-08-07 Jakub Jelinek <jakub@redhat.com>
16688
16689 PR c/69389
16690 * gimplify.c (goa_stabilize_expr): Handle BIT_INSERT_EXPR and
16691 BIT_FIELD_REF.
16692
16693 2017-08-07 Martin Liska <mliska@suse.cz>
16694
16695 * config/m32c/m32c.c: Add include of stringpool.h and attribs.h.
16696 * config/rl78/rl78.c: Add include of attribs.h.
16697 * config/sh/sh.c: Likewise.
16698 * config/v850/v850.c: Likewise.
16699
16700 2017-08-07 Tom de Vries <tom@codesourcery.com>
16701
16702 PR middle-end/78266
16703 * omp-expand.c (expand_oacc_for): Ensure diff_type is large enough.
16704
16705 2017-08-07 Martin Liska <mliska@suse.cz>
16706
16707 * config/mips/mips.c: Include attribs.h.
16708
16709 2017-08-07 Thomas Koenig <tkoenig@gcc.gnu.org>
16710
16711 PR fortran/68829
16712 * doc/invoke.texi: Document change in behvaior for -Ofast for
16713 Fortran.
16714
16715 2017-08-07 Wilco Dijkstra <wdijkstr@arm.com>
16716
16717 * config/aarch64/aarch64.c (aarch64_pushwb_single_reg):
16718 Use gen_frame_mem.
16719 (aarch64_pop_regs): Likewise.
16720 (aarch64_gen_load_pair): Likewise.
16721 (aarch64_save_callee_saves): Likewise.
16722 (aarch64_restore_callee_saves): Likewise.
16723
16724 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
16725
16726 * config/i386/i386.c: Revert the last change.
16727
16728 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
16729
16730 PR target/81736
16731 * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
16732 to ...
16733 (ix86_finalize_stack_frame_flags): This. Also clear
16734 frame_pointer_needed if -fno-omit-frame-pointer is used without
16735 stack access.
16736 (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
16737 with ix86_finalize_stack_frame_flags.
16738 (ix86_expand_epilogue): Likewise.
16739 (ix86_expand_split_stack_prologue): Likewise.
16740
16741 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
16742
16743 PR target/81743
16744 * config/i386/i386.c (get_builtin_code_for_version): Set priority
16745 to P_AES for Westmere.
16746
16747 2017-08-07 Jonathan Yong <10walls@gmail.com>
16748
16749 * config/i386/mingw.opt (fset-stack-executable): Removed.
16750 * config/i386/cygming.opt (fset-stack-executable): Moved
16751 from mingw.opt.
16752 * config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED.
16753
16754 2017-08-07 Segher Boessenkool <segher@kernel.crashing.org>
16755
16756 * print-rtl.c (print_exp): Print NOT as "~" instead of as "!".
16757
16758 2017-08-07 Marek Polacek <polacek@redhat.com>
16759
16760 PR middle-end/81737
16761 * fold-const.c (fold_indirect_ref_1): Check type_domain.
16762
16763 2017-08-07 Martin Liska <mliska@suse.cz>
16764
16765 * attribs.h (canonicalize_attr_name): New function.
16766 (cmp_attribs): Move from c-format.c and adjusted.
16767 (is_attribute_p): Moved from tree.h.
16768 * tree-inline.c: Add new includes.
16769 * tree.c (cmp_attrib_identifiers): Use cmp_attribs.
16770 (private_is_attribute_p): Remove.
16771 (private_lookup_attribute): Likewise.
16772 (private_lookup_attribute_by_prefix): Simplify.
16773 (remove_attribute): Use is_attribute_p.
16774 * tree.h: Remove removed declarations.
16775
16776 2017-08-07 Jakub Jelinek <jakub@redhat.com>
16777
16778 PR middle-end/81698
16779 * stmt.c (emit_case_dispatch_table): Add DEFAULT_EDGE argument,
16780 instead of computing it in the function. Formatting fix.
16781 (expand_case): Don't rely on default_edge being the first edge,
16782 clear it if removing it, pass default_edge to
16783 emit_case_dispatch_table.
16784 (expand_sjlj_dispatch_table): Pass NULL as DEFAULT_EDGE, formatting
16785 fix.
16786
16787 2017-08-06 Uros Bizjak <ubizjak@gmail.com>
16788
16789 * config/alpha/alpha.c (alpha_reorg): If trap is the last active
16790 insn in the function, emit NOP after the insn.
16791
16792 2017-08-06 Tom de Vries <tom@codesourcery.com>
16793
16794 * omp-expand.c (expand_oacc_for): Add missing edge probability for tile
16795 and element loops.
16796
16797 2017-08-06 Tom de Vries <tom@codesourcery.com>
16798
16799 * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk
16800 loop.
16801
16802 2017-08-04 Yury Gribov <tetra2005@gmail.com>
16803
16804 PR tree-optimization/57371
16805 * match.pd: New pattern.
16806
16807 2017-08-04 Marek Polacek <polacek@redhat.com>
16808
16809 PR middle-end/81695
16810 * fold-const.c (fold_indirect_ref_1): For ((int *)&a + 4 -> a[1],
16811 perform the computation in offset_int.
16812
16813 2017-08-04 Richard Sandiford <richard.sandiford@linaro.org>
16814
16815 PR tree-optimization/81136
16816 * tree-vectorizer.h: Include tree-hash-traits.h.
16817 (vec_base_alignments): New typedef.
16818 (vec_info): Add a base_alignments field.
16819 (vect_record_base_alignments): Declare.
16820 * tree-data-ref.h (data_reference): Add an is_conditional_in_stmt
16821 field.
16822 (DR_IS_CONDITIONAL_IN_STMT): New macro.
16823 (create_data_ref): Add an is_conditional_in_stmt argument.
16824 * tree-data-ref.c (create_data_ref): Likewise. Use it to initialize
16825 the is_conditional_in_stmt field.
16826 (data_ref_loc): Add an is_conditional_in_stmt field.
16827 (get_references_in_stmt): Set the is_conditional_in_stmt field.
16828 (find_data_references_in_stmt): Update call to create_data_ref.
16829 (graphite_find_data_references_in_stmt): Likewise.
16830 * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
16831 * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
16832 (vect_record_base_alignment): New function.
16833 (vect_record_base_alignments): Likewise.
16834 (vect_compute_data_ref_alignment): Adjust base_addr and aligned_to
16835 for nested statements even if we fail to compute a misalignment.
16836 Use pooled base alignments for unconditional references.
16837 (vect_find_same_alignment_drs): Compare base addresses instead
16838 of base objects.
16839 (vect_analyze_data_refs_alignment): Call vect_record_base_alignments.
16840 * tree-vect-slp.c (vect_slp_analyze_bb_1): Likewise.
16841
16842 2017-08-04 Richard Sandiford <richard.sandiford@linaro.org>
16843
16844 * tree-vectorizer.h (vec_info): Add a constructor and destructor.
16845 Add an explicit name for the enum. Use auto_vec for slp_instances
16846 and grouped_stores.
16847 (_loop_vec_info): Add a constructor and destructor. Use auto_vec
16848 for all vectors.
16849 (_bb_vec_info): Add a constructor and destructor.
16850 (vinfo_for_stmt): Return NULL for uids of -1 as well.
16851 (destroy_loop_vec_info): Delete.
16852 (vect_destroy_datarefs): Likewise.
16853 * tree-vectorizer.c (vect_destroy_datarefs): Delete.
16854 (vec_info::vec_info): New function.
16855 (vec_info::~vec_info): Likewise.
16856 (vectorize_loops): Use delete instead of destroy_loop_vec_info.
16857 * tree-parloops.c (gather_scalar_reductions): Use delete instead of
16858 destroy_loop_vec_info.
16859 * tree-vect-loop.c (new_loop_vec_info): Replace with...
16860 (_loop_vec_info::_loop_vec_info): ...this.
16861 (destroy_loop_vec_info): Replace with...
16862 (_loop_vec_info::~_loop_vec_info): ...this. Unconditionally delete
16863 the stmt_vec_infos. Leave handling of vec_info information to its
16864 destructor. Remove explicit vector releases.
16865 (vect_analyze_loop_form): Use new instead of new_loop_vec_info.
16866 (vect_analyze_loop): Use delete instead of destroy_loop_vec_info.
16867 * tree-vect-slp.c (new_bb_vec_info): Replace with...
16868 (_bb_vec_info::_bb_vec_info): ...this. Don't reserve space in
16869 BB_VINFO_GROUPED_STORES or BB_VINFO_SLP_INSTANCES.
16870 (destroy_bb_vec_info): Replace with...
16871 (_bb_vec_info::~_bb_vec_info): ...this. Leave handling of vec_info
16872 information to its destructor.
16873 (vect_slp_analyze_bb_1): Use new and delete instead of
16874 new_bb_vec_info and destroy_bb_vec_info.
16875 (vect_slp_bb): Replace 2 calls to destroy_bb_vec_info with a
16876 single delete.
16877
16878 2017-08-04 Richard Sandiford <richard.sandiford@linaro.org>
16879
16880 * tree-data-ref.h (subscript): Add access_fn field.
16881 (data_dependence_relation): Add could_be_independent_p.
16882 (SUB_ACCESS_FN, DDR_COULD_BE_INDEPENDENT_P): New macros.
16883 (same_access_functions): Move to tree-data-ref.c.
16884 * tree-data-ref.c (ref_contains_union_access_p): New function.
16885 (access_fn_component_p): Likewise.
16886 (access_fn_components_comparable_p): Likewise.
16887 (dr_analyze_indices): Add a reference to access_fn_component_p.
16888 (dump_data_dependence_relation): Use SUB_ACCESS_FN instead of
16889 DR_ACCESS_FN.
16890 (constant_access_functions): Likewise.
16891 (add_other_self_distances): Likewise.
16892 (same_access_functions): Likewise. (Moved from tree-data-ref.h.)
16893 (initialize_data_dependence_relation): Use XCNEW and remove
16894 explicit zeroing of DDR_REVERSED_P. Look for a subsequence
16895 of access functions that have the same type. Allow the
16896 subsequence to end with different bases in some circumstances.
16897 Record the chosen access functions in SUB_ACCESS_FN.
16898 (build_classic_dist_vector_1): Replace ddr_a and ddr_b with
16899 a_index and b_index. Use SUB_ACCESS_FN instead of DR_ACCESS_FN.
16900 (subscript_dependence_tester_1): Likewise dra and drb.
16901 (build_classic_dist_vector): Update calls accordingly.
16902 (subscript_dependence_tester): Likewise.
16903 * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Check
16904 DDR_COULD_BE_INDEPENDENT_P.
16905 * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Test
16906 comp_alias_ddrs instead of may_alias_ddrs.
16907 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
16908 New function.
16909 (vect_analyze_data_ref_dependence): Use it if
16910 DDR_COULD_BE_INDEPENDENT_P, but fall back to using the recorded
16911 distance vectors if that fails.
16912 (dependence_distance_ge_vf): New function.
16913 (vect_prune_runtime_alias_test_list): Use it. Don't clear
16914 LOOP_VINFO_MAY_ALIAS_DDRS.
16915
16916 2017-08-04 Richard Biener <rguenther@suse.de>
16917
16918 PR middle-end/81705
16919 * fold-const.c (fold_binary_loc): Properly restrict
16920 minus_var0 && minus_var1 case when associating undefined overflow
16921 entities.
16922
16923 2017-08-04 Tom de Vries <tom@codesourcery.com>
16924
16925 * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability.
16926
16927 2017-08-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16928
16929 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
16930 Don't start diagnostic messages with a capital letter.
16931 * config/rs6000/rs6000.c (rs6000_option_override_internal):
16932 Likewise.
16933 (rs6000_invalid_builtin): Likewise.
16934 (rs6000_trampoline_init): Likewise.
16935
16936 2017-08-03 Jakub Jelinek <jakub@redhat.com>
16937
16938 PR target/81621
16939 * bb-reorder.c (pass_partition_blocks::execute): Return TODO_df_finish
16940 after setting changeable df flags.
16941
16942 2017-08-03 Richard Biener <rguenther@suse.de>
16943
16944 * tree-ssa-reassoc.c (should_break_up_subtract): Also break
16945 up if the use is in USE - X.
16946
16947 2017-08-03 Alexander Monakov <amonakov@ispras.ru>
16948
16949 * toplev.c (dumpfile.h): New include.
16950 (internal_error_reentered): New static function. Use it...
16951 (internal_error_function): ...here to handle reentered internal_error.
16952
16953 2017-08-03 Richard Biener <rguenther@suse.de>
16954
16955 PR middle-end/81148
16956 * fold-const.c (split_tree): Add minus_var and minus_con
16957 arguments, remove unused loc arg. Never generate NEGATE_EXPRs
16958 here but always use minus_*.
16959 (associate_trees): Assert we never associate with MINUS_EXPR
16960 and NULL first operand. Do not recurse for PLUS_EXPR operands
16961 when associating as MINUS_EXPR either.
16962 (fold_binary_loc): Track minus_var and minus_con.
16963
16964 2017-08-03 Tom de Vries <tom@codesourcery.com>
16965
16966 PR lto/81430
16967 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): If
16968 ACCEL_COMPILER, apply finish_options on
16969 DECL_FUNCTION_SPECIFIC_OPTIMIZATION.
16970
16971 2017-08-03 Tom de Vries <tom@codesourcery.com>
16972
16973 PR target/81662
16974 * config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if
16975 function_entry_patch_area_size > 0.
16976
16977 2017-08-03 Jakub Jelinek <jakub@redhat.com>
16978
16979 PR driver/81650
16980 * calls.c (alloc_max_size): Use HOST_WIDE_INT_UC (10??)
16981 instead of 10??LU, perform unit multiplication in wide_int,
16982 don't change alloc_object_size_limit if the limit is larger
16983 than SSIZE_MAX.
16984
16985 PR tree-optimization/81655
16986 PR tree-optimization/81588
16987 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Handle also
16988 the case when ranges[i].low and high are 1 for unsigned type with
16989 precision 1.
16990
16991 PR middle-end/81052
16992 * omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
16993 (pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.
16994
16995 2017-08-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16996
16997 * tree-vrp.h: Add include guard.
16998
16999 2017-08-02 Uros Bizjak <ubizjak@gmail.com>
17000
17001 PR target/81644
17002 * config/i386/i386.md (unspecv): Add UNSPECV_UD2.
17003 (ud2): New insn pattern.
17004 * config/i386/i386.c (ix86_expand_epilogue):
17005 For naked functions, generate ud2 instead of trap insn.
17006
17007 2017-08-02 Marek Polacek <polacek@redhat.com>
17008
17009 PR other/81667
17010 * alloc-pool.h (base_pool_allocator): Initialize m_elt_size.
17011
17012 2017-08-02 Tom de Vries <tom@codesourcery.com>
17013 Cesar Philippidis <cesar@codesourcery.com>
17014
17015 * config/nvptx/nvptx.c (nvptx_lockless_update, nvptx_lockfull_update):
17016 Add missing edge probabilities.
17017
17018 2017-08-02 Tamar Christina <tamar.christina@arm.com>
17019
17020 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
17021 Correct endianness.
17022
17023 2017-08-02 Jakub Jelinek <jakub@redhat.com>
17024
17025 PR middle-end/79499
17026 * function.c (thread_prologue_and_epilogue_insns): Determine blocks
17027 for find_many_sub_basic_blocks bitmap by looking up BLOCK_FOR_INSN
17028 of first NONDEBUG_INSN_P in each of the split_prologue_seq and
17029 prologue_seq sequences - if any.
17030
17031 2017-08-02 Richard Biener <rguenther@suse.de>
17032
17033 * tree-vect-stmts.c (vectorizable_store): Perform vector extracts
17034 via vectors if supported, integer extracts via punning if supported
17035 or otherwise vector extracts.
17036
17037 2017-08-02 Richard Biener <rguenther@suse.de>
17038
17039 * tree-ssa-pre.c (bitmap_insert_into_set_1): Remove and inline
17040 into ...
17041 (bitmap_insert_into_set): ... this.
17042
17043 2017-08-02 Richard Biener <rguenther@suse.de>
17044
17045 PR tree-optimization/81633
17046 Revert
17047 2015-08-17 Alan Hayward <alan.hayward@arm.com>
17048
17049 PR tree-optimization/71752
17050 * tree-vect-slp.c (vect_get_slp_defs): Handle null operands.
17051
17052 2017-08-01 Daniel Santos <daniel.santos@pobox.com>
17053
17054 * config/i386/i386.h (ix86_frame::outlined_save_offset): Remove field.
17055 (machine_function::call_ms2sysv_pad_out): Remove field.
17056 * config/i386/i386.c (xlogue_layout::get_stack_space_used): Modify.
17057 (ix86_compute_frame_layout): Likewise.
17058
17059 2017-08-01 H.J. Lu <hongjiu.lu@intel.com>
17060
17061 PR target/81654
17062 * config/i386/i386.c (ix86_set_func_type): Disallow naked
17063 attribute with interrupt attribute.
17064
17065 2017-08-01 Andrew Pinski <apinski@cavium.com>
17066
17067 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Check
17068 BIT_INSERT_EXPR's operand 1
17069 to see if the types precision matches.
17070
17071 2017-08-01 Martin Liska <mliska@suse.cz>
17072
17073 PR middle-end/70140
17074 * builtins.c (expand_builtin_memcpy_args): Remove.
17075 (expand_builtin_memcpy): Call newly added function
17076 expand_builtin_memory_copy_args.
17077 (expand_builtin_memcpy_with_bounds): Likewise.
17078 (expand_builtin_mempcpy): Remove last argument.
17079 (expand_builtin_mempcpy_with_bounds): Likewise.
17080 (expand_builtin_memory_copy_args): New function created from
17081 expand_builtin_mempcpy_args with small modifications.
17082 (expand_builtin_mempcpy_args): Remove.
17083 (expand_builtin_stpcpy): Remove unused argument.
17084 (expand_builtin): Likewise.
17085 (expand_builtin_with_bounds): Likewise.
17086
17087 2017-08-01 Martin Liska <mliska@suse.cz>
17088
17089 Revert r250771
17090 Make mempcpy more optimal (PR middle-end/70140).
17091
17092 2017-08-01 Jakub Jelinek <jakub@redhat.com>
17093
17094 PR target/81622
17095 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
17096 __builtin_vec_cmpne verify both arguments are compatible vectors
17097 before looking at TYPE_MODE on the element type. For __builtin_vec_ld
17098 verify arg1_type is a pointer or array type. For __builtin_vec_st,
17099 move computation of aligned to after checking the argument types.
17100 Formatting fixes.
17101
17102 PR target/80846
17103 * config/rs6000/vsx.md (vextract_fp_from_shorth,
17104 vextract_fp_from_shortl): Add element mode after mode in gen_vec_init*
17105 calls.
17106
17107 2017-08-01 Jerome Lambourg <lambourg@adacore.com>
17108 Doug Rupp <rupp@adacore.com>
17109 Olivier Hainque <hainque@adacore.com>
17110
17111 * config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as
17112 well as arm-wrs-vxworks. Update target_cpu_name from arm6 (arch v3) to
17113 arm8 (arch v4).
17114 * config/arm/vxworks.h (MAYBE_TARGET_BPABI_CPP_BUILTINS): New, helper
17115 for TARGET_OS_CPP_BUILTIN.
17116 (TARGET_OS_CPP_BUILTIN): Invoke MAYBE_TARGET_BPABI_CPP_BUILTINS(),
17117 refine CPU definitions for arm_arch5 and add those for arm_arch6 and
17118 arm_arch7.
17119 (MAYBE_ASM_ABI_SPEC): New, helper for SUBTARGET_EXTRA_ASM_SPEC,
17120 passing required abi options to the assembler for EABI configurations.
17121 (EXTRA_CC1_SPEC): New macro, to help prevent the implicit production
17122 of .text.hot and .text.unlikely sections for kernel modules when
17123 using ARM style exceptions.
17124 (CC1_SPEC): Remove obsolete attempt at mimicking Diab toolchain
17125 options. Add EXTRA_CC1_SPEC.
17126 (VXWORKS_ENDIAN_SPEC): Adjust comment and remove handling of Diab
17127 toolchain options.
17128 (DWARF2_UNWIND_INFO): Redefine to handle the pre/post VxWorks 7
17129 transition.
17130 (ARM_TARGET2_DWARF_FORMAT): Define.
17131 * config/arm/t-vxworks: Adjust multilib control to removal of the
17132 Diab command line options.
17133
17134 2017-08-01 Martin Liska <mliska@suse.cz>
17135
17136 PR gcov-profile/81561
17137 * gcov.c (unblock): Make unblocking safe as we need to preserve
17138 index correspondence of blocks and block_lists.
17139
17140 2017-08-01 Richard Biener <rguenther@suse.de>
17141
17142 PR tree-optimization/81181
17143 * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
17144 (compute_antic): ... end of iteration here.
17145
17146 2017-08-01 James Greenhalgh <james.greenhalgh@arm.com>
17147
17148 * common.opt (ftree-vectorize): No longer set flag_tree_vectorize.
17149 (ftree-loop-vectorize): Set as EnabledBy ftree-vectorize.
17150 (ftree-slp-vectorize): Likewise.
17151 * omp-expand (expand_omp_simd): Remove flag_tree_vectorize, as it
17152 can no longer be set independent of flag_tree_loop_vectorize.
17153 * omp-general.c (emp_max_vf): Likewise.
17154 * opts.c (enable_fdo_optimizations): Remove references to
17155 flag_tree_vectorize, these are now implicit.
17156 (common_handle_option): Remove handling for OPT_ftree_vectorize,
17157 and leave it for the options machinery.
17158
17159 2017-08-01 Martin Liska <mliska@suse.cz>
17160
17161 PR middle-end/70140
17162 * builtins.c (expand_builtin_memcpy_args): Remove.
17163 (expand_builtin_memcpy): Call newly added function
17164 expand_builtin_memory_copy_args.
17165 (expand_builtin_memcpy_with_bounds): Likewise.
17166 (expand_builtin_mempcpy): Remove last argument.
17167 (expand_builtin_mempcpy_with_bounds): Likewise.
17168 (expand_builtin_memory_copy_args): New function created from
17169 expand_builtin_mempcpy_args with small modifications.
17170 (expand_builtin_mempcpy_args): Remove.
17171 (expand_builtin_stpcpy): Remove unused argument.
17172 (expand_builtin): Likewise.
17173 (expand_builtin_with_bounds): Likewise.
17174
17175 2017-08-01 Uros Bizjak <ubizjak@gmail.com>
17176
17177 PR target/81641
17178 * config/i386/i386.c (ix86_print_operand_address_as): For -masm=intel
17179 print "ds:" only for immediates in generic address space.
17180
17181 2017-08-01 Uros Bizjak <ubizjak@gmail.com>
17182
17183 PR target/81639
17184 * config/i386/i386.c (ix86_funciton_naked): New prototype.
17185 (ix86_function_ok_for_sibcall): Return false for naked functions.
17186
17187 2017-08-01 Richard Biener <rguenther@suse.de>
17188
17189 * tree-ssa-pre.c (print_pre_expr): Handle NULL expr.
17190 (compute_antic): Seed worklist with exit block predecessors.
17191 * cfganal.c (dfs_find_deadend): For a cycle return the source
17192 of the edge closing it.
17193
17194 2017-08-01 Tamar Christina <tamar.christina@arm.com>
17195
17196 * config/aarch64/aarch64.c
17197 (aarch64_can_const_movi_rtx_p): Move 0 check.
17198
17199 2017-08-01 Bin Cheng <bin.cheng@arm.com>
17200
17201 * tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete.
17202 * fold-const.c (fold_comparison, fold_binary_loc): Delete use of
17203 above macro.
17204 * match.pd: Ditto in address comparison pattern.
17205
17206 2017-08-01 Bin Cheng <bin.cheng@arm.com>
17207
17208 PR tree-optimization/81627
17209 * tree-predcom.c (prepare_finalizers): Always rewrite into loop
17210 closed ssa form for store-store chain.
17211
17212 2017-08-01 Bin Cheng <bin.cheng@arm.com>
17213
17214 PR tree-optimization/81620
17215 * tree-predcom.c (add_ref_to_chain): Don't set has_max_use_after
17216 for store-store chain.
17217
17218 2017-08-01 Jakub Jelinek <jakub@redhat.com>
17219
17220 PR tree-optimization/81588
17221 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
17222 ranges[i].in_p, invert comparison code ccode. For >/>=,
17223 swap rhs1 and rhs2 and comparison code unconditionally,
17224 for </<= don't do that. Don't swap rhs1/rhs2 again if
17225 ranges[i].in_p, instead invert comparison code ccode if
17226 opcode or oe->rank is BIT_IOR_EXPR.
17227
17228 PR target/80846
17229 * optabs.def (vec_extract_optab, vec_init_optab): Change from
17230 a direct optab to conversion optab.
17231 * optabs.c (expand_vector_broadcast): Use convert_optab_handler
17232 with GET_MODE_INNER as last argument instead of optab_handler.
17233 * expmed.c (extract_bit_field_1): Likewise. Use vector from
17234 vector extraction if possible and optab is available.
17235 * expr.c (store_constructor): Use convert_optab_handler instead
17236 of optab_handler. Use vector initialization from smaller
17237 vectors if possible and optab is available.
17238 * tree-vect-stmts.c (vectorizable_load): Likewise.
17239 * doc/md.texi (vec_extract, vec_init): Document that the optabs
17240 now have two modes.
17241 * config/i386/i386.c (ix86_expand_vector_init): Handle expansion
17242 of vec_init from half-sized vectors with the same element mode.
17243 * config/i386/sse.md (ssehalfvecmode): Add V4TI case.
17244 (ssehalfvecmodelower, ssescalarmodelower): New mode attributes.
17245 (reduc_plus_scal_v8df, reduc_plus_scal_v4df, reduc_plus_scal_v2df,
17246 reduc_plus_scal_v16sf, reduc_plus_scal_v8sf, reduc_plus_scal_v4sf,
17247 reduc_<code>_scal_<mode>, reduc_umin_scal_v8hi): Add element mode
17248 after mode in gen_vec_extract* calls.
17249 (vec_extract<mode>): Renamed to ...
17250 (vec_extract<mode><ssescalarmodelower>): ... this.
17251 (vec_extract<mode><ssehalfvecmodelower>): New expander.
17252 (rotl<mode>3, rotr<mode>3, <shift_insn><mode>3, ashrv2di3): Add
17253 element mode after mode in gen_vec_init* calls.
17254 (VEC_INIT_HALF_MODE): New mode iterator.
17255 (vec_init<mode>): Renamed to ...
17256 (vec_init<mode><ssescalarmodelower>): ... this.
17257 (vec_init<mode><ssehalfvecmodelower>): New expander.
17258 * config/i386/mmx.md (vec_extractv2sf): Renamed to ...
17259 (vec_extractv2sfsf): ... this.
17260 (vec_initv2sf): Renamed to ...
17261 (vec_initv2sfsf): ... this.
17262 (vec_extractv2si): Renamed to ...
17263 (vec_extractv2sisi): ... this.
17264 (vec_initv2si): Renamed to ...
17265 (vec_initv2sisi): ... this.
17266 (vec_extractv4hi): Renamed to ...
17267 (vec_extractv4hihi): ... this.
17268 (vec_initv4hi): Renamed to ...
17269 (vec_initv4hihi): ... this.
17270 (vec_extractv8qi): Renamed to ...
17271 (vec_extractv8qiqi): ... this.
17272 (vec_initv8qi): Renamed to ...
17273 (vec_initv8qiqi): ... this.
17274 * config/rs6000/vector.md (VEC_base_l): New mode attribute.
17275 (vec_init<mode>): Renamed to ...
17276 (vec_init<mode><VEC_base_l>): ... this.
17277 (vec_extract<mode>): Renamed to ...
17278 (vec_extract<mode><VEC_base_l>): ... this.
17279 * config/rs6000/paired.md (vec_initv2sf): Renamed to ...
17280 (vec_initv2sfsf): ... this.
17281 * config/rs6000/altivec.md (splitter, altivec_copysign_v4sf3,
17282 vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
17283 vec_unpacku_lo_v8hi, mulv16qi3, altivec_vreve<mode>2): Add
17284 element mode after mode in gen_vec_init* calls.
17285 * config/aarch64/aarch64-simd.md (vec_init<mode>): Renamed to ...
17286 (vec_init<mode><Vel>): ... this.
17287 (vec_extract<mode>): Renamed to ...
17288 (vec_extract<mode><Vel>): ... this.
17289 * config/aarch64/iterators.md (Vel): New mode attribute.
17290 * config/s390/s390.c (s390_expand_vec_strlen, s390_expand_vec_movstr):
17291 Add element mode after mode in gen_vec_extract* calls.
17292 * config/s390/vector.md (non_vec_l): New mode attribute.
17293 (vec_extract<mode>): Renamed to ...
17294 (vec_extract<mode><non_vec_l>): ... this.
17295 (vec_init<mode>): Renamed to ...
17296 (vec_init<mode><non_vec_l>): ... this.
17297 * config/s390/s390-builtins.def (s390_vlgvb, s390_vlgvh, s390_vlgvf,
17298 s390_vlgvf_flt, s390_vlgvg, s390_vlgvg_dbl): Add element mode after
17299 vec_extract mode.
17300 * config/arm/iterators.md (V_elem_l): New mode attribute.
17301 * config/arm/neon.md (vec_extract<mode>): Renamed to ...
17302 (vec_extract<mode><V_elem_l>): ... this.
17303 (vec_extractv2di): Renamed to ...
17304 (vec_extractv2didi): ... this.
17305 (vec_init<mode>): Renamed to ...
17306 (vec_init<mode><V_elem_l>): ... this.
17307 (reduc_plus_scal_<mode>, reduc_plus_scal_v2di, reduc_smin_scal_<mode>,
17308 reduc_smax_scal_<mode>, reduc_umin_scal_<mode>,
17309 reduc_umax_scal_<mode>, neon_vget_lane<mode>, neon_vget_laneu<mode>):
17310 Add element mode after gen_vec_extract* calls.
17311 * config/mips/mips-msa.md (vec_init<mode>): Renamed to ...
17312 (vec_init<mode><unitmode>): ... this.
17313 (vec_extract<mode>): Renamed to ...
17314 (vec_extract<mode><unitmode>): ... this.
17315 * config/mips/loongson.md (vec_init<mode>): Renamed to ...
17316 (vec_init<mode><unitmode>): ... this.
17317 * config/mips/mips-ps-3d.md (vec_initv2sf): Renamed to ...
17318 (vec_initv2sfsf): ... this.
17319 (vec_extractv2sf): Renamed to ...
17320 (vec_extractv2sfsf): ... this.
17321 (reduc_plus_scal_v2sf, reduc_smin_scal_v2sf, reduc_smax_scal_v2sf):
17322 Add element mode after gen_vec_extract* calls.
17323 * config/mips/mips.md (unitmode): New mode iterator.
17324 * config/spu/spu.c (spu_expand_prologue, spu_allocate_stack,
17325 spu_builtin_extract): Add element mode after gen_vec_extract* calls.
17326 * config/spu/spu.md (inner_l): New mode attribute.
17327 (vec_init<mode>): Renamed to ...
17328 (vec_init<mode><inner_l>): ... this.
17329 (vec_extract<mode>): Renamed to ...
17330 (vec_extract<mode><inner_l>): ... this.
17331 * config/sparc/sparc.md (veltmode): New mode iterator.
17332 (vec_init<VMALL:mode>): Renamed to ...
17333 (vec_init<VMALL:mode><VMALL:veltmode>): ... this.
17334 * config/ia64/vect.md (vec_initv2si): Renamed to ...
17335 (vec_initv2sisi): ... this.
17336 (vec_initv2sf): Renamed to ...
17337 (vec_initv2sfsf): ... this.
17338 (vec_extractv2sf): Renamed to ...
17339 (vec_extractv2sfsf): ... this.
17340 * config/powerpcspe/vector.md (VEC_base_l): New mode attribute.
17341 (vec_init<mode>): Renamed to ...
17342 (vec_init<mode><VEC_base_l>): ... this.
17343 (vec_extract<mode>): Renamed to ...
17344 (vec_extract<mode><VEC_base_l>): ... this.
17345 * config/powerpcspe/paired.md (vec_initv2sf): Renamed to ...
17346 (vec_initv2sfsf): ... this.
17347 * config/powerpcspe/altivec.md (splitter, altivec_copysign_v4sf3,
17348 vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
17349 vec_unpacku_lo_v8hi, mulv16qi3): Add element mode after mode in
17350 gen_vec_init* calls.
17351
17352 2017-08-01 Richard Biener <rguenther@suse.de>
17353
17354 PR tree-optimization/81297
17355 * tree-vrp.c (get_single_symbol): Remove assert, instead drop
17356 TREE_OVERFLOW from INTEGER_CSTs.
17357
17358 2017-07-31 Segher Boessenkool <segher@kernel.crashing.org>
17359
17360 * config/rs6000/rs6000.c (enum rs6000_reg_type): Delete trailing comma.
17361
17362 2017-07-31 Carl Love <cel@us.ibm.com>
17363
17364 * config/rs6000/rs6000-c: Add support for built-in functions
17365 vector signed char vec_xl_be (signed long long, signed char *);
17366 vector unsigned char vec_xl_be (signed long long, unsigned char *);
17367 vector signed int vec_xl_be (signed long long, signed int *);
17368 vector unsigned int vec_xl_be (signed long long, unsigned int *);
17369 vector signed long long vec_xl_be (signed long long, signed long long *);
17370 vector unsigned long long vec_xl_be (signed long long, unsigned long long *);
17371 vector signed short vec_xl_be (signed long long, signed short *);
17372 vector unsigned short vec_xl_be (signed long long, unsigned short *);
17373 vector double vec_xl_be (signed long long, double *);
17374 vector float vec_xl_be (signed long long, float *);
17375 * config/rs6000/altivec.h (vec_xl_be): Add #define.
17376 * config/rs6000/rs6000-builtin.def (XL_BE_V16QI, XL_BE_V8HI, XL_BE_V4SI)
17377 XL_BE_V2DI, XL_BE_V4SF, XL_BE_V2DF, XL_BE): Add definitions
17378 for the builtins.
17379 * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Add function.
17380 (altivec_expand_builtin): Add switch statement to call
17381 altivec_expand_xl_be for each builtin.
17382 (altivec_init_builtins): Add def_builtin for _builtin_vsx_le_be_v8hi,
17383 __builtin_vsx_le_be_v4si, __builtin_vsx_le_be_v2di,
17384 __builtin_vsx_le_be_v4sf, __builtin_vsx_le_be_v2df,
17385 __builtin_vsx_le_be_v16qi.
17386 * doc/extend.texi: Update the built-in documentation file for the
17387 new built-in functions.
17388
17389 2017-07-31 Uros Bizjak <ubizjak@gmail.com>
17390
17391 PR target/25967
17392 * config/i386/i386.c (ix86_allocate_stack_slots_for_args):
17393 New function.
17394 (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
17395
17396 2017-07-31 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17397
17398 * config.gcc: Add z14.
17399 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
17400 CPU model numbers for z13s and z14.
17401 * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
17402 arch12 with z14.
17403 * config/s390/s390-opts.h (enum processor_type): Rename
17404 PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
17405 * config/s390/s390.c (processor_table): Add field for CPU name to
17406 be passed to Binutils.
17407 (s390_asm_output_machine_for_arch): Use the new field in
17408 processor_table for Binutils.
17409 (s390_expand_builtin): Replace arch12 with z14.
17410 (s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
17411 (s390_get_sched_attrmask): Likewise.
17412 (s390_get_unit_mask): Likewise.
17413 * config/s390/s390.opt: Add z14 to processor_type enum.
17414
17415 2017-07-31 Martin Jambor <mjambor@suse.cz>
17416
17417 PR hsa/81477
17418 * ipa-fnsummary.c (ipa_fn_summary_generate): Set versionable
17419 regardless of optimization level.
17420
17421 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
17422 Martin Liska <mliska@suse.cz>
17423
17424 * predict.def: Remove old comment and adjust probability.
17425 * gimplify.c (should_warn_for_implicit_fallthrough): Ignore
17426 PREDICT statements.
17427
17428 2017-07-31 Uros Bizjak <ubizjak@gmail.com>
17429
17430 PR target/25967
17431 * config/i386/i386.c (ix86_function_naked): New function.
17432 (ix86_can_use_return_insn_p): Return false for naked functions.
17433 (ix86_expand_prologue): Skip prologue for naked functions.
17434 (ix86_expand_epilogue): Skip epilogue for naked functions
17435 and emit trap instruction.
17436 (ix86_warn_func_return): New function.
17437 (ix86_attribute_table): Add "naked" attribute specification.
17438 (TARGET_WARN_FUNC_RETURN): Define.
17439 * doc/extend.texi (x86 Function Attributes) <naked>: Document it.
17440
17441 2017-07-31 Martin Liska <mliska@suse.cz>
17442
17443 * gimple-pretty-print.c (dump_gimple_label): Never dump BB info.
17444 (dump_gimple_bb_header): Always dump BB info.
17445 (pp_cfg_jump): Do not append info about BB when dumping a jump.
17446
17447 2017-07-31 Martin Liska <mliska@suse.cz>
17448
17449 PR sanitize/81530
17450 * convert.c (convert_to_integer_1): Guard condition with flag_sanitize_p
17451 also with current_function_decl non-null equality.
17452
17453 2017-07-31 Jakub Jelinek <jakub@redhat.com>
17454
17455 PR sanitizer/81604
17456 * ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't
17457 change type to the element type, instead add eltype variable and
17458 use it where we are interested in the element type.
17459
17460 PR tree-optimization/81603
17461 * ipa-polymorphic-call.c
17462 (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Perform
17463 offset arithmetic in offset_int, bail out if the resulting bit offset
17464 doesn't fit into shwi.
17465
17466 2017-07-31 Martin Liska <mliska@suse.cz>
17467
17468 * gimplify.c (mostly_copy_tree_r): Remove Java specific hunk.
17469 (gimplify_save_expr): Fix comment.
17470
17471 2017-07-30 H.J. Lu <hongjiu.lu@intel.com>
17472
17473 PR target/79793
17474 * config/i386/i386.c (ix86_function_arg): Update arguments for
17475 exception handler.
17476 (ix86_compute_frame_layout): Set the initial stack offset to
17477 INCOMING_FRAME_SP_OFFSET. Update red-zone offset with
17478 INCOMING_FRAME_SP_OFFSET.
17479 (ix86_expand_epilogue): Don't pop the 'ERROR_CODE' off the
17480 stack before exception handler returns.
17481 * config/i386/i386.h (INCOMING_FRAME_SP_OFFSET): Add the
17482 the 'ERROR_CODE' for exception handler.
17483
17484 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
17485
17486 * config/i386/i386.h (ASM_PRINTF_EXTENSIONS): New macro.
17487 (ASM_OUTPUT_REG_PUSH): Rewrite with new operand modifiers.
17488 (ASM_OUTPUT_REG_POP): Ditto.
17489 * config/i386/i386.c (ix86_asm_output_function_label): Use fputs
17490 instead of asm_fprintf to output pure string.
17491
17492 2017-07-29 Jakub Jelinek <jakub@redhat.com>
17493
17494 * debug.h (struct gcc_debug_hooks): Add IMPLICIT argument
17495 to imported_module_or_decl hook.
17496 (debug_nothing_tree_tree_tree_bool): Remove.
17497 (debug_nothing_tree_tree_tree_bool_bool): New declaration.
17498 * debug.c (do_nothing_debug_hooks): Use
17499 debug_nothing_tree_tree_tree_bool_bool instead of
17500 debug_nothing_tree_tree_tree_bool.
17501 * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
17502 * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
17503 * sdbout.c (sdb_debug_hooks): Likewise.
17504 * dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise.
17505 (gen_namespace_die): Add DW_AT_export_symbols attribute if
17506 langhook wants it.
17507 (dwarf2out_imported_module_or_decl): Add IMPLICIT argument,
17508 if true, -gdwarf-5 and decl will have DW_AT_export_symbols
17509 attribute, don't add anything.
17510
17511 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17512
17513 * fold-const.c (fold_build1_stat_loc): Remove _stat from name.
17514 (fold_build2_stat_loc): Likewise.
17515 (fold_build3_stat_loc): Likewise.
17516 * fold-const.h (fold_build1, fold_build2, fold_build3): Adjust.
17517 (fold_build1_loc): Remove macro.
17518 (fold_build2_loc): Likewise.
17519 (fold_build3_loc): Likewise.
17520
17521 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17522
17523 * gimple.c (gimple_build_debug_bind_stat): Remove _stat from name.
17524 (gimple_build_debug_bind_source_stat): Likewise.
17525 * gimple.h (gimple_build_debug_bind): Remove macro.
17526 (gimple_build_debug_bind_source): Likewise.
17527
17528 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17529
17530 * bitmap.c (bitmap_alloc): Adjust.
17531 (bitmap_gc_alloc): Likewise.
17532 * bitmap.h (bitmap_initialize_stat): Remove _stat from name.
17533
17534 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17535
17536 * bitmap.c (bitmap_obstack_alloc_stat): Rename to bitmap_alloc.
17537 (bitmap_gc_alloc_stat): Rename to bitmap_gc_alloc.
17538 * bitmap.h (bitmap_obstack_alloc_stat): Adjust prototype.
17539 (bitmap_gc_alloc_stat): Likewise.
17540 (BITMAP_ALLOC, BITMAP_GGC_ALLOC): Adjust.
17541
17542 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17543
17544 * rtl.c (shallow_copy_rtx_stat): Remove _stat from name.
17545 * rtl.h (shallow_copy_rtx): Remove macro.
17546
17547 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17548
17549 * emit-rtl.c (gen_raw_REG): Adjust.
17550 * gengenrtl.c (gendef): Likewise.
17551 * rtl.c (rtx_alloc_stat): Remove _stat from name.
17552 * rtl.h (rtx_alloc): Remove macro.
17553
17554 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17555
17556 * tree.c (build_tree_list_vec_stat): Remove _stat from name.
17557 (build_tree_list_stat): Likewise.
17558 * tree.h (build_tree_list): Remove macro.
17559 (build_tree_list_vec): Likewise.
17560
17561 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17562
17563 * tree.c (make_vector_stat): Remove _stat from name.
17564 (build_vector_stat): Likewise.
17565 * tree.h (make_vector_stat): Remove macro.
17566 (build_vector_stat): Likewise.
17567
17568 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17569
17570 * tree.h (build_var_debug_value): Remove prototype.
17571
17572 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17573
17574 * tree.c (tree_cons_stat): Remove _stat from name.
17575 * tree.h (tree_cons): Remove macro.
17576
17577 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17578
17579 * tree.c (build_vl_exp_stat): Remove _stat from name.
17580 * tree.h (build_vl_exp): Remove macro.
17581
17582 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17583
17584 * tree.c (build_decl_stat): Remove _stat from name.
17585 * tree.h (build_decl): Remove macro.
17586
17587 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17588
17589 * gimple.c (gimple_build_with_ops_stat): Adjust.
17590 (gimple_alloc_stat): Remove _stat from name.
17591 * gimple.h (gimple_alloc): Remove macro.
17592
17593 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17594
17595 * tree.c (make_tree_vec_stat): Remove _stat from name.
17596 (grow_tree_vec_stat): Likewise.
17597 * tree.h (make_tree_vec_stat): Adjust prototype.
17598 (grow_tree_vec_stat): Likewise.
17599 (make_tree_vec): Remove macro.
17600 (grow_tree_vec): Likewise.
17601
17602 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17603
17604 * fold-const.c (fold_build1_stat_loc): Adjust.
17605 (fold_build2_stat_loc): Likewise.
17606 (fold_build3_stat_loc): Likewise.
17607 * tree.c (build0_stat): Remove _stat from name.
17608 (build1_stat): Likewise.
17609 (build2_stat): Likewise.
17610 (build3_stat): Likewise.
17611 (build4_stat): Likewise.
17612 (build5_stat): Likewise.
17613 * tree.h (build1_loc): Remove macro, and rename _stat function
17614 to this.
17615 (build2_loc): Likewise.
17616 (build3_loc): Likewise.
17617 (build4_loc): Likewise.
17618 (build5_loc): Likewise.
17619
17620 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17621
17622 * tree.c (make_int_cst_stat): Remove _stat from name.
17623 * tree.h (make_int_cst_stat): Adjust prototype.
17624 (make_int_cst): Remove macro.
17625
17626 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17627
17628 * tree.c (make_tre_binfo_stat): Remove _stat from name.
17629 * tree.h (make_tree_binfo_stat): Adjust prototype.
17630 (make_tree_binfo): Remove.
17631
17632 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17633
17634 * tree.c (copy_node_stat): Rename to copy_node.
17635 (build_distinct_type_copy): Adjust.
17636 * tree.h (copy_node_stat): Adjust prototype.
17637 (copy_node): Remove macro.
17638
17639 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
17640
17641 * tree.c (make_node_stat): rename to make_node.
17642 (build_tree_list_stat): Adjust.
17643 (build0_stat): Likewise.
17644 (build2_stat): Likewise.
17645 (build3_stat): Likewise.
17646 (build4_stat): Likewise.
17647 (build5_stat): Likewise.
17648 (build_decl_stat): Likewise.
17649 * tree.h (make_node_stat): Adjust prototype.
17650 (make_node): remove macro.
17651
17652 2017-07-28 Peter Bergner <bergner@vnet.ibm.com>
17653
17654 * config/rs6000/ppc-auxv.h (PPC_FEATURE2_DARN): New define.
17655 (PPC_FEATURE2_SCV): Likewise.
17656 * config/rs6000/rs6000.c (cpu_supports_info): Use them.
17657
17658 2017-07-28 Tamar Christina <tamar.christina@arm.com>
17659
17660 * config/aarch64/aarch64.c
17661 (aarch64_internal_mov_immediate): Add new special pattern.
17662 * config/aarch64/aarch64.md (*movdi_aarch64):
17663 Add reg/32bit const mov case.
17664
17665 2017-07-28 Tamar Christina <tamar.christina@arm.com>
17666 Richard Sandiford <richard.sandiford@linaro.org>
17667
17668 * config/aarch64/aarch64.md (mov<mode>): Generalize.
17669 (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
17670 Add integer and movi cases.
17671 (movi-split-hf-df-sf split, fp16): New.
17672 (enabled): Added TARGET_FP_F16INST.
17673 * config/aarch64/iterators.md (GPF_HF): New.
17674 * config/aarch64/predicates.md (aarch64_reg_or_fp_float): New.
17675
17676 2017-07-28 Tamar Christina <tamar.christina@arm.com>
17677
17678 * config/aarch64/aarch64.c
17679 (aarch64_simd_container_mode): Add prototype.
17680 (aarch64_expand_mov_immediate): Add HI support.
17681 (aarch64_reinterpret_float_as_int, aarch64_float_const_rtx_p: New.
17682 (aarch64_can_const_movi_rtx_p): New.
17683 (aarch64_preferred_reload_class):
17684 Remove restrictions of using FP registers for certain SIMD operations.
17685 (aarch64_rtx_costs): Added new cost for CONST_DOUBLE moves.
17686 (aarch64_valid_floating_const): Add integer move validation.
17687 (aarch64_simd_imm_scalar_p): Remove.
17688 (aarch64_output_scalar_simd_mov_immediate): Generalize function.
17689 (aarch64_legitimate_constant_p): Expand list of supported cases.
17690 * config/aarch64/aarch64-protos.h
17691 (aarch64_float_const_rtx_p, aarch64_can_const_movi_rtx_p): New.
17692 (aarch64_reinterpret_float_as_int): New.
17693 (aarch64_simd_imm_scalar_p): Remove.
17694 * config/aarch64/constraints.md (Uvi): New.
17695 (Dd): Split into Ds and new Dd.
17696 * config/aarch64/aarch64.md (*movsi_aarch64):
17697 Add SIMD mov case.
17698 (*movdi_aarch64): Add SIMD mov case.
17699
17700 2017-07-28 Bin Cheng <bin.cheng@arm.com>
17701
17702 * tree-predcom.c: (struct chain): Handle store-store chain in which
17703 stores for elimination only store loop invariant values.
17704 (execute_pred_commoning_chain): Ditto.
17705 (prepare_initializers_chain_store_elim): Ditto.
17706 (prepare_finalizers): Ditto.
17707 (is_inv_store_elimination_chain): New function.
17708 (initialize_root_vars_store_elim_1): New function.
17709
17710 2017-07-28 Bin Cheng <bin.cheng@arm.com>
17711
17712 * tree-predcom.c: Revise general description of the pass.
17713 (enum chain_type): New enum type for store elimination.
17714 (struct chain): New field supporting store elimination.
17715 (struct component): Ditto.
17716 (dump_chain): Dump store-stores chain.
17717 (release_chain): Release resources.
17718 (split_data_refs_to_components): Compute and create component
17719 contains only stores for elimination.
17720 (get_chain_last_ref_at): New function.
17721 (make_invariant_chain): Initialization.
17722 (make_rooted_chain): Specify chain type in parameter and record it.
17723 (add_looparound_copies): Skip for store-stores chain.
17724 (determine_roots_comp): Compute type of chain and pass it to
17725 make_rooted_chain.
17726 (initialize_root_vars_store_elim_2): New function.
17727 (finalize_eliminated_stores): New function.
17728 (remove_stmt): Handle store for elimination.
17729 (execute_pred_commoning_chain): Execute predictive commoning on
17730 store-store chains.
17731 (determine_unroll_factor): Skip unroll for store-stores chain.
17732 (prepare_initializers_chain_store_elim): New function.
17733 (prepare_initializers_chain): Hanlde store-store chain.
17734 (prepare_finalizers_chain, prepare_finalizers): New function.
17735 (tree_predictive_commoning_loop): Return integer value indicating
17736 if loop is unrolled or lcssa form is corrupted.
17737 (tree_predictive_commoning): Rewrite for lcssa form if necessary.
17738
17739 2017-07-28 Bin Cheng <bin.cheng@arm.com>
17740
17741 * tree-predcom.c (initialize_root): Delete.
17742 (execute_pred_commoning_chain): Initialize root vars and replace
17743 reference of non-combined chain directly, rather than call above
17744 function.
17745
17746 2017-07-28 Bin Cheng <bin.cheng@arm.com>
17747
17748 * tree-predcom.c (ref_at_iteration): Add parameter NITERS. Compute
17749 memory reference to DR at (NITERS + ITERS)-th iteration of loop.
17750
17751 2017-07-28 Bin Cheng <bin.cheng@arm.com>
17752
17753 * tree-predcom.c (struct chain): New field init_seq.
17754 (release_chain): Release init_seq.
17755 (prepare_initializers_chain): Record intialization stmts in above
17756 field.
17757 (insert_init_seqs): New function.
17758 (tree_predictive_commoning_loop): Call insert_init_seqs.
17759
17760 2017-07-28 Bin Cheng <bin.cheng@arm.com>
17761
17762 * tree-predcom.c (determine_roots_comp): Skip trivial components.
17763
17764 2017-07-28 Richard Biener <rguenther@suse.de>
17765
17766 * match.pd: Remove superfluous :c.
17767 * genmatch.c (simplify::id): Add member.
17768 (lower_commutative, lower_opt_convert, lower_cond, lower_for):
17769 Copy id.
17770 (current_id): New global.
17771 (dt_node::parent): Move from ...
17772 (dt_operand::parent): ... here. Add for_id member.
17773 (is_a_helper <dt_operand *>::test): DT_TRUE is also a dt_operand.
17774 (decision_tree::find_node): Relax order requirement when
17775 merging DT_TRUE nodes to ones inbetween the current simplify
17776 and the one we try to merge with. Add diagnostic whenever
17777 we need to enforce pattern order by not merging.
17778 (decision_tree::insert): Set current_id.
17779 (decision_tree::print_node): Dump parent node and for_id.
17780 (parser::last_id): Add member.
17781 (parser::push_simplify): Assign unique id.
17782 (parser::parser): Initialize last_id.
17783
17784 2017-07-28 Martin Liska <mliska@suse.cz>
17785
17786 PR sanitizer/81340
17787 * sanopt.c (sanitize_rewrite_addressable_params): Set VALUE_EXPR after
17788 gimple_build_debug_bind.
17789
17790 2017-07-28 Richard Biener <rguenther@suse.de>
17791
17792 PR tree-optimization/81502
17793 * match.pd: Add pattern combining BIT_INSERT_EXPR with
17794 BIT_FIELD_REF.
17795 * tree-cfg.c (verify_expr): Verify types of BIT_FIELD_REF
17796 size/pos operands.
17797 (verify_gimple_assign_ternary): Likewise for BIT_INSERT_EXPR pos.
17798 * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Use bitsizetype
17799 for BIT_FIELD_REF args.
17800 * fold-const.c (make_bit_field_ref): Likewise.
17801 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
17802
17803 2017-07-28 Jakub Jelinek <jakub@redhat.com>
17804
17805 PR sanitizer/80998
17806 * sanopt.c (pass_sanopt::execute): Handle IFN_UBSAN_PTR.
17807 * tree-ssa-alias.c (call_may_clobber_ref_p_1): Likewise.
17808 * flag-types.h (enum sanitize_code): Add SANITIZER_POINTER_OVERFLOW.
17809 Or it into SANITIZER_UNDEFINED.
17810 * ubsan.c: Include gimple-fold.h and varasm.h.
17811 (ubsan_expand_ptr_ifn): New function.
17812 (instrument_pointer_overflow): New function.
17813 (maybe_instrument_pointer_overflow): New function.
17814 (instrument_object_size): Formatting fix.
17815 (pass_ubsan::execute): Call instrument_pointer_overflow
17816 and maybe_instrument_pointer_overflow.
17817 * internal-fn.c (expand_UBSAN_PTR): New function.
17818 * ubsan.h (ubsan_expand_ptr_ifn): Declare.
17819 * sanitizer.def (__ubsan_handle_pointer_overflow,
17820 __ubsan_handle_pointer_overflow_abort): New builtins.
17821 * tree-ssa-tail-merge.c (merge_stmts_p): Handle IFN_UBSAN_PTR.
17822 * internal-fn.def (UBSAN_PTR): New internal function.
17823 * opts.c (sanitizer_opts): Add pointer-overflow.
17824 * lto-streamer-in.c (input_function): Handle IFN_UBSAN_PTR.
17825 * fold-const.c (build_range_check): Compute pointer range check in
17826 integral type if pointer arithmetics would be needed. Formatting
17827 fixes.
17828
17829 2017-07-28 Martin Liska <mliska@suse.cz>
17830
17831 PR sanitizer/81460
17832 * sanopt.c (sanitize_rewrite_addressable_params): Do not rewrite
17833 parameters that are of a variable-length.
17834
17835 2017-07-28 Sebastian Huber <sebastian.huber@embedded-brains.de>
17836
17837 * config.gcc (powerpc-*-rtems*): Remove rs6000/eabi.h. Add
17838 rs6000/biarch64.h.
17839 * config/rs6000/rtems.h (ASM_DECLARE_FUNCTION_SIZE): New macro.
17840 (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
17841 (CRT_CALL_STATIC_FUNCTION): Likewise.
17842 (ASM_DEFAULT_SPEC): New define.
17843 (ASM_SPEC32): Likewise.
17844 (ASM_SPEC64): Likewise.
17845 (ASM_SPEC_COMMON): Likewise.
17846 (ASM_SPEC): Likewise.
17847 (INVALID_64BIT): Likewise.
17848 (LINK_OS_DEFAULT_SPEC): Likewise.
17849 (LINK_OS_SPEC32): Likewise.
17850 (LINK_OS_SPEC64): Likewise.
17851 (POWERPC_LINUX): Likewise.
17852 (PTRDIFF_TYPE): Likewise.
17853 (RESTORE_FP_PREFIX): Likewise.
17854 (RESTORE_FP_SUFFIX): Likewise.
17855 (SAVE_FP_PREFIX): Likewise.
17856 (SAVE_FP_SUFFIX): Likewise.
17857 (SIZE_TYPE): Likewise.
17858 (SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise.
17859 (TARGET_64BIT): Likewise.
17860 (TARGET_64BIT): Likewise.
17861 (TARGET_AIX): Likewise.
17862 (WCHAR_TYPE_SIZE): Likewise.
17863 (WCHAR_TYPE): Undefine.
17864 (TARGET_OS_CPP_BUILTINS): Add 64-bit PowerPC defines.
17865 (CPP_OS_DEFAULT_SPEC): Use previous CPP_OS_RTEMS_SPEC.
17866 (CPP_OS_RTEMS_SPEC): Delete.
17867 (SUBSUBTARGET_EXTRA_SPECS): Remove cpp_os_rtems. Add
17868 asm_spec_common, asm_spec32, asm_spec64, link_os_spec32, and
17869 link_os_spec64.
17870 * config/rs6000/t-rtems: Add mcpu=e6500/m64 multilibs.
17871
17872 2017-07-28 Jakub Jelinek <jakub@redhat.com>
17873
17874 PR tree-optimization/81578
17875 * tree-parloops.c (build_new_reduction): Bail out if
17876 reduction_code isn't one of the standard OpenMP reductions.
17877 Move the details printing after that decision.
17878
17879 2017-07-27 Peter Bergner <bergner@vnet.ibm.com>
17880
17881 * config/rs6000/predicates.md (volatile_mem_operand): Remove code
17882 related to reload_in_progress.
17883 (splat_input_operand): Likewise.
17884 * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_rtx):
17885 Delete prototype.
17886 * config/rs6000/rs6000.c (machine_function): Remove sdmode_stack_slot
17887 field.
17888 (TARGET_EXPAND_TO_RTL_HOOK): Delete.
17889 (TARGET_INSTANTIATE_DECLS): Likewise.
17890 (legitimate_indexed_address_p): Delete reload_in_progress code.
17891 (rs6000_debug_legitimate_address_p): Likewise.
17892 (rs6000_eliminate_indexed_memrefs): Likewise.
17893 (rs6000_emit_le_vsx_store): Likewise.
17894 (rs6000_emit_move_si_sf_subreg): Likewise.
17895 (rs6000_emit_move): Likewise.
17896 (register_to_reg_type): Likewise.
17897 (rs6000_pre_atomic_barrier): Likewise.
17898 (rs6000_machopic_legitimize_pic_address): Likewise.
17899 (rs6000_allocate_stack_temp): Likewise.
17900 (rs6000_address_for_fpconvert): Likewise.
17901 (rs6000_address_for_altivec): Likewise.
17902 (rs6000_secondary_memory_needed_rtx): Delete function.
17903 (rs6000_check_sdmode): Likewise.
17904 (rs6000_alloc_sdmode_stack_slot): Likewise.
17905 (rs6000_instantiate_decls): Likewise.
17906 * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_RTX): Delete.
17907 * config/rs6000/rs6000.md (splitter for *movsi_got_internal):
17908 Delete reload_in_progress.
17909 (*vec_reload_and_plus_<mptrsize>): Likewise.
17910 * config/rs6000/vsx.md (vsx_mul_v2di): Likewise.
17911 (vsx_div_v2di): Likewise.
17912 (vsx_udiv_v2di): Likewise.
17913
17914 2017-07-27 Peter Bergner <bergner@vnet.ibm.com>
17915
17916 * config/rs6000/rs6000.opt (mlra): Replace with stub.
17917 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete OPTION_MASK_LRA.
17918 * config/rs6000/rs6000.c (TARGET_LRA_P): Delete.
17919 (rs6000_debug_reg_global): Delete print of LRA status.
17920 (rs6000_option_override_internal): Delete dead LRA related code.
17921 (rs6000_lra_p): Delete function.
17922 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mlra.
17923
17924 2017-07-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
17925
17926 * config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*).
17927 * config/riscv/rtems.h: New file.
17928
17929 2017-07-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17930 Sudakshina Das <sudi.das@arm.com>
17931
17932 * config/aarch64/aarch64.md
17933 (define_split for and<mode>3nr_compare): Move
17934 non aarch64_logical_operand to a register.
17935 (define_split for and_<SHIFT:optab><mode>3nr_compare0): Move non
17936 register immediate operand to a register.
17937 * config/aarch64/predicates.md (aarch64_mov_imm_operand): New.
17938
17939 2017-07-27 Peter Bergner <bergner@vnet.ibm.com>
17940
17941 PR middle-end/81564
17942 * tree-cfg.c (group_case_labels_stmt): Handle already deleted blocks.
17943
17944 2017-07-27 Richard Biener <rguenther@suse.de>
17945
17946 PR tree-optimization/81573
17947 PR tree-optimization/81494
17948 * tree-vect-loop.c (vect_create_epilog_for_reduction): Handle
17949 multi defuse cycle case.
17950
17951 2017-07-27 Richard Biener <rguenther@suse.de>
17952
17953 PR tree-optimization/81571
17954 * tree-vect-slp.c (vect_build_slp_tree): Properly verify reduction
17955 PHIs.
17956
17957 2017-07-27 Eric Botcazou <ebotcazou@adacore.com>
17958
17959 * config/sparc/sparc.c (sparc_option_override): Set MASK_FSMULD flag
17960 earlier and only if MASK_FPU is set. Adjust formatting.
17961
17962 2017-07-27 Martin Liska <mliska@suse.cz>
17963
17964 * opt-functions.awk: Add validation of value of Init.
17965 * optc-gen.awk: Pass new argument.
17966
17967 2017-07-27 Martin Liska <mliska@suse.cz>
17968
17969 * auto-profile.c (autofdo_source_profile::update_inlined_ind_target):
17970 Fix wrong condition.
17971
17972 2017-07-27 Martin Liska <mliska@suse.cz>
17973
17974 * auto-profile.c (afdo_annotate_cfg): Assign zero counts to
17975 BBs and edges seen by autoFDO.
17976
17977 2017-07-27 Richard Biener <rguenther@suse.de>
17978
17979 PR tree-optimization/81502
17980 * tree-ssa.c (non_rewritable_lvalue_p): Handle BIT_INSERT_EXPR
17981 with incompatible but same sized type.
17982 (execute_update_addresses_taken): Likewise.
17983
17984 2017-07-27 James Greenhalgh <james.greenhalgh@arm.com>
17985
17986 * tree-ssa-loop-ch.c (pass_ch::process_loop_p): Guard on
17987 flag_tree_loop_vectorize rather than flag_tree_vectorize.
17988
17989 2017-07-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17990
17991 PR target/81534
17992 * config/s390/s390.md ("*atomic_compare_and_swap<mode>_1")
17993 ("*atomic_compare_and_swapdi_2", "*atomic_compare_and_swapsi_3"):
17994 Change s_operand to memory_operand.
17995
17996 2017-07-27 Richard Sandiford <richard.sandiford@linaro.org>
17997
17998 * config/rs6000/rs6000-protos.h (rs6000_emit_le_vsx_permute): Declare.
17999 * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Replace with...
18000 (rs6000_emit_le_vsx_permute): ...this. Take the destination as input.
18001 Emit instructions rather than returning an expression. Handle TFmode
18002 and KFmode by casting to TImode.
18003 (rs6000_emit_le_vsx_load): Update to use rs6000_emit_le_vsx_permute.
18004 (rs6000_emit_le_vsx_store): Likewise.
18005 * config/rs6000/vsx.md (VSX_TI): New iterator.
18006 (*vsx_le_permute_<mode>): Use it instead of VSX_LE_128.
18007 (*vsx_le_undo_permute_<mode>): Likewise.
18008 (*vsx_le_perm_load_<mode>): Use rs6000_emit_le_vsx_permute to
18009 emit the split sequence.
18010 (*vsx_le_perm_store_<mode>): Likewise.
18011
18012 2017-07-27 Jakub Jelinek <jakub@redhat.com>
18013
18014 PR tree-optimization/81555
18015 PR tree-optimization/81556
18016 * tree-ssa-reassoc.c (rewrite_expr_tree): Add NEXT_CHANGED argument,
18017 if true, force CHANGED for the recursive invocation.
18018 (reassociate_bb): Remember original length of ops array, pass
18019 len != orig_len as NEXT_CHANGED in rewrite_expr_tree call.
18020
18021 * attribs.c (decl_attributes): Imply noinline, noclone and no_icf
18022 attributes for noipa attribute. For naked attribute use
18023 lookup_attribute first before lookup_attribute_spec.
18024 * final.c (rest_of_handle_final): Disable IPA RA for functions with
18025 noipa attribute.
18026 * ipa-visibility.c (non_local_p): Fix comment typos. Return true
18027 for functions with noipa attribute.
18028 (cgraph_externally_visible_p): Return true for functions with noipa
18029 attribute.
18030 * cgraph.c (cgraph_node::get_availability): Return AVAIL_INTERPOSABLE
18031 for functions with noipa attribute.
18032 * doc/extend.texi: Document noipa function attribute.
18033 * tree-ssa-structalias.c (refered_from_nonlocal_fn): Set *nonlocal_p
18034 also for functions with noipa attribute.
18035 (ipa_pta_execute): Set nonlocal_p also for nodes with noipa attribute.
18036
18037 2017-07-26 Andrew Pinski <apinski@cavium.com>
18038
18039 * config/aarch64/aarch64.c (thunderx_vector_cost): Decrease cost of
18040 vec_unalign_load_cost and vec_unalign_store_cost.
18041
18042 2017-07-26 Michael Meissner <meissner@linux.vnet.ibm.com>
18043
18044 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Delete
18045 -mvsx-small-integer option.
18046 (ISA_3_0_MASKS_IEEE): Likewise.
18047 (OTHER_VSX_VECTOR_MASKS): Likewise.
18048 (POWERPC_MASKS): Likewise.
18049 * config/rs6000/rs6000.opt (-mvsx-small-integer): Likewise.
18050 * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Simplify
18051 code, only testing for DImode being allowed in non-VSX floating
18052 point registers.
18053 (rs6000_init_hard_regno_mode_ok): Change TARGET_VSX_SMALL_INTEGER
18054 to TARGET_P8_VECTOR test. Remove redundant VSX test inside of
18055 another VSX test.
18056 (rs6000_option_override_internal): Delete -mvsx-small-integer.
18057 (rs6000_expand_vector_set): Change TARGET_VSX_SMALL_INTEGER to
18058 TARGET_P8_VECTOR test.
18059 (rs6000_secondary_reload_simple_move): Likewise.
18060 (rs6000_preferred_reload_class): Delete TARGET_VSX_SMALL_INTEGER,
18061 since TARGET_P9_VECTOR was already tested.
18062 (rs6000_opt_masks): Remove -mvsx-small-integer.
18063 * config/rs6000/vsx.md (vsx_extract_<mode>): Delete
18064 TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
18065 used.
18066 (vsx_extract_<mode>_p9): Delete TARGET_VSX_SMALL_INTEGER, since a
18067 test for TARGET_VEXTRACTUB was used, and that uses
18068 TARGET_P9_VECTOR.
18069 (p9 extract splitter): Likewise.
18070 (vsx_extract_<mode>_di_p9): Likewise.
18071 (vsx_extract_<mode>_store_p9): Likewise.
18072 (vsx_extract_si): Delete TARGET_VSX_SMALL_INTEGER, since a test
18073 for TARGET_P9_VECTOR was used. Delete code that is now dead with
18074 the elimination of TARGET_VSX_SMALL_INTEGER.
18075 (vsx_extract_<mode>_p8): Likewise.
18076 (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_fl_<FL_CONV:mode>): Likewise.
18077 (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_ufl_<FL_CONV:mode>): Likewise.
18078 (vsx_set_<mode>_p9): Likewise.
18079 (vsx_set_v4sf_p9): Likewise.
18080 (vsx_set_v4sf_p9_zero): Likewise.
18081 (vsx_insert_extract_v4sf_p9): Likewise.
18082 (vsx_insert_extract_v4sf_p9_2): Likewise.
18083 * config/rs6000/rs6000.md (sign extend splitter): Change
18084 TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test.
18085 (floatsi<mode>2_lfiwax_mem): Likewise.
18086 (floatunssi<mode>2_lfiwzx_mem): Likewise.
18087 (float<QHI:mode><FP_ISA3:mode>2): Delete TARGET_VSX_SMALL_INTEGER,
18088 since a test for TARGET_P9_VECTOR was used.
18089 (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
18090 (floatuns<QHI:mode><FP_ISA3:mode>2): Likewise.
18091 (floatuns<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
18092 (fix_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
18093 TARGET_P8_VECTOR test.
18094 (fix_trunc<mode>si2_stfiwx): Likewise.
18095 (fix_trunc<mode>si2_internal): Likewise.
18096 (fix_trunc<SFDF:mode><QHI:mode>2): Delete
18097 TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
18098 used.
18099 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18100 (fixuns_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
18101 TARGET_P8_VECTOR test.
18102 (fixuns_trunc<mode>si2_stfiwx): Likewise.
18103 (fixuns_trunc<SFDF:mode><QHI:mode>2): Delete
18104 TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
18105 used.
18106 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18107 (fctiw<u>z_<mode>_smallint): Delete TARGET_VSX_SMALL_INTEGER,
18108 since a test for TARGET_P9_VECTOR was used.
18109 (splitter for loading small constants): Likewise.
18110
18111 2017-07-26 Andrew Pinski <apinski@cavium.com>
18112
18113 * config/aarch64/aarch64.c (thunderx_vector_cost): Fix
18114 vec_fp_stmt_cost.
18115
18116 2017-07-26 H.J. Lu <hongjiu.lu@intel.com>
18117
18118 PR target/81563
18119 * config/i386/i386.c (sp_valid_at): Properly check CFA offset.
18120 (fp_valid_at): Likewise.
18121
18122 2017-07-26 James Greenhalgh <james.greenhalgh@arm.com>
18123
18124 * config/aarch64/aarch64.c (cortexa57_addrcost_table): Remove.
18125 (qdf24xx_addrcost_table): Likewise.
18126 (cortexa57_tunings): Update to use generic_branch_cost.
18127 (cortexa72_tunings): Likewise.
18128 (cortexa73_tunings): Likewise.
18129 (qdf24xx_tunings): Likewise.
18130
18131 2017-07-26 James Greenhalgh <james.greenhalgh@arm.com>
18132
18133 * config/aarch64/aarch64.c (cortexa57_branch_cost): Remove.
18134 (thunderx2t99_branch_cost): Likewise.
18135 (cortexa35_tunings): Update to use generic_branch_cost.
18136 (cortexa53_tunings): Likewise.
18137 (cortexa57_tunings): Likewise.
18138 (cortexa72_tunings): Likewise.
18139 (cortexa73_tunings): Likewise.
18140 (thunderx2t99_tunings): Likewise.
18141
18142 2017-07-26 Sebastian Huber <sebastian.huber@embedded-brains.de>
18143
18144 * config/sparc/sparc.c (dump_target_flag_bits): Dump MASK_FSMULD.
18145 (sparc_option_override): Honour MASK_FSMULD.
18146 * config/sparc/sparc.h (MASK_FEATURES): Add MASK_FSMULD.
18147 * config/sparc/sparc.md (muldf3_extend): Use TARGET_FSMULD.
18148 * config/sparc/sparc.opt (mfsmuld): New option.
18149 * doc/invoke.texi (mfsmuld): Document option.
18150
18151 2017-07-26 Marek Polacek <polacek@redhat.com>
18152
18153 PR middle-end/70992
18154 * tree.c (build2_stat): Don't set TREE_CONSTANT on divisions by zero.
18155
18156 2017-07-26 Richard Biener <rguenther@suse.de>
18157
18158 * gimple-match-head.c (do_valueize): Return OP if valueize
18159 returns NULL_TREE.
18160 (get_def): New helper to get at the def stmt of a SSA name
18161 if valueize allows.
18162 * genmatch.c (dt_node::gen_kids_1): Use get_def instead of
18163 do_valueize to get at the def stmt.
18164 (dt_operand::gen_gimple_expr): Simplify do_valueize calls.
18165
18166 2017-07-26 Wilco Dijkstra <wdijkstr@arm.com>
18167
18168 PR middle-end/46932
18169 * auto-inc-dec.c (parse_add_or_inc): Block autoinc on sfp.
18170
18171 2017-07-26 Martin Liska <mliska@suse.cz>
18172
18173 PR sanitize/81186
18174 * function.c (expand_function_start): Make expansion of
18175 nonlocal_goto_save_area after parm_birth_insn.
18176
18177 2017-07-26 Sebastian Huber <sebastian.huber@embedded-brains.de>
18178
18179 * config/sparc/sparc.c (sparc_option_override): Remove MASK_FPU
18180 from all CPU target flags enable members.
18181
18182 2017-07-26 Richard Biener <rguenther@suse.de>
18183
18184 * genmatch.c (dt_simplify::gen): Make iterator vars const.
18185 (decision_tree::gen): Make 'type' const.
18186 (write_predicate): Likewise.
18187
18188 2017-07-24 Michael Meissner <meissner@linux.vnet.ibm.com>
18189
18190 * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok):
18191 Eliminate TARGET_UPPER_REGS_{DF,DI,SF} usage.
18192 (rs6000_option_override_internal): Likewise.
18193 (rs6000_expand_vector_set): Likewise.
18194 * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Delete.
18195 (TARGET_UPPER_REGS_SF): Likewise.
18196 (TARGET_UPPER_REGS_DI): Likewise.
18197 (TARGET_VEXTRACTUB): Eliminate TARGET_UPPER_REGS_{DF,DI,SF}.
18198 (TARGET_DIRECT_MOVE_64BIT): Likewise.
18199 * config/rs6000/rs6000.md (ALTIVEC_DFORM): Likewise.
18200 (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
18201 (Splitters for DI constants in Altivec registers): Likewise.
18202 * config/rs6000/vsx.md (vsx_set_<mode>_p9): Likewise.
18203 (vsx_set_v4sf_p9): Likewise.
18204 (vsx_set_v4sf_p9_zero): Likewise.
18205 (vsx_insert_extract_v4sf_p9): Likewise.
18206 (vsx_insert_extract_v4sf_p9_2): Likewise.
18207
18208 2017-07-25 Carl Love <cel@us.ibm.com>
18209
18210 * doc/extend.texi: Update the built-in documentation file for the
18211 existing built-in functions
18212 vector signed char vec_cnttz (vector signed char);
18213 vector unsigned char vec_cnttz (vector unsigned char);
18214 vector signed short vec_cnttz (vector signed short);
18215 vector unsigned short vec_cnttz (vector unsigned short);
18216 vector signed int vec_cnttz (vector signed int);
18217 vector unsigned int vec_cnttz (vector unsigned int);
18218 vector signed long long vec_cnttz (vector signed long long);
18219 vector unsigned long long vec_cnttz (vector unsigned long long);
18220
18221 2017-07-25 Andrew Pinski <apinski@cavium.com>
18222
18223 * tree-ssa-uninit.c (warn_uninitialized_vars): Don't warn about memory
18224 accesses where the use is for the first operand of a BIT_INSERT.
18225
18226 2017-07-25 Jim Wilson <jim.wilson@linaro.org>
18227
18228 PR bootstrap/81521
18229 * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
18230 for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
18231
18232 2017-07-25 Jim Wilson <jim.wilson@linaro.org>
18233
18234 * config/i386/gstabs.h: Delete.
18235 * config/i386/openbsd.h, config/i386/t-openbsd: Likewise.
18236
18237 2017-07-25 Uros Bizjak <ubizjak@gmail.com>
18238
18239 * config/i386/i386.c (ix86_decompose_address): Do not check for
18240 register RTX when looking at index_reg or base_reg.
18241 * config/i386/i386.h (INCOMING_RETURN_ADDR_RTX): Use stack_pointer_rtx.
18242
18243 2017-07-25 Eric Botcazou <ebotcazou@adacore.com>
18244
18245 * gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace
18246 to update EH info here.
18247
18248 2017-07-25 Alexander Monakov <amonakov@ispras.ru>
18249
18250 * match.pd ((X * CST1) * CST2): Simplify to X * (CST1 * CST2).
18251
18252 2017-07-25 Alexander Monakov <amonakov@ispras.ru>
18253
18254 * match.pd ((X * CST) * Y): Reassociate to (X * Y) * CST.
18255
18256 2017-07-25 Torsten Duwe <duwe@suse.de>
18257
18258 * common.opt: Introduce -fpatchable-function-entry
18259 command line option, and its variables function_entry_patch_area_size
18260 and function_entry_patch_area_start.
18261 * opts.c (common_handle_option): Add -fpatchable_function_entry_ case,
18262 including a two-value parser.
18263 * target.def (print_patchable_function_entry): New target hook.
18264 * targhooks.h (default_print_patchable_function_entry): New function.
18265 * targhooks.c (default_print_patchable_function_entry): Likewise.
18266 * toplev.c (process_options): Switch off IPA-RA if
18267 patchable function entries are being generated.
18268 * varasm.c (assemble_start_function): Look at the
18269 patchable-function-entry command line switch and current
18270 function attributes and maybe generate NOP instructions by
18271 calling the print_patchable_function_entry hook.
18272 * doc/extend.texi: Document patchable_function_entry attribute.
18273 * doc/invoke.texi: Document -fpatchable_function_entry
18274 command line option.
18275 * doc/tm.texi.in (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
18276 New target hook.
18277 * doc/tm.texi: Re-generate.
18278
18279 2017-07-25 Jakub Jelinek <jakub@redhat.com>
18280
18281 PR target/81532
18282 * config/i386/constraints.md (Yd, Ye): Use ALL_SSE_REGS for
18283 TARGET_AVX512DQ rather than TARGET_AVX512BW.
18284
18285 2017-07-25 Tamar Christina <tamar.christina@arm.com>
18286
18287 * config/arm/parsecpu.awk (all_cores): Remove duplicates.
18288
18289 2017-07-25 Richard Biener <rguenther@suse.de>
18290
18291 PR tree-optimization/81455
18292 * tree-ssa-loop-unswitch.c (find_loop_guard): Make sure to
18293 not walk in cycles when looking for guards.
18294
18295 2017-07-25 Richard Biener <rguenther@suse.de>
18296
18297 PR tree-optimization/81529
18298 * tree-vect-stmts.c (process_use): Disregard live induction PHIs
18299 when optimizing backedge uses.
18300
18301 2017-07-25 David Edelsohn <dje.gcc@gmail.com>
18302
18303 * dwarf2asm.c (dw2_asm_output_nstring): Encode double quote
18304 character for AIX.
18305 * dwarf2out.c (output_macinfo): Copy debug_line_section_label
18306 to dl_section_ref. On AIX, append an expression to subtract
18307 the size of the section length to dl_section_ref.
18308
18309 2017-07-25 Segher Boessenkool <segher@kernel.crashing.org>
18310
18311 * configure.ac: If any of the config.* scripts fail, exit 1.
18312 * configure: Regenerate.
18313
18314 2017-07-25 Richard Biener <rguenther@suse.de>
18315
18316 PR middle-end/81546
18317 * tree-ssa-operands.c (verify_imm_links): Remove cap on number
18318 of immediate uses, be more verbose on errors.
18319
18320 2017-07-25 Richard Biener <rguenther@suse.de>
18321
18322 PR tree-optimization/81510
18323 * tree-vect-loop.c (vect_is_simple_reduction): When the
18324 reduction stmt is not inside the loop bail out.
18325
18326 2017-07-25 Richard Biener <rguenther@suse.de>
18327
18328 PR tree-optimization/81303
18329 * tree-vect-loop-manip.c (vect_loop_versioning): Build
18330 profitability check against LOOP_VINFO_NITERSM1.
18331
18332 2017-07-25 Alexander Monakov <amonakov@ispras.ru>
18333
18334 * domwalk.c (cmp_bb_postorder): Simplify.
18335 (sort_bbs_postorder): New function. Use it...
18336 (dom_walker::walk): ...here to optimize common cases.
18337
18338 2017-07-25 Martin Liska <mliska@suse.cz>
18339
18340 PR ipa/81520
18341 * ipa-visibility.c (function_and_variable_visibility): Make the
18342 redirection just on target that supports aliasing.
18343 Fix GNU coding style.
18344
18345 2017-07-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
18346
18347 PR libgcc/61152
18348 * config/aarch64/rtems.h: Add GCC Runtime Library Exception.
18349 Format changes.
18350 * config/arm/rtems.h: Likewise.
18351 * config/bfin/rtems.h: Likewise.
18352 * config/i386/rtemself.h: Likewise.
18353 * config/lm32/rtems.h: Likewise.
18354 * config/m32c/rtems.h: Likewise.
18355 * config/m68k/rtemself.h: Likewise.
18356 * config/microblaze/rtems.h: Likewise.
18357 * config/mips/rtems.h: Likewise.
18358 * config/moxie/rtems.h: Likewise.
18359 * config/nios2/rtems.h: Likewise.
18360 * config/powerpcspe/rtems.h: Likewise.
18361 * config/rs6000/rtems.h: Likewise.
18362 * config/rtems.h: Likewise.
18363 * config/sh/rtems.h: Likewise.
18364 * config/sh/rtemself.h: Likewise.
18365 * config/sparc/rtemself.h: Likewise.
18366
18367 2017-07-25 Georg-Johann Lay <avr@gjlay.de>
18368
18369 PR 81487
18370 * hsa-brig.c (brig_init): Use xasprintf instead of asprintf.
18371 * gimple-pretty-print.c (dump_profile, dump_probability): Same.
18372 * tree-ssa-structalias.c (alias_get_name): Same.
18373
18374 2017-07-25 Bin Cheng <bin.cheng@arm.com>
18375
18376 PR target/81414
18377 * config/aarch64/cortex-a57-fma-steering.c (analyze): Skip fmul/fmac
18378 instructions if no du chain is found.
18379
18380 2017-07-25 Georg-Johann Lay <avr@gjlay.de>
18381
18382 * config/avr/avr-log.c (avr_log_vadump) ['T']: Print NULL-TREE.
18383
18384 2017-07-25 Richard Biener <rguenther@suse.de>
18385
18386 PR middle-end/81505
18387 * fold-const.c (fold_negate_const): TREE_OVERFLOW should be
18388 sticky.
18389
18390 2017-07-24 Michael Meissner <meissner@linux.vnet.ibm.com>
18391
18392 * config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Delete
18393 upper-regs options.
18394 (ISA_2_7_MASKS_SERVER): Likewise.
18395 (ISA_3_0_MASKS_IEEE): Likewise.
18396 (OTHER_P8_VECTOR_MASKS): Likewise.
18397 (OTHER_VSX_VECTOR_MASKS): Likewise.
18398 (POWERPC_MASKS): Likewise.
18399 (power7 cpu): Use ISA_2_6_MASKS_SERVER instead of using a
18400 duplicate list of options.
18401 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove
18402 explicit -mupper-regs options.
18403 * config/rs6000/rs6000.opt (-mvsx-scalar-memory): Delete
18404 -mupper-regs* options. Delete -mvsx-scalar-memory, which was an
18405 alias for -mupper-regs-df.
18406 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
18407 (rs6000_init_hard_regno_mode_ok): Likewise.
18408 (rs6000_option_override_internal): Likewise.
18409 (rs6000_opt_masks): Likewise.
18410 * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Define upper regs
18411 options in terms of whether -mvsx or -mpower8-vector was used.
18412 (TARGET_UPPER_REGS_DI): Likewise.
18413 (TARGET_UPPER_REGS_SF): Likewise.
18414 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete the
18415 -mupper-regs-* options.
18416
18417 2017-07-24 Segher Boessenkool <segher@kernel.crashing.org>
18418
18419 * passes.c (emergency_dump_function): Print some empty lines and a
18420 header before the RTL dump.
18421
18422 2017-07-24 Segher Boessenkool <segher@kernel.crashing.org>
18423
18424 * cfgrtl.c (rtl_dump_bb): Don't call NEXT_INSN on NULL.
18425
18426 2017-07-24 Wilco Dijkstra <wdijkstr@arm.com>
18427
18428 PR target/79041
18429 * config/aarch64/aarch64.c (aarch64_classify_symbol):
18430 Avoid SYMBOL_SMALL_ABSOLUTE for literals with pc-relative literals.
18431
18432 2017-07-24 Carl Love <cel@us.ibm.com>
18433
18434 * config/rs6000/rs6000-c.c: Add support for built-in functions
18435 vector float vec_extract_fp32_from_shorth (vector unsigned short);
18436 vector float vec_extract_fp32_from_shortl (vector unsigned short);
18437 * config/rs6000/altivec.h (vec_extract_fp_from_shorth,
18438 vec_extract_fp_from_shortl): Add defines for the two builtins.
18439 * config/rs6000/rs6000-builtin.def (VEXTRACT_FP_FROM_SHORTH,
18440 VEXTRACT_FP_FROM_SHORTL): Add BU_P9V_OVERLOAD_1 and BU_P9V_VSX_1
18441 new builtins.
18442 * config/rs6000/vsx.md vsx_xvcvhpsp): Add define_insn.
18443 (vextract_fp_from_shorth, vextract_fp_from_shortl): Add define_expands.
18444 * doc/extend.texi: Update the built-in documentation file for the
18445 new built-in function.
18446
18447 2017-07-24 Jakub Jelinek <jakub@redhat.com>
18448
18449 PR bootstrap/81521
18450 * tree.def: Remove TYPE_METHODS documentation, adjust TYPE_FIELDS
18451 documentation.
18452 * doc/generic.texi: Likewise.
18453 * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
18454 for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
18455
18456 2017-07-24 Jackson Woodruff <jackson.woodruff@arm.com>
18457
18458 * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): New.
18459 (aarch64_mls_elt_merge<mode>): Likewise.
18460
18461 2017-07-23 Krister Walfridsson <krister.walfridsson@gmail.com>
18462
18463 * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
18464 having __cxa_atexit.
18465
18466 2017-07-23 Michael Collison <michael.collison@arm.com>
18467
18468 * config/arm/arm.c (arm_option_override): Deprecate
18469 use of -mstructure-size-boundary.
18470 * config/arm/arm.opt: Deprecate -mstructure-size-boundary.
18471 * doc/invoke.texi: Deprecate -mstructure-size-boundary.
18472
18473 2017-07-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18474
18475 PR target/80695
18476 * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
18477 Reduce cost estimate for direct moves.
18478
18479 2017-07-23 Uros Bizjak <ubizjak@gmail.com>
18480
18481 PR target/80569
18482 * config/i386/i386.c (ix86_option_override_internal): Disable
18483 BMI, BMI2 and TBM instructions for -m16.
18484
18485 2017-07-21 Carl Love <cel@us.ibm.com>
18486
18487 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
18488 ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
18489 ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
18490 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
18491 builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
18492 * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
18493 VMULOSW): New enum "unspec" values.
18494 (altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
18495 altivec_vmulosw): New patterns.
18496 * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
18497 VMULOSW): Add definitions.
18498
18499 2017-07-21 Jim Wilson <jim.wilson@linaro.org>
18500
18501 * config/aarch64/aarch64-cores.def (falkor): Add AARCH64_FL_RDMA.
18502 (qdf24xx): Likewise.
18503 * config/aarch64/aarch64-options-extensions.def (rdma); New.
18504 * config/aarch64/aarch64.h (AARCH64_FL_RDMA): New.
18505 (AARCH64_FL_V8_1): Renumber.
18506 (AARCH64_FL_FOR_ARCH8_1): Add AARCH64_FL_RDMA.
18507 (AARCH64_ISA_RDMA): Use AARCH64_FL_RDMA.
18508 * config/aarch64/arm_neon.h: Use +rdma instead of arch=armv8.1-a.
18509 * doc/invoke.texi (AArch64 Options): Mention +rmda in -march docs. Add
18510 rdma to feature modifiers list.
18511
18512 2017-07-21 Yury Gribov <tetra2005@gmail.com>
18513
18514 PR middle-end/56727
18515 * ipa-visibility (function_and_variable_visibility): Convert
18516 recursive PLT call to direct call if appropriate.
18517
18518 2017-07-21 Andrew Pinski <apinski@cavium.com>
18519
18520 * tree-ssa-sccvn.c (vn_nary_op_eq): Check BIT_INSERT_EXPR's
18521 operand 1 to see if the types precision matches.
18522 * fold-const.c (operand_equal_p): Likewise.
18523
18524 2017-07-21 Richard Biener <rguenther@suse.de>
18525
18526 PR tree-optimization/81303
18527 * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Pass
18528 in datarefs vector. Allow NULL dr0 for no peeling cost estimate.
18529 (vect_peeling_hash_get_lowest_cost): Adjust.
18530 (vect_enhance_data_refs_alignment): Likewise. Use
18531 vect_get_peeling_costs_all_drs to compute the penalty for no
18532 peeling to match up costs.
18533
18534 2017-07-21 Richard Biener <rguenther@suse.de>
18535
18536 PR tree-optimization/81500
18537 * tree-vect-loop.c (vect_is_simple_reduction): Properly fail if
18538 we didn't identify a reduction path.
18539
18540 2017-07-21 Tom de Vries <tom@codesourcery.com>
18541 Cesar Philippidis <cesar@codesourcery.com>
18542
18543 PR gcov-profile/81442
18544 * config/nvptx/nvptx.c (nvptx_goacc_reduction_init): Add missing edge
18545 probabilities.
18546
18547 2017-07-21 Tom de Vries <tom@codesourcery.com>
18548
18549 PR lto/81430
18550 * config/nvptx/nvptx.c (nvptx_override_options_after_change): New
18551 function.
18552 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define to
18553 nvptx_override_options_after_change.
18554
18555 2017-07-21 Ulrich Drepper <drepper@redhat.com>
18556
18557 * dwarf2out.c (output_file_names): Avoid double testing for
18558 dwarf_version >= 5.
18559
18560 2017-07-21 Georg-Johann Lay <avr@gjlay.de>
18561
18562 * doc/invoke.texi (AVR Built-in Functions): Re-layout section.
18563
18564 2016-07-21 Jan Hubicka <hubicka@ucw.cz>
18565
18566 * cfgcleanup.c (flow_find_cross_jump): Do not crossjump across
18567 hot/cold regions.
18568 (try_crossjump_to_edge): Do not punt on partitioned functions.
18569
18570 2016-07-21 Jan Hubicka <hubicka@ucw.cz>
18571
18572 * bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
18573 Put all BBs reachable only via paths crossing cold region to cold
18574 region.
18575 * cfgrtl.c (find_bbs_reachable_by_hot_paths): New function.
18576
18577 2016-07-21 Richard Biener <rguenther@suse.de>
18578
18579 PR tree-optimization/81303
18580 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Take
18581 into account prologue and epilogue iterations when raising
18582 min_profitable_iters to sth at least covering one vector iteration.
18583
18584 2017-07-21 Tamar Christina <tamar.christina@arm.com>
18585
18586 * config/arm/arm.c (arm_test_cpu_arch_dat):
18587 Check for overlap.
18588
18589 2017-07-20 Nathan Sidwell <nathan@acm.org>
18590
18591 Remove TYPE_METHODS.
18592 * tree.h (TYPE_METHODS): Delete.
18593 * dwarf2out.c (gen_member_die): Member fns are on TYPE_FIELDS.
18594 * dbxout.c (dbxout_type_fields): Ignore FUNCTION_DECLs.
18595 (dbxout_type_methods): Scan TYPE_FIELDS.
18596 (dbxout_type): Don't check TYPE_METHODS here.
18597 * function.c (use_register_for_decl): Always ignore register for
18598 class types when not optimizing.
18599 * ipa-devirt.c (odr_types_equivalent_p): Delete TYPE_METHODS scan.
18600 * tree.c (free_lang_data_in_type): Stitch out member functions and
18601 templates from TYPE_FIELDS.
18602 (build_distinct_type_copy, verify_type_variant,
18603 verify_type): Member fns are on TYPE_FIELDS.
18604 * tree-dump.c (dequeue_and_dump): No TYPE_METHODS.
18605 * tree-pretty-print.c (dump_generic_node): Likewise.
18606
18607 2017-07-20 Jakub Jelinek <jakub@redhat.com>
18608
18609 PR target/80846
18610 * config/i386/i386.c (ix86_expand_vector_init_general): Handle
18611 V2TImode and V4TImode.
18612 (ix86_expand_vector_extract): Likewise.
18613 * config/i386/sse.md (VMOVE): Enable V4TImode even for just
18614 TARGET_AVX512F, instead of only for TARGET_AVX512BW.
18615 (ssescalarmode): Handle V4TImode and V2TImode.
18616 (VEC_EXTRACT_MODE): Add V4TImode and V2TImode.
18617 (*vec_extractv2ti, *vec_extractv4ti): New insns.
18618 (VEXTRACTI128_MODE): New mode iterator.
18619 (splitter for *vec_extractv?ti first element): New.
18620 (VEC_INIT_MODE): New mode iterator.
18621 (vec_init<mode>): Consolidate 3 expanders into one using
18622 VEC_INIT_MODE mode iterator.
18623
18624 2017-07-20 Alexander Monakov <amonakov@ispras.ru>
18625
18626 * lra-assigns.c (pseudo_compare_func): Fix comparison step based on
18627 non_spilled_static_chain_regno_p.
18628
18629 2017-07-20 Alexander Monakov <amonakov@ispras.ru>
18630
18631 * gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.
18632
18633 2017-07-20 Jan Hubicka <hubicka@ucw.cz>
18634
18635 * bb-reorder.c (connect_traces): Allow copying of blocks within
18636 single partition.
18637
18638 2017-07-20 Richard Biener <rguenther@suse.de>
18639
18640 * gimple.h (gimple_phi_result): Add gphi * overload.
18641 (gimple_phi_result_ptr): Likewise.
18642 (gimple_phi_arg): Likewise. Adjust index assert to only
18643 allow actual argument accesses rather than all slots available
18644 by capacity.
18645 (gimple_phi_arg_def): Add gphi * overload.
18646 * tree-phinodes.c (make_phi_node): Initialize only actual
18647 arguments.
18648 (resize_phi_node): Clear memory not covered by old node,
18649 do not initialize excess argument slots.
18650 (reserve_phi_args_for_new_edge): Initialize new argument slot
18651 completely.
18652
18653 2017-07-20 Bin Cheng <bin.cheng@arm.com>
18654
18655 PR tree-optimization/81388
18656 Revert r238585:
18657 2016-07-21 Bin Cheng <bin.cheng@arm.com>
18658
18659 * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up
18660 by removing computation of may_be_zero.
18661
18662 2017-07-18 Jan Hubicka <hubicka@ucw.cz>
18663 Tom de Vries <tom@codesourcery.com>
18664
18665 PR middle-end/81030
18666 * cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
18667 when gimple level profile disagrees with what RTL expander did.
18668
18669 2017-07-20 Richard Biener <rguenther@suse.de>
18670
18671 PR tree-optimization/61171
18672 * tree-vectorizer.h (slp_instance): Add reduc_phis member.
18673 (vect_analyze_stmt): Add slp instance parameter.
18674 (vectorizable_reduction): Likewise.
18675 * tree-vect-loop.c (vect_analyze_loop_operations): Adjust.
18676 (vect_is_simple_reduction): Deal with chains not detected
18677 as SLP reduction chain, specifically not properly associated
18678 chains containing a mix of plus/minus.
18679 (get_reduction_op): Remove.
18680 (get_initial_defs_for_reduction): Simplify, pass in whether
18681 this is a reduction chain, pass in the SLP node for the PHIs.
18682 (vect_create_epilog_for_reduction): Get the SLP instance as
18683 arg and adjust.
18684 (vectorizable_reduction): Get the SLP instance as arg.
18685 During analysis remember the SLP node with the PHIs in the
18686 instance. Simplify getting at the vectorized reduction PHIs.
18687 * tree-vect-slp.c (vect_slp_analyze_node_operations): Pass
18688 through SLP instance.
18689 (vect_slp_analyze_operations): Likewise.
18690 * tree-vect-stms.c (vect_analyze_stmt): Likewise.
18691 (vect_transform_stmt): Likewise.
18692
18693 2017-07-20 Tom de Vries <tom@codesourcery.com>
18694
18695 PR tree-optimization/81489
18696 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Move
18697 read of phi arg location to before loop that modifies phi.
18698
18699 2017-07-20 Naveen H.S <Naveen.Hurugalawadi@cavium.com>
18700
18701 * match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0):
18702 New pattern.
18703
18704 2017-07-19 Jan Hubicka <hubicka@ucw.cz>
18705
18706 PR middle-end/81331
18707 * except.c (execute): Fix ordering issue.
18708
18709 2018-07-19 Segher Boessenkool <segher@kernel.crashing.org>
18710
18711 PR rtl-optimization/81423
18712 * combine.c (make_compound_operation_int): Don't try to optimize
18713 the AND of a SUBREG of an LSHIFTRT if that SUBREG is paradoxical.
18714
18715 2017-07-19 Segher Boessenkool <segher@kernel.crashing.org>
18716
18717 PR rtl-optimization/81423
18718 * simplify-rtx.c (simplify_truncation): Handle truncating an IOR
18719 with a constant that is -1 in the truncated to mode.
18720
18721 2017-07-19 Jan Hubicka <hubicka@ucw.cz>
18722
18723 * predict.c (propagate_unlikely_bbs_forward): Break out from ...
18724 (determine_unlikely_bbs): ... here.
18725 * predict.h (propagate_unlikely_bbs_forward): Declare.
18726 * cfgexpand.c (pass_expand::execute): Use it.
18727 * bb-reorder.c (sanitize_hot_paths): Do not consider known to be
18728 unlikely edges.
18729 (find_rarely_executed_basic_blocks_and_crossing_edges): Use
18730 propagate_unlikely_bbs_forward.
18731
18732 2017-07-19 Jan Hubicka <hubicka@ucw.cz>
18733
18734 PR middle-end/81331
18735 * except.c (maybe_add_nop_after_section_switch): New function.
18736 (execute): Use it.
18737
18738 2017-07-19 Tom de Vries <tom@codesourcery.com>
18739
18740 * gimple.h (gimple_phi_set_arg): Make assert more strict.
18741
18742 2017-07-19 Tom de Vries <tom@codesourcery.com>
18743
18744 * gimple.h (gimple_phi_arg): Make assert more strict.
18745
18746 2017-07-19 Steven Munroe <munroesj@gcc.gnu.org>
18747
18748 * config.gcc (powerpc*-*-*): Add mmintrin.h.
18749 * config/rs6000/mmintrin.h: New file.
18750 * config/rs6000/x86intrin.h [__ALTIVEC__]: Include mmintrin.h.
18751
18752 2017-07-19 Jakub Jelinek <jakub@redhat.com>
18753
18754 PR tree-optimization/81346
18755 * match.pd: Optimize (X - 1U) <= INT_MAX-1U into (int) X > 0.
18756
18757 2017-07-19 Tom de Vries <tom@codesourcery.com>
18758
18759 * config/nvptx/nvptx.md (VECIM): Add V2DI.
18760
18761 2017-07-19 Tom de Vries <tom@codesourcery.com>
18762
18763 * config/nvptx/nvptx-modes.def: Add V2DImode.
18764 * config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare.
18765 * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode.
18766 (nvptx_output_mov_insn): Handle lack of mov.b128.
18767 (nvptx_print_operand): Handle 'H' and 'L' codes.
18768 (nvptx_vector_mode_supported): Allow V2DImode.
18769 (nvptx_preferred_simd_mode): New function.
18770 (nvptx_data_alignment): New function.
18771 (TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to
18772 nvptx_preferred_simd_mode.
18773 * config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from
18774 64 to 128 bits.
18775 (DATA_ALIGNMENT): Define. Set to nvptx_data_alignment.
18776
18777 2017-07-19 Tom de Vries <tom@codesourcery.com>
18778
18779 * config/nvptx/nvptx-modes.def: New file. Add V2SImode.
18780 * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2SImode.
18781 (nvptx_vector_mode_supported): New function. Allow V2SImode.
18782 (TARGET_VECTOR_MODE_SUPPORTED_P): Redefine to nvptx_vector_mode_supported.
18783 * config/nvptx/nvptx.md (VECIM): New mode iterator. Add V2SI.
18784 (mov<VECIM>_insn): New define_insn.
18785 (define_expand "mov<VECIM>): New define_expand.
18786
18787 2017-07-19 Tom de Vries <tom@codesourcery.com>
18788
18789 * config/nvptx/nvptx.c (nvptx_print_operand): Handle v2 vector mode.
18790
18791 2017-07-19 Jakub Jelinek <jakub@redhat.com>
18792
18793 PR tree-optimization/81346
18794 * fold-const.h (fold_div_compare, range_check_type): Declare.
18795 * fold-const.c (range_check_type): New function.
18796 (build_range_check): Use range_check_type.
18797 (fold_div_compare): No longer static, rewritten into
18798 a match.pd helper function.
18799 (fold_comparison): Don't call fold_div_compare here.
18800 * match.pd (X / C1 op C2): New optimization using fold_div_compare
18801 as helper function.
18802
18803 2017-07-19 Nathan Sidwell <nathan@acm.org>
18804
18805 * tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ...
18806 (TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these.
18807 * tree.c (find_decls_types_r, verify_type): Use
18808 TYPE_{MIN,MAX}_VALUE_RAW.
18809 * lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise.
18810 (hash_tree): Likewise.
18811 * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
18812 Likewise.
18813 * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
18814 Likewise.
18815
18816 2017-07-18 Tom de Vries <tom@codesourcery.com>
18817
18818 PR middle-end/81464
18819 * omp-expand.c (expand_omp_for_static_chunk): Handle
18820 equal-argument loop exit phi.
18821
18822 2017-07-18 Uros Bizjak <ubizjak@gmail.com>
18823
18824 PR target/81471
18825 * config/i386/i386.md (rorx_immediate_operand): New mode attribute.
18826 (*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
18827 operand 2 predicate.
18828 (*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
18829 operand 2 predicate.
18830 (ror,rol -> rorx splitters): Use const_int_operand as
18831 operand 2 predicate.
18832
18833 2017-06-18 Richard Biener <rguenther@suse.de>
18834
18835 PR tree-optimization/81410
18836 * tree-vect-stmts.c (vectorizable_load): Properly adjust for
18837 the gap in the ! slp_perm SLP case after each group.
18838
18839 2017-07-18 Jan Hubicka <hubicka@ucw.cz>
18840
18841 PR middle-end/81463
18842 * cfgloopmanip.c (scale_loop_profile): Watch out for zero frequency
18843 again.
18844
18845 2017-07-18 Jan Hubicka <hubicka@ucw.cz>
18846
18847 PR middle-end/81462
18848 * predict.c (set_even_probabilities): Cleanup; do not affect
18849 probabilities that are already known.
18850 (combine_predictions_for_bb): Call even when count is set.
18851
18852 2017-07-18 Nathan Sidwell <nathan@acm.org>
18853
18854 * tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
18855 TYPE_MAX_VALUE.
18856
18857 2017-07-18 Bin Cheng <bin.cheng@arm.com>
18858
18859 PR target/81408
18860 * tree-ssa-loop-niter.c (number_of_iterations_exit): Dump missed
18861 optimization for loop niter analysis.
18862
18863 2017-07-18 Georg-Johann Lay <avr@gjlay.de>
18864
18865 PR target/81473
18866 * config/avr/avr.c (avr_optimize_casesi): Don't use
18867 INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX.
18868
18869 2017-07-18 Robin Dapp <rdapp@linux.vnet.ibm.com>
18870
18871 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Remove
18872 body_cost_vec from _vect_peel_extended_info.
18873 (vect_peeling_hash_get_lowest_cost): Do not set body_cost_vec.
18874 (vect_peeling_hash_choose_best_peeling): Remove body_cost_vec and
18875 npeel.
18876
18877 2017-07-18 Bin Cheng <bin.cheng@arm.com>
18878
18879 * config/arm/arm.c (emit_unlikely_jump): Remove unused var.
18880
18881 2017-07-18 Richard Biener <rguenther@suse.de>
18882
18883 PR tree-optimization/80620
18884 PR tree-optimization/81403
18885 * tree-ssa-pre.c (phi_translate_1): Clear range and points-to
18886 info when re-using a VN table entry.
18887
18888 2017-07-18 Richard Biener <rguenther@suse.de>
18889
18890 PR tree-optimization/81418
18891 * tree-vect-loop.c (vectorizable_reduction): Properly compute
18892 vectype_in. Verify that with lane-reducing reduction operations
18893 we have a single def-use cycle.
18894
18895 2017-07-17 Carl Love <cel@us.ibm.com>
18896
18897 Revert commit r249424 2017-06-20 Carl Love <cel@us.ibm.com>
18898
18899 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
18900 ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
18901 ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
18902 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
18903 builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
18904 * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
18905 VMULOSW): New enum "unspec" values.
18906 (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
18907 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
18908 altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
18909 altivec_vmulosw): New patterns.
18910 * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
18911 VMULOSW): Add definitions.
18912 2017-07-17 Uros Bizjak <ubizjak@gmail.com>
18913
18914 * config/alpha/alpha.c: Include predict.h.
18915
18916 2017-07-17 Yury Gribov <tetra2005@gmail.com>
18917
18918 * tree-vrp.c (compare_assert_loc): Fix comparison function
18919 to return predictable results.
18920
18921 2017-07-17 Claudiu Zissulescu <claziss@synopsys.com>
18922
18923 * config/arc/arc.md (adddi3): Remove support for mexpand-adddi
18924 option.
18925 (subdi3): Likewise.
18926 * config/arc/arc.opt (mexpand-adddi): Deprecate it.
18927 * doc/invoke.texi (mexpand-adddi): Update text.
18928
18929 2017-07-17 Claudiu Zissulescu <claziss@synopsys.com>
18930
18931 * config/arc/arc.md (clzsi2): Expand to an arc_clzsi2 instruction
18932 that also clobbers the CC register. The old expand code is moved
18933 to ...
18934 (*arc_clzsi2): ... here.
18935 (ctzsi2): Expand to an arc_ctzsi2 instruction that also clobbers
18936 the CC register. The old expand code is moved to ...
18937 (arc_ctzsi2): ... here.
18938
18939 2017-07-17 Claudiu Zissulescu <claziss@synopsys.com>
18940
18941 * config/arc/arc.opt (mindexed-loads): Use initial value
18942 TARGET_INDEXED_LOADS_DEFAULT.
18943 (mauto-modify-reg): Use initial value
18944 TARGET_AUTO_MODIFY_REG_DEFAULT.
18945 * config/arc/elf.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
18946 (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
18947 * config/arc/linux.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
18948 (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
18949
18950 2017-07-17 Martin Liska <mliska@suse.cz>
18951
18952 PR sanitizer/81302
18953 * opts.c (finish_options): Do not allow -fgnu-tm
18954 w/ -fsanitize={kernel-,}address. Say sorry.
18955
18956 2017-07-17 Bin Cheng <bin.cheng@arm.com>
18957
18958 PR target/81369
18959 * tree-loop-distribution.c (classify_partition): Only assert on
18960 numer of iterations.
18961 (merge_dep_scc_partitions): Delete prameter. Update function call.
18962 (distribute_loop): Remove code handling loop with unknown niters.
18963 (pass_loop_distribution::execute): Skip loop with unknown niters.
18964
18965 2017-07-17 Bin Cheng <bin.cheng@arm.com>
18966
18967 PR target/81369
18968 * tree-loop-distribution.c (merge_dep_scc_partitions): Sink call to
18969 function sort_partitions_by_post_order.
18970
18971 2017-07-17 Bin Cheng <bin.cheng@arm.com>
18972
18973 PR tree-optimization/81374
18974 * tree-loop-distribution.c (pass_loop_distribution::execute): Record
18975 the max index of basic blocks, rather than number of basic blocks.
18976
18977 2017-07-17 Claudiu Zissulescu <claziss@synopsys.com>
18978
18979 * config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
18980 proto.
18981 (arc_legitimate_pic_operand_p): Likewise.
18982 * config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
18983 function.
18984 (arc_needs_pcl_p): Likewise.
18985 (arc_legitimate_pc_offset_p): Likewise.
18986 (arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
18987 function is also used in constrains.md.
18988 (arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
18989 validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
18990 PLUS. Only return true/false in known cases, otherwise assert.
18991 (arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
18992 is already called in arc_legitimate_constant_p.
18993 * config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
18994 pic addresses.
18995 (LEGITIMATE_PIC_OPERAND_P): Use
18996 arc_raw_symbolic_reference_mentioned_p function.
18997 * config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
18998 function.
18999 (Cal): Likewise.
19000 (C32): Likewise.
19001
19002 2017-07-17 Claudiu Zissulescu <claziss@synopsys.com>
19003 Andrew Burgess <andrew.burgess@embecosm.com>
19004
19005 * config/arc/arc-protos.h (arc_compute_function_type): Change prototype.
19006 (arc_return_address_register): New function.
19007 * config/arc/arc.c (arc_handle_fndecl_attribute): New function.
19008 (arc_handle_fndecl_attribute): Add naked attribute.
19009 (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
19010 (TARGET_WARN_FUNC_RETURN): Likewise.
19011 (arc_allocate_stack_slots_for_args): New function.
19012 (arc_warn_func_return): Likewise.
19013 (machine_function): Change type fn_type.
19014 (arc_compute_function_type): Consider new naked function type,
19015 change function return type.
19016 (arc_must_save_register): Adapt to handle new
19017 arc_compute_function_type's return type.
19018 (arc_expand_prologue): Likewise.
19019 (arc_expand_epilogue): Likewise.
19020 (arc_return_address_regs): Delete.
19021 (arc_return_address_register): New function.
19022 (arc_epilogue_uses): Use above function.
19023 * config/arc/arc.h (arc_return_address_regs): Delete prototype.
19024 (arc_function_type): Change encoding, add naked type.
19025 (ARC_INTERRUPT_P): Change to handle the new encoding.
19026 (ARC_FAST_INTERRUPT_P): Likewise.
19027 (ARC_NORMAL_P): Define.
19028 (ARC_NAKED_P): Likewise.
19029 (arc_compute_function_type): Delete prototype.
19030 * config/arc/arc.md (in_ret_delay_slot): Use
19031 arc_return_address_register function.
19032 (simple_return): Likewise.
19033 (p_return_i): Likewise.
19034
19035 2017-07-17 Jakub Jelinek <jakub@redhat.com>
19036
19037 PR tree-optimization/81428
19038 * match.pd (X / X -> one): Don't optimize _Fract divisions, as 1
19039 can't be built for those types.
19040
19041 2017-07-17 Georg-Johann Lay <avr@gjlay.de>
19042
19043 Remove stuff dead since r239246.
19044
19045 * config/avr/avr-arch.h (avr_inform_devices): Remove dead proto.
19046 * config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str)
19047 (avr_inform_devices): Remove dead stuff.
19048
19049 2017-07-17 Tamar Christina <tamar.christina@arm.com>
19050
19051 * config/arm/arm_neon.h: Fix softp typo.
19052
19053 2017-07-17 Jakub Jelinek <jakub@redhat.com>
19054
19055 PR tree-optimization/81365
19056 * tree-ssa-phiprop.c (propagate_with_phi): When considering hoisting
19057 aggregate moves onto bb predecessor edges, make sure there are no
19058 loads that could alias the lhs in between the start of bb and the
19059 loads from *phi.
19060
19061 2017-07-17 Georg-Johann Lay <avr@gjlay.de>
19062
19063 PR 80929
19064 * config/avr/avr.c (avr_mul_highpart_cost): New static function.
19065 (avr_rtx_costs_1) [TRUNCATE]: Use it to compute mul_highpart cost.
19066 [LSHIFTRT, outer_code = TRUNCATE]: Same.
19067
19068 2017-07-17 Jakub Jelinek <jakub@redhat.com>
19069
19070 PR tree-optimization/81396
19071 * tree-ssa-math-opts.c (struct symbolic_number): Add n_ops field.
19072 (init_symbolic_number): Initialize it to 1.
19073 (perform_symbolic_merge): Add n_ops from both operands into the new
19074 n_ops.
19075 (find_bswap_or_nop): Don't consider n->n == cmpnop computations
19076 without base_addr as useless if they need more than one operation.
19077 (bswap_replace): Handle !bswap case for NULL base_addr.
19078
19079 2017-07-17 Tom de Vries <tom@codesourcery.com>
19080
19081 PR target/81069
19082 * config/nvptx/nvptx.c (nvptx_single): Insert diverging branch as late
19083 as possible.
19084
19085 2017-07-17 Sebastian Huber <sebastian.huber@embedded-brains.de>
19086
19087 * config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
19088 conditional builtin define __FIX_LEON3FT_B2BST.
19089
19090 2017-07-17 Daniel Cederman <cederman@gaisler.com>
19091
19092 * config/sparc/t-rtems: Add mfix-gr712rc multilibs. Replace
19093 MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED. Match -mfix-gr712rc
19094 with -mfix-ut700.
19095
19096 2017-07-16 Eric Botcazou <ebotcazou@adacore.com>
19097
19098 PR rtl-optimization/81424
19099 * optabs.c (prepare_cmp_insn): Use copy_to_reg instead of force_reg
19100 to remove potential trapping from operands if -fnon-call-exceptions.
19101
19102 2017-07-16 Jan Hubicka <hubicka@ucw.cz>
19103
19104 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Use
19105 profile_proability for scalling.
19106 * scale_profile_for_vect_loop.c (scale_profile_for_vect_loop): Likewise.
19107
19108 2017-07-16 Jan Hubicka <hubicka@ucw.cz>
19109
19110 * cgraph.c (cgraph_edge::redirect_call_stmt_to_caller): Cleanup.
19111
19112 2017-07-16 Jan Hubicka <hubicka@ucw.cz>
19113
19114 * cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE
19115 fixpoint arithmetics.
19116
19117 2017-07-16 Jan Hubicka <hubicka@ucw.cz>
19118
19119 * tree-ssa-loop-unswitch.c (hoist_guard): Avoid use of REG_BR_PROB_BASE
19120 fixpoint arithmetics.
19121
19122 2017-07-16 Jan Hubicka <hubicka@ucw.cz>
19123
19124 * asan.c (create_cond_insert_point): Avoid use of REG_BR_PROB_BASE
19125 fixpoint arithmetics.
19126
19127 2017-07-16 Jan Hubicka <hubicka@ucw.cz>
19128
19129 * profile-count.h (profile_probability::from_reg_br_prob_note,
19130 profile_probability::to_reg_br_prob_note): New functions.
19131 * doc/rtl.texi (REG_BR_PROB_NOTE): Update documentation.
19132 * reg-notes.h (REG_BR_PROB, REG_BR_PRED): Update docs.
19133 * predict.c (probability_reliable_p): Update.
19134 (edge_probability_reliable_p): Update.
19135 (br_prob_note_reliable_p): Update.
19136 (invert_br_probabilities): Update.
19137 (add_reg_br_prob_note): New function.
19138 (combine_predictions_for_insn): Update.
19139 * asan.c (asan_clear_shadow): Update.
19140 * cfgbuild.c (compute_outgoing_frequencies): Update.
19141 * cfgrtl.c (force_nonfallthru_and_redirect): Update.
19142 (update_br_prob_note): Update.
19143 (rtl_verify_edges): Update.
19144 (purge_dead_edges): Update.
19145 (fixup_reorder_chain): Update.
19146 * emit-rtl.c (try_split): Update.
19147 * ifcvt.c (cond_exec_process_insns): Update.
19148 (cond_exec_process_if_block): Update.
19149 (dead_or_predicable): Update.
19150 * internal-fn.c (expand_addsub_overflow): Update.
19151 (expand_neg_overflow): Update.
19152 (expand_mul_overflow): Update.
19153 * loop-doloop.c (doloop_modify): Update.
19154 * loop-unroll.c (compare_and_jump_seq): Update.
19155 * optabs.c (emit_cmp_and_jump_insn_1): Update.
19156 * predict.h: Update.
19157 * reorg.c (mostly_true_jump): Update.
19158 * rtl.h: Update.
19159 * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Update.
19160 * config/alpha/alpha.c (emit_unlikely_jump): Update.
19161 * config/arc/arc.c: (emit_unlikely_jump): Update.
19162 * config/arm/arm.c: (emit_unlikely_jump): Update.
19163 * config/bfin/bfin.c (cbranch_predicted_taken_p): Update.
19164 * config/frv/frv.c (frv_print_operand_jump_hint): Update.
19165 * config/i386/i386.c (ix86_expand_split_stack_prologue): Update.
19166 (ix86_print_operand): Update.
19167 (ix86_split_fp_branch): Update.
19168 (predict_jump): Update.
19169 * config/ia64/ia64.c (ia64_print_operand): Update.
19170 * config/mmix/mmix.c (mmix_print_operand): Update.
19171 * config/powerpcspe/powerpcspe.c (output_cbranch): Update.
19172 (rs6000_expand_split_stack_prologue): Update.
19173 * config/rs6000/rs6000.c: Update.
19174 * config/s390/s390.c (s390_expand_vec_strlen): Update.
19175 (s390_expand_vec_movstr): Update.
19176 (s390_expand_cs_tdsi): Update.
19177 (s390_expand_split_stack_prologue): Update.
19178 * config/sh/sh.c (sh_print_operand): Update.
19179 (expand_cbranchsi4): Update.
19180 (expand_cbranchdi4): Update.
19181 * config/sparc/sparc.c (output_v9branch): Update.
19182 * config/spu/spu.c (get_branch_target): Update.
19183 (ea_load_store_inline): Update.
19184 * config/tilegx/tilegx.c (cbranch_predicted_p): Update.
19185 * config/tilepro/tilepro.c: Update.
19186
19187 2017-07-16 Eric Botcazou <ebotcazou@adacore.com>
19188
19189 * gimplify.c (mostly_copy_tree_r): Revert latest change.
19190 (gimplify_save_expr): Likewise.
19191
19192 2017-07-07 Jan Hubicka <hubicka@ucw.cz>
19193
19194 * ipa-visibility.c (function_and_variable_visibility): Fix pasto.
19195
19196 2017-07-07 Jan Hubicka <hubicka@ucw.cz>
19197
19198 * ipa-fnsummary.c (pass_data_ipa_fn_summary): Use
19199 TV_IPA_FNSUMMARY.
19200 * timevar.def (TV_IPA_FNSUMMARY): Define.
19201
19202 2017-07-16 Daniel Cederman <cederman@gaisler.com>
19203
19204 * config/sparc/sparc.md (divdf3_fix): Add NOP to prevent back
19205 to back store errata sensitive sequence from being generated.
19206 (sqrtdf2_fix): Likewise.
19207
19208 2017-07-07 Jan Hubicka <hubicka@ucw.cz>
19209
19210 * tree-ssa-threadupdate.c (compute_path_counts,
19211 update_joiner_offpath_counts): Use profile_probability.
19212
19213 2017-07-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
19214
19215 Revert:
19216 2017-07-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
19217
19218 * config/arm/arm-c.c (arm_cpu_builtins): Define
19219 __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
19220
19221 2017-07-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
19222
19223 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
19224 array entries to represent __ieee128 versions of the
19225 scalar_test_data_class, scalar_test_neg, scalar_extract_exp,
19226 scalar_extract_sig, and scalar_insert_exp built-in functions.
19227 (altivec_resolve_overloaded_builtin): Add special case handling
19228 for the __builtin_scalar_insert_exp function, as represented by
19229 the P9V_BUILTIN_VEC_VSIEDP constant.
19230 * config/rs6000/rs6000-builtin.def (VSEEQP): Add scalar extract
19231 exponent support for __ieee128 argument.
19232 (VSESQP): Add scalar extract signature support for __ieee128
19233 argument.
19234 (VSTDCNQP): Add scalar test negative support for __ieee128
19235 argument.
19236 (VSIEQP): Add scalar insert exponent support for __int128 argument
19237 with __ieee128 result.
19238 (VSIEQPF): Add scalar insert exponent support for __ieee128
19239 argument with __ieee128 result.
19240 (VSTDCQP): Add scalar test data class support for __ieee128
19241 argument.
19242 (VSTDCNQP): Add overload support for scalar test negative with
19243 __ieee128 argument.
19244 (VSTDCQP): Add overload support for scalar test data class
19245 __ieee128 argument.
19246 * config/rs6000/vsx.md (UNSPEC_VSX_SXSIG) Replace
19247 UNSPEC_VSX_SXSIGDP.
19248 (UNSPEC_VSX_SIEXPQP): New constant.
19249 (xsxexpqp): New insn for VSX scalar extract exponent quad
19250 precision.
19251 (xsxsigqp): New insn for VSX scalar extract significand quad
19252 precision.
19253 (xsiexpqpf): New insn for VSX scalar insert exponent quad
19254 precision with floating point argument.
19255 (xststdcqp): New expand for VSX scalar test data class quad
19256 precision.
19257 (xststdcnegqp): New expand for VSX scalar test negative quad
19258 precision.
19259 (xststdcqp): New insn to match expansions for VSX scalar test data
19260 class quad precision and VSX scalar test negative quad precision.
19261 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
19262 special case operand checking to enforce that second operand of
19263 VSX scalar test data class with quad precision argument is a 7-bit
19264 unsigned literal.
19265 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
19266 prototypes and descriptions of __ieee128 versions of
19267 scalar_extract_exp, scalar_extract_sig, scalar_insert_exp,
19268 scalar_test_data_class, and scalar_test_neg built-in functions.
19269
19270 2016-07-14 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19271
19272 PR tree-optimization/81162
19273 * gimple-ssa-strength-reduction.c (replace_mult_candidate): Don't
19274 replace a negate with an add.
19275
19276 2017-07-14 James Greenhalgh <james.greenhalgh@arm.com>
19277
19278 * doc/invoke.texi (arm/-mcpu): Document +crypto.
19279
19280 2017-07-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
19281
19282 * config/arm/arm-c.c (arm_cpu_builtins): Define
19283 __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
19284
19285 2017-07-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
19286
19287 * config/arm/arm-cpus.in (cortex-r52): Add new entry.
19288 (armv8-r): Set ARM Cortex-R52 as default CPU.
19289 * config/arm/arm-tables.opt: Regenerate.
19290 * config/arm/arm-tune.md: Regenerate.
19291 * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
19292 Cortex-R52.
19293 * doc/invoke.texi: Mention -mtune=cortex-r52 and availability of fp.dp
19294 extension for -mcpu=cortex-r52.
19295
19296 2017-07-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
19297
19298 * config/arm/arm-isa.h (isa_bit_FP_ARMv8): Delete enumerator.
19299 (ISA_FP_ARMv8): Define as ISA_FPv5 and ISA_FP_D32.
19300 * config/arm/arm-cpus.in (armv8-r): Define fp.sp as enabling FPv5.
19301 (fp-armv8): Define it as FP_ARMv8 only.
19302 config/arm/arm.h (TARGET_FPU_ARMV8): Delete.
19303 (TARGET_VFP_FP16INST): Define using TARGET_VFP5 rather than
19304 TARGET_FPU_ARMV8.
19305 config/arm/arm.c (arm_rtx_costs_internal): Replace checks against
19306 TARGET_FPU_ARMV8 by checks against TARGET_VFP5.
19307 * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Define
19308 first ARM_CHECK_BUILTIN_MODE definition using TARGET_VFP5 rather
19309 than TARGET_FPU_ARMV8.
19310 * config/arm/arm-c.c (arm_cpu_builtins): Likewise for
19311 __ARM_FEATURE_NUMERIC_MAXMIN macro definition.
19312 * config/arm/arm.md (cmov<mode>): Condition on TARGET_VFP5 rather than
19313 TARGET_FPU_ARMV8.
19314 * config/arm/neon.md (neon_vrint): Likewise.
19315 (neon_vcvt): Likewise.
19316 (neon_<fmaxmin_op><mode>): Likewise.
19317 (<fmaxmin><mode>3): Likewise.
19318 * config/arm/vfp.md (l<vrint_pattern><su_optab><mode>si2): Likewise.
19319 * config/arm/predicates.md (arm_cond_move_operator): Check against
19320 TARGET_VFP5 rather than TARGET_FPU_ARMV8 and fix spacing.
19321
19322 2017-07-14 Jackson Woodruff <jackson.woodruff@arm.com>
19323
19324 * config/aarch64/aarch64.c (aarch64_print_operand): Move comments
19325 to top of function.
19326
19327 2017-07-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19328
19329 * gimple-ssa-store-merging.c (clear_bit_region): Replace reference to
19330 loop in comment with memset.
19331
19332 2017-07-14 Martin Liska <mliska@suse.cz>
19333
19334 * cfgexpand.c (expand_gimple_basic_block): Remove dead comment.
19335 * dwarf2out.c (is_java): Remove the function.
19336 (output_pubname): Remove usage of the function.
19337 (lower_bound_default): Remove usage of DW_LANG_Java.
19338 (gen_compile_unit_die): Likewise.
19339 * gcc.c: Remove compiler defaults for .java and .zip files.
19340 * gimple-expr.c (remove_suffix): Change as there's no longer
19341 extension than 4-letter one.
19342 * gimplify.c (mostly_copy_tree_r): Remove Java-special part.
19343 (gimplify_save_expr): Likewise.
19344 * ipa-utils.h (polymorphic_type_binfo_p): Remove the comment
19345 as it's possible even for other languages than Java.
19346 * langhooks.h (struct lang_hooks): Remove Java from a comment.
19347 * lto-opts.c (lto_write_options): Remove reference to Java.
19348 * opts.c (strip_off_ending): Update file extension handling.
19349 * tree-cfg.c (verify_gimple_call): Remove comment with Java.
19350 * tree-eh.c (lower_resx): Likewise.
19351 * tree.c (free_lang_data_in_type): Remove dead code.
19352 (find_decls_types_r): Likewise.
19353 (build_common_builtin_nodes): Remove Java from a comment.
19354 (verify_type): Remove dead code.
19355 * varasm.c (assemble_external): Remove Java from a comment.
19356
19357 2017-07-14 Martin Liska <mliska@suse.cz>
19358
19359 * opts.c (finish_options): Add quotes.
19360 (common_handle_option): Likewise.
19361
19362 2017-07-14 Martin Liska <mliska@suse.cz>
19363
19364 * dbxout.c (get_lang_number): Do not handle GNU Pascal.
19365 * dbxout.h (extern void dbxout_stab_value_internal_label_diff):
19366 Remove N_SO_PASCAL.
19367 * dwarf2out.c (lower_bound_default): Do not handle
19368 DW_LANG_Pascal83.
19369 (gen_compile_unit_die): Likewise.
19370 * gcc.c: Remove default extension binding for GNU Pascal.
19371 * stmt.c: Remove Pascal language from a comment.
19372 * xcoffout.c: Likewise.
19373
19374 2017-07-13 David Malcolm <dmalcolm@redhat.com>
19375
19376 PR c/81405
19377 * diagnostic-show-locus.c (fixit_cmp): New function.
19378 (layout::layout): Sort m_fixit_hints.
19379 (column_range::column_range): Assert that the values are valid.
19380 (struct char_span): New struct.
19381 (correction::overwrite): New method.
19382 (struct source_line): New struct.
19383 (line_corrections::add_hint): Add assertions. Reimplement memcpy
19384 calls in terms of classes source_line and char_span, and
19385 correction::overwrite.
19386 (selftest::test_overlapped_fixit_printing_2): New function.
19387 (selftest::diagnostic_show_locus_c_tests): Call it.
19388
19389 2017-07-13 Will Schmidt <will_schmidt@vnet.ibm.com>
19390
19391 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Return
19392 early if there is no lhs.
19393
19394 2017-07-13 Martin Liska <mliska@suse.cz>
19395
19396 * dwarf2out.c (gen_pointer_type_die): Remove dead code.
19397 (gen_reference_type_die): Likewise.
19398 * stor-layout.c: Remove Pascal-related comment.
19399
19400 2017-07-13 Martin Liska <mliska@suse.cz>
19401
19402 * opts.c (finish_options): Add quotes to error messages.
19403 (parse_sanitizer_options): Likewise.
19404
19405 2017-07-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
19406
19407 * doc/invoke.texi (armv8-r): Document +fp.sp ARMv8-R extension.
19408
19409 2017-07-13 Richard Earnshaw <rearnsha@arm.com>
19410
19411 * config/arm/vxworks.h (TARGET_ENDIAN_DEFAULT): Define.
19412
19413 2017-07-13 Maxim Ostapenko <m.ostapenko@samsung.com>
19414
19415 * asan.c (asan_emit_allocas_unpoison): Use ptr_mode for arguments
19416 during expansion.
19417 * builtins.c (expand_asan_emit_allocas_unpoison): Likewise.
19418
19419 2017-07-12 Michael Meissner <meissner@linux.vnet.ibm.com>
19420
19421 PR target/81193
19422 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If GLIBC
19423 provides the hardware capability bits, define the macro
19424 __BUILTIN_CPU_SUPPORTS__.
19425 * config/rs6000/rs6000.c (cpu_expand_builtin): Generate a warning
19426 if GLIBC does not provide the hardware capability bits. Add a
19427 gcc_unreachable call if the built-in cpu function is neither
19428 __builtin_cpu_is nor __builtin_cpu_supports.
19429 (rs6000_get_function_versions_dispatcher): Change the warning
19430 that an old GLIBC is used which does not export the capability
19431 bits to be an error.
19432 * doc/extend.texi (target_clones attribute): Document the
19433 restriction that GLIBC 2.23 or newer is needed on the PowerPC.
19434 (PowerPC built-in functions): Document that GLIBC 2.23 or newer is
19435 needed by __builtin_cpu_is and __builtin_cpu_supports. Document
19436 the macros defined by GCC if the newer GLIBC is available.
19437
19438 2017-07-12 Jeff Law <law@redhat.com>
19439
19440 * config/riscv/riscv.c: Remove unnecessary includes. Reorder
19441 remaining includes slightly.
19442 * config/riscv/riscv-builtins.c: Include profile-count.h.
19443
19444 2017-07-12 Georg-Johann Lay <avr@gjlay.de>
19445
19446 PR target/79883
19447 * config/avr/avr.c (avr_set_current_function): In diagnostic
19448 messages: Quote keywords and (parts of) identifiers.
19449 [WITH_AVRLIBC]: Warn for functions named "ISR", "SIGNAL" or
19450 "INTERUPT".
19451
19452 2017-07-12 Carl Love <cel@us.ibm.com>
19453
19454 * config/rs6000/rs6000-c.c: Add support for built-in functions
19455 vector bool char vec_revb (vector bool char);
19456 vector bool short vec_revb (vector short char);
19457 vector bool int vec_revb (vector bool int);
19458 vector bool long long vec_revb (vector bool long long);
19459 * doc/extend.texi: Update the built-in documentation file for the
19460 new built-in functions.
19461
19462 2017-07-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19463
19464 * config/s390/s390.md: Remove movcc splitter.
19465
19466 2017-07-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19467
19468 * config/s390/s390.c (s390_rtx_costs): Return proper costs for
19469 load/store on condition.
19470
19471 2017-07-12 Georg-Johann Lay <avr@gjlay.de>
19472
19473 PR target/81407
19474 * config/avr/avr.c (avr_encode_section_info)
19475 [progmem && !TREE_READONLY]: Error if progmem object needs
19476 constructing.
19477
19478 2017-07-11 Michael Collison <michael.collison@arm.com>
19479
19480 * config/aarch64/aarch64-simd.md (aarch64_sub<mode>_compare0):
19481 New pattern.
19482
19483 2017-07-11 Carl Love <cel@us.ibm.com>
19484
19485 * config/rs6000/rs6000-c.c: Add support for builtins
19486 vector unsigned int vec_parity_lsbb (vector signed int);
19487 vector unsigned int vec_parity_lsbb (vector unsigned int);
19488 vector unsigned __int128 vec_parity_lsbb (vector signed __int128);
19489 vector unsigned __int128 vec_parity_lsbb (vector unsigned __int128);
19490 vector unsigned long long vec_parity_lsbb (vector signed long long);
19491 vector unsigned long long vec_parity_lsbb (vector unsigned long long);
19492 * config/rs6000/rs6000-builtin.def (VPARITY_LSBB): Add BU_P9V_OVERLOAD1.
19493 * config/rs6000/altivec.h (vec_parity_lsbb): Add define.
19494 * doc/extend.texi: Update the built-in documentation file for the
19495 new built-in functions.
19496
19497 2017-07-11 David Malcolm <dmalcolm@redhat.com>
19498
19499 * diagnostic-show-locus.c: Include "gcc-rich-location.h".
19500 (layout::m_primary_loc): New field.
19501 (layout::layout): Initialize new field. Move location filtering
19502 logic from here to...
19503 (layout::maybe_add_location_range): ...this new method. Add
19504 support for filtering to just the lines already specified by other
19505 locations.
19506 (layout::will_show_line_p): New method.
19507 (gcc_rich_location::add_location_if_nearby): New method.
19508 (selftest::test_add_location_if_nearby): New test function.
19509 (selftest::diagnostic_show_locus_c_tests): Call it.
19510 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
19511 New method.
19512
19513 2017-07-11 Tom de Vries <tom@codesourcery.com>
19514
19515 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG): New macro.
19516 (bb_first_real_insn): New function.
19517 (nvptx_single): Add extra initialization of broadcasted condition
19518 variables.
19519
19520 2017-07-11 Nathan Sidwell <nathan@acm.org>
19521
19522 * dwarf2out.c (gen_member_die): Remove useless check for anon ctors.
19523
19524 2017-07-11 Georg-Johann Lay <avr@gjlay.de>
19525
19526 * doc/extend.texi (AVR Function Attributes): Remove weblink to
19527 Binutils doc as TEXI will mess them up.
19528 * doc/invoke.texi (AVR Options): Same here.
19529
19530 2017-07-11 Daniel Cederman <cederman@gaisler.com>
19531
19532 * config/sparc/sparc.opt (mfix-ut700): New option.
19533 (mfix-gr712rc): Likewise.
19534 (sparc_fix_b2bst): New variable.
19535 * doc/invoke.texi (SPARC options): Document them.
19536 (ARM options): Fix warnings.
19537 * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP
19538 instructions to prevent sequences that can trigger the store-store
19539 errata for certain LEON3FT processors.
19540 (pass_work_around_errata::gate): Also test sparc_fix_b2bst.
19541 (sparc_option_override): Set sparc_fix_b2bst appropriately.
19542 * config/sparc/sparc.md (fix_b2bst): New attribute.
19543 (in_branch_delay): Prevent stores in delay slot if fix_b2bst.
19544
19545 2017-07-10 Uros Bizjak <ubizjak@gmail.com>
19546
19547 PR target/81375
19548 * config/i386/i386.md (divsf3): Add TARGET_SSE to TARGET_SSE_MATH.
19549 (rcpps): Ditto.
19550 (*rsqrtsf2_sse): Ditto.
19551 (rsqrtsf2): Ditto.
19552 (div<mode>3): Macroize insn from divdf3 and divsf3
19553 using MODEF mode iterator.
19554
19555 2017-07-10 Martin Sebor <msebor@redhat.com>
19556
19557 PR tree-optimization/80397
19558 * gimple-ssa-sprintf.c (format_integer): Use INTEGRAL_TYPE_P()
19559 instead of testing for equality to INTEGER_TYPE.
19560
19561 2017-07-10 Vineet Gupta <vgupta@synopsys.com>
19562
19563 * config.gcc: Remove uclibc from arc target spec.
19564
19565 2017-07-10 Claudiu Zissulescu <claziss@synopsys.com>
19566
19567 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Define.
19568
19569 2017-07-07 Jan Hubicka <hubicka@ucw.cz>
19570
19571 PR lto/80838
19572 * lto-wrapper.c (remove_option): New function.
19573 (merge_and_complain): Merge PIC/PIE options more realistically.
19574
19575 2017-07-10 Georg-Johann Lay <avr@gjlay.de>
19576
19577 Better ISR prologues by supporting GASes __gcc_isr pseudo insn.
19578
19579 PR target/20296
19580 PR target/81268
19581 * configure.ac [target=avr]: Add GAS check for -mgcc-isr.
19582 (HAVE_AS_AVR_MGCCISR_OPTION): If so, AC_DEFINE it.
19583 * config.in: Regenerate.
19584 * configure: Regenerate.
19585 * doc/extend.texi (AVR Function Attributes) <no_gccisr>: Document it.
19586 * doc/invoke.texi (AVR Options) <-mgas-isr-prologues>: Document it.
19587 * config/avr/avr.opt (-mgas-isr-prologues): New option and...
19588 (TARGET_GASISR_PROLOGUES): ...target mask.
19589 * common/config/avr/avr-common.c
19590 (avr_option_optimization_table) [OPT_LEVELS_1_PLUS_NOT_DEBUG]:
19591 Set -mgas-isr-prologues.
19592 * config/avr/avr-passes.def (avr_pass_pre_proep): Add
19593 INSERT_PASS_BEFORE for it.
19594 * config/avr/avr-protos.h (make_avr_pass_pre_proep): New proto.
19595 * config/avr/avr.c (avr_option_override)
19596 [!HAVE_AS_AVR_MGCCISR_OPTION]: Unset TARGET_GASISR_PROLOGUES.
19597 (avr_no_gccisr_function_p, avr_hregs_split_reg): New static functions.
19598 (avr_attribute_table) <no_gccisr>: Add new function attribute.
19599 (avr_set_current_function) <is_no_gccisr>: Init machine field.
19600 (avr_pass_data_pre_proep, avr_pass_pre_proep): New pass data
19601 and rtl_opt_pass.
19602 (make_avr_pass_pre_proep): New function.
19603 (emit_push_sfr) <treg>: Add argument to function and use it
19604 instead of TMP_REG.
19605 (avr_expand_prologue) [machine->gasisr.maybe]: Emit gasisr insn
19606 and set machine->gasisr.yes.
19607 (avr_expand_epilogue) [machine->gasisr.yes]: Similar.
19608 (avr_asm_function_end_prologue) [machine->gasisr.yes]: Add
19609 __gcc_isr.n_pushed to .L__stack_usage.
19610 (TARGET_ASM_FINAL_POSTSCAN_INSN): Define to...
19611 (avr_asm_final_postscan_insn): ...this new static function.
19612 * config/avr/avr.h (machine_function)
19613 <is_no_gccisr, use_L__stack_usage>: New fields.
19614 <gasisr, gasisr.yes, gasisr.maybe, gasisr.regno>: New fields.
19615 * config/avr/avr.md (UNSPECV_GASISR): Add unspecv enum.
19616 (GASISR_Prologue, GASISR_Epilogue, GASISR_Done): New define_constants.
19617 (gasisr, *gasisr): New expander and insn.
19618 * config/avr/gen-avr-mmcu-specs.c (print_mcu)
19619 [HAVE_AS_AVR_MGCCISR_OPTION]: Print asm_gccisr spec.
19620 * config/avr/specs.h (ASM_SPEC) <asm_gccisr>: Add sub spec.
19621
19622 2017-07-10 Richard Earnshaw <rearnsha@arm.com>
19623
19624 * config/arm/parsecpu.awk (gen_comm_data): Do not escape single quotes
19625 in quoted strings.
19626
19627 2017-07-10 Georg-Johann Lay <avr@gjlay.de>
19628
19629 Move jump-tables out of .text again.
19630
19631 PR target/81075
19632 * config/avr/avr.c (ASM_OUTPUT_ADDR_VEC_ELT): Remove function.
19633 (ASM_OUTPUT_ADDR_VEC): New function.
19634 (avr_adjust_insn_length) [JUMP_TABLE_DATA_P]: Return 0.
19635 (avr_final_prescan_insn) [avr_log.insn_addresses]: Dump
19636 INSN_ADDRESSes as asm comment.
19637 * config/avr/avr.h (JUMP_TABLES_IN_TEXT_SECTION): Adjust comment.
19638 (ASM_OUTPUT_ADDR_VEC_ELT): Remove define.
19639 (ASM_OUTPUT_ADDR_VEC): Define to avr_output_addr_vec.
19640 * config/avr/avr.md (*tablejump): Adjust comment.
19641 * config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove.
19642 * config/avr/avr-log.c (avr_log_set_avr_log) <insn_addresses>:
19643 New detail.
19644 * config/avr/avr-protos.h (avr_output_addr_vec_elt): Remove proto.
19645 (avr_output_addr_vec): New proto.
19646 (avr_log_t) <insn_addresses>: New field.
19647
19648 2017-07-09 H.J. Lu <hongjiu.lu@intel.com>
19649
19650 PR target/81313
19651 * config/i386/i386.c (ix86_function_arg_advance): Set
19652 outgoing_args_on_stack to true if there are outgoing arguments
19653 on stack.
19654 (ix86_function_arg): Likewise.
19655 (ix86_get_drap_rtx): Use DRAP only if there are outgoing
19656 arguments on stack and ACCUMULATE_OUTGOING_ARGS is false.
19657 * config/i386/i386.h (machine_function): Add
19658 outgoing_args_on_stack.
19659
19660 2017-07-09 Krister Walfridsson <krister.walfridsson@gmail.com>
19661
19662 * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
19663 supporting pthreds.
19664 * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always enable pthreads.
19665
19666 2017-07-08 Richard Sandiford <richard.sandiford@linaro.org>
19667
19668 * Makefile.in (HOOKS_H, RTL_BASE_H, FUNCTION_H, EXPR_H, REGS_H)
19669 (REAL_H): Remove $(MACHMODE_H).
19670 (FIXED_VALUE_H, TREE_CORE_H, CFGLOOP_H): Remove $(MACHMODE_H) and
19671 double-int.h.
19672 (CORETYPES_H): Add signop.h, wide-int.h, wide-int-print.h,
19673 $(MACHMODE_H) and double-int.h.
19674 (build/min-insn-modes.o): Depend on $(CORETYPES_H) rather than
19675 $(MACHMODE_H).
19676 (gengtype-state.o, gengtype.o, build/gengtype.o): Don't depend on
19677 double-int.h.
19678
19679 2017-07-07 Andrew Pinski <apinski@cavium.com>
19680
19681 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Check
19682 prev_set and curr_set for AARCH64_FUSE_ALU_BRANCH.
19683
19684 2017-07-07 Michael Meissner <meissner@linux.vnet.ibm.com>
19685
19686 * config/rs6000/rs6000.c (rs6000_get_function_versions_dispatcher):
19687 Add warning if GCC was not configured to link against a GLIBC that
19688 exports the hardware capability bits.
19689 (make_resolver_func): Make resolver function private and not a
19690 COMDAT function. Create the name with clone_function_name instead
19691 of make_unique_name.
19692
19693 PR target/81348
19694 * config/rs6000/rs6000.md (HI sign_extend splitter): Use the
19695 correct operand in doing the split.
19696
19697 2017-07-07 Carl Love <cel@us.ibm.com>
19698
19699 * config/rs6000/rs6000-c: Add support for built-in function
19700 vector unsigned short vec_pack_to_short_fp32 (vector float,
19701 vector float).
19702 * config/rs6000/rs6000-builtin.def (CONVERT_4F32_8I16): Add
19703 BU_P9V_AV_2 and BU_P9V_OVERLOAD_2 definitions.
19704 * config/rs6000/altivec.h (vec_pack_to_short_fp32): Add define.
19705 * config/rs6000/altivec.md(UNSPEC_CONVERT_4F32_8I16): Add UNSPEC.
19706 (convert_4f32_8i16): Add define_expand.
19707 * doc/extend.texi: Update the built-in documentation file for the
19708 new built-in function.
19709
19710 2017-07-07 Jose E. Marchesi <jose.marchesi@oracle.com>
19711
19712 * config/sparc/m8.md: New file.
19713 * config/sparc/sparc.md: Include m8.md.
19714
19715 2017-07-07 Jose E. Marchesi <jose.marchesi@oracle.com>
19716
19717 * config/sparc/sparc.opt: New option -mvis4b.
19718 * config/sparc/sparc.c (dump_target_flag_bits): Handle MASK_VIS4B.
19719 (sparc_option_override): Handle VIS4B.
19720 (enum sparc_builtins): Define
19721 SPARC_BUILTIN_DICTUNPACK{8,16,32},
19722 SPARC_BUILTIN_FPCMP{LE,GT,EQ,NE}{8,16,32}SHL,
19723 SPARC_BUILTIN_FPCMPU{LE,GT}{8,16,32}SHL,
19724 SPARC_BUILTIN_FPCMPDE{8,16,32}SHL and
19725 SPARC_BUILTIN_FPCMPUR{8,16,32}SHL.
19726 (check_constant_argument): New function.
19727 (sparc_vis_init_builtins): Define builtins
19728 __builtin_vis_dictunpack{8,16,32},
19729 __builtin_vis_fpcmp{le,gt,eq,ne}{8,16,32}shl,
19730 __builtin_vis_fpcmpu{le,gt}{8,16,32}shl,
19731 __builtin_vis_fpcmpde{8,16,32}shl and
19732 __builtin_vis_fpcmpur{8,16,32}shl.
19733 (sparc_expand_builtin): Check that the constant operands to
19734 __builtin_vis_fpcmp*shl and _builtin_vis_dictunpack* are indeed
19735 constant and in range.
19736 * config/sparc/sparc-c.c (sparc_target_macros): Handle
19737 TARGET_VIS4B.
19738 * config/sparc/sparc.h (SPARC_IMM2_P): Define.
19739 (SPARC_IMM5_P): Likewise.
19740 * config/sparc/sparc.md (cpu_feature): Add new feagure "vis4b".
19741 (enabled): Handle vis4b.
19742 (UNSPEC_DICTUNPACK): New unspec.
19743 (UNSPEC_FPCMPSHL): Likewise.
19744 (UNSPEC_FPUCMPSHL): Likewise.
19745 (UNSPEC_FPCMPDESHL): Likewise.
19746 (UNSPEC_FPCMPURSHL): Likewise.
19747 (cpu_feature): New CPU feature `vis4b'.
19748 (dictunpack{8,16,32}): New insns.
19749 (FPCSMODE): New mode iterator.
19750 (fpcscond): New code iterator.
19751 (fpcsucond): Likewise.
19752 (fpcmp{le,gt,eq,ne}{8,16,32}{si,di}shl): New insns.
19753 (fpcmpu{le,gt}{8,16,32}{si,di}shl): Likewise.
19754 (fpcmpde{8,16,32}{si,di}shl): Likewise.
19755 (fpcmpur{8,16,32}{si,di}shl): Likewise.
19756 * config/sparc/constraints.md: Define constraints `q' for unsigned
19757 2-bit integer constants and `t' for unsigned 5-bit integer
19758 constants.
19759 * config/sparc/predicates.md (imm5_operand_dictunpack8): New
19760 predicate.
19761 (imm5_operand_dictunpack16): Likewise.
19762 (imm5_operand_dictunpack32): Likewise.
19763 (imm2_operand): Likewise.
19764 * doc/invoke.texi (SPARC Options): Document -mvis4b.
19765 * doc/extend.texi (SPARC VIS Built-in Functions): Document the
19766 ditunpack* and fpcmp*shl builtins.
19767
19768 2017-07-07 Jose E. Marchesi <jose.marchesi@oracle.com>
19769
19770 * config.gcc: Handle m8 in --with-{cpu,tune} options.
19771 * config.in: Add HAVE_AS_SPARC6 define.
19772 * config/sparc/driver-sparc.c (cpu_names): Add entry for the SPARC
19773 M8.
19774 * config/sparc/sol2.h (CPP_CPU64_DEFAULT_SPEC): Define for
19775 TARGET_CPU_m8.
19776 (ASM_CPU32_DEFAUILT_SPEC): Likewise.
19777 (CPP_CPU_SPEC): Handle m8.
19778 (ASM_CPU_SPEC): Likewise.
19779 * config/sparc/sparc-opts.h (enum processor_type): Add
19780 PROCESSOR_M8.
19781 * config/sparc/sparc.c (m8_costs): New struct.
19782 (sparc_option_override): Handle TARGET_CPU_m8.
19783 (sparc32_initialize_trampoline): Likewise.
19784 (sparc64_initialize_trampoline): Likewise.
19785 (sparc_issue_rate): Likewise.
19786 (sparc_register_move_cost): Likewise.
19787 * config/sparc/sparc.h (TARGET_CPU_m8): Define.
19788 (CPP_CPU64_DEFAULT_SPEC): Define for M8.
19789 (ASM_CPU64_DEFAULT_SPEC): Likewise.
19790 (CPP_CPU_SPEC): Handle M8.
19791 (ASM_CPU_SPEC): Likewise.
19792 (AS_M8_FLAG): Define.
19793 * config/sparc/sparc.md: Add m8 to the cpu attribute.
19794 * config/sparc/sparc.opt: New option -mcpu=m8 for sparc targets.
19795 * configure.ac (HAVE_AS_SPARC6): Check for assembler support for
19796 M8 instructions.
19797 * configure: Regenerate.
19798 * doc/invoke.texi (SPARC Options): Document -mcpu=m8 and
19799 -mtune=m8.
19800
19801 2017-07-07 Jose E. Marchesi <jose.marchesi@oracle.com>
19802
19803 * config/sparc/niagara7.md: Rework the DFA scheduler to use insn
19804 subtypes.
19805 * config/sparc/sparc.md: Remove the `v3pipe' insn attribute.
19806 ("*movdi_insn_sp32"): Do not set v3pipe.
19807 ("*movsi_insn"): Likewise.
19808 ("*movdi_insn_sp64"): Likewise.
19809 ("*movsf_insn"): Likewise.
19810 ("*movdf_insn_sp32"): Likewise.
19811 ("*movdf_insn_sp64"): Likewise.
19812 ("*zero_extendsidi2_insn_sp64"): Likewise.
19813 ("*sign_extendsidi2_insn"): Likewise.
19814 ("*mov<VM32:mode>_insn"): Likewise.
19815 ("*mov<VM64:mode>_insn_sp64"): Likewise.
19816 ("*mov<VM64:mode>_insn_sp32"): Likewise.
19817 ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
19818 ("<vlop:code><VL:mode>3"): Likewise.
19819 ("*not_<vlop:code><VL:mode>3"): Likewise.
19820 ("*nand<VL:mode>_vis"): Likewise.
19821 ("*<vlnotop:code>_not1<VL:mode>_vis"): Likewise.
19822 ("*<vlnotop:code>_not2<VL:mode>_vis"): Likewise.
19823 ("one_cmpl<VL:mode>2"): Likewise.
19824 ("faligndata<VM64:mode>_vis"): Likewise.
19825 ("alignaddrsi_vis"): Likewise.
19826 ("alignaddrdi_vis"): Likweise.
19827 ("alignaddrlsi_vis"): Likewise.
19828 ("alignaddrldi_vis"): Likewise.
19829 ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
19830 ("bmaskdi_vis"): Likewise.
19831 ("bmasksi_vis"): Likewise.
19832 ("bshuffle<VM64:mode>_vis"): Likewise.
19833 ("cmask8<P:mode>_vis"): Likewise.
19834 ("cmask16<P:mode>_vis"): Likewise.
19835 ("cmask32<P:mode>_vis"): Likewise.
19836 ("pdistn<P:mode>_vis"): Likewise.
19837 ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
19838
19839 2017-07-07 Jose E. Marchesi <jose.marchesi@oracle.com>
19840
19841 * config/sparc/sparc.md ("subtype"): New insn attribute.
19842 ("*wrgsr_sp64"): Set insn subtype.
19843 ("*rdgsr_sp64"): Likewise.
19844 ("alignaddrsi_vis"): Likewise.
19845 ("alignaddrdi_vis"): Likewise.
19846 ("alignaddrlsi_vis"): Likewise.
19847 ("alignaddrldi_vis"): Likewise.
19848 ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
19849 ("fexpand_vis"): Likewise.
19850 ("fpmerge_vis"): Likewise.
19851 ("faligndata<VM64:mode>_vis"): Likewise.
19852 ("bshuffle<VM64:mode>_vis"): Likewise.
19853 ("cmask8<P:mode>_vis"): Likewise.
19854 ("cmask16<P:mode>_vis"): Likewise.
19855 ("cmask32<P:mode>_vis"): Likewise.
19856 ("fchksm16_vis"): Likewise.
19857 ("v<vis3_shift_patname><GCM:mode>3"): Likewise.
19858 ("fmean16_vis"): Likewise.
19859 ("fp<plusminus_insn>64_vis"): Likewise.
19860 ("<plusminus_insn>v8qi3"): Likewise.
19861 ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
19862 ("<vis4_minmax_patname><VMMAX:mode>3"): Likewise.
19863 ("<vis4_uminmax_patname><VMMAX:mode>3"): Likewise.
19864 ("<vis3_addsub_ss_patname>v8qi3"): Likewise.
19865 ("<vis4_addsub_us_patname><VAUS:mode>3"): Likewise.
19866 ("*movqi_insn"): Likewise.
19867 ("*movhi_insn"): Likewise.
19868 ("*movsi_insn"): Likewise.
19869 ("movsi_pic_gotdata_op"): Likewise.
19870 ("*movdi_insn_sp32"): Likewise.
19871 ("*movdi_insn_sp64"): Likewise.
19872 ("movdi_pic_gotdata_op"): Likewise.
19873 ("*movsf_insn"): Likewise.
19874 ("*movdf_insn_sp32"): Likewise.
19875 ("*movdf_insn_sp64"): Likewise.
19876 ("*zero_extendhisi2_insn"): Likewise.
19877 ("*zero_extendqihi2_insn"): Likewise.
19878 ("*zero_extendqisi2_insn"): Likewise.
19879 ("*zero_extendqidi2_insn"): Likewise.
19880 ("*zero_extendhidi2_insn"): Likewise.
19881 ("*zero_extendsidi2_insn_sp64"): Likewise.
19882 ("ldfsr"): Likewise.
19883 ("prefetch_64"): Likewise.
19884 ("prefetch_32"): Likewise.
19885 ("tie_ld32"): Likewise.
19886 ("tie_ld64"): Likewise.
19887 ("*tldo_ldub_sp32"): Likewise.
19888 ("*tldo_ldub1_sp32"): Likewise.
19889 ("*tldo_ldub2_sp32"): Likewise.
19890 ("*tldo_ldub_sp64"): Likewise.
19891 ("*tldo_ldub1_sp64"): Likewise.
19892 ("*tldo_ldub2_sp64"): Likewise.
19893 ("*tldo_ldub3_sp64"): Likewise.
19894 ("*tldo_lduh_sp32"): Likewise.
19895 ("*tldo_lduh1_sp32"): Likewise.
19896 ("*tldo_lduh_sp64"): Likewise.
19897 ("*tldo_lduh1_sp64"): Likewise.
19898 ("*tldo_lduh2_sp64"): Likewise.
19899 ("*tldo_lduw_sp32"): Likewise.
19900 ("*tldo_lduw_sp64"): Likewise.
19901 ("*tldo_lduw1_sp64"): Likewise.
19902 ("*tldo_ldx_sp64"): Likewise.
19903 ("*mov<VM32:mode>_insn"): Likewise.
19904 ("*mov<VM64:mode>_insn_sp64"): Likewise.
19905 ("*mov<VM64:mode>_insn_sp32"): Likewise.
19906
19907 2017-07-07 Jose E. Marchesi <jose.marchesi@oracle.com>
19908
19909 * config/sparc/sparc.md ("type"): New insn type viscmp.
19910 ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Set insn type to
19911 viscmp.
19912 ("fpcmp<gcond:code>8<P:mode>_vis"): Likewise.
19913 ("fucmp<gcond:code>8<P:mode>_vis"): Likewise.
19914 ("fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
19915 * config/sparc/niagara7.md ("n7_vis_logical_v3pipe"): Handle
19916 viscmp.
19917 ("n7_vis_logical_11cycle"): Likewise.
19918 * config/sparc/niagara4.md ("n4_vis_logical"): Likewise.
19919 * config/sparc/niagara2.md ("niag3_vis": Likewise.
19920 * config/sparc/niagara.md ("niag_vis"): Likewise.
19921 * config/sparc/ultra3.md ("us3_fga"): Likewise.
19922 * config/sparc/ultra1_2.md ("us1_fga_double"): Likewise.
19923
19924 2017-07-07 Jose E. Marchesi <jose.marchesi@oracle.com>
19925
19926 * config/sparc/sparc.md: New instruction type `bmask'.
19927 (bmaskdi_vis): Use the `bmask' type.
19928 (bmasksi_vis): Likewise.
19929 * config/sparc/ultra3.md (us3_array): Likewise.
19930 * config/sparc/niagara7.md (n7_array): Likewise.
19931 * config/sparc/niagara4.md (n4_array): Likewise.
19932 * config/sparc/niagara2.md (niag2_vis): Likewise.
19933 (niag3_vis): Likewise.
19934 * config/sparc/niagara.md (niag_vis): Likewise.
19935
19936 2017-07-06 Jan Hubicka <hubicka@ucw.cz>
19937
19938 * ipa-comdats.c: Remove optimize check from gate.
19939 * ipa-fnsummary.c (ipa_fn_summary_generate): do not generate summary
19940 for functions not optimized.
19941 (ipa_fn_summary_read): Skip optimize check.
19942 (ipa_fn_summary_write): Likewise.
19943 * ipa-inline-analysis.c (do_estimate_growth_1): Check that caller
19944 is optimized.
19945 * ipa-inline.c (can_inline_edge_p): Not optimized functions are
19946 uninlinable.
19947 (can_inline_edge_p): Check flag_pcc_struct_return for match.
19948 (check_callers): Give up on caller which is not optimized.
19949 (inline_small_functions): Likewise.
19950 (ipa_inline): Do not give up when not optimizing.
19951 * ipa-visbility.c (function_and_variable_visibility): Do not optimize
19952 away unoptimizes cdtors.
19953 (whole_program_function_and_variable_visibility): Do
19954 ipa_discover_readonly_nonaddressable_vars in LTO mode.
19955 * ipa.c (process_references): Do not check optimize.
19956 (symbol_table::remove_unreachable_nodes): Update optimize check.
19957 (set_writeonly_bit): Update optimize check.
19958 (pass_ipa_cdtor_merge::gate): Do not check optimize.
19959 (pass_ipa_single_use::gate): Remove.
19960
19961 2017-07-06 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19962
19963 * config/rs6000/rs6000.c (union_defs, union_uses, insn_is_load_p,
19964 insn_is_store_p, insn_is_swap_p, const_load_sequence_p, v2df_reduction_p,
19965 rtx_is_swappable_p, insn_is_swappable_p, chain_contains_only_swaps,
19966 mark_swaps_for_removal, swap_const_vector_halves, adjust_subreg_index,
19967 permute_load, permute_store, adjust_extract, adjust_splat,
19968 adjust_xxpermdi, adjust_concat, adjust_vperm, handle_special_swappables,
19969 replace_swap_with_copy, dump_swap_insn_table,
19970 alignment_with_canonical_addr, alignment_mask, find_alignment_op,
19971 recombine_lvx_pattern, recombine_stvx_pattern,
19972 recombine_lvx_stvx_patterns, rs6000_analyze_swaps,
19973 make_pass_analyze_swaps): Move all code related to p8 swap optimizations
19974 to file rs6000-p8swap.c.
19975 * config/rs6000/rs6000-p8swap.c: New file.
19976 * config/rs6000/t-rs6000: Add rule to build rs6000-p8swap.o.
19977 * config.gcc: Add rs6000-p8swap.o to extra_objs for powerpc*-*-*
19978 and rs6000*-*-* targets.
19979
19980 2017-07-06 David Malcolm <dmalcolm@redhat.com>
19981
19982 * Makefile.in (selftest): Remove dependency on s-selftest-c++.
19983
19984 2017-07-06 Jan Hubicka <hubicka@ucw.cz>
19985
19986 * lto-wrapper.c (merge_and_complain): Do not merge
19987 fexceptions, fnon_call_exceptions, ftrapv, ffp_contract_, fmath_errno,
19988 fsigned_zeros, ftrapping_math, fwrapv.
19989 (append_compiler_options): Do not track these options.
19990 (append_linker_options): Likewie
19991
19992 2017-07-06 Jan Hubicka <hubicka@ucw.cz>
19993
19994 * cgraphunit.c (cgraph_node::finalize_function): When
19995 !flag_toplevel_reorde set no_reorder flag.
19996 (varpool_node::finalize_decl): Likewise.
19997 (symbol_table::compile): Drop no toplevel reorder path.
19998
19999 2017-07-06 Jan Hubicka <hubicka@ucw.cz>
20000
20001 * bb-reorder.c (better_edge_p): Do not build traces across abnormal/eh
20002 edges; zero probability is not better than uninitialized.
20003
20004 2017-07-06 Maxim Ostapenko <m.ostapenko@samsung.com>
20005
20006 * asan.h (asan_sanitize_allocas_p): Declare.
20007 * asan.c (asan_sanitize_allocas_p): New function.
20008 (handle_builtin_stack_restore): Bail out if !asan_sanitize_allocas_p.
20009 (handle_builtin_alloca): Likewise.
20010 * cfgexpand.c (expand_used_vars): Do not add allocas unpoisoning stuff
20011 if !asan_sanitize_allocas_p.
20012 * params.def (asan-instrument-allocas): Add new option.
20013 * params.h (ASAN_PROTECT_ALLOCAS): Define.
20014 * opts.c (common_handle_option): Disable allocas sanitization for
20015 KASan by default.
20016
20017 2017-07-06 Maxim Ostapenko <m.ostapenko@samsung.com>
20018
20019 * asan.c: Include gimple-fold.h.
20020 (get_last_alloca_addr): New function.
20021 (handle_builtin_stackrestore): Likewise.
20022 (handle_builtin_alloca): Likewise.
20023 (asan_emit_allocas_unpoison): Likewise.
20024 (get_mem_refs_of_builtin_call): Add new parameter, remove const
20025 quallifier from first paramerer. Handle BUILT_IN_ALLOCA,
20026 BUILT_IN_ALLOCA_WITH_ALIGN and BUILT_IN_STACK_RESTORE builtins.
20027 (instrument_builtin_call): Pass gimple iterator to
20028 get_mem_refs_of_builtin_call.
20029 (last_alloca_addr): New global.
20030 * asan.h (asan_emit_allocas_unpoison): Declare.
20031 * builtins.c (expand_asan_emit_allocas_unpoison): New function.
20032 (expand_builtin): Handle BUILT_IN_ASAN_ALLOCAS_UNPOISON.
20033 * cfgexpand.c (expand_used_vars): Call asan_emit_allocas_unpoison
20034 if function calls alloca.
20035 * gimple-fold.c (replace_call_with_value): Remove static keyword.
20036 * gimple-fold.h (replace_call_with_value): Declare.
20037 * internal-fn.c: Include asan.h.
20038 * sanitizer.def (BUILT_IN_ASAN_ALLOCA_POISON,
20039 BUILT_IN_ASAN_ALLOCAS_UNPOISON): New builtins.
20040
20041 2017-07-06 David Malcolm <dmalcolm@redhat.com>
20042
20043 * Makefile.in (SELFTEST_FLAGS): Drop "-x c", moving it to...
20044 (C_SELFTEST_FLAGS): New.
20045 (CPP_SELFTEST_FLAGS): New.
20046 (SELFTEST_DEPS): New, from deps of s-selftest.
20047 (C_SELFTEST_DEPS): New, from deps of s-selftest.
20048 (CPP_SELFTEST_DEPS): New.
20049 (selftest): Add dependency on s-selftest-c++.
20050 (s-selftest): Rename to...
20051 (s-selftest-c): ...this, moving deps to SELFTEST_DEPS
20052 and C_SELFTEST_DEPS, and using C_SELFTEST_FLAGS rather
20053 than SELFTEST_FLAGS.
20054 (selftest-gdb): Rename to...
20055 (selftest-c-gdb): ...this, using C_SELFTEST_DEPS and
20056 C_SELFTEST_FLAGS.
20057 (selftest-gdb): Reintroduce as an alias for selftest-c-gdb.
20058 (selftest-valgrind): Rename to...
20059 (selftest-c-valgrind): ...this, using C_SELFTEST_DEPS and
20060 C_SELFTEST_FLAGS.
20061 (selftest-valgrind): Reintroduce as an alias for
20062 selftest-c-valgrind.
20063 (s-selftest-c++): New.
20064 (selftest-c++-gdb): New.
20065 (selftest-c++-valgrind): New.
20066
20067 2017-07-06 Olivier Hainque <hainque@adacore.com>
20068
20069 * gcc.c (process_command): When deciding if undefined variables
20070 should be ignored when processing specs, accept "gcc -v" as well.
20071
20072 2017-07-06 Jan Hubicka <hubicka@ucw.cz>
20073
20074 * auto-profile.c (afdo_set_bb_count, afdo_propagate_edge,
20075 afdo_annotate_cfg): Set counts/probabilities as determined by afdo.
20076
20077 2017-07-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
20078
20079 * config/arm/arm-cpus.in (armv8-r): Add new entry.
20080 * config/arm/arm-isa.h (ISA_ARMv8r): Define macro.
20081 * config/arm/arm-tables.opt: Regenerate.
20082 * config/arm/arm.h (enum base_architecture): Add BASE_ARCH_8R
20083 enumerator.
20084 * doc/invoke.texi: Mention -march=armv8-r and its extensions.
20085
20086 2017-07-06 Carl Love <cel@us.ibm.com>
20087
20088 * ChangeLog: Clean up from mid air collision
20089
20090 2017-07-06 Carl Love <cel@us.ibm.com>
20091
20092 * config/rs6000/rs6000-c.c: Add support for built-in functions
20093 vector signed int vec_subc (vector signed int, vector signed int);
20094 vector signed __int128 vec_subc (vector signed __int128,
20095 vector signed __int128);
20096 vector unsigned __int128 vec_subc (vector unsigned __int128,
20097 vector unsigned __int128);
20098 vector signed int vec_sube (vector signed int, vector signed int,
20099 vector signed int);
20100 vector unsigned int vec_sube (vector unsigned int,
20101 vector unsigned int,
20102 vector unsigned int);
20103 vector signed __int128 vec_sube (vector signed __int128,
20104 vector signed __int128,
20105 vector signed__int128);
20106 vector unsigned __int128 vec_sube (vector unsigned __int128,
20107 vector unsigned __int128,
20108 vector unsigned __int128);
20109 vector signed int vec_subec (vector signed int, vector signed int,
20110 vector signed int);
20111 vector unsigned int vec_subec (vector unsigned int,
20112 vector unsigned int,
20113 vector unsigned int);
20114 vector signed __int128 vec_subec (vector signed __int128,
20115 vector signed __int128,
20116 vector signed__int128);
20117 vector unsigned __int128 vec_subec (vector unsigned __int128,
20118 vector unsigned __int128,
20119 vector unsigned __int128);
20120 * config/rs6000/rs6000.c (ALTIVEC_BUILTIN_VEC_SUBE,
20121 ALTIVEC_BUILTIN_VEC_SUBEC): Add ef_builtins.
20122 * config/rs6000/rs6000-builtin.def (SUBE, SUBEC): Add
20123 BU_ALTIVEC_OVERLOAD_X definitions.
20124 * config/rs6000/altivec.h (vec_sube, vec_subec): Add builtin defines.
20125 * doc/extend.texi: Update the built-in documentation file for the new
20126 built-in functions.
20127
20128 2017-07-06 David Malcolm <dmalcolm@redhat.com>
20129
20130 PR c++/79300
20131 * diagnostic-show-locus.c (layout::layout): Use start and finish
20132 spelling location for the start and finish of each range.
20133 * genmatch.c (linemap_client_expand_location_to_spelling_point):
20134 Add unused aspect param.
20135 * input.c (expand_location_1): Add "aspect" param, and use it
20136 to access the correct part of the location.
20137 (expand_location): Pass LOCATION_ASPECT_CARET to new param of
20138 expand_location_1.
20139 (expand_location_to_spelling_point): Likewise.
20140 (linemap_client_expand_location_to_spelling_point): Add "aspect"
20141 param, and pass it to expand_location_1.
20142
20143 2017-07-06 Sebastian Peryt <sebastian.peryt@intel.com>
20144
20145 * config/i386/avx512fintrin.h (_mm_mask_getexp_round_ss,
20146 _mm_maskz_getexp_round_ss, _mm_mask_getexp_round_sd,
20147 _mm_maskz_getexp_round_sd, _mm_mask_getmant_round_sd,
20148 _mm_maskz_getmant_round_sd, _mm_mask_getmant_round_ss,
20149 _mm_maskz_getmant_round_ss, _mm_mask_getexp_ss, _mm_maskz_getexp_ss,
20150 _mm_mask_getexp_sd, _mm_maskz_getexp_sd, _mm_mask_getmant_sd,
20151 _mm_maskz_getmant_sd, _mm_mask_getmant_ss,
20152 _mm_maskz_getmant_ss): New intrinsics.
20153 (__builtin_ia32_getexpss128_mask): Changed to ...
20154 __builtin_ia32_getexpss128_round ... this.
20155 (__builtin_ia32_getexpsd128_mask): Changed to ...
20156 __builtin_ia32_getexpsd128_round ... this.
20157 * config/i386/i386-builtin-types.def
20158 ((V2DF, V2DF, V2DF, INT, V2DF, UQI, INT),
20159 (V4SF, V4SF, V4SF, INT, V4SF, UQI, INT)): New function type aliases.
20160 * config/i386/i386-builtin.def (__builtin_ia32_getexpsd_mask_round,
20161 __builtin_ia32_getexpss_mask_round, __builtin_ia32_getmantsd_mask_round,
20162 __builtin_ia32_getmantss_mask_round): New builtins.
20163 * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI_INT,
20164 V4SF_FTYPE_V4SF_V4SF_INT_V4SF_UQI_INT): Handle new types.
20165 (CODE_FOR_avx512f_vgetmantv2df_mask_round,
20166 CODE_FOR_avx512f_vgetmantv4sf_mask_round): New cases.
20167 * config/i386/sse.md
20168 (avx512f_sgetexp<mode><round_saeonly_name>): Changed to ...
20169 avx512f_sgetexp<mode><mask_scalar_name>
20170 <round_saeonly_scalar_name> ... this.
20171 (vgetexp<ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|
20172 %0, %1, %2<round_saeonly_op3>}): Changed to ...
20173 vgetexp<ssescalarmodesuffix>
20174 \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
20175 %0<mask_scalar_operand3>, %1, %2<round_saeonly_scalar_mask_op3>} ... this.
20176 (avx512f_vgetmant<mode><round_saeonly_name>): Changed to ...
20177 avx512f_vgetmant<mode><mask_scalar_name>
20178 <round_saeonly_scalar_name> ... this.
20179 (vgetmant<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
20180 %0, %1, %2<round_saeonly_op4>, %3}): Changed to ...
20181 vgetmant<ssescalarmodesuffix>
20182 \t{%3, <round_saeonly_scalar_mask_op4>%2, %1, %0<mask_scalar_operand4>|
20183 %0<mask_scalar_operand4>, %1, %2
20184 <round_saeonly_scalar_mask_op4>, %3} ... this.
20185 * config/i386/subst.md (mask_scalar_operand4,
20186 round_saeonly_scalar_mask_operand4, round_saeonly_scalar_mask_op4,
20187 round_saeonly_scalar_nimm_predicate): New subst attributes.
20188
20189 2017-07-06 Julia Koval <julia.koval@intel.com>
20190
20191 * config/i386/i386.c (ix86_erase_embedded_rounding):
20192 Remove code for old rounding pattern.
20193
20194 2017-07-06 Richard Earnshaw <rearnsha@arm.com>
20195
20196 * config/arm/t-arm (GTM_H): Add arm-cpu.h.
20197
20198 2017-07-06 Christophe Lyon <christophe.lyon@linaro.org>
20199
20200 * doc/sourcebuild.texi (Test Directives, Variants of
20201 dg-require-support): Add documentation for dg-require-stack-check.
20202
20203 2017-07-05 Sebastian Peryt <sebastian.peryt@intel.com>
20204
20205 * config/i386/subst.md (mask_scalar, round_scalar,
20206 round_saeonly_scalar): New meta-templates.
20207 (mask_scalar_name, mask_scalar_operand3, round_scalar_name,
20208 round_scalar_mask_operand3, round_scalar_mask_op3,
20209 round_scalar_constraint, round_scalar_prefix, round_saeonly_scalar_name,
20210 round_saeonly_scalar_mask_operand3, round_saeonly_scalar_mask_op3,
20211 round_saeonly_scalar_constraint,
20212 round_saeonly_scalar_prefix): New subst attribute.
20213 * config/i386/sse.md
20214 (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): Renamed to ...
20215 <sse>_vm<plusminus_insn><mode>3<mask_scalar_name>
20216 <round_scalar_name> ... this.
20217 (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): Renamed to ...
20218 <sse>_vm<multdiv_mnemonic><mode>3<mask_scalar_name>
20219 <round_scalar_name> ... this.
20220 (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): Renamed to ...
20221 <sse>_vm<code><mode>3<mask_scalar_name>
20222 <round_saeonly_scalar_name> ... this.
20223 (v<plusminus_mnemonic><ssescalarmodesuffix>
20224 \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
20225 %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
20226 v<plusminus_mnemonic><ssescalarmodesuffix>
20227 \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
20228 %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
20229 (v<multdiv_mnemonic><ssescalarmodesuffix>
20230 \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
20231 %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
20232 v<multdiv_mnemonic><ssescalarmodesuffix>
20233 \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
20234 %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
20235 (v<maxmin_float><ssescalarmodesuffix>
20236 \t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|
20237 %0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}): Changed to ...
20238 v<maxmin_float><ssescalarmodesuffix>
20239 \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
20240 %0<mask_scalar_operand3>, %1, %<iptr>2
20241 <round_saeonly_scalar_mask_op3>} ... this.
20242
20243 2017-07-05 Richard Earnshaw <rearnsha@arm.com>
20244
20245 * config/arm/arm.c (arm_fixed_condition_code_regs): New function.
20246 (TARGET_FIXED_CONDITION_CODE_REGS): Redefine.
20247
20248 2017-07-05 Richard Sandiford <richard.sandiford@linaro.org>
20249 Alan Hayward <alan.hayward@arm.com>
20250 David Sherwood <david.sherwood@arm.com>
20251
20252 * combine.c (simplify_if_then_else): Remove "enum" before
20253 "machine_mode".
20254 * compare-elim.c (can_eliminate_compare): Likewise.
20255 * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
20256 Likewise.
20257 (aarch64_lookup_simd_builtin_type): Likewise.
20258 (aarch64_simd_builtin_type): Likewise.
20259 (aarch64_init_simd_builtin_types): Likewise.
20260 (aarch64_simd_expand_args): Likewise.
20261 * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_rglist):
20262 Likewise.
20263 (aarch64_reverse_mask): Likewise.
20264 (aarch64_simd_emit_reg_reg_move): Likewise.
20265 (aarch64_gen_adjusted_ldpstp): Likewise.
20266 (aarch64_ccmp_mode_to_code): Likewise.
20267 (aarch64_operands_ok_for_ldpstp): Likewise.
20268 (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
20269 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
20270 Likewise.
20271 (aarch64_min_divisions_for_recip_mul): Likewise.
20272 (aarch64_reassociation_width): Likewise.
20273 (aarch64_get_condition_code_1): Likewise.
20274 (aarch64_simd_emit_reg_reg_move): Likewise.
20275 (aarch64_simd_attr_length_rglist): Likewise.
20276 (aarch64_reverse_mask): Likewise.
20277 (aarch64_operands_ok_for_ldpstp): Likewise.
20278 (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
20279 (aarch64_gen_adjusted_ldpstp): Likewise.
20280 * config/aarch64/cortex-a57-fma-steering.c (fma_node::rename):
20281 Likewise.
20282 * config/arc/arc.c (legitimate_offset_address_p): Likewise.
20283 * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
20284 (arm_lookup_simd_builtin_type): Likewise.
20285 (arm_simd_builtin_type): Likewise.
20286 (arm_init_simd_builtin_types): Likewise.
20287 (arm_expand_builtin_args): Likewise.
20288 * config/arm/arm-protos.h (arm_expand_builtin): Likewise.
20289 * config/ft32/ft32.c (ft32_libcall_value): Likewise.
20290 (ft32_setup_incoming_varargs): Likewise.
20291 (ft32_function_arg): Likewise.
20292 (ft32_function_arg_advance): Likewise.
20293 (ft32_pass_by_reference): Likewise.
20294 (ft32_arg_partial_bytes): Likewise.
20295 (ft32_valid_pointer_mode): Likewise.
20296 (ft32_addr_space_pointer_mode): Likewise.
20297 (ft32_addr_space_legitimate_address_p): Likewise.
20298 * config/i386/i386-protos.h (ix86_operands_ok_for_move_multiple):
20299 Likewise.
20300 * config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise.
20301 (ix86_emit_outlined_ms2sysv_restore): Likewise.
20302 (iamcu_alignment): Likewise.
20303 (canonicalize_vector_int_perm): Likewise.
20304 (ix86_noce_conversion_profitable_p): Likewise.
20305 (ix86_mpx_bound_mode): Likewise.
20306 (ix86_operands_ok_for_move_multiple): Likewise.
20307 * config/microblaze/microblaze-protos.h
20308 (microblaze_expand_conditional_branch_reg): Likewise.
20309 * config/microblaze/microblaze.c
20310 (microblaze_expand_conditional_branch_reg): Likewise.
20311 * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
20312 Likewise.
20313 (rs6000_reassociation_width): Likewise.
20314 (rs6000_invalid_binary_op): Likewise.
20315 (fusion_p9_p): Likewise.
20316 (emit_fusion_p9_load): Likewise.
20317 (emit_fusion_p9_store): Likewise.
20318 * config/riscv/riscv-protos.h (riscv_regno_mode_ok_for_base_p):
20319 Likewise.
20320 (riscv_hard_regno_mode_ok_p): Likewise.
20321 (riscv_address_insns): Likewise.
20322 (riscv_split_symbol): Likewise.
20323 (riscv_legitimize_move): Likewise.
20324 (riscv_function_value): Likewise.
20325 (riscv_hard_regno_nregs): Likewise.
20326 (riscv_expand_builtin): Likewise.
20327 * config/riscv/riscv.c (riscv_build_integer_1): Likewise.
20328 (riscv_build_integer): Likewise.
20329 (riscv_split_integer): Likewise.
20330 (riscv_legitimate_constant_p): Likewise.
20331 (riscv_cannot_force_const_mem): Likewise.
20332 (riscv_regno_mode_ok_for_base_p): Likewise.
20333 (riscv_valid_base_register_p): Likewise.
20334 (riscv_valid_offset_p): Likewise.
20335 (riscv_valid_lo_sum_p): Likewise.
20336 (riscv_classify_address): Likewise.
20337 (riscv_legitimate_address_p): Likewise.
20338 (riscv_address_insns): Likewise.
20339 (riscv_load_store_insns): Likewise.
20340 (riscv_force_binary): Likewise.
20341 (riscv_split_symbol): Likewise.
20342 (riscv_force_address): Likewise.
20343 (riscv_legitimize_address): Likewise.
20344 (riscv_move_integer): Likewise.
20345 (riscv_legitimize_const_move): Likewise.
20346 (riscv_legitimize_move): Likewise.
20347 (riscv_address_cost): Likewise.
20348 (riscv_subword): Likewise.
20349 (riscv_output_move): Likewise.
20350 (riscv_canonicalize_int_order_test): Likewise.
20351 (riscv_emit_int_order_test): Likewise.
20352 (riscv_function_arg_boundary): Likewise.
20353 (riscv_pass_mode_in_fpr_p): Likewise.
20354 (riscv_pass_fpr_single): Likewise.
20355 (riscv_pass_fpr_pair): Likewise.
20356 (riscv_get_arg_info): Likewise.
20357 (riscv_function_arg): Likewise.
20358 (riscv_function_arg_advance): Likewise.
20359 (riscv_arg_partial_bytes): Likewise.
20360 (riscv_function_value): Likewise.
20361 (riscv_pass_by_reference): Likewise.
20362 (riscv_setup_incoming_varargs): Likewise.
20363 (riscv_print_operand): Likewise.
20364 (riscv_elf_select_rtx_section): Likewise.
20365 (riscv_save_restore_reg): Likewise.
20366 (riscv_for_each_saved_reg): Likewise.
20367 (riscv_register_move_cost): Likewise.
20368 (riscv_hard_regno_mode_ok_p): Likewise.
20369 (riscv_hard_regno_nregs): Likewise.
20370 (riscv_class_max_nregs): Likewise.
20371 (riscv_memory_move_cost): Likewise.
20372 * config/rl78/rl78-protos.h (rl78_split_movsi): Likewise.
20373 * config/rl78/rl78.c (rl78_split_movsi): Likewise.
20374 (rl78_addr_space_address_mode): Likewise.
20375 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
20376 Likewise.
20377 * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
20378 (rs6000_reassociation_width): Likewise.
20379 (rs6000_invalid_binary_op): Likewise.
20380 (fusion_p9_p): Likewise.
20381 (emit_fusion_p9_load): Likewise.
20382 (emit_fusion_p9_store): Likewise.
20383 * config/visium/visium-protos.h (prepare_move_operands): Likewise.
20384 (ok_for_simple_move_operands): Likewise.
20385 (ok_for_simple_move_strict_operands): Likewise.
20386 (ok_for_simple_arith_logic_operands): Likewise.
20387 (visium_legitimize_reload_address): Likewise.
20388 (visium_select_cc_mode): Likewise.
20389 (output_cbranch): Likewise.
20390 (visium_split_double_move): Likewise.
20391 (visium_expand_copysign): Likewise.
20392 (visium_expand_int_cstore): Likewise.
20393 (visium_expand_fp_cstore): Likewise.
20394 * config/visium/visium.c (visium_pass_by_reference): Likewise.
20395 (visium_function_arg): Likewise.
20396 (visium_function_arg_advance): Likewise.
20397 (visium_libcall_value): Likewise.
20398 (visium_setup_incoming_varargs): Likewise.
20399 (visium_legitimate_constant_p): Likewise.
20400 (visium_legitimate_address_p): Likewise.
20401 (visium_legitimize_address): Likewise.
20402 (visium_secondary_reload): Likewise.
20403 (visium_register_move_cost): Likewise.
20404 (visium_memory_move_cost): Likewise.
20405 (prepare_move_operands): Likewise.
20406 (ok_for_simple_move_operands): Likewise.
20407 (ok_for_simple_move_strict_operands): Likewise.
20408 (ok_for_simple_arith_logic_operands): Likewise.
20409 (visium_function_value_1): Likewise.
20410 (rtx_ok_for_offset_p): Likewise.
20411 (visium_legitimize_reload_address): Likewise.
20412 (visium_split_double_move): Likewise.
20413 (visium_expand_copysign): Likewise.
20414 (visium_expand_int_cstore): Likewise.
20415 (visium_expand_fp_cstore): Likewise.
20416 (visium_split_cstore): Likewise.
20417 (visium_select_cc_mode): Likewise.
20418 (visium_split_cbranch): Likewise.
20419 (output_cbranch): Likewise.
20420 (visium_print_operand_address): Likewise.
20421 * expmed.c (flip_storage_order): Likewise.
20422 * expmed.h (emit_cstore): Likewise.
20423 (flip_storage_order): Likewise.
20424 * genrecog.c (validate_pattern): Likewise.
20425 * hsa-gen.c (gen_hsa_addr): Likewise.
20426 * internal-fn.c (expand_arith_overflow): Likewise.
20427 * ira-color.c (allocno_copy_cost_saving): Likewise.
20428 * lra-assigns.c (find_hard_regno_for_1): Likewise.
20429 * lra-constraints.c (prohibited_class_reg_set_mode_p): Likewise.
20430 (process_invariant_for_inheritance): Likewise.
20431 * lra-eliminations.c (move_plus_up): Likewise.
20432 * omp-low.c (lower_oacc_reductions): Likewise.
20433 * simplify-rtx.c (simplify_subreg): Likewise.
20434 * target.def (TARGET_SETUP_INCOMING_VARARG_BOUNDS): Likewise.
20435 (TARGET_CHKP_BOUND_MODE): Likewise..
20436 * targhooks.c (default_chkp_bound_mode): Likewise.
20437 (default_setup_incoming_vararg_bounds): Likewise.
20438 * targhooks.h (default_chkp_bound_mode): Likewise.
20439 (default_setup_incoming_vararg_bounds): Likewise.
20440 * tree-ssa-math-opts.c (divmod_candidate_p): Likewise.
20441 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20442 (have_whole_vector_shift): Likewise.
20443 * tree-vect-stmts.c (vectorizable_load): Likewise.
20444 * doc/tm.texi: Regenerate.
20445
20446 2017-07-05 Georg-Johann Lay <avr@gjlay.de>
20447
20448 Graceful degrade if Binutils PR21472 is not available.
20449
20450 PR target/81072
20451 * configure.ac [target=avr]: WARN instead of ERROR if avrxmega3
20452 .rodata in flash test fails.
20453 (HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH): Define it if test passes.
20454 * confgure: Regenerate.
20455 * config.in: Regenerate.
20456 * config/avr/avr.c (avr_asm_named_section)
20457 [HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH]: Only trigger
20458 __do_copy_data for stuff in .rodata if flash_pm_offset = 0.
20459 (avr_asm_init_sections): Same.
20460
20461 2017-07-05 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20462
20463 * config/arm/neon.md (fma<VCVTF:mode>4): Remove %?.
20464 (fma<VH:mode>4_intrinsic): Likewise.
20465 (*fmsub<VCVTF:mode>4): Likewise.
20466 (*fmsub<VH:mode>4_intrinsic): Likewise.
20467
20468 2017-07-05 Georg-Johann Lay <avr@gjlay.de>
20469
20470 PR target/81305
20471 * config/avr/avr.c (avr_out_movhi_mr_r_xmega) [CONSTANT_ADDRESS_P]:
20472 Don't depend on "optimize > 0".
20473 (out_movhi_r_mr, out_movqi_mr_r): Same.
20474 (out_movhi_mr_r, out_movqi_r_mr): Same.
20475 (avr_address_cost) [CONSTANT_ADDRESS_P]: Don't depend cost for
20476 io_address_operand on "optimize > 0".
20477
20478 2017-07-05 Bin Cheng <bin.cheng@arm.com>
20479
20480 * tree-loop-distribution.c: Add general explanantion on the pass.
20481 (generate_loops_for_partition): Mark distributed loop.
20482 (pg_add_dependence_edges): New parameter. Handle alias data
20483 dependence specially and record it in the parameter if asked.
20484 (struct pg_vdata, pg_edata, pg_edge_callback_data): New structs.
20485 (init_partition_graph_vertices, add_partition_graph_edge): New.
20486 (pg_skip_alias_edge, free_partition_graph_edata_cb): New.
20487 (free_partition_graph_vdata, build_partition_graph): New.
20488 (sort_partitions_by_post_order, merge_dep_scc_partitions): New.
20489 (pg_collect_alias_ddrs, break_alias_scc_partitions): New.
20490 (data_ref_segment_size, latch_dominated_by_data_ref): New.
20491 (compute_alias_check_pairs, version_loop_by_alias_check): New.
20492 (version_for_distribution_p, finalize_partitions): New.
20493 (distribute_loop): Handle alias data dependence specially. Factor
20494 out loop fusion code as functions and call these functions.
20495
20496 2017-07-05 Bin Cheng <bin.cheng@arm.com>
20497
20498 * tree-loop-distribution.c (classify_partition): New parameter and
20499 better handle reduction statement.
20500 (rdg_build_partitions): Revise comment.
20501 (distribute_loop): Compute statements in all partitions and pass it
20502 to classify_partition.
20503
20504 2017-07-05 Bin Cheng <bin.cheng@arm.com>
20505
20506 * tree-loop-distribution.c (enum partition_type): New.
20507 (struct partition): New field type.
20508 (partition_merge_into): Add parameter. Update partition type.
20509 (data_dep_in_cycle_p, update_type_for_merge): New functions.
20510 (build_rdg_partition_for_vertex): Compute partition type.
20511 (rdg_build_partitions): Dump partition type.
20512 (distribute_loop): Update calls to partition_merge_into.
20513
20514 2017-07-05 Bin Cheng <bin.cheng@arm.com>
20515
20516 * tree-loop-distribution.c (struct ddr_hasher): New.
20517 (ddr_hasher::hash, ::equal, get_data_dependence): New function.
20518 (ddrs_table): New.
20519 (classify_partition): Call get_data_dependence.
20520 (pg_add_dependence_edges): Ditto.
20521 (distribute_loop): Release data dependence hash table.
20522
20523 2017-07-05 Bin Cheng <bin.cheng@arm.com>
20524
20525 * tree-loop-distribution.c (ref_base_address): Delete.
20526 (similar_memory_accesses): Rename ...
20527 (share_memory_accesses): ... to this. Check if partitions access
20528 the same memory reference.
20529 (distribute_loop): Call share_memory_accesses.
20530
20531 2017-07-05 Bin Cheng <bin.cheng@arm.com>
20532
20533 * tree-loop-distribution.c (struct partition): New field recording
20534 its data reference.
20535 (partition_alloc, partition_free): Init and release data refs.
20536 (partition_merge_into): Merge data refs.
20537 (build_rdg_partition_for_vertex): Collect data refs for partition.
20538 (pg_add_dependence_edges): Change parameters from vector to bitmap.
20539 Update uses.
20540 (distribute_loop): Remve data refs from vertice data of partition
20541 graph.
20542
20543 2017-07-05 Bin Cheng <bin.cheng@arm.com>
20544
20545 * tree-loop-distribution.c (params.h): Include header file.
20546 (MAX_DATAREFS_NUM, DR_INDEX): New macro.
20547 (datarefs_vec): New global var.
20548 (create_rdg_vertices): Use datarefs_vec directly.
20549 (free_rdg): Don't free data references.
20550 (build_rdg): Update use. Don't free data references.
20551 (distribute_loop): Compute global variable for data references.
20552 Bail out if there are too many data references.
20553
20554 2017-07-05 Bin Cheng <bin.cheng@arm.com>
20555
20556 * tree-loop-distribution.c (loop_nest): New global var.
20557 (build_rdg): Use loop directly, rather than loop nest.
20558 (pg_add_dependence_edges): Remove loop nest parameter. Use global
20559 variable directly.
20560 (distribute_loop): Compute global variable loop nest. Update use.
20561
20562 2017-07-05 Bin Cheng <bin.cheng@arm.com>
20563
20564 * tree-loop-distribution.c (enum fuse_type, fuse_message): New.
20565 (partition_merge_into): New parameter. Dump reason for fusion.
20566 (distribute_loop): Update use of partition_merge_into.
20567
20568 2017-07-05 Bin Cheng <bin.cheng@arm.com>
20569
20570 * tree-loop-distribution.c (bb_top_order_index): New.
20571 (bb_top_order_index_size, bb_top_order_cmp): New.
20572 (stmts_from_loop): Use topological order.
20573 (pass_loop_distribution::execute): Compute and release topological
20574 order for basic blocks.
20575
20576 2017-07-05 Bin Cheng <bin.cheng@arm.com>
20577
20578 * tree-loop-distribution.c (pass_loop_distribution::execute): Skip
20579 if no loops.
20580
20581 2017-07-05 Bin Cheng <bin.cheng@arm.com>
20582
20583 * cfgloop.h (struct loop): Add comment. New field orig_loop_num.
20584 * cfgloopmanip.c (lv_adjust_loop_entry_edge): Comment change.
20585 * internal-fn.c (expand_LOOP_DIST_ALIAS): New function.
20586 * internal-fn.def (LOOP_DIST_ALIAS): New.
20587 * tree-vectorizer.c (fold_loop_vectorized_call): Rename to ...
20588 (fold_loop_internal_call): ... this.
20589 (vect_loop_dist_alias_call): New function.
20590 (set_uid_loop_bbs): Call fold_loop_internal_call.
20591 (vectorize_loops): Fold IFN_LOOP_VECTORIZED and IFN_LOOP_DIST_ALIAS
20592 internal calls.
20593
20594 2017-07-04 Uros Bizjak <ubizjak@gmail.com>
20595
20596 PR target/81300
20597 * config/i386/i386.md (setcc + movzbl/and to xor + setcc peepholes):
20598 Require dead FLAGS_REG at the beginning of a peephole.
20599
20600 2017-07-04 Uros Bizjak <ubizjak@gmail.com>
20601
20602 PR target/81294
20603 * config/i386/adxintrin.h (_subborrow_u32): Swap _X and _Y
20604 arguments in the call to __builtin_ia32_sbb_u32.
20605 (_subborrow_u64): Swap _X and _Y arguments in the call to
20606 __builtin_ia32_sbb_u64.
20607
20608 2017-07-04 Jakub Jelinek <jakub@redhat.com>
20609
20610 PR debug/81278
20611 * tree-vrp.c (compare_assert_loc): Turn into a function template
20612 with stable template parameter. Only test if a->e is NULL,
20613 !a->e == !b->e has been verified already. Use e == NULL or
20614 e != NULL instead of e or ! e tests. If stable is true, don't use
20615 iterative_hash_expr, on the other side allow a or b or both NULL
20616 and sort the NULLs last.
20617 (process_assert_insertions): Sort using compare_assert_loc<false>
20618 instead of compare_assert_loc, later sort using
20619 compare_assert_loc<true> before calling process_assert_insertions_for
20620 in a loop. Use break instead of continue once seen NULL pointer.
20621
20622 2017-07-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
20623
20624 * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
20625 Cortex-R7 and Cortex-R8 processors.
20626
20627 2017-07-04 Jan Hubicka <hubicka@ucw.cz>
20628
20629 * ipa-utils.c (ipa_merge_profiles): Fix merging when dst is
20630 uninitialized while src is not.
20631
20632 2017-07-04 Richard Earnshaw <rearnsha@arm.com>
20633
20634 * common/config/arm/arm-common.c: Adjust include path for
20635 arm-cpu-cdata.h
20636 * config/arm/t-arm (TM_H): Adjust path for arm-cpu.h.
20637 (arm-cpu.h): Create in build directory. Adjust dependency rules.
20638 (arm-cpu-data.h): Likewise.
20639 (arm-cpu-cdata.h): Likewise.
20640 * config/arm/arm-cpu.h: Delete.
20641 * config/arm/arm-cpu-cdata.h: Delete.
20642 * config/arm/arm-cpu-data.h: Delete.
20643
20644 2017-07-04 James Greenhalgh <james.greenhalgh@arm.com>
20645
20646 * config/arm/arm-cpus.in (cortex-a55): New.
20647 (cortex-a75): Likewise.
20648 (cortex-a75.cortex-a55): Likewise.
20649 * config/arm/driver-arm.c (arm_cpu_table): Add cortex-a55 and
20650 cortex-a75.
20651 * doc/invoke.texi (-mcpu): Document cortex-a55 and cortex-a75.
20652 * config/arm/arm-cpu-cdata.h: Regenerate.
20653 * config/arm/arm-cpu-data.h: Regenerate.
20654 * config/arm/arm-cpu.h: Regenerate.
20655 * config/arm/arm-tables.opt: Regenerate.
20656 * config/arm/arm-tune.md: Regenerate.
20657
20658 2017-07-04 Jan Hubicka <hubicka@ucw.cz>
20659
20660 * haifa-sched.c (sched_create_recovery_edges): Update profile.
20661
20662 2017-07-04 Jan Hubicka <hubicka@ucw.cz>
20663
20664 * bb-reorder.c (better_edge_p): Fix handling of uninitialized
20665 probability.
20666
20667 2017-07-04 Richard Sandiford <richard.sandiford@linaro.org>
20668
20669 PR tree-optimization/81292
20670 * tree-ssa-strlen.c (handle_builtin_strlen): When setting
20671 full_string_p, also call adjust_related_strinfos if the adjustment
20672 is simple, otherwise invalidate related strinfos.
20673
20674 2017-07-04 Martin Liska <mliska@suse.cz>
20675
20676 PR sanitizer/81040
20677 * sanopt.c (sanitize_rewrite_addressable_params): Mark the
20678 newly created variable as DECL_IGNORED_P.
20679
20680 2017-07-04 Martin Liska <mliska@suse.cz>
20681
20682 PR ipa/81293
20683 * ipa-inline.c (inline_small_functions):
20684 Use xstrdup_for_dump.
20685
20686 2017-07-04 Tom de Vries <tom@codesourcery.com>
20687
20688 * graph.c (draw_cfg_edges): Save and restore EDGE_DFS_BACK.
20689
20690 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
20691
20692 PR target/81033
20693 * config/darwin.c (darwin_function_switched_text_sections):
20694 Fix spaces.
20695
20696 2017-07-03 Jan Hubicka <hubicka@ucw.cz>
20697
20698 * tree-vect-loop-manip.c (vect_do_peeling): Fix scaling up.
20699
20700 2017-07-03 Richard Earnshaw <rearnsha@arm.com>
20701
20702 * doc/invoke.texi (ARM Options): Add -mbe8 and -mbe32 to option summary.
20703
20704 2017-07-03 Richard Sandiford <richard.sandiford@linaro.org>
20705
20706 * tree-vect-loop.c (vect_analyze_loop_2): Treat min_scalar_loop_bound,
20707 min_profitable_iters, and th as inclusive lower bounds.
20708 Fix LOOP_VINFO_PEELING_FOR_GAPS condition.
20709 (vect_estimate_min_profitable_iters): Return inclusive lower bounds
20710 for min_profitable_iters and min_profitable_estimate.
20711 (vect_transform_loop): Treat th as an inclusive lower bound.
20712 * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
20713
20714 2017-07-03 Dominique d'Humieres <dominiq@lps.ens.fr>
20715
20716 PR target/81033
20717 * config/darwin.c (darwin_function_switched_text_sections):
20718 Replace DECL_NAME with DECL_ASSEMBLER_NAME, split assemble_name_raw
20719 in two pieces, and suppress the use of buf.
20720
20721 2017-07-03 Nathan Sidwell <nathan@acm.org>
20722
20723 * hash-table.h (hash_table_mod1): Fix indentation.
20724
20725 2017-07-02 Jan Hubicka <hubicka@ucw.cz>
20726
20727 PR middle-end/81290
20728 * predict.c (force_edge_cold): Be more careful about propagation
20729 backward.
20730 * profile-count.h (profile_probability::guessed,
20731 profile_probability::fdo, profile_count::guessed, profile_count::fdo):
20732 New.
20733 * tree-ssa-threadupdate.c (recompute_probabilities): Result is guessed.
20734
20735 2017-07-03 James Greenhalgh <james.greenhalgh@arm.com>
20736
20737 * doc/invoke.texi (rcpc architecture extension): Document it.
20738
20739 2017-07-03 Richard Biener <rguenther@suse.de>
20740
20741 PR tree-optimization/60510
20742 * tree-vect-loop.c (vect_create_epilog_for_reduction): Pass in
20743 the scalar reduction PHI and use it.
20744 (vectorizable_reduction): Properly guard the single_defuse_cycle
20745 path for non-SLP reduction chains where we cannot use it.
20746 Rework reduc_def/index and vector type deduction. Rework
20747 vector operand gathering during reduction op code-gen.
20748 * tree-vect-slp.c (vect_analyze_slp): For failed SLP reduction
20749 chains dissolve the chain and leave it to non-SLP reduction
20750 handling.
20751
20752 2017-07-03 Richard Sandiford <richard.sandiford@linaro.org>
20753
20754 * tree-data-ref.h (dr_alignment): Declare.
20755 * tree-data-ref.c (dr_alignment): New function.
20756 * tree-vectorizer.h (dataref_aux): Remove base_element_aligned.
20757 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20758 set it.
20759 * tree-vect-stmts.c (vectorizable_store): Use dr_alignment.
20760
20761 2017-07-03 Richard Sandiford <richard.sandiford@linaro.org>
20762
20763 * tree-data-ref.h (innermost_loop_behavior): Add base_alignment
20764 and base_misalignment fields.
20765 (DR_BASE_ALIGNMENT, DR_BASE_MISALIGNMENT): New macros.
20766 * tree-data-ref.c: Include builtins.h.
20767 (dr_analyze_innermost): Set up the new innmost_loop_behavior fields.
20768 * tree-vectorizer.h (STMT_VINFO_DR_BASE_ALIGNMENT): New macro.
20769 (STMT_VINFO_DR_BASE_MISALIGNMENT): Likewise.
20770 * tree-vect-data-refs.c: Include tree-cfg.h.
20771 (vect_compute_data_ref_alignment): Use the new innermost_loop_behavior
20772 fields instead of calculating an alignment here.
20773 (vect_analyze_data_refs): Use dr_analyze_innermost. Dump the new
20774 innermost_loop_behavior fields.
20775
20776 2017-07-03 Richard Sandiford <richard.sandiford@linaro.org>
20777
20778 * tree-data-ref.h (innermost_loop_behavior): Add a step_alignment
20779 field.
20780 (DR_STEP_ALIGNMENT): New macro.
20781 * tree-vectorizer.h (STMT_VINFO_DR_STEP_ALIGNMENT): Likewise.
20782 * tree-data-ref.c (dr_analyze_innermost): Initalize step_alignment.
20783 (create_data_ref): Print it.
20784 * tree-vect-stmts.c (vectorizable_load): Use the step alignment
20785 to tell whether the step preserves vector (mis)alignment.
20786 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
20787 Move the check for an integer step and generalise to all INTEGER_CST.
20788 (vect_analyze_data_refs): Set DR_STEP_ALIGNMENT when setting DR_STEP.
20789 Print the outer step alignment.
20790
20791 2017-07-03 Richard Sandiford <richard.sandiford@linaro.org>
20792
20793 * tree-data-ref.h (innermost_loop_behavior): Replace aligned_to
20794 with offset_alignment.
20795 (DR_ALIGNED_TO): Delete.
20796 (DR_OFFSET_ALIGNMENT): New macro.
20797 * tree-vectorizer.h (STMT_VINFO_DR_ALIGNED_TO): Delete.
20798 (STMT_VINFO_DR_OFFSET_ALIGNMENT): New macro.
20799 * tree-data-ref.c (dr_analyze_innermost): Update after above changes.
20800 (create_data_ref): Likewise.
20801 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
20802 (vect_analyze_data_refs): Likewise.
20803 * tree-if-conv.c (if_convertible_loop_p_1): Use memset before
20804 creating dummy innermost behavior.
20805
20806 2017-07-03 Richard Sandiford <richard.sandiford@linaro.org>
20807
20808 * tree-data-ref.h (dr_analyze_innermost): Replace the dr argument
20809 with a "innermost_loop_behavior *" and refeence tree.
20810 * tree-data-ref.c (dr_analyze_innermost): Likewise.
20811 (create_data_ref): Update call accordingly.
20812 * tree-predcom.c (find_looparound_phi): Likewise.
20813
20814 2017-07-03 Richard Sandiford <richard.sandiford@linaro.org>
20815
20816 * tree-vectorizer.h (_stmt_vec_info): Replace individual dr_*
20817 fields with dr_wrt_vec_loop.
20818 (STMT_VINFO_DR_BASE_ADDRESS, STMT_VINFO_DR_INIT, STMT_VINFO_DR_OFFSET)
20819 (STMT_VINFO_DR_STEP, STMT_VINFO_DR_ALIGNED_TO): Update accordingly.
20820 (STMT_VINFO_DR_WRT_VEC_LOOP): New macro.
20821 (vect_dr_behavior): New function.
20822 (vect_create_addr_base_for_vector_ref): Remove loop parameter.
20823 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20824 vect_dr_behavior. Use a step_preserves_misalignment_p boolean to
20825 track whether the step preserves the misalignment.
20826 (vect_create_addr_base_for_vector_ref): Remove loop parameter.
20827 Use vect_dr_behavior.
20828 (vect_setup_realignment): Update call accordingly.
20829 (vect_create_data_ref_ptr): Likewise. Use vect_dr_behavior.
20830 * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Update
20831 call to vect_create_addr_base_for_vector_ref.
20832 (vect_create_cond_for_align_checks): Likewise.
20833 * tree-vect-patterns.c (vect_recog_bool_pattern): Copy
20834 STMT_VINFO_DR_WRT_VEC_LOOP as a block.
20835 (vect_recog_mask_conversion_pattern): Likewise.
20836 * tree-vect-stmts.c (compare_step_with_zero): Use vect_dr_behavior.
20837 (new_stmt_vec_info): Remove redundant zeroing.
20838
20839 2017-07-03 Richard Earnshaw <rearnsha@arm.com>
20840
20841 * common/config/arm/arm-common.c (arm_be8_option): New function.
20842 * config/arm/arm-isa.h (isa_feature): Add new feature bit isa_bit_be8.
20843 (ISA_ARMv6): Add isa_bit_be8.
20844 * config/arm/arm.h (arm_be8_option): Add prototype.
20845 (BE8_SPEC_FUNCTION): New define.
20846 (EXTRA_SPEC_FUNCTIONS): Add BE8_SPEC_FUNCTION.
20847 * config/arm/arm.opt (mbig-endian): Mark as Negative of mlittle-endian.
20848 (mlittle-endian): Similarly.
20849 (mbe8, mbe32): New options.
20850 * config/arm/bpabi.h (BE8_LINK_SPEC): Call arm_be8_option.
20851 * doc/invoke.texi (ARM Options): Document -mbe8 and -mbe32.
20852
20853 2017-07-02 Jan Hubicka <hubicka@ucw.cz>
20854
20855 * tree-cfg.c (gimple_find_sub_bbs): Fix profile updating.
20856
20857 2017-07-02 Jan Hubicka <hubicka@ucw.cz>
20858
20859 * tree-cfgcleanup.c (want_merge_blocks_p): New function.
20860 (cleanup_tree_cfg_bb): Use it.
20861 * profile-count.h (profile_count::of_for_merging, profile_count::merge):
20862 New functions.
20863 * tree-cfg.c (gimple_merge_blocks): Use profile_count::merge.
20864
20865 2017-07-02 Jan Hubicka <hubicka@ucw.cz>
20866
20867 PR bootstrap/81285
20868 * loop-doloop.c (add_test): Update profile.
20869
20870 2017-07-03 Martin Liska <mliska@suse.cz>
20871
20872 PR sanitize/81040
20873 * sanopt.c (rewrite_usage_of_param): New function.
20874 (sanitize_rewrite_addressable_params): Likewise.
20875 (pass_sanopt::execute): Call rewrite_usage_of_param.
20876
20877 2017-07-03 Richard Biener <rguenther@suse.de>
20878
20879 * tree-vect-loop.c (vect_create_epilog_for_reduction): Revert
20880 back to using VIEW_CONVERT_EXPR.
20881
20882 2017-07-03 Martin Liska <mliska@suse.cz>
20883
20884 PR other/78366
20885 * doc/extend.texi: Document when a resolver function is
20886 generated for target_clones.
20887
20888 2017-07-03 Martin Liska <mliska@suse.cz>
20889
20890 * asan.c (asan_emit_stack_protection): Unpoison just red zones
20891 and shadow memory of auto variables which are subject of
20892 use-after-scope sanitization.
20893 (asan_expand_mark_ifn): Add do set only when is_poison.
20894
20895 2016-07-03 Richard Biener <rguenther@suse.de>
20896
20897 * tree-vect-loop.c (vect_analyze_loop_operations): Also analyze
20898 reduction PHIs.
20899 (vect_force_simple_reduction): Record reduction def -> phi mapping.
20900 (vectorizable_reduction): Perform reduction PHI creation when
20901 visiting a reduction PHI and adjust and simplify code generation
20902 phase of the reduction op. Cache dts, use fold_binary, not fold_build2.
20903 (vect_transform_loop): Visit reduction PHIs.
20904 * tree-vect-slp.c (vect_get_and_check_slp_defs): Record reduction
20905 defs into the SLP tree.
20906 (vect_build_slp_tree): Reduction defs terminate the recursion.
20907 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Allow lookup
20908 of reduction defs.
20909 (vect_get_vec_defs_for_stmt_copy): Export.
20910 (vect_get_vec_defs): Likewise.
20911 * tree-vectorizer.h (struct _stmt_vec_info): Amend reduc_def
20912 purpose.
20913 (vect_get_vec_defs_for_stmt_copy): Declare.
20914 (vect_get_vec_defs): Likewise.
20915
20916 2017-07-03 Richard Sandiford <richard.sandiford@linaro.org>
20917
20918 * tree-data-ref.c (dr_analyze_innermost): Replace the "nest"
20919 parameter with a "loop" parameter and use it instead of the
20920 loop containing DR_STMT. Don't check simple_iv when doing
20921 BB analysis. Describe the two analysis modes in the comment.
20922
20923 2017-07-03 Tom de Vries <tom@codesourcery.com>
20924
20925 PR tree-optimization/69468
20926 * tree-ssa-tail-merge.c (ignore_edge_flags): New constant.
20927 (find_same_succ_bb): Handle ignore_edge_flags.
20928
20929 2017-07-03 Tom de Vries <tom@codesourcery.com>
20930
20931 PR tree-optimization/81192
20932 * tree-ssa-tail-merge.c (same_succ_hash): Use bb->loop_father->num in
20933 hash.
20934 (same_succ::equal): Don't find bbs to be equal if bb->loop_father
20935 differs.
20936 (find_same_succ_bb): Remove obsolete test on bb->loop_father->latch.
20937
20938 2017-07-03 Tom de Vries <tom@codesourcery.com>
20939
20940 PR tree-optimization/81192
20941 * tree-ssa-tail-merge.c (same_succ_flush_bb): Handle
20942 BB_SAME_SUCC (bb) == NULL.
20943
20944 2017-07-02 Jan Hubicka <hubicka@ucw.cz>
20945
20946 * cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
20947 consistency.
20948
20949 2017-07-02 Jan Hubicka <hubicka@ucw.cz>
20950
20951 * dumpfile.c: Include profile-count.h
20952 * tree-cfg.c (gimple_duplicate_sese_tail): Drop UNUSED attributes;
20953 update profile.
20954 (insert_cond_bb): Update profile.
20955 * tree-cfg.h (insert_cond_bb): Update prototype.
20956 * tree-chkp-opt.c (chkp_optimize_string_function_calls): Update.
20957 * tree-dump.c: Do not include tree-cfg.
20958
20959 2017-07-02 Jan Hubicka <hubicka@ucw.cz>
20960
20961 * bb-reorder.c (fix_up_crossing_landing_pad): Update profile.
20962
20963 2017-07-02 Jan Hubicka <hubicka@ucw.cz>
20964
20965 * expect.c (dw2_build_landing_pads): Update profile of the landing pad
20966 bb.
20967
20968 2017-07-02 Jan Hubicka <hubicka@ucw.cz>
20969
20970 * tree-complex.c (expand_complex_div_wide): update profile.
20971
20972 2017-07-02 Richard Sandiford <richard.sandiford@linaro.org>
20973 Alan Hayward <alan.hayward@arm.com>
20974 David Sherwood <david.sherwood@arm.com>
20975
20976 * Makefile.in (MACHMODE_H): Remove insn-modes.h
20977 (CORETYPES_H): New define.
20978 (MOSTLYCLEANFILES): Add insn-modes-inline.h.
20979 (insn-modes-inline.h, s-modes-inline-h): New rules.
20980 (generated_files): Add insn-modes-inline.h.
20981 (RTL_BASE_H, TREE_CORE_H): Use CORETYPES_H instead of coretypes.h.
20982 (build/gensupport.o, build/ggc-none.o, build/print-rtl.o): Likewise.
20983 (build/read-md.o, build/read-rtl.o, build/rtl.o): Likewise.
20984 (build/vec.o, build/hash-table.o, build/inchash.o): Likewise.
20985 (build/gencondmd.o, build/genattr.o, build/genattr-common.o): Likewise.
20986 (build/genattrtab.o, build/genautomata.o, build/gencheck.o): Likewise.
20987 (build/gencodes.o, build/genconditions.o): Likewise.
20988 (build/genconfig.o, build/genconstants.o, build/genemit.o): Likewise.
20989 (build/genenums.o, build/genextract.o, build/genflags.o): Likewise.
20990 (build/gentarget-def.o, build/genmddeps.o, build/genopinit.o)
20991 (build/genoutput.o, build/genpeep.o, build/genpreds.o): Likewise.
20992 (build/genrecog.o, build/genmddump.o, build/genmatch.o): Likewise.
20993 (build/gencfn-macros.o, build/gcov-iov.o): Likewise.
20994 * coretypes.h: Include everything up to real.h for generators.
20995 Include insn-modes.h first. Include wide-int-print.h after
20996 wide-int.h. Include insn-modes-inline.h and then machmode.h.
20997 * machmode.h: Don't include insn-modes.h here.
20998 * function-tests.c: Remove includes of signop.h, machmode.h,
20999 double-int.h and wide-int.h.
21000 * rtl.h: Likewise.
21001 * gcc-rich-location.c: Remove includes of machmode.h, double-int.h
21002 and wide-int.h.
21003 * optc-save-gen.awk: Likewise.
21004 * gencheck.c (BITS_PER_UNIT): Delete dummy definition.
21005 * godump.c: Remove include of wide-int-print.h.
21006 * pretty-print.h: Likewise.
21007 * wide-int-print.cc: Likewise.
21008 * wide-int.cc: Likewise.
21009 * hash-map-tests.c: Remove include of signop.h.
21010 * hash-set-tests.c: Likewise.
21011 * rtl-tests.c: Likewise.
21012 * mkconfig.sh: Remove include of machmode.h.
21013 * genmodes.c (emit_insn_modes_h): Split emission of inline functions
21014 into...
21015 (emit_insn_modes_inline_h): ...this new function. Emit the code
21016 into an insn-modes-inline.h header file, adding appropriate
21017 include guards and end comments.
21018 (emit_insn_modes_c_header): Remove include of machmode.h.
21019 (emit_min_insn_modes_c_header): Include coretypes.h rather than
21020 machmode.h.
21021 (main): Handle -i flag and call emit_insn_modes_inline_h when
21022 it is passed.
21023
21024 2017-07-02 Richard Sandiford <richard.sandiford@linaro.org>
21025
21026 * tree-ssa-strlen.c (strinfo): Rename the length field to
21027 nonzero_chars. Add a full_string_p field.
21028 (compare_nonzero_chars, zero_length_string_p): New functions.
21029 (get_addr_stridx): Add an offset_out parameter.
21030 Use compare_nonzero_chars.
21031 (get_stridx): Update accordingly. Use compare_nonzero_chars.
21032 (new_strinfo): Update after above changes to strinfo.
21033 (set_endptr_and_length): Set full_string_p.
21034 (get_string_length): Update after above changes to strinfo.
21035 (unshare_strinfo): Update call to new_strinfo.
21036 (maybe_invalidate): Likewise.
21037 (get_stridx_plus_constant): Change off to unsigned HOST_WIDE_INT.
21038 Use compare_nonzero_chars and zero_string_p. Treat nonzero_chars
21039 as a uhwi instead of an shwi. Update after above changes to
21040 strinfo and new_strinfo.
21041 (zero_length_string): Assert that chainsi contains full strings.
21042 Use zero_length_string_p. Update call to new_strinfo.
21043 (adjust_related_strinfos): Update after above changes to strinfo.
21044 Copy full_string_p from origsi.
21045 (adjust_last_stmt): Use zero_length_string_p.
21046 (handle_builtin_strlen): Update after above changes to strinfo and
21047 new_strinfo. Install the lhs as the string length if the previous
21048 entry didn't describe a full string.
21049 (handle_builtin_strchr): Update after above changes to strinfo
21050 and new_strinfo.
21051 (handle_builtin_strcpy): Likewise.
21052 (handle_builtin_strcat): Likewise.
21053 (handle_builtin_malloc): Likewise.
21054 (handle_pointer_plus): Likewise.
21055 (handle_builtin_memcpy): Likewise. Track nonzero characters
21056 that aren't necessarily followed by a nul terminator.
21057 (handle_char_store): Likewise.
21058
21059 2017-07-02 Richard Sandiford <richard.sandiford@linaro.org>
21060
21061 PR tree-optimization/80769
21062 * tree-ssa-strlen.c (strinfo): Document that "stmt" is also used
21063 for malloc and calloc. Document the new invariant that all related
21064 strinfos have delayed lengths or none do.
21065 (verify_related_strinfos): Move earlier in file.
21066 (set_endptr_and_length): New function, split out from...
21067 (get_string_length): ...here. Also set the lengths of related
21068 strinfos.
21069 (zero_length_string): Assert that chainsi has known (rather than
21070 delayed) lengths.
21071 (adjust_related_strinfos): Likewise.
21072
21073 2017-07-02 Richard Sandiford <richard.sandiford@linaro.org>
21074
21075 PR tree-optimization/81136
21076 * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Only
21077 assert that two references with the same misalignment have the same
21078 compile-time misalignment if those compile-time misalignments
21079 are known.
21080
21081 2017-07-01 Andi Kleen <ak@linux.intel.com>
21082
21083 * print-tree.c (print_node): Print all attributes.
21084
21085 2017-07-01 Jan Hubicka <hubicka@ucw.cz>
21086
21087 * cfg.c (scale_bbs_frequencies): New function.
21088 * cfg.h (scale_bbs_frequencies): Declare it.
21089 * cfgloopanal.c (single_likely_exit): Cleanup.
21090 * cfgloopmanip.c (scale_loop_frequencies): Take profile_probability
21091 as parameter.
21092 (scale_loop_profile): Likewise.
21093 (loop_version): Likewise.
21094 (create_empty_loop_on_edge): Update.
21095 * cfgloopmanip.h (scale_loop_frequencies, scale_loop_profile,
21096 scale_loop_frequencies, scale_loop_profile, loopify,
21097 loop_version): Update prototypes.
21098 * modulo-sched.c (sms_schedule): Update.
21099 * predict.c (unlikely_executed_edge_p): Also check probability.
21100 (probably_never_executed_edge_p): Fix typo.
21101 * tree-if-conv.c (version_loop_for_if_conversion): Update.
21102 * tree-parloops.c (gen_parallel_loop): Update.
21103 * tree-ssa-loop-ivcanon.c (try_peel_loop): Update.
21104 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
21105 * tree-ssa-loop-split.c (split_loop): Update.
21106 * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
21107 * tree-vect-loop-manip.c (vect_do_peeling): Update.
21108 (vect_loop_versioning): Update.
21109 * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
21110
21111 2017-07-01 Jan Hubicka <hubicka@ucw.cz>
21112
21113 * trans-mem.c (split_bb_make_tm_edge): Update profile.
21114
21115 2017-07-01 Jan Hubicka <hubicka@ucw.cz>
21116
21117 * tree-if-conv.c (combine_blocks): Use make_single_succ_edge
21118 to keep profile consistent.
21119
21120 2017-07-01 Jan Hubicka <hubicka@ucw.cz>
21121
21122 * cfgrtl.c (rtl_flow_call_edges_add): Update profile.
21123 * tree-cfg.c (gimple_flow_call_edges_add): Likewise.
21124 * profile-count.h (max_safe_multiplier): Make unsigned.
21125 (profile_count::guessed_zero): New.
21126
21127 2017-07-01 Jan Hubicka <hubicka@ucw.cz>
21128
21129 * bb-reorder.c (fix_up_crossing_landing_pad,
21130 fix_crossing_conditional_branches): Use make_single_succ_edge
21131 to keep profile consistent.
21132
21133 2017-07-01 Jan Hubicka <hubicka@ucw.cz>
21134
21135 * tree-vect-loop.c (optimize_mask_stores): Use make_single_succ_edge
21136 to update profile.
21137
21138 2017-07-01 Jakub Jelinek <jakub@redhat.com>
21139
21140 PR sanitizer/81262
21141 * bb-reorder.c (fix_up_fall_thru_edges): Move variable declarations to
21142 the right scopes, make sure cond_jump isn't preserved between multiple
21143 iterations. Search for fallthru edge whenever there are 3+ edges and
21144 use find_fallthru_edge for it.
21145
21146 2017-06-29 Jan Hubicka <hubicka@ucw.cz>
21147
21148 Patch by Alexander Monakov <amonakov@ispras.ru>
21149 * sel-sched-ir.c (compute_succs_info): Handle uninitialized
21150 probabilities consistently.
21151
21152 2017-06-29 Jan Hubicka <hubicka@ucw.cz>
21153
21154 * pa.c (pa_expand_compare_and_swap_loop): Update call of
21155 emit_cmp_and_jump_insns.
21156
21157 2017-06-29 Jan Hubicka <hubicka@ucw.cz>
21158
21159 PR ipa/81261
21160 * tree-inline.c (expand_call_inline): Combine profile statuses.
21161
21162 2017-06-30 Andrew Pinski <apinski@cavium.com>
21163
21164 * tree-if-conv.c (predicate_scalar_phi): Update new_stmt if
21165 fold_stmt returned true.
21166
21167 2017-06-30 Nathan Sidwell <nathan@acm.org>
21168
21169 * ggc.h (empty_string): Delete.
21170 * cfgexpand.c (expand_asm_stmt): Use plain "".
21171 * optabs.c (expand_asm_memory_barrier): Likewise.
21172 * stringpool.c (empty_string): Delete.
21173 (digit_vector, digit_string): Delete.
21174 (ggc_alloc_string): Use plain "", don't optimize single digit
21175 strings. Use ggc_alloc_atomic.
21176
21177 2017-06-30 Richard Earnshaw <rearnsha@arm.com>
21178
21179 * rtlanal.c (insn_rtx_cost): If a parallel contains exactly one
21180 comparison set and one other set, use the cost of the non-comparison
21181 set.
21182
21183 2017-06-30 Nathan Sidwell <nathan@acm.org>
21184
21185 * ggc.h: Replace all 'static inline' with plain 'inline'. Fix
21186 some formatting.
21187
21188 2017-06-30 Peter Bergner <bergner@vnet.ibm.com>
21189
21190 * tree-cfg.c (group_case_labels_stmt): Merge scanning and compressing
21191 loops. Remove now unneeded calls to gimple_switch_set_label() that
21192 just set removed labels to NULL_TREE.
21193
21194 2017-06-30 Aldy Hernandez <aldyh@redhat.com>
21195
21196 * tree-ssanames.c (set_range_info_raw): Abstract from ...
21197 (set_range_info): ...here. Only call set_range_info_raw if domain
21198 is useful.
21199 (set_nonzero_bits): Call set_range_info_raw.
21200 * tree-ssanames.h (set_range_info_raw): New.
21201
21202 2017-06-30 Jakub Jelinek <jakub@redhat.com>
21203
21204 PR target/81225
21205 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): For V8FI,
21206 V16FI and VI8F_256 iterators, use <store_mask_predicate> instead
21207 of nonimmediate_operand and <store_mask_constraint> instead of m
21208 for the input operand. For V8FI iterator, always split if input
21209 is a MEM. For V16FI and V8SF_256 iterators, don't test if both
21210 operands are MEM if <mask_applied>. For VI4F_256 iterator, use
21211 <store_mask_predicate> instead of register_operand and
21212 <store_mask_constraint> instead of v for the input operand. Make
21213 sure both operands aren't MEMs for if not <mask_applied>.
21214
21215 2017-06-30 Sylvestre Ledru <sylvestre@debian.org>
21216
21217 * lto-wrapper.c (copy_file) Close both file descriptors before
21218 exiting normally.
21219
21220 2017-06-30 Martin Liska <mliska@suse.cz>
21221
21222 PR ipa/81214
21223 * multiple_target.c (create_dispatcher_calls): Make ifunc
21224 also for function that don't have calls or are not referenced.
21225
21226 2017-06-30 Richard Biener <rguenther@suse.de>
21227
21228 * tree-vect-slp.c (vect_slp_analyze_node_operations): Only
21229 analyze the first scalar stmt. Move vector type computation
21230 for the BB case here from ...
21231 * tree-vect-stmts.c (vect_analyze_stmt): ... here. Guard
21232 live operation processing in the SLP case properly.
21233
21234 2017-06-30 Richard Biener <rguenther@suse.de>
21235
21236 * graph.c (draw_cfg_node_succ_edges): Fix broken dot syntax.
21237
21238 2017-06-30 Martin Liska <mliska@suse.cz>
21239
21240 PR sanitizer/81021
21241 * tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN
21242 before BUILT_IN_UNWIND_RESUME when ASAN is used.
21243
21244 2017-06-30 Yvan Roux <yvan.roux@linaro.org>
21245
21246 * doc/invoke.texi (AArch64): Add missing options and remove redundant
21247 ones.
21248
21249 2017-06-30 Richard Biener <rguenther@suse.de>
21250
21251 PR tree-optimization/81249
21252 * tree-vect-loop.c (vect_create_epilog_for_reduction): Convert
21253 condition reduction result to original scalar type.
21254
21255 2017-06-30 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21256
21257 * profile-count.h (enum profile_quality): Fix typos and whitespace
21258 issues.
21259
21260 2017-06-30 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21261
21262 * config/s390/s390.c (s390_expand_setmem): Adjust to the new data
21263 type for branch probabilities.
21264
21265 2017-06-29 Julian Brown <julian@codesourcery.com>
21266 Naveen H.S <Naveen.Hurugalawadi@cavium.com>
21267
21268 * config/aarch64/aarch64-fusion-pairs.def: Add ALU_BRANCH entry.
21269 * config/aarch64/aarch64.c (AARCH64_FUSE_ALU_BRANCH): New fusion type.
21270 (thunderx2t99_tunings): Set AARCH64_FUSE_ALU_BRANCH flag.
21271 (aarch_macro_fusion_pair_p): Add support for AARCH64_FUSE_ALU_BRANCH.
21272
21273 2017-06-29 Naveen H.S <Naveen.Hurugalawadi@cavium.com>
21274
21275 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Push the
21276 check for CC usage into AARCH64_FUSE_CMP_BRANCH.
21277 * config/i386/i386.c (ix86_macro_fusion_pair_p): Push the check for
21278 CC usage from generic code to here.
21279 * sched-deps.c (sched_macro_fuse_insns): Move the condition for
21280 CC usage into the target macros.
21281
21282 2017-06-29 Maya Rashish <coypu@sdf.org>
21283
21284 * config/netbsd.h (NETBSD_LIB_SPEC): Add -lc when creating shared
21285 objects.
21286
21287 2017-06-29 Jan Hubicka <hubicka@ucw.cz>
21288
21289 * arm/arm-builtins.c: Include profile-count.h
21290 * except.c (sjlj_emit_function_enter): Use
21291 profile_probability::unlikely.
21292
21293 2017-06-29 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21294
21295 * config/rs6000/rs6000.c (toc_relative_expr_p): Make tocrel_base
21296 and tocrel_offset be pointer args rather than implicitly using
21297 static versions.
21298 (legitimate_constant_pool_address_p, rs6000_emit_move,
21299 const_load_sequence_p, adjust_vperm): Add local tocrel_base and
21300 tocrel_offset and use in toc_relative_expr_p call.
21301 (print_operand, print_operand_address): Use static tocrel_base_oac
21302 and tocrel_offset_oac.
21303 (rs6000_output_addr_const_extra): Use static tocrel_base_oac and
21304 tocrel_offset_oac.
21305
21306 2017-06-29 Maya Rashish <coypu@sdf.org>
21307
21308 * config/vax/builtins.md (ffssi2_internal): Correct constraint.
21309
21310 2017-06-29 Eric Botcazou <ebotcazou@adacore.com>
21311
21312 * expr.c (expand_expr) <normal_inner_ref>: When testing for unaligned
21313 objects, take into account only the alignment of 'op0' and 'mode1' if
21314 'op0' is a MEM.
21315
21316 2017-06-29 Steve Ellcey <sellcey@cavium.com>
21317
21318 * ccmp.c (ccmp_tree_comparison_p): New function.
21319 (ccmp_candidate_p): Update to use above function.
21320 (get_compare_parts): New function.
21321 (expand_ccmp_next): Update to use new functions.
21322 (expand_ccmp_expr_1): Take tree arg instead of gimple, update to use
21323 new functions.
21324 (expand_ccmp_expr): Pass tree instead of gimple to expand_ccmp_expr_1,
21325 take mode as argument.
21326 * ccmp.h (expand_ccmp_expr): Add mode as argument.
21327 * expr.c (expand_expr_real_1): Pass mode as argument.
21328
21329 2017-06-29 Segher Boessenkool <segher@kernel.crashing.org>
21330
21331 * combine.c (combine_instructions): Print insns to dump_file, together
21332 with their costs.
21333
21334 2017-06-29 Jan Hubicka <hubicka@ucw.cz>
21335
21336 * asan.c (asan_emit_stack_protection): Update.
21337 (create_cond_insert_point): Update.
21338 * auto-profile.c (afdo_propagate_circuit): Update.
21339 * basic-block.h (struct edge_def): Turn probability to
21340 profile_probability.
21341 (EDGE_FREQUENCY): Update.
21342 * bb-reorder.c (find_traces_1_round): Update.
21343 (better_edge_p): Update.
21344 (sanitize_hot_paths): Update.
21345 * cfg.c (unchecked_make_edge): Initialize probability to uninitialized.
21346 (make_single_succ_edge): Update.
21347 (check_bb_profile): Update.
21348 (dump_edge_info): Update.
21349 (update_bb_profile_for_threading): Update.
21350 * cfganal.c (connect_infinite_loops_to_exit): Initialize new edge
21351 probabilitycount to 0.
21352 * cfgbuild.c (compute_outgoing_frequencies): Update.
21353 * cfgcleanup.c (try_forward_edges): Update.
21354 (outgoing_edges_match): Update.
21355 (try_crossjump_to_edge): Update.
21356 * cfgexpand.c (expand_gimple_cond): Update make_single_succ_edge.
21357 (expand_gimple_tailcall): Update.
21358 (construct_init_block): Use make_single_succ_edge.
21359 (construct_exit_block): Use make_single_succ_edge.
21360 * cfghooks.c (verify_flow_info): Update.
21361 (redirect_edge_succ_nodup): Update.
21362 (split_edge): Update.
21363 (account_profile_record): Update.
21364 * cfgloopanal.c (single_likely_exit): Update.
21365 * cfgloopmanip.c (scale_loop_profile): Update.
21366 (set_zero_probability): Remove.
21367 (duplicate_loop_to_header_edge): Update.
21368 * cfgloopmanip.h (loop_version): Update prototype.
21369 * cfgrtl.c (try_redirect_by_replacing_jump): Update.
21370 (force_nonfallthru_and_redirect): Update.
21371 (update_br_prob_note): Update.
21372 (rtl_verify_edges): Update.
21373 (purge_dead_edges): Update.
21374 (rtl_lv_add_condition_to_bb): Update.
21375 * cgraph.c: (cgraph_edge::redirect_call_stmt_to_calle): Update.
21376 * cgraphunit.c (init_lowered_empty_function): Update.
21377 (cgraph_node::expand_thunk): Update.
21378 * cilk-common.c: Include profile-count.h
21379 * dojump.c (inv): Remove.
21380 (jumpifnot): Update.
21381 (jumpifnot_1): Update.
21382 (do_jump_1): Update.
21383 (do_jump): Update.
21384 (do_jump_by_parts_greater_rtx): Update.
21385 (do_compare_rtx_and_jump): Update.
21386 * dojump.h (jumpifnot, jumpifnot_1, jumpif_1, jumpif, do_jump,
21387 do_jump_1. do_compare_rtx_and_jump): Update prototype.
21388 * dwarf2cfi.c: Include profile-count.h
21389 * except.c (dw2_build_landing_pads): Use make_single_succ_edge.
21390 (sjlj_emit_dispatch_table): Likewise.
21391 * explow.c: Include profile-count.h
21392 * expmed.c (emit_store_flag_force): Update.
21393 (do_cmp_and_jump): Update.
21394 * expr.c (compare_by_pieces_d::generate): Update.
21395 (compare_by_pieces_d::finish_mode): Update.
21396 (emit_block_move_via_loop): Update.
21397 (store_expr_with_bounds): Update.
21398 (store_constructor): Update.
21399 (expand_expr_real_2): Update.
21400 (expand_expr_real_1): Update.
21401 * expr.h (try_casesi, try_tablejump): Update prototypes.
21402 * gimple-pretty-print.c (dump_probability): Update.
21403 (dump_profile): New.
21404 (dump_gimple_label): Update.
21405 (dump_gimple_bb_header): Update.
21406 * graph.c (draw_cfg_node_succ_edges): Update.
21407 * hsa-gen.c (convert_switch_statements): Update.
21408 * ifcvt.c (cheap_bb_rtx_cost_p): Update.
21409 (find_if_case_1): Update.
21410 (find_if_case_2): Update.
21411 * internal-fn.c (expand_arith_overflow_result_store): Update.
21412 (expand_addsub_overflow): Update.
21413 (expand_neg_overflow): Update.
21414 (expand_mul_overflow): Update.
21415 (expand_vector_ubsan_overflow): Update.
21416 * ipa-cp.c (good_cloning_opportunity_p): Update.
21417 * ipa-split.c (split_function): Use make_single_succ_edge.
21418 * ipa-utils.c (ipa_merge_profiles): Update.
21419 * loop-doloop.c (add_test): Update.
21420 (doloop_modify): Update.
21421 * loop-unroll.c (compare_and_jump_seq): Update.
21422 (unroll_loop_runtime_iterations): Update.
21423 * lra-constraints.c (lra_inheritance): Update.
21424 * lto-streamer-in.c (input_cfg): Update.
21425 * lto-streamer-out.c (output_cfg): Update.
21426 * mcf.c (adjust_cfg_counts): Update.
21427 * modulo-sched.c (sms_schedule): Update.
21428 * omp-expand.c (expand_omp_for_init_counts): Update.
21429 (extract_omp_for_update_vars): Update.
21430 (expand_omp_ordered_sink): Update.
21431 (expand_omp_for_ordered_loops): Update.
21432 (expand_omp_for_generic): Update.
21433 (expand_omp_for_static_nochunk): Update.
21434 (expand_omp_for_static_chunk): Update.
21435 (expand_cilk_for): Update.
21436 (expand_omp_simd): Update.
21437 (expand_omp_taskloop_for_outer): Update.
21438 (expand_omp_taskloop_for_inner): Update.
21439 * omp-simd-clone.c (simd_clone_adjust): Update.
21440 * optabs.c (expand_doubleword_shift): Update.
21441 (expand_abs): Update.
21442 (emit_cmp_and_jump_insn_1): Update.
21443 (expand_compare_and_swap_loop): Update.
21444 * optabs.h (emit_cmp_and_jump_insns): Update prototype.
21445 * predict.c (predictable_edge_p): Update.
21446 (edge_probability_reliable_p): Update.
21447 (set_even_probabilities): Update.
21448 (combine_predictions_for_insn): Update.
21449 (combine_predictions_for_bb): Update.
21450 (propagate_freq): Update.
21451 (estimate_bb_frequencies): Update.
21452 (force_edge_cold): Update.
21453 * profile-count.c (profile_count::dump): Add missing space into dump.
21454 (profile_count::debug): Add newline.
21455 (profile_count::differs_from_p): Explicitly convert to unsigned.
21456 (profile_count::stream_in): Update.
21457 (profile_probability::dump): New member function.
21458 (profile_probability::debug): New member function.
21459 (profile_probability::differs_from_p): New member function.
21460 (profile_probability::differs_lot_from_p): New member function.
21461 (profile_probability::stream_in): New member function.
21462 (profile_probability::stream_out): New member function.
21463 * profile-count.h (profile_count_quality): Rename to ...
21464 (profile_quality): ... this one.
21465 (profile_probability): New.
21466 (profile_count): Update.
21467 * profile.c (compute_branch_probabilities): Update.
21468 * recog.c (peep2_attempt): Update.
21469 * sched-ebb.c (schedule_ebbs): Update.
21470 * sched-rgn.c (find_single_block_region): Update.
21471 (compute_dom_prob_ps): Update.
21472 (schedule_region): Update.
21473 * sel-sched-ir.c (compute_succs_info): Update.
21474 * stmt.c (struct case_node): Update.
21475 (do_jump_if_equal): Update.
21476 (get_outgoing_edge_probs): Update.
21477 (conditional_probability): Update.
21478 (emit_case_dispatch_table): Update.
21479 (expand_case): Update.
21480 (expand_sjlj_dispatch_table): Update.
21481 (emit_case_nodes): Update.
21482 * targhooks.c: Update.
21483 * tracer.c (better_p): Update.
21484 (find_best_successor): Update.
21485 * trans-mem.c (expand_transaction): Update.
21486 * tree-call-cdce.c: Update.
21487 * tree-cfg.c (gimple_split_edge): Upate.
21488 (move_sese_region_to_fn): Upate.
21489 * tree-cfgcleanup.c (cleanup_control_expr_graph): Upate.
21490 * tree-eh.c (lower_resx): Upate.
21491 (cleanup_empty_eh_move_lp): Upate.
21492 * tree-if-conv.c (version_loop_for_if_conversion): Update.
21493 * tree-inline.c (copy_edges_for_bb): Update.
21494 (copy_cfg_body): Update.
21495 * tree-parloops.c (gen_parallel_loop): Update.
21496 * tree-profile.c (gimple_gen_ic_func_profiler): Update.
21497 (gimple_gen_time_profiler): Update.
21498 * tree-ssa-dce.c (remove_dead_stmt): Update.
21499 * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
21500 * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
21501 * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
21502 (unloop_loops): Update.
21503 (try_peel_loop): Update.
21504 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
21505 * tree-ssa-loop-split.c (connect_loops): Update.
21506 (split_loop): Update.
21507 * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
21508 (hoist_guard): Update.
21509 * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
21510 * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
21511 (value_replacement): Update.
21512 * tree-ssa-reassoc.c (branch_fixup): Update.
21513 * tree-ssa-tail-merge.c (replace_block_by): Update.
21514 * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
21515 (create_edge_and_update_destination_phis): Update.
21516 (compute_path_counts): Update.
21517 (recompute_probabilities): Update.
21518 (update_joiner_offpath_counts): Update.
21519 (freqs_to_counts_path): Update.
21520 (duplicate_thread_path): Update.
21521 * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
21522 (struct switch_conv_info): Update.
21523 (gen_inbound_check): Update.
21524 * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
21525 (vect_do_peeling): Update.
21526 (vect_loop_versioning): Update.
21527 * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
21528 (optimize_mask_stores): Update.
21529 * ubsan.c (ubsan_expand_null_ifn): Update.
21530 * value-prof.c (gimple_divmod_fixed_value): Update.
21531 (gimple_divmod_fixed_value_transform): Update.
21532 (gimple_mod_pow2): Update.
21533 (gimple_mod_pow2_value_transform): Update.
21534 (gimple_mod_subtract): Update.
21535 (gimple_mod_subtract_transform): Update.
21536 (gimple_ic): Update.
21537 (gimple_stringop_fixed_value): Update.
21538 (gimple_stringops_transform): Update.
21539 * value-prof.h: Update.
21540
21541 2017-06-29 Carl Love <cel@us.ibm.com>
21542
21543 * config/rs6000/rs6000-c.c: Add support for built-in functions
21544 vector signed int vec_signed (vector float);
21545 vector signed long long vec_signed (vector double);
21546 vector signed int vec_signed2 (vector double, vector double);
21547 vector signed int vec_signede (vector double);
21548 vector signed int vec_signedo (vector double);
21549 * config/rs6000/rs6000.c (rs6000_generate_vsigned2_code): Add
21550 instruction generator.
21551 * config/rs6000/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
21552 UNSPEC_VSX_VSIGNED2): Add UNSPECS.
21553 (vsx_xvcvspsxws, vsx_xvcvdpuxds_scale, vsx_xvcvspuxws, vsigned2_v2df):
21554 Add define_insn.
21555 (vsignedo_v2df, vsignede_v2df, vunsigned2_v2df, vunsignedo_v2df,
21556 vunsignede_v2df): Add define_expands.
21557 * config/rs6000/rs6000-builtin.def (VEC_SIGNED, VEC_UNSIGNED,
21558 VEC_SIGNED2, VEC_UNSIGNED2, VEC_SIGNEDE, VEC_UNSIGNEDE, VEC_SIGNEDO,
21559 VEC_UNSIGNEDO): Add definitions.
21560 * config/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
21561 UNSPEC_VSX_VSIGNED2): Add UNSPECs.
21562 (vsx_xvcvspsxws, vsx_xvcvspuxws): Add define_insn.
21563 (vsigned2_v2df, vsigendo_v2df, vsignede_v2df,
21564 vunsigned2_v2df, vunsignedo_v2df, vunsignede_v2df): Add define_expands.
21565 * config/rs6000/altivec.h (vec_signed, vec_signed2,
21566 vec_signede and vec_signedo, vec_unsigned, vec_unsigned2,
21567 vec_unsignede, vec_unsignedo): Add builtin defines.
21568 * config/rs6000-protos.h (rs6000_generate_vsigned2_code): Add extern
21569 declaration.
21570 * doc/extend.texi: Update the built-in documentation file for the
21571 new built-in functions.
21572
21573 2017-06-29 Richard Biener <rguenther@suse.de>
21574
21575 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Do not add
21576 reduction chains to LOOP_VINFO_REDUCTIONS.
21577 * tree-vect-slp.c (vect_analyze_slp): Continue looking for
21578 SLP reductions after processing reduction chains.
21579
21580 2017-06-29 Nathan Sidwell <nathan@acm.org>
21581
21582 * builtins.c (fold_builtin_FUNCTION): Use
21583 lang_hooks.decl_printable_name.
21584
21585 2017-06-29 Peter Bergner <bergner@vnet.ibm.com>
21586
21587 PR middle-end/81194
21588 * cfgexpand.c (expand_gimple_stmt_1): Handle switch statements
21589 with only one label.
21590 * stmt.c (expand_case): Assert NCASES is greater than one.
21591
21592 2017-06-29 Richard Biener <rguenther@suse.de>
21593
21594 * tree-cfg.c (group_case_labels_stmt): Return whether we changed
21595 anything.
21596 (group_case_labels): Likewise.
21597 (find_taken_edge): Push sanity checking on val to workers...
21598 (find_taken_edge_cond_expr): ... here
21599 (find_taken_edge_switch_expr): ... and here, handle cases
21600 with just a default label.
21601 * tree-cfg.h (group_case_labels_stmt): Adjust prototype.
21602 (group_case_labels): Likewise.
21603 * tree-cfgcleanup.c (execute_cleanup_cfg_post_optimizing): When
21604 group_case_labels does anything cleanup the CFG again.
21605
21606 2017-06-29 Bin Cheng <bin.cheng@arm.com>
21607
21608 PR tree-optimization/81196
21609 * tree-ssa-loop-niter.c (number_of_iterations_cond): Handle loop
21610 exit condition comparing two IVs.
21611
21612 2017-06-29 Richard Earnshaw <rearnsha@arm.com>
21613
21614 * config/arm/parsecpu.awk (gen_comm_data): Add initializer for
21615 profile to the dummy entry at the end of the list of architectures.
21616 * config/arm/arm-cpu-cdata.h: Regenerated.
21617
21618 2017-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21619 Michael Collison <michael.collison@arm.com>
21620
21621 PR target/70119
21622 * config/aarch64/aarch64.md (*aarch64_<optab>_reg_<mode>3_mask1):
21623 New pattern.
21624 (*aarch64_reg_<mode>3_neg_mask2): New pattern.
21625 (*aarch64_reg_<mode>3_minus_mask): New pattern.
21626 (*aarch64_<optab>_reg_di3_mask2): New pattern.
21627 * config/aarch64/aarch64.c (aarch64_rtx_costs): Account for cost
21628 of shift when the shift amount is masked with constant equal to
21629 the size of the mode.
21630 * config/aarch64/predicates.md (subreg_lowpart_operator): New
21631 predicate.
21632
21633 2017-06-29 Martin Liska <mliska@suse.cz>
21634
21635 * config/i386/i386.opt: Change range from [1,5] to [0,5].
21636
21637 2017-06-29 Yury Gribov <tetra2005@gmail.com>
21638
21639 PR bootstrap/80565
21640 * ipa-cp.c (allocate_and_init_ipcp_value): Add initialization
21641 code.
21642 * ipa-inline.h
21643 (edge_growth_cache_entry::edge_growth_cache_entry): New
21644 function.
21645 (reset_edge_growth_cache): Update to use constructor.
21646
21647 2017-06-28 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
21648
21649 * config/aarch64/aarch64.h (AARCH64_EXPAND_ALIGNMENT): New.
21650 (DATA_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
21651 (LOCAL_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
21652
21653 2017-06-28 Sebastian Peryt <sebastian.peryt@intel.com>
21654
21655 * config/i386/avx512vlintrin.h (_mm256_permutexvar_epi64)
21656 (_mm256_permutexvar_epi32, _mm256_permutex_epi64): New intrinsics.
21657
21658 2017-06-28 Szabolcs Nagy <szabolcs.nagy@arm.com>
21659
21660 * config.gcc (*-linux-musl*): Add t-musl tmake_file.
21661 (*-linux-uclibc*): Add t-uclibc tmake_file.
21662 * config/t-musl: New.
21663 * config/t-uclibc: New.
21664
21665 2017-06-28 Richard Earnshaw <rearnsha@arm.com>
21666
21667 * config/arm/parsecpu.awk (profile): Parse new keyword in an arch
21668 context.
21669 (gen_comm_data): Emit architectural setting of arch_prof.
21670 * config/arm/arm-cpus.in (armv6-m, armv6s-m, armv7-a, armv7ve): Set the
21671 profile.
21672 (armv7-r, armv7-m, armv7e-m, armv8-a, armv8.1-a, armv8.2-a): Likewise.
21673 (armv8-m.base, armv8-m.main): Likewise.
21674 * arm-protos.h (arm_build_target): Add profile field.
21675 (arch_option): Likewise.
21676 * config/arm/arm.c (arm_configure_build_target): Copy the profile to
21677 the active target.
21678 * config/arm/arm.h (TARGET_ARM_ARCH_PROFILE): Use
21679 arm_active_target.profile.
21680
21681 2017-06-28 Richard Biener <rguenther@suse.de>
21682
21683 PR middle-end/81227
21684 * fold-const.c (negate_expr_p): Use TYPE_UNSIGNED, not
21685 TYPE_OVERFLOW_WRAPS.
21686 * match.pd (negate_expr_p): Likewise.
21687 * tree-ssa-reassoc.c (optimize_range_tests_diff): Use
21688 fold_build2, not fold_binary.
21689
21690 2017-06-28 Wilco Dijkstra <wdijkstr@arm.com>
21691
21692 * config/aarch64/aarch64 (aarch64_expand_mov_immediate):
21693 Convert memory address to Pmode.
21694 (aarch64_print_operand): Assert MEM operands are always Pmode.
21695
21696 2017-06-28 Wilco Dijkstra <wdijkstr@arm.com>
21697
21698 PR target/79665
21699 * config/arm/aarch-common.c (arm_no_early_alu_shift_dep):
21700 Remove redundant if.
21701 (aarch_forward_to_shift_is_not_shifted_reg): Remove.
21702 * config/arm/aarch-common-protos.h
21703 (aarch_forward_to_shift_is_not_shifted_re): Remove.
21704 * config/arm/cortex-a53.md: Use arm_no_early_alu_shift_dep in bypass.
21705
21706 2017-06-28 Michael Meissner <meissner@linux.vnet.ibm.com>
21707
21708 PR ipa/81238
21709 * multiple_target.c (create_dispatcher_calls): Set the default
21710 clone to be static, not public.
21711
21712 2017-06-28 Richard Biener <rguenther@suse.de>
21713
21714 * tree-vect-loop.c (vectorizable_reduction): Move special
21715 cond reduction IV var creation ...
21716 (vect_create_epilog_for_reduction): ... here. Remove induction_index
21717 parameter. Use STMT_VINFO_VECTYPE.
21718 * tree-vect-slp.c (vect_get_constant_vectors): Properly reset
21719 constant_p.
21720
21721 2017-06-28 Martin Liska <mliska@suse.cz>
21722
21723 PR ipa/81128
21724 * ipa-visibility.c (non_local_p): Handle visibility.
21725
21726 2017-06-28 Martin Liska <mliska@suse.cz>
21727
21728 PR driver/79659
21729 * common.opt: Add IntegerRange to various options.
21730 * opt-functions.awk (integer_range_info): New function.
21731 * optc-gen.awk: Add integer_range_info to cl_options struct.
21732 * opts-common.c (decode_cmdline_option): Handle
21733 CL_ERR_INT_RANGE_ARG.
21734 (cmdline_handle_error): Likewise.
21735 * opts.c (print_filtered_help): Show valid interval in
21736 when --help is provided.
21737 * opts.h (struct cl_option): Add range_min and range_max fields.
21738 * config/i386/i386.opt: Add IntegerRange for -mbranch-cost.
21739
21740 2017-06-28 Marc Glisse <marc.glisse@inria.fr>
21741
21742 * match.pd ((X & ~Y) | (~X & Y)): Generalize to + and ^.
21743 (x * C EQ/NE y * C): New transformation.
21744
21745 2017-06-28 Christophe Lyon <christophe.lyon@linaro.org>
21746
21747 * genmultilib (combination_space): Accept '+' in option names.
21748
21749 2017-06-28 Martin Liska <mliska@suse.cz>
21750
21751 PR sanitizer/81224
21752 * asan.c (instrument_derefs): Bail out inner references
21753 that are hard register variables.
21754
21755 2017-06-28 Jakub Jelinek <jakub@redhat.com>
21756
21757 PR target/81175
21758 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use def_builtin
21759 rather than def_builtin_pure for __builtin_ia32_gatherpf*.
21760
21761 2017-06-28 Richard Biener <rguenther@suse.de>
21762
21763 * tree-vectorizer.h (vect_get_vec_defs): Remove.
21764 (vect_get_slp_defs): Adjust.
21765 * tree-vect-loop.c (get_initial_defs_for_reduction): Split
21766 out from ...
21767 * tree-vect-slp.c (vect_get_constant_vectors): ... here and
21768 simplify.
21769 * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
21770 get_initial_defs_for_reduction instead of vect_get_vec_defs.
21771 (vectorizable_reduction): Adjust.
21772 * tree-vect-slp.c (vect_get_constant_vectors): Remove reduction
21773 handling.
21774 (vect_get_slp_defs): Likewise.
21775 * tree-vect-stmts.c (vect_get_vec_defs): Make static and adjust.
21776 (vectorizable_bswap): Adjust.
21777 (vectorizable_call): Likewise.
21778 (vectorizable_conversion): Likewise.
21779 (vectorizable_assignment): Likewise.
21780 (vectorizable_shift): Likewise.
21781 (vectorizable_operation): Likewise.
21782 (vectorizable_store): Likewise.
21783 (vectorizable_condition): Likewise.
21784 (vectorizable_comparison): Likewise.
21785
21786 2017-06-28 Michael Collison <michael.collison@arm.com>
21787
21788 PR target/68535
21789 * config/arm/arm.c (gen_ldm_seq): Remove last unnecessary
21790 set of base_reg
21791 (arm_gen_movmemqi): Removed unused variable 'i'.
21792 Convert 'for' loop into 'while' loop.
21793 (arm_expand_prologue): Remove last unnecessary set of insn.
21794 (thumb_pop): Remove unused variable 'pushed_words'.
21795 (thumb_exit): Remove last unnecessary set of regs_to_pop.
21796
21797 2017-06-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21798
21799 * config/s390/predicates.md: Use s390_rel_address_ok_p.
21800 * config/s390/s390-protos.h: Add prototype of
21801 s390_rel_address_ok_p.
21802 * config/s390/s390.c (s390_got_symbol): New function.
21803 (s390_rel_address_ok_p): New function.
21804 (legitimize_pic_address): Use s390_rel_address_ok_p.
21805 (s390_load_got): Use s390_got_symbol.
21806 (s390_option_override): Issue error if
21807 -mno-pic-data-is-text-relative is used without -fpic/-fPIC.
21808 * config/s390/s390.h (TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE):
21809 New macro.
21810 * config/s390/s390.opt: New option mpic-data-is-text-relative.
21811
21812 2017-06-27 Andrew Pinski <apinski@cavium.com>
21813
21814 * match.pd (X >/>=/</<= 0 ? 1.0 : -1.0): New patterns.
21815 (X * copysign (1.0, X)): New pattern.
21816 (X * copysign (1.0, -X)): New pattern.
21817 (copysign (-1.0, CST)): New pattern.
21818
21819 2017-06-27 Joseph Myers <joseph@codesourcery.com>
21820
21821 * genmultilib (combination_space): Remove variable.
21822 Validate reuse rules against regular expression for any sequence
21823 of multilib options in any order.
21824
21825 2017-06-27 Michael Collison <michael.collison@arm.com>
21826
21827 * config/aarch64/aarch64-simd.md (aarch64_combine<mode>): Directly
21828 call aarch64_split_simd_combine.
21829 * (aarch64_combine_internal<mode>): Delete pattern.
21830 * config/aarch64/aarch64.c (aarch64_split_simd_combine):
21831 Allow register and subreg operands.
21832
21833 2017-06-27 Jerome Lambourg <lambourg@adacore.com>
21834
21835 * config/i386/vxworks.h (ASM_SPEC): Remove definition. No target
21836 specific need, just fallback on defaults.
21837 (ASM_OUTPUT_ALIGNED_BSS): Add #undef before #define.
21838
21839 2017-06-27 Jerome Lambourg <lambourg@adacore.com>
21840 Olivier Hainque <hainque@adacore.com>
21841
21842 * config/i386/vxworks.h (DBX_REGISTER_NUMBER): Pick distinct
21843 map for 64bits.
21844 (TARGET_OS_CPP_BUILTINS): builtin_define CPU to X86_64 for 64bit
21845 targets. Pick a default if no particular attempt applied.
21846 (STACK_CHECK_PROTECT): Double for 64bit targets, which have
21847 larger contexts.
21848
21849 2017-06-27 Jerome Lambourg <lambourg@adacore.com>
21850
21851 * config.gcc (i*86-wrs-vxworks7): Handle new acceptable triplet.
21852 (x86_64-wrs-vxworks7): Likewise.
21853
21854 2017-06-27 Marek Polacek <polacek@redhat.com>
21855
21856 PR sanitizer/81223
21857 * ubsan.c (instrument_null): Check get_base_address's result for null.
21858
21859 2017-06-27 Marc Glisse <marc.glisse@inria.fr>
21860
21861 * match.pd ((A+-B)+(C-A), (A+B)-(A-C)): New transformations.
21862
21863 2017-06-27 Marc Glisse <marc.glisse@inria.fr>
21864
21865 * builtin-types.def (BT_FENV_T_PTR, BT_CONST_FENV_T_PTR,
21866 BT_FEXCEPT_T_PTR, BT_CONST_FEXCEPT_T_PTR): New primitive types.
21867 (BT_FN_INT_FENV_T_PTR, BT_FN_INT_CONST_FENV_T_PTR,
21868 BT_FN_INT_FEXCEPT_T_PTR_INT, BT_FN_INT_CONST_FEXCEPT_T_PTR_INT):
21869 New function types.
21870 * builtins.def (BUILT_IN_FECLEAREXCEPT, BUILT_IN_FEGETENV,
21871 BUILT_IN_FEGETEXCEPTFLAG, BUILT_IN_FEGETROUND,
21872 BUILT_IN_FEHOLDEXCEPT, BUILT_IN_FERAISEEXCEPT,
21873 BUILT_IN_FESETENV, BUILT_IN_FESETEXCEPTFLAG,
21874 BUILT_IN_FESETROUND, BUILT_IN_FETESTEXCEPT,
21875 BUILT_IN_FEUPDATEENV): New builtins.
21876 * tree-core.h (TI_FENV_T_PTR_TYPE, TI_CONST_FENV_T_PTR_TYPE,
21877 TI_FEXCEPT_T_PTR_TYPE, TI_CONST_FEXCEPT_T_PTR_TYPE): New entries.
21878 * tree.h (fenv_t_ptr_type_node, const_fenv_t_ptr_type_node,
21879 fexcept_t_ptr_type_node, const_fexcept_t_ptr_type_node): New
21880 macros.
21881 (builtin_structptr_types): Adjust size.
21882 * tree.c (builtin_structptr_types): Add four entries.
21883
21884 2017-06-27 Jerome Lambourg <lambourg@adacore.com>
21885 Olivier Hainque <hainque@adacore.com>
21886
21887 * config/vxworks.h (VXWORKS_LIB_SPEC): Incorporate ...
21888 (TLS_SYM): New local macro, forcing reference to __tls__ on
21889 link command lines for VxWorks 7 RTPs, triggering initialization
21890 of tlsLib.
21891 (VXWORKS_HAVE_TLS): New macro. State whether the target VxWorks
21892 OS features TLS support, true for RTPs on VxWorks 7.
21893 * config/vxworks.c (vxworks_override_options): Setup emutls
21894 accordingly.
21895
21896 2017-06-27 Jakub Jelinek <jakub@redhat.com>
21897
21898 * predict.c (test_prediction_value_range): Use -1U instead of -1
21899 to avoid narrowing conversion warning.
21900 * dumpfile.c (dump_options): Wrap all value into dump_flags_t cast
21901 to avoid narrowing conversion warning.
21902 * opt-functions.awk (var_ref): Return (unsigned short) -1 instead of
21903 -1.
21904 * optc-gen.awk (END): Expect (unsigned short) -1 instead of -1.
21905
21906 2017-06-27 Jerome Lambourg <lambourg@adacore.com>
21907
21908 * config/vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for
21909 64bit configurations.
21910 (PTR_DIFF_TYPE): Alternative definition for TARGET_LP64.
21911 (SIZE_TYPE): Likewise.
21912 * config/vxworks.c (vxworks_emutls_var_fields): Use
21913 long_unsigned_type_node instead of unsigned_type_node as the offset
21914 field type, which is "pointer" mode in emutls.c.
21915
21916 2017-06-27 Jakub Jelinek <jakub@redhat.com>
21917
21918 PR sanitizer/81209
21919 * ubsan.c (ubsan_encode_value): Initialize DECL_CONTEXT on var.
21920
21921 PR middle-end/81207
21922 * gimple-fold.c (replace_call_with_call_and_fold): Handle
21923 gimple_vuse copying separately from gimple_vdef copying.
21924
21925 2017-06-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21926
21927 * value-prof.c (free_hist): Remove call to memset and the enclosing if
21928 condition.
21929
21930 2017-06-26 Jerome Lambourg <lambourg@adacore.com>
21931 Olivier Hainque <hainque@adacore.com>
21932
21933 * config.gcc (*-*-vxworks*): Add TARGET_VXWORKS7=1 to tm_defines
21934 for all vxworks7 targets.
21935 * config/vxworks.h (TARGET_VXWORKS7): If not defined, define to 0.
21936 (VXWORKS_ADDITIONAL_CPP_SPEC): Alternative definition for VXWORKS7.
21937 (VXWORKS_LIBS_RTP, VXWORKS_LIBS_RTP_DIR): New macros, allowing
21938 variations for VX6/VX7 and 32/64bits later on in ...
21939 (VXWORKS_LIB_SPEC): Leverage new macros.
21940 (VXWORKS_OS_CPP_BUILTINS): Define _VSB_CONFIG_FILE for VXWORKS7,
21941 as well as _ALLOW_KEYWORD_MACROS when "inline" is not a keyword.
21942
21943 2017-06-26 Jerome Lambourg <lambourg@adacore.com>
21944
21945 * config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): builtin_define
21946 _VX_TOOL_FAMILY and _VX_TOOL to gnu.
21947
21948 2017-06-26 Carl Love <cel@us.ibm.com>
21949
21950 * config/rs6000/rs6000-c.c: Add support for built-in functions
21951 vector bool char vec_reve (vector bool char);
21952 vector signed char vec_reve (vector signed char);
21953 vector unsigned char vec_reve (vector unsigned char);
21954 vector bool int vec_reve (vector bool int);
21955 vector signed int vec_reve (vector signed int);
21956 vector unsigned int vec_reve (vector unsigned int);
21957 vector bool long long vec_reve (vector bool long long);
21958 vector signed long long vec_reve (vector signed long long);
21959 vector unsigned long long vec_reve (vector unsigned long long);
21960 vector bool short vec_reve (vector bool short);
21961 vector signed short vec_reve (vector signed short);
21962 vector double vec_reve (vector double);
21963 vector float vec_reve (vector float);
21964 * config/rs6000/rs6000-builtin.def (VREVE_V2DI, VREVE_V4SI,
21965 VREVE_V8HI, VREVE_V16QI, VREVE_V2DF, VREVE_V4SF, VREVE): New builtin.
21966 * config/rs6000/altivec.md (UNSPEC_VREVEV): New UNSPEC.
21967 (altivec_vreve): New pattern.
21968 * config/rs6000/altivec.h (vec_reve): New define.
21969 * doc/extend.texi (vec_rev): Update the built-in documentation file
21970 for the new built-in functions.
21971
21972 2016-06-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21973
21974 PR tree-optimization/71815
21975 * gimple-ssa-strength-reduction.c (uses_consumed_by_stmt): New
21976 function.
21977 (find_basis_for_candidate): Call uses_consumed_by_stmt rather than
21978 has_single_use.
21979 (slsr_process_phi): Likewise.
21980 (replace_uncond_cands_and_profitable_phis): Don't replace a
21981 multiply candidate with a stride of 1 (copy or cast).
21982 (phi_incr_cost): Call uses_consumed_by_stmt rather than
21983 has_single_use.
21984 (lowest_cost_path): Likewise.
21985 (total_savings): Likewise.
21986
21987 2017-06-26 Richard Biener <rguenther@suse.de>
21988
21989 PR target/81175
21990 * config/i386/i386.c (ix86_init_mmx_sse_builtins):
21991 Use def_builtin_pure for all gather builtins.
21992
21993 2017-06-26 Richard Biener <rguenther@suse.de>
21994
21995 PR tree-optimization/81203
21996 * tree-tailcall.c (find_tail_calls): Do not move stmts into
21997 non-dominating BBs.
21998
21999 2017-06-26 Marek Polacek <polacek@redhat.com>
22000
22001 PR c/80116
22002 * doc/invoke.texi: Document -Wmultistatement-macros.
22003
22004 2017-06-26 Christophe Lyon <christophe.lyon@linaro.org>
22005
22006 * doc/sourcebuild.texi (ARM-specific attributes): Document new
22007 arm_neon_ok_no_float_abi effective target.
22008
22009 2017-06-26 Richard Biener <rguenther@suse.de>
22010
22011 PR tree-optimization/80928
22012 * cfghooks.c (duplicate_block): Do not copy BB_DUPLICATED flag.
22013 (copy_bbs): Set BB_DUPLICATED flag early.
22014 (execute_on_growing_pred): Do not execute for BB_DUPLICATED
22015 marked blocks.
22016 (execute_on_shrinking_pred): Likewise.
22017 * tree-ssa.c (ssa_redirect_edge): Do not look for PHI args in
22018 BB_DUPLICATED blocks.
22019 * tree-ssa-phionlycoprop.c (eliminate_degenerate_phis_1): Properly
22020 iterate over all PHIs considering removal of *gsi.
22021
22022 2017-06-23 Jim Wilson <jim.wilson@linaro.org>
22023
22024 * doc/invoke.texi (AArch64 Options, -mtune): Re-add falkor and
22025 qdf24xx.
22026
22027 2017-06-23 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22028
22029 * config/rs6000/rs6000-string.c: (expand_block_clear,
22030 do_load_for_compare, select_block_compare_mode,
22031 compute_current_alignment, expand_block_compare,
22032 expand_strncmp_align_check, expand_strn_compare,
22033 expand_block_move, rs6000_output_load_multiple)
22034 Move functions related to string/block move/compare
22035 to a separate file.
22036 * config/rs6000/rs6000.c: Move above functions to rs6000-string.c.
22037 * config/rs6000/rs6000-protos.h (rs6000_emit_dot_insn): Add prototype
22038 for this function which is now used in two files.
22039 * config/rs6000/t-rs6000: Add rule to compile rs6000-string.o.
22040 * config.gcc: Add rs6000-string.o to extra_objs for
22041 targets powerpc*-*-* and rs6000*-*-*.
22042
22043 2017-06-23 Michael Meissner <meissner@linux.vnet.ibm.com>
22044
22045 PR target/80510
22046 * config/rs6000/rs6000.md (ALTIVEC_DFORM): Do not allow DImode in
22047 32-bit, since indexed is not valid for DImode.
22048 (mov<mode>_hardfloat32): Reorder ISA 2.07 load/stores before ISA
22049 3.0 d-form load/stores to be the same as mov<mode>_hardfloat64.
22050 (define_peephole2 for Altivec d-form load): Add 32-bit support.
22051 (define_peephole2 for Altivec d-form store): Likewise.
22052
22053 PR ipa/81185
22054 * multiple_target.c (create_dispatcher_calls): Only create the
22055 dispatcher call if the function is the default clone of a
22056 versioned function.
22057
22058 2017-06-23 Segher Boessenkool <segher@kernel.crashing.org>
22059
22060 PR middle-end/80902
22061 * builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
22062 a call, force the call to not be a tail call.
22063
22064 2017-06-23 Jeff Law <law@redhat.com>
22065
22066 * doc/contrib.texi: Add entry for Steven Pemberton's work on
22067 enquire.
22068
22069 2017-06-23 Will Schmidt <will_schmidt@vnet.ibm.com>
22070
22071 * config/rs6000/rs6000.c: Add include of ssa-propagate.h for
22072 update_call_from_tree(). (rs6000_gimple_fold_builtin): Add
22073 handling for early expansion of vector shifts (sl,sr,sra,rl).
22074 (builtin_function_type): Add vector shift right instructions
22075 to the unsigned argument list.
22076
22077 2017-06-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
22078
22079 rtl-optimizatoin/79286
22080 * ira.c (update_equiv_regs): Revert to using may_trap_or_fault_p again.
22081 * rtlanal.c (rtx_addr_can_trap_p_1): SYMBOL_REF_FUNCTION_P can never
22082 trap. PIC register plus a const unspec without offset can never trap.
22083
22084 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
22085
22086 * tree.h (builtin_structptr_type): New type.
22087 (builtin_structptr_types): Declare new array.
22088 * tree.c (builtin_structptr_types): New array.
22089 (free_lang_data, build_common_tree_nodes): Use it.
22090
22091 2017-06-23 Jonathan Wakely <jwakely@redhat.com>
22092
22093 PR c++/81187
22094 * doc/invoke.texi (-Wnoexcept-type): Fix name of option, from
22095 -Wnoexcept.
22096
22097 2017-06-22 Matt Turner <mattst88@gmail.com>
22098
22099 * config/i386/driver-i386.c (host_detect_local_cpu): Add Kaby
22100 Lake models to skylake case. Assume skylake for unknown
22101 models with clflushopt.
22102
22103 2017-06-22 Jeff Law <law@redhat.com>
22104
22105 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Handle
22106 frame sizes that do not satisfy aarch64_uimm12_shift.
22107
22108 2017-06-22 Jan Hubicka <hubicka@ucw.cz>
22109
22110 * profile-count.h (apply_probability,
22111 apply_scale, probability_in): Fix checks for zero.
22112
22113 2017-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22114
22115 * incpath.c (add_sysroot_to_chain): Allow for $SYSROOT prefix.
22116 * doc/cppdiropts.texi (-I @var{dir}): Document it.
22117
22118 2016-06-22 Richard Biener <rguenther@suse.de>
22119
22120 * tree-vect-loop.c (vect_model_reduction_cost): Handle
22121 COND_REDUCTION and INTEGER_INDUC_COND_REDUCTION without
22122 REDUC_MAX_EXPR support.
22123 (vectorizable_reduction): Likewise.
22124 (vect_create_epilog_for_reduction): Likewise.
22125
22126 2017-06-22 James Greenhalgh <james.greenhalgh@arm.com>
22127
22128 * match.pd (A / (1 << B) -> A >> B): New.
22129 * generic-match-head.c: Include optabs-tree.h.
22130 * gimple-match-head.c: Likewise.
22131 * optabs-tree.h (target_supports_op_p): New.
22132 * optabs-tree.c (target_supports_op_p): New.
22133
22134 2017-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22135
22136 * configure.ac (gcc_cv_ld_static_dynamic): Also check stderr for
22137 $gcc_cv_ld --help output.
22138 (gcc_cv_ld_demangle): Likewise.
22139 (gcc_cv_ld_eh_frame_hdr): Likewise.
22140 (gcc_cv_ld_pie): Likewise.
22141 (gcc_cv_ld_as_needed): Likewise. Prefer native forms unless $gnu_ld.
22142 (gcc_cv_ld_buildid): Likewise.
22143 (gcc_cv_ld_sysroot): Likewise.
22144 (ld_bndplt_support): Likewise.
22145 (ld_pushpopstate_support): Likewise.
22146 * configure: Regenerate.
22147 * config/sol2.h [!USE_GLD] (SYSROOT_SPEC): Define.
22148
22149 2017-06-21 Jakub Jelinek <jakub@redhat.com>
22150
22151 PR target/81151
22152 * config/i386/sse.md (round<mode>2): Renumber match_dup and
22153 operands indexes to avoid gap between operands and match_dups.
22154
22155 2017-06-21 Andrew Pinski <apinski@cavium.com>
22156
22157 * config/aarch64/aarch64-cost-tables.h (thunderx_extra_costs):
22158 Increment Arith_shift and Arith_shift_reg by 1.
22159 * config/aarch64/aarch64-tuning-flags.def (cheap_shift_extend):
22160 New tuning flag.
22161 * config/aarch64/aarch64.c (thunderx_tunings): Enable
22162 AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND.
22163 (aarch64_strip_extend): Add new argument and test for it.
22164 (aarch64_cheap_mult_shift_p): New function.
22165 (aarch64_rtx_mult_cost): Call aarch64_cheap_mult_shift_p and don't
22166 add a cost if it is true.
22167 Update calls to aarch64_strip_extend.
22168 (aarch64_rtx_costs): Update calls to aarch64_strip_extend.
22169
22170 2017-06-21 Andrew Pinski <apinski@cavium.com>
22171
22172 * config/aarch64/aarch64-cores.def (thunderxt88p1): Use thunderxt88
22173 tunings.
22174 (thunderxt88): Likewise.
22175 * config/aarch64/aarch64.c (thunderxt88_prefetch_tune): New variable.
22176 (thunderx_prefetch_tune): New variable.
22177 (thunderx2t99_prefetch_tune): Update for the correct values.
22178 (thunderxt88_tunings): New variable.
22179 (thunderx_tunings): Use thunderx_prefetch_tune instead of
22180 generic_prefetch_tune.
22181 (thunderx2t99_tunings): Use AUTOPREFETCHER_WEAK.
22182
22183 2017-06-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22184
22185 * config/aarch64/atomics.md (aarch64_compare_and_swap<mode>_lse,
22186 SHORT): Relax operand 3 to aarch64_reg_or_zero and constraint to Z.
22187 (aarch64_compare_and_swap<mode>_lse, GPI): Likewise.
22188 (aarch64_atomic_cas<mode>, SHORT): Likewise for operand 2.
22189 (aarch64_atomic_cas<mode>, GPI): Likewise.
22190
22191 2017-06-21 Martin Liska <mliska@suse.cz>
22192
22193 * gimplify.c (gimplify_label_expr): Insert GIMPLE_PREDICT
22194 statements on cold and hot labels.
22195 * predict.c (tree_estimate_probability_bb): Remove the
22196 prediction from this place.
22197
22198 2017-06-21 Martin Liska <mliska@suse.cz>
22199
22200 PR tree-optimization/79489
22201 * gimplify.c (maybe_add_early_return_predict_stmt): New
22202 function.
22203 (gimplify_return_expr): Call the function.
22204 * predict.c (tree_estimate_probability_bb): Remove handling
22205 of early return.
22206 * predict.def: Update comment about early return predictor.
22207 * gimple-predict.h (is_gimple_predict): New function.
22208 * predict.def: Change default value of early return to 66.
22209 * tree-tailcall.c (find_tail_calls): Skip GIMPLE_PREDICT
22210 statements.
22211 * passes.def: Put pass_strip_predict_hints to the beginning of
22212 IPA passes.
22213
22214 2017-06-21 Pierre-Marie de Rodat <derodat@adacore.com>
22215
22216 * dwarf2out.c (gen_decl_die): Remove the guard to skip file-scope
22217 FUNCTION_DECL declarations.
22218 (dwarf2out_early_global_decl): Remove the guard to skip FUNCTION_DECL
22219 declarations.
22220 (dwaf2out_decl): Likewise.
22221 * godump.c (go_early_global_decl): Skip call to the real debug hook
22222 for FUNCTION_DECL declarations.
22223 * passes.c (rest_of_decl_compilation): Skip call to the
22224 early_global_decl debug hook for FUNCTION_DECL declarations, unless
22225 -fdump-go-spec is passed.
22226
22227 2017-06-21 Marc Glisse <marc.glisse@inria.fr>
22228
22229 * config/i386/i386.c (struct builtin_isa): New field pure_p.
22230 Reorder for compactness.
22231 (def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
22232 (def_builtin_pure, def_builtin_pure2): New functions.
22233 (ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.
22234
22235 2017-06-21 Marc Glisse <marc.glisse@inria.fr>
22236
22237 * match.pd (nop_convert): New predicate.
22238 ((A +- CST1) +- CST2): Allow some NOP conversions.
22239
22240 2017-06-21 Jakub Jelinek <jakub@redhat.com>
22241
22242 PR c++/81130
22243 * gimplify.c (omp_add_variable): Don't force GOVD_SEEN for types
22244 with ctors/dtors if GOVD_SHARED is set.
22245
22246 2017-06-21 Wilco Dijkstra <wdijkstr@arm.com>
22247
22248 * config/aarch64/aarch64.md (movti_aarch64):
22249 Emit mov rather than orr.
22250 (movtf_aarch64): Likewise.
22251 * config/aarch64/aarch64-simd.md (aarch64_simd_mov):
22252 Emit mov rather than orr.
22253
22254 2017-06-21 Wilco Dijkstra <wdijkstr@arm.com>
22255
22256 * config/aarch64/aarch64-simd.md (aarch64_simd_dup):
22257 Swap alternatives, make integer dup more expensive.
22258
22259 2017-06-21 Wilco Dijkstra <wdijkstr@arm.com>
22260
22261 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
22262 Return true for non-tls symbols.
22263
22264 2017-06-21 James Greenhalgh <james.greenhalgh@arm.com>
22265
22266 * config/aarch64/aarch64-cores.def (cortex-a55): New.
22267 (cortex-a75): Likewise.
22268 (cortex-a75.cortex-a55): Likewise.
22269 * config/aarch64/aarch64-tune.md: Regenerate.
22270 * doc/invoke.texi (-mtune): Document new values for -mtune.
22271
22272 2017-06-21 Tom de Vries <tom@codesourcery.com>
22273
22274 * doc/sourcebuild.texi (Add Options, Features for dg-add-options): Add
22275 stack_size feature.
22276 (Effective-Target Keywords, Other attributes): Suggest using
22277 dg-add-options stack_size feature to get stack limit in stack_size
22278 effective target documentation.
22279
22280 2017-06-21 Julian Brown <julian@codesourcery.com>
22281 Naveen H.S <Naveen.Hurugalawadi@cavium.com>
22282
22283 * config/aarch64/aarch64-simd.md (aarch64_crypto_pmulldi)
22284 (aarch64_crypto_pmullv2di): Change type attribute to crypto_pmull.
22285 * config/aarch64/thunderx2t99.md (thunderx2t99_pmull): New
22286 reservation.
22287 * config/arm/cortex-a53.md (cortex_a53_advsimd_type): Add crypto_pmull to
22288 attribute type list for neon_multiply.
22289 * config/arm/cortex-a57.md (cortex_a57_neon_type): Add crypto_pmull to
22290 attribute type list for neon_multiply.
22291 * config/arm/crypto.md (crypto_vmullp64): Change type to crypto_pmull.
22292 * config/arm/exynos-m1.md (exynos_m1_neon_type): Add crypto_pmull to
22293 attribute type list for neon_multiply.
22294 * config/arm/types.md (crypto_pmull): Add.
22295 * config/arm/xgene1.md (xgene1_neon_pmull): Add crypto_pmull to
22296 attribute type list.
22297
22298 2017-06-20 Andreas Tobler <andreast@gcc.gnu.org>
22299
22300 * config.gcc (armv6*-*-freebsd*): Change the target_cpu_cname to
22301 arm1176jzf-s.
22302
22303 2017-06-20 Jakub Jelinek <jakub@redhat.com>
22304
22305 * ira-costs.c (find_costs_and_classes): Initialize cost_classes later
22306 to make sure not to dereference a NULL cost_classes_ptr pointer.
22307
22308 2017-06-20 Carl Love <cel@us.ibm.com>
22309
22310 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
22311 ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
22312 ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
22313 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
22314 builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
22315 * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
22316 VMULOSW): New enum "unspec" values.
22317 (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
22318 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
22319 altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
22320 altivec_vmulosw): New patterns.
22321 * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
22322 VMULOSW): Add definitions.
22323
22324 2017-06-20 Julia Koval <julia.koval@intel.com>
22325
22326 * config/i386/i386.c: Fix rounding expand for new pattern.
22327 * config/i386/subst.md: Fix pattern (parallel -> unspec).
22328
22329 2017-06-20 James Greenhalgh <james.greenhalgh@arm.com>
22330
22331 * config/aarch64/aarch64-option-extensions.def (rcpc): New.
22332 * config/aarch64/aarch64.h (AARCH64_FL_RCPC): New.
22333
22334 2017-06-20 James Greenhalgh <james.greenhalgh@arm.com>
22335
22336 * config/aarch64/aarch64-option-extensions.def (fp16): Fix expected
22337 feature string.
22338
22339 2017-06-20 James Greenhalgh <james.greenhalgh@arm.com>
22340
22341 * config/aarch64/aarch64-cores.def: Rearrange to sort by
22342 architecture, then by implementer ID.
22343 * config/aarch64/aarch64-tune.md: Regenerate.
22344
22345 2017-06-20 Richard Biener <rguenther@suse.de>
22346
22347 PR middle-end/81097
22348 * fold-const.c (split_tree): Fold to type before negating.
22349
22350 2017-06-20 David Malcolm <dmalcolm@redhat.com>
22351
22352 * diagnostic-show-locus.c
22353 (selftest::test_fixit_deletion_affecting_newline): New function.
22354 (selftest::diagnostic_show_locus_c_tests): Call it.
22355
22356 2017-06-20 Andreas Schwab <schwab@suse.de>
22357
22358 PR target/80970
22359 * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d"
22360 instead of "+d".
22361
22362 2017-06-20 Prakhar Bahuguna <prakhar.bahuguna@arm.com>
22363
22364 * config/arm/arm-c.c (arm_cpu_builtins): New block to define
22365 __ARM_FEATURE_COPROC according to support.
22366
22367 2017-06-20 Jakub Jelinek <jakub@redhat.com>
22368
22369 * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
22370 Rewritten to avoid overflow for > 32-bit pointers.
22371
22372 PR sanitizer/81125
22373 * ubsan.h (ubsan_encode_value): Workaround buggy clang++ parser
22374 by removing enum keyword.
22375 (ubsan_type_descriptor): Likewise. Formatting fix.
22376
22377 PR target/81121
22378 * config/i386/i386.md (TARGET_USE_VECTOR_CONVERTS float si->{sf,df}
22379 splitter): Require TARGET_SSE2 in the condition.
22380
22381 2017-06-20 Michael Meissner <meissner@linux.vnet.ibm.com>
22382
22383 PR target/79799
22384 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Add support
22385 for doing vector set of SFmode on ISA 3.0.
22386 * config/rs6000/vsx.md (vsx_set_v4sf_p9): Likewise.
22387 (vsx_set_v4sf_p9_zero): Special case setting 0.0f to a V4SF
22388 element.
22389 (vsx_insert_extract_v4sf_p9): Add an optimization for inserting a
22390 SFmode value into a V4SF variable that was extracted from another
22391 V4SF variable without converting the element to double precision
22392 and back to single precision vector format.
22393 (vsx_insert_extract_v4sf_p9_2): Likewise.
22394
22395 2017-06-19 Jakub Jelinek <jakub@redhat.com>
22396
22397 * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply
22398 in UWHI to avoid undefined overflow.
22399
22400 PR sanitizer/81125
22401 * ubsan.h (enum ubsan_encode_value_phase): New.
22402 (ubsan_encode_value): Change second argument to
22403 enum ubsan_encode_value_phase with default value of
22404 UBSAN_ENCODE_VALUE_GENERIC.
22405 * ubsan.c (ubsan_encode_value): Change second argument to
22406 enum ubsan_encode_value_phase PHASE from bool IN_EXPAND_P,
22407 adjust uses, for UBSAN_ENCODE_VALUE_GENERIC use just
22408 create_tmp_var_raw instead of create_tmp_var and use a
22409 TARGET_EXPR.
22410 (ubsan_expand_bounds_ifn, ubsan_build_overflow_builtin,
22411 instrument_bool_enum_load, ubsan_instrument_float_cast): Adjust
22412 ubsan_encode_value callers.
22413
22414 PR sanitizer/81111
22415 * ubsan.c (ubsan_encode_value): If current_function_decl is NULL,
22416 use create_tmp_var_raw instead of create_tmp_var, mark it addressable
22417 just by setting TREE_ADDRESSABLE on the result and use a TARGET_EXPR.
22418
22419 2017-06-19 Richard Biener <rguenther@suse.de>
22420
22421 PR middle-end/81118
22422 * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Clear niter
22423 estimates if we changed anything.
22424
22425 2017-06-19 Richard Biener <rguenther@suse.de>
22426
22427 PR tree-optimization/80887
22428 * tree-ssa-sccvn.c (mprts_hook_cnt): New global.
22429 (vn_lookup_simplify_result): Allow only mprts_hook_cnt succesful
22430 simplified lookups, then reset mprts_hook.
22431 (vn_nary_build_or_lookup_1): Set mprts_hook_cnt to 9 before
22432 simplifying.
22433 (try_to_simplify): Likewise.
22434
22435 2017-06-19 Martin Liska <mliska@suse.cz>
22436
22437 PR sanitizer/80879
22438 * gimplify.c (gimplify_switch_expr):
22439 Initialize live_switch_vars for SWITCH_BODY == STATEMENT_LIST.
22440
22441 2017-06-19 Martin Liska <mliska@suse.cz>
22442
22443 * doc/install.texi: Document that PGO runs in 4 stages.
22444
22445 2017-06-19 Martin Liska <mliska@suse.cz>
22446
22447 PR ipa/80732
22448 * attribs.c (make_dispatcher_decl): Do not append '.ifunc'
22449 to dispatcher function name.
22450 * multiple_target.c (replace_function_decl): New function.
22451 (create_dispatcher_calls): Redirect both edges and references.
22452
22453 2017-06-19 Jan Hubicka <hubicka@ucw.cz>
22454
22455 * profile-count.c (profile_count::dump): Dump quality.
22456 (profile_count::differs_from_p): Update for unsigned val.
22457 * profile-count.h (profile_count_quality): New enum.
22458 (profile_count): Turn m_val to 62bit unsigned, add quality tracking.
22459
22460 2017-06-19 Richard Biener <rguenther@suse.de>
22461
22462 * tree-ssa-loop-niter.h (estimate_numbers_of_iterations): Take
22463 struct function as arg.
22464 (estimate_numbers_of_iterations): Export overload with loop arg.
22465 (free_numbers_of_iterations_estimates_loop): Use an overload of
22466 free_numbers_of_iterations_estimates instead.
22467 * tree-cfg.c (remove_bb): Adjust.
22468 * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Likewise.
22469 * tree-parloops.c (gen_parallel_loop): Likewise.
22470 * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables):
22471 Likewise.
22472 (tree_unroll_loops_completely): Likewise.
22473 * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop):
22474 Use an overload instead and export.
22475 (estimated_loop_iterations): Adjust.
22476 (max_loop_iterations): Likewise.
22477 (likely_max_loop_iterations): Likewise.
22478 (estimate_numbers_of_iterations): Take struct function as arg
22479 and adjust.
22480 (loop_exits_before_overflow): Adjust.
22481 (free_numbers_of_iterations_estimates_loop): Use an overload.
22482 * tree-vect-loop.c (vect_analyze_loop_form): Adjust.
22483 * tree-vectorizer.c (vect_free_loop_info_assumptions): Likewise.
22484
22485 2017-06-19 Richard Biener <rguenther@suse.de>
22486
22487 PR ipa/81112
22488 * ipa-prop.c (find_constructor_constant_at_offset): Handle
22489 RANGE_EXPR conservatively.
22490
22491 2017-06-16 Carl Love <cel@us.ibm.com>
22492
22493 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
22494 definitions for vec_float, vec_float2, vec_floato,
22495 vec_floate built-ins.
22496 * config/rs6000/vsx.md (define_c_enum "unspec"): Add RTL code
22497 for instructions vsx_xvcvsxws vsx_xvcvuxwsp, float2, floato and
22498 floate.
22499 * config/rs6000/rs6000-builtin.def (FLOAT2_V2DI, FLOATE_V2DF,
22500 FLOATE_2DI, FLOATO_V2DF, FLOATEE_V2DI, XVCVSXWSP_V4SF,
22501 UNS_FLOATO_V2DI, UNS_FLOATE_V2DI): Add definitions.
22502 * config/altivec.md (define_insn "p8_vmrgew_<mode>",
22503 define_mode_attr VF_sxddp): Add V4SF type to p8_vmrgew.
22504 * config/rs6000/altivec.h (vec_float, vec_float2, vec_floate,
22505 vec_floato): Add builtin defines.
22506 * doc/extend.texi (vec_float, vec_float2, vec_floate, vec_floato):
22507 Update the built-in documentation file for the new built-in
22508 functions.
22509
22510 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22511
22512 * config/arm/arm.opt (marm): Mark as the negative of of -mthumb.
22513 (mthumb): Mark as the negative of -marm.
22514
22515 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22516
22517 * doc/invoke.texi (ARM Options, -mcpu): Document supported
22518 extension options.
22519 (ARM Options, -mtune): Document that this accepts the same
22520 extension options as -mcpu.
22521 (ARM Options, -mfpu): Document addition of -mfpu=auto.
22522
22523 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22524
22525 * doc/invoke.texi (ARM Options, -march=): Document new syntax and
22526 permitted extensions.
22527
22528 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22529
22530 * config/arm/arm-cpus.in (armv7): Add extension +nofp.
22531 (armv7-r): Add aliases vfpv3xd and vfpv3-d16.
22532 (armv8-m.main): Add option +nodsp.
22533 * config/arm/arm-cpu-cdata.h: Regenerated.
22534
22535 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22536
22537 * config/arm/t-fuchsia: New file.
22538 * config.gcc (arm*-*-fuchsia*): Use it.
22539
22540 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22541
22542 * config/arm/t-symbian: Rewrite for new option infrastructure.
22543
22544 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22545
22546 * config/arm/t-phoenix (MULTILIB_REUSE): Clear variable.
22547 (MULTILIB_REQUIRED): Likewise.
22548
22549 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22550
22551 * config/arm/t-linux-eabi (MULTILIB_EXCEPTIONS): Set to empty.
22552 (MULTILIB_RESUE): Likewise.
22553 (MULTILIB_MATCHES): Likewise.
22554 (MULTLIB_REQUIRED): Likewise.
22555
22556 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22557
22558 * config/arm/t-rtems: Rewrite for new option framework.
22559
22560 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22561
22562 * config/arm/t-aprofile (v7_a_nosimd_variants, v7_a_simd_variants)
22563 (v7ve_nosimd_variatns, v7ve_vfpv3_simd_variants)
22564 (v7ve_vfpv4_simd_variants, v8_a_nosimd_variants, v8_a_simd_variants)
22565 (v8_1_a_simd_variants, v8_2_a_simd_variants): Move to ...
22566 * config/arm/t-multilib: ... here.
22567 (MULTILIB_OPTIONS): Add armv7 and armv7+fp architectures.
22568 (MULTILIB_MATCHES): Use armv7 libraries for armv7-r. Also use for
22569 armv7-a and armv8*-a when A-profile libraries have not been built.
22570 * config/arm/t-rmprofile: Rewrite.
22571
22572 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22573
22574 * genmultilib (multilib_reuse): Allow an explicit period to be escaped
22575 with a backslash. Remove the backslash after substituting unescaped
22576 periods.
22577 * doc/fragments.texi (MULTILIB_REUSE): Document it.
22578
22579 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22580
22581 * config.gcc: (arm*-*-*): When building a-profile libraries, force
22582 the driver to pass through the default setting of -mfloat-abi.
22583 * common/config/arm/arm-common.c (arm_target_thumb_only): Return -marm
22584 rather than NULL.
22585 * config/arm/t-multilib (MULTILIB_REUSE): Initialize to empty.
22586 (all_feat_combs): New rule.
22587 (MULTILIB_OPTIONS): Use explicit ARM and Thumb directories. Rework
22588 default libraries.
22589 * config/arm/t-aprofile: Rewrite.
22590
22591 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22592
22593 * config/arm/arm.h (FPUTYPE_AUTO): Define.
22594 * config/arm/arm.c (arm_option_override): Use FPUTYPE_AUTO if the
22595 fpu is not specified by the user/command-line.
22596 * config/arm/bpabi.h (FPUTYPE_DEFAULT): Delete.
22597 * config/arm/netbsd-elf.h (FPUTYPE_DEFAULT): Delete.
22598 * config/arm/linux-elf.h (FPUTYPE_DEFAULT): Delete.
22599 * config/arm/vxworks.h (FPUTYPE_DEFAULT): Delete.
22600 * common/config/arm/arm-common.c (arm_canon_arch_option): Use
22601 FPUTYPE_AUTO insted of FPUTYPE_DEFAULT.
22602
22603 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22604
22605 * config/arm/elf.h (MULTILIB_DEFAULTS): Delete.
22606 * config/arm/t-arm-elf: Rewritten.
22607
22608 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22609
22610 * config/arm/arm.h (TARGET_HARD_FLOAT): Also check that we
22611 have some floating-point instructions.
22612 (TARGET_SOFT_FLOAT): Define as inverse of TARGET_HARD_FLOAT.
22613 (TARGET_MAYBE_HARD_FLOAT): New macro.
22614 * config/arm/arm-builtins.c (arm_init_builtins): Use
22615 TARGET_MAYBE_HARD_FLOAT.
22616 * config/arm/arm.c (arm_option_override): Use TARGET_HARD_FLOAT_ABI.
22617
22618 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22619
22620 * common/config/arm/arm-common.c: Define INCLUDE_LIST.
22621 (configargs.h): Include it.
22622 (arm_print_hint_for_fpu_option): New function.
22623 (arm_parse_fpu_option): New function.
22624 (candidate_extension): New class.
22625 (arm_canon_for_multilib): New function.
22626 * config/arm/arm.h (CANON_ARCH_SPEC_FUNCTION): New macro.
22627 (EXTRA_SPEC_FUNCTIONS): Add CANON_ARCH_SPEC_FUNCTION.
22628 (ARCH_CANONICAL_SPECS): New macro.
22629 (DRIVER_SELF_SPECS): Add ARCH_CANONICAL_SPECS.
22630
22631 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22632
22633 * config.gcc (arm*-*-*): Ensure both target_cpu_cname and with_cpu
22634 are set after handling multilib fragments. Set target_cpu_default2
22635 from with_cpu.
22636
22637 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22638
22639 * config.gcc (arm*-*-fucshia*): Set target_cpu_cname to the real
22640 cpu name.
22641 (arm*-*-*): Set target_cpu_default2 to a quoted string.
22642 * config/arm/parsecpu.awk (check_cpu): Validate any extension
22643 options.
22644 (check_arch): Likewise.
22645 * config/arm/arm.c (arm_configure_build_target): Handle
22646 TARGET_CPU_DEFAULT being a string constant. Scan any feature
22647 options in the default.
22648
22649 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22650
22651 * config/arm/arm-protos.h (cpu_arch_extension): Add field to record
22652 when an option is an alias of another.
22653 * config/arm/parsecpu.awk (optalias): New parser token.
22654 (gen_comm_data): Mark non-alias options as such. Emit entries
22655 for extension aliases.
22656 * config/arm/arm-cpus.in (armv5e): Make vfpv2 an alias.
22657 (armv5te, armv5tej, armv6, armv6j, armv6k, armv6z): Likewise.
22658 (armv6kz, armv6zk, armv6t2): Likewise.
22659 (armv7): Make vfpv3-d16 an alias.
22660 (armv7-a): Make vfpv3-d16, neon and neon-vfpv3 aliases. Sort in
22661 canonical order.
22662 (armv7ve): Make vfpv4-d16, neon-vfpv3 and neon-vfpv4 aliases.
22663 Sort in canonical order.
22664 (armv8-a): Sort in canonical order.
22665 (armv8.1-a, armv8.2-a): Likewise.
22666 (generic-armv7-a): Make neon and neon-vfpv3 aliases. Sort in
22667 canonical order.
22668 (cortex-a9): Sort in canonical order.
22669 * config/arm/arm.c (selftests.h): Include it.
22670 (arm_test_cpu_arch_data): New function.
22671 (arm_run_self_tests): New function.
22672 (TARGET_RUN_TARGET_SELFTESTS): Redefine.
22673 (targetm): Move declaration to the end of the file.
22674 * arm-cpu-cdata.h: Regenerated.
22675
22676 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22677
22678 * config/arm/arm.h (TARGET_MODE_SPECS): Add additional parameter to
22679 call to target_mode_check describing the type of option passed.
22680 * common/config/arm/arm-common.c (arm_arch_core_flag): Delete.
22681 (arm_target_thumb_only): Use arm_parse_arch_option_name or
22682 arm_parse_cpu_option_name to match parameters against list of
22683 available targets.
22684 * config/arm/parsecpu.awk (gen_comm_data): Don't generate
22685 arm_arch_core_flags data structure.
22686 * config/arm/arm-cpu_cdata.h: Regenerated.
22687
22688 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22689
22690 * common/config/arm/arm-common.c (arm_initialize_isa): Moved here from
22691 config/arm/arm.c.
22692 (arm_print_hint_for_cpu_option): Likewise.
22693 (arm_print_hint_for_arch_option): Likewise.
22694 (arm_parse_cpu_option_name): Likewise.
22695 (arm_parse_arch_option_name): Likewise.
22696 * config/arm/arm.c (arm_identify_fpu_from_isa): Use the computed number
22697 of entries in the all_fpus list.
22698 * config/arm/arm-protos.h (all_architectures, all_cores): Declare.
22699 (arm_parse_cpu_option_name): Declare.
22700 (arm_parse_arch_option_name): Declare.
22701 (arm_parse_option_features): Declare.
22702 (arm_intialize_isa): Declare.
22703 * config/arm/parsecpu.awk (gen_data): Move CPU and architecture
22704 data tables to ...
22705 (gen_comm_data): ... here. Make definitions non-static.
22706 * config/arm/arm-cpu-data.h: Regenerated.
22707 * config/arm/arm-cpu-cdata.h: Regenerated.
22708
22709 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22710
22711 * config/arm/arm-protos.h (arm_build_target): Remove arch_core.
22712 (cpu_arch_extension): New structure.
22713 (cpu_arch_option, arch_option, cpu_option): New structures.
22714 * config/arm/parsecpu.awk (gen_headers): Build an enumeration of
22715 architecture types.
22716 (gen_data): Generate new format data tables.
22717 * config/arm/arm.c (cpu_tune): New structure.
22718 (cpu_option, processors): Delete.
22719 (arm_print_hint_for_core_or_arch): Delete. Replace with ...
22720 (arm_print_hint_for_cpu_option): ... this and ...
22721 (arm_print_hint_for_arch_option): ... this.
22722 (arm_parse_arch_cpu_name): Delete. Replace with ...
22723 (arm_parse_cpu_option_name): ... this and ...
22724 (arm_parse_arch_option_name): ... this.
22725 (arm_unrecognized_feature): Change type of target parameter to
22726 cpu_arch_option.
22727 (arm_parse_arch_cpu_features): Delete. Replace with ...
22728 (arm_parse_option_features): ... this.
22729 (arm_configure_build_target): Rework to use new configuration data
22730 tables.
22731 (arm_print_tune_info): Rework for new configuration data tables.
22732 * config/arm/arm-cpu-data.h: Regenerated.
22733 * config/arm/arm-cpu.h: Regenerated.
22734
22735 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22736
22737 * Makefile.in (OBJS): Move sbitmap.o from here ...
22738 (OBJS-libcommon): ... to here.
22739
22740 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22741
22742 * config/arm/arm-isa.h (ISA_ALL_FPU_INTERNAL): Renamed from ISA_ALL_FPU.
22743 (ISA_ALL_CRYPTO): New macro.
22744 (ISA_ALL_SIMD): New macro
22745 (ISA_ALL_FP): New macro.
22746 * config/arm/arm.c (fpu_bitlist): Update initializer.
22747 * config/arm/arm-cpus.in: Use new ISA_ALL macros to disable crypto,
22748 simd or fp.
22749 (arm9e): Add fpu. Add option for nofp
22750 (arm946e-s, arm966e-s, arm968e-s, arm10e, arm1020e, arm1022e): Likewise.
22751 (arm926ej-s, arm1026ej-s): Likewise.
22752 (generic-armv7-a): Add fpu. Add options for simd, vfpv3, vfpv3-d16,
22753 vfpv3-fp16, vfpv3-d16-fp16, vfpv4, vfpv4-d16, neon, neon-vfp3,
22754 neon-fp16, neon-vfpv4, nofp and nosimd.
22755 (cortex-a5, cortex-a7): Add fpu. Add options for nosimd and nofp.
22756 (cortex-a8): Add fpu. Add option for nofp.
22757 (cortex-a9): Add fpu. Add options for nosimd and nofp.
22758 (cortex-a12, cortex-a15, cortex-a17): Add fpu. Add option for nofp.
22759 (cortex-r4f): Add fpu.
22760 (cortex-r5): Add fpu. Add options for nofp.dp and nofp.
22761 (cortex-r7): Use idiv option from architecture. Add fpu. Add option
22762 for nofp.
22763 (cortex-r8): Likewise.
22764 (cortex-m4): Add fpu. Add option for nofp.
22765 (cortex-a15.cortex-a7): Add fpu. Add option for nofp.
22766 (cortex-a17.cortex-a7): Likewise.
22767 (cortex-a32): Add fpu. Add options for crypto and nofp.
22768 (cortex-a35, cortex-a53): Likewise.
22769 (cortex-a57): Add fpu. Add option for crypto.
22770 (cortex-a72, cortex-a73): Likewise.
22771 (exynos-m1): Likewise.
22772 (cortex-a57.cortex-a53, cortex-a72.cortex-a53): Likewise.
22773 (cortex-a73.cortex-a35, cortex-a73.cortex-a53): Likewise.
22774 (cortex-m33): Add fpu. Add option for nofp.
22775 * config/arm/arm-cpu-cdata.h: Regenerated
22776 * config/arm/arm-cpu-data.h: Regenerated.
22777
22778 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22779
22780 * arm-cpus.in (armv5e): Add options fp, vfpv2 and nofp.
22781 (armv5te, armv5tej): Likewise.
22782 (armv6, armv6j, armv6k, armv6z, armv6kz, armv6zk, armv6t2): Likewise.
22783 (armv7): Add options fp and vfpv3-d16.
22784 (armv7-a): Add options fp, simd, vfpv3, vfpv3-d16, vfpv3-d16-fp16,
22785 vfpv3-fp16, vfpv4, vfpv4-d16, neon, neon-vfpv3, neon-fp16, neon-vfpv4,
22786 nofp and nosimd.
22787 (armv7ve): Likewise.
22788 (armv7-r): Add options fp, fp.sp, idiv, nofp and noidiv.
22789 (armv7e-m): Add options fp, fpv5, fp.dp and nofp.
22790 (armv8-a): Add nocrypto option.
22791 (armv8.1-a, armv8.2-a): Likewise.
22792 (armv8-m.main): add options fp, fp.dp and nofp.
22793
22794 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22795
22796 * config/arm/arm-cpus.in (armv8-a): Add options crc, simd crypto and
22797 nofp.
22798 (armv8-a+crc): Delete.
22799 (armv8.1-a): Add options simd, crypto and nofp.
22800 (armv8.2-a): Add options fp16, simd, crypto and nofp.
22801 (armv8.2-a+fp16): Delete.
22802 (armv8-m.main): Add option dsp.
22803 (armv8-m.main+dsp): Delete.
22804 (cortex-a8): Add fpu. Add nofp option.
22805 (cortex-a9): Add fpu. Add nofp and nosimd options.
22806 * config/arm/parsecpu.awk (gen_data): Generate option tables and
22807 link to main cpu and architecture data structures.
22808 (gen_comm_data): Only put isa attributes from the main architecture
22809 in common tables.
22810 (option): New statement for architecture and CPU entries.
22811 * arm.c (struct cpu_option): New structure.
22812 (struct processors): Add entry for options.
22813 (arm_unrecognized_feature): New function.
22814 (arm_parse_arch_cpu_name): Ignore any characters after the first
22815 '+' character.
22816 (arm_parse_arch_cpu_feature): New function.
22817 (arm_configure_build_target): Separate out any CPU and architecture
22818 features and parse separately. Don't error out if -mfpu=auto is
22819 used with only an architecture string.
22820 (arm_print_asm_arch_directives): New function.
22821 (arm_file_start): Call it.
22822 * config/arm/arm-cpu-cdata.h: Regenerated.
22823 * config/arm/arm-cpu-data.h: Likewise.
22824 * config/arm/arm-tables.opt: Likewise.
22825
22826 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22827
22828 * config/arm/elf.h (ASM_SPEC): Only pass -mfpu through to the
22829 assembler when it is not -mfpu=auto.
22830
22831 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22832
22833 * config/arm/arm.h (BIG_LITTLE_SPEC): Delete macro.
22834 (ASM_REWRITE_SPEC_FUNCTIONS): New macro.
22835 (BIG_LITTLE_CPU_SPEC_FUNCTIONS): Delete macro.
22836 (ASM_CPU_SPEC): Rewrite.
22837 (MCPU_MTUNE_NATIVE_FUNCTIONS): New macro.
22838 (EXTRA_SPEC_FUNCTIONS): Move outside of ifdef. Use
22839 MCPU_MTUNE_NATIVE_FUNCTIONS and ASM_REWRITE_SPEC_FUNCTIONS. Remove
22840 reference to BIG_LITTLE_CPU_SPEC_FUNCTIONS.
22841 * common/config/arm/arm-common.c (arm_rewrite_selected_cpu): Ensure
22842 copied string is NUL-terminated. Also strip any characters prefixed
22843 by '+'.
22844 (arm_rewrite_selected_arch): New function.
22845 (arm_rewrite_march): New function.
22846
22847 2017-06-16 Richard Earnshaw <rearnsha@arm.com>
22848
22849 * config/arm/arm.opt (x_arm_arch_string): New TargetSave option.
22850 (x_arm_cpu_string, x_arm_tune_string): Likewise.
22851 (march, mcpu, mtune): Convert to string-based options.
22852 * config/arm/arm.c (arm_print_hint_for_core_or_arch): New function.
22853 (arm_parse_arch_cpu_name): New function.
22854 (arm_configure_build_target): Use arm_parse_arch_cpu_name to
22855 identify selected architecture or CPU.
22856 (arm_option_save): New function.
22857 (TARGET_OPTION_SAVE): Redefine.
22858 (arm_option_restore): Restore string options.
22859 (arm_option_print): Print string options.
22860
22861 2017-06-16 Martin Sebor <msebor@redhat.com>
22862
22863 PR tree-optimization/80933
22864 PR tree-optimization/80934
22865 * builtins.c (fold_builtin_3): Do not handle bcmp here.
22866 * gimple-fold.c (gimple_fold_builtin_bcmp): New function.
22867 (gimple_fold_builtin_bcopy, gimple_fold_builtin_bzero): Likewise.
22868 (gimple_fold_builtin): Call them.
22869
22870 2017-06-16 Jan Hubicka <hubicka@ucw.cz>
22871
22872 * gimple-ssa-isolate-paths.c (isolate_path): Set edge leading to path
22873 as unlikely; update profile.
22874
22875 2017-06-16 Jan Hubicka <hubicka@ucw.cz>
22876
22877 * predict.c (force_edge_cold): Handle declaring edges impossible
22878 more aggresively.
22879
22880 2017-06-16 Jan Hubicka <hubicka@ucw.cz>
22881
22882 * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update
22883 profile.
22884 (try_unroll_loop_completely): Fix reporting.
22885
22886 2017-06-16 Jan Hubicka <hubicka@ucw.cz>
22887
22888 * tree-ssa-tail-merge.c (replace_block_by): Fix profile updating.
22889
22890 2017-06-16 James Greenhalgh <james.greenhalgh@arm.com>
22891
22892 PR target/71778
22893 * config/arm/arm-builtins.c (arm_expand_builtin_args): Return TARGET
22894 if given a non-constant argument for an intrinsic which requires a
22895 constant.
22896
22897 2017-06-16 Jan Hubicka <hubicka@ucw.cz>
22898
22899 * profile.c (compare_freqs): New function.
22900 (branch_prob): Sort edge list.
22901 (find_spanning_tree): Assume that the list is priority sorted.
22902
22903 2017-06-16 Richard Biener <rguenther@suse.de>
22904
22905 PR tree-optimization/81090
22906 * passes.def (pass_record_bounds): Remove.
22907 * tree-pass.h (make_pass_record_bounds): Likewise.
22908 * tree-ssa-loop.c (pass_data_record_bounds, pass_record_bounds,
22909 make_pass_record_bounds): Likewise.
22910 * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Do
22911 not free niter estimates at the beginning but at the end.
22912 * tree-scalar-evolution.c (scev_finalize): Free niter estimates.
22913
22914 2017-06-16 Richard Biener <rguenther@suse.de>
22915
22916 * tree-switch-conversion.c (emit_case_bit_tests): Adjust
22917 initializer to workaround ICE in host GCC 4.8.
22918
22919 2017-06-16 Jan Hubicka <hubicka@ucw.cz>
22920
22921 * ipa-inline-transform.c (update_noncloned_frequencies): Update also
22922 counts.
22923 (clone_inlined_nodes): Update.
22924
22925 2017-06-16 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
22926
22927 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune): Update
22928 prefetch settings, and enable prefetching by default at -O3.
22929
22930 2017-06-16 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
22931
22932 * config/aarch64/aarch64.c (aarch64_override_options_internal):
22933 Set flag_prefetch_loop_arrays according to tuning data.
22934
22935 2017-06-16 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
22936
22937 * config/aarch64/aarch64-protos.h (struct cpu_prefetch_tune):
22938 New tune structure.
22939 (struct tune_params): Use cpu_prefetch_tune instead of cache_line_size.
22940 [Unrelated to main purpose of the patch] Place the pointer field last
22941 to enable type checking errors when tune structure are wrongly merged.
22942 * config/aarch64/aarch64.c (generic_prefetch_tune,)
22943 (exynosm1_prefetch_tune, qdf24xx_prefetch_tune,)
22944 (thunderx2t99_prefetch_tune): New tune constants.
22945 (tune_params *_tunings): Update all tunings (no functional change).
22946 (aarch64_override_options_internal): Set PARAM_SIMULTANEOUS_PREFETCHES,
22947 PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE, and PARAM_L2_CACHE_SIZE
22948 from tunings structures.
22949
22950 2017-06-16 Jakub Jelinek <jakub@redhat.com>
22951
22952 PR sanitizer/81094
22953 * ubsan.c (instrument_null): Add T argument, use it instead
22954 of computing it based on IS_LHS.
22955 (instrument_object_size): Likewise.
22956 (pass_ubsan::execute): Adjust instrument_null and
22957 instrument_object_size callers to pass gimple_get_lhs or
22958 gimple_assign_rhs1 result to it. Use instrument_null instead of
22959 calling get_base_address and instrument_mem_ref. Handle
22960 aggregate call arguments for object-size sanitization.
22961
22962 2017-06-16 Yury Gribov <tetra2005@gmail.com>
22963
22964 PR tree-optimization/81089
22965 * tree-vrp.c (is_masked_range_test): Validate operands of
22966 subexpression.
22967
22968 2017-06-15 Martin Sebor <msebor@redhat.com>
22969
22970 PR c++/80560
22971 * dumpfile.c (dump_register): Avoid calling memset to initialize
22972 a class with a default ctor.
22973 * gcc.c (struct compiler): Remove const qualification.
22974 * genattrtab.c (gen_insn_reserv): Replace memset with initialization.
22975 * hash-table.h: Ditto.
22976 * ipa-cp.c (allocate_and_init_ipcp_value): Replace memset with
22977 assignment.
22978 * ipa-prop.c (ipa_free_edge_args_substructures): Ditto.
22979 * omp-low.c (lower_omp_ordered_clauses): Replace memset with
22980 default ctor.
22981 * params.h (struct param_info): Make struct members non-const.
22982 * tree-switch-conversion.c (emit_case_bit_tests): Replace memset
22983 with default initialization.
22984 * vec.h (vec_copy_construct, vec_default_construct): New helper
22985 functions.
22986 (vec<T>::copy, vec<T>::splice, vec<T>::reserve): Replace memcpy
22987 with vec_copy_construct.
22988 (vect<T>::quick_grow_cleared): Replace memset with default ctor.
22989 (vect<T>::vec_safe_grow_cleared, vec_safe_grow_cleared): Same.
22990 * doc/invoke.texi (-Wclass-memaccess): Document.
22991
22992 2017-06-15 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22993
22994 * emit-rtl.h (is_leaf): Update comment about local
22995 register allocator.
22996
22997 2017-06-15 Jozef Lawrynowicz <jozef.l@somniumtech.com>
22998
22999 PR target/78818
23000 * config/msp430/msp430.c (msp430_data_attr): Check that it's possible
23001 for a variable to have a section before checking if the section has a
23002 name.
23003 Set section to.persistent if persistent attribute is set.
23004 Warn if .persistent attribute is used on an automatic variable.
23005
23006 2017-06-15 Eric Botcazou <ebotcazou@adacore.com>
23007
23008 PR rtl-optimization/80474
23009 * reorg.c (update_block): Do not ignore instructions in a delay slot.
23010
23011 2017-06-15 Segher Boessenkool <segher@kernel.crashing.org>
23012
23013 * config/rs6000/rs6000.md (add<mode>3): Use reg_or_subregno instead
23014 of REGNO.
23015
23016 2017-06-14 Maciej W. Rozycki <macro@imgtec.com>
23017
23018 * config/mips/mips.md (MIPS16_T_REGNUM): Remove constant.
23019 (casesi): Emit bounds checking as RTL.
23020 (casesi_internal_mips16_<mode>): Remove bounds checking.
23021
23022 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
23023
23024 * config/xtensa/xtensa.c (xtensa_option_override): Append
23025 MASK_CONST16 to target_flags in the absence of TARGET_L32R.
23026 (hwloop_optimize, hwloop_fail, hwloop_pattern_reg,
23027 xtensa_doloop_hooks): Define unconditionally.
23028 (xtensa_reorg_loops): Only call reorg_loops in the presence of
23029 TARGET_LOOPS.
23030 * config/xtensa/xtensa.h (TARGET_L32R): New definition.
23031 (TARGET_DEFAULT): Remove XCHAL_HAVE_L32R condition and account
23032 for it in xtensa_option_override.
23033 (HARD_FRAME_POINTER_IS_FRAME_POINTER,
23034 HARD_FRAME_POINTER_IS_ARG_POINTER): New definitions.
23035
23036 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
23037
23038 * doc/cppopts.texi: Document '-' special value to -MF.
23039
23040 2017-06-14 Wilco Dijkstra <wdijkstr@arm.com>
23041
23042 * config/arm/cortex-a53.md (cortex_a53_fpalu) Adjust latency.
23043 (cortex_a53_fconst): Likewise.
23044 (cortex_a53_fpmul): Likewise.
23045 (cortex_a53_f_load_64): Likewise.
23046 (cortex_a53_f_load_many): Likewise.
23047 (cortex_a53_advsimd_alu): Likewise.
23048 (cortex_a53_advsimd_alu_q): Likewise.
23049 (cortex_a53_advsimd_mul): Likewise.
23050 (cortex_a53_advsimd_mul_q): Likewise.
23051 (fpmac bypass): Add new bypass for fpmac-fpmac case.
23052 Add missing fmul, r2f_cvt and fconst cases.
23053
23054 2017-06-14 Richard Biener <rguenther@suse.de>
23055
23056 PR middle-end/81088
23057 * fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
23058 literal constants.
23059 (fold_binary_loc): When associating do not treat pre-existing
23060 TREE_OVERFLOW on literal constants as a reason to allow
23061 TREE_OVERFLOW on associated literal constants.
23062
23063 2017-06-14 Eric Botcazou <ebotcazou@adacore.com>
23064
23065 * config/sparc/sparc.h (MASK_ISA): Add MASK_LEON and MASK_LEON3.
23066 (MASK_FEATURES): New macro.
23067 * config/sparc/sparc.c (sparc_option_override): Remove the special
23068 handling of -mfpu and generalize it to all MASK_FEATURES switches.
23069
23070 2017-06-14 Eric Botcazou <ebotcazou@adacore.com>
23071
23072 * simplify-rtx.c (simplify_binary_operation_1) <UDIV>: Do not simplify
23073 a division of 0 if non-call exceptions are enabled.
23074
23075 2017-06-14 Andrew Pinski <apinski@cavium.com>
23076 Naveen H.S <Naveen.Hurugalawadi@cavium.com>
23077
23078 PR target/71663
23079 * config/aarch64/aarch64.c (aarch64_expand_vector_init):
23080 Improve vector initialization code gen for only variable case.
23081
23082 2017-06-14 Eric Botcazou <ebotcazou@adacore.com>
23083
23084 * config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
23085
23086 2017-06-14 Richard Biener <rguenther@suse.de>
23087
23088 PR tree-optimization/81083
23089 * tree-ssa-sccvn.c (vn_reference_lookup_3): Do not use abnormals
23090 as values.
23091
23092 2017-06-13 Segher Boessenkool <segher@kernel.crashing.org>
23093
23094 * config/rs6000/rs6000.c: Update all comments that mentioned SPE.
23095 (rs6000_expand_builtin): Remove RS6000_BTC_EVSEL.
23096 * config/rs6000/rs6000.h (RS6000_BTC_EVSEL): Delete.
23097 * config/rs6000/vxworks.h (VXCPU_FOR_8548): Delete. Adjust former use.
23098 * config/rs6000/vxworksae.h (VXCPU_FOR_8548): Delete.
23099 * config/rs6000/vxworksmils.h (VXCPU_FOR_8548): Delete.
23100
23101 2017-06-13 Segher Boessenkool <segher@kernel.crashing.org>
23102
23103 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete VECTOR_SPE.
23104 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete VECTOR_SPE.
23105
23106 2017-06-13 Segher Boessenkool <segher@kernel.crashing.org>
23107
23108 * config/rs6000/rs6000.h (FIXED_SCRATCH): Delete.
23109
23110 2017-06-13 Segher Boessenkool <segher@kernel.crashing.org>
23111
23112 * config/rs6000/t-rtems: Don't handle SPE.
23113
23114 2017-06-13 Segher Boessenkool <segher@kernel.crashing.org>
23115
23116 * config/rs6000/t-linux: Don't handle SPE.
23117
23118 2017-06-13 Segher Boessenkool <segher@kernel.crashing.org>
23119
23120 * config/rs6000/eabispe.h: Delete file.
23121
23122 2017-06-13 Segher Boessenkool <segher@kernel.crashing.org>
23123
23124 * config/rs6000/t-spe: Delete file.
23125
23126 2017-06-13 Segher Boessenkool <segher@kernel.crashing.org>
23127
23128 * config/rs6000/rs6000.c (SPE_CONST_OFFSET_OK): Delete.
23129 (rs6000_legitimate_offset_address_p): Return false for anything in
23130 V2SImode or V2SFmode.
23131
23132 2017-06-13 Segher Boessenkool <segher@kernel.crashing.org>
23133
23134 * config/rs6000/rs6000-modes.def: Remove all 8-byte vector modes
23135 except V2SF and V2SI. Rearrange the vector modes, and add comments.
23136 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove V8QImode
23137 and V4HImode.
23138 (reg_offset_addressing_ok_p): Remove V4HImode and V1DImode.
23139 (rs6000_legitimate_offset_address_p): Ditto.
23140 (rs6000_emit_move): Ditto.
23141 (rs6000_init_builtins): Remove V4HI_type_node.
23142
23143 2017-06-13 Martin Liska <mliska@suse.cz>
23144
23145 PR sanitize/78204
23146 * asan.c (asan_sanitize_stack_p): Use sanitize_flags_p.
23147 (gate_asan): Likewise.
23148 * asan.h (asan_no_sanitize_address_p): Remove the function.
23149 (sanitize_flags_p): New function.
23150 * builtins.def: Fix coding style.
23151 * common.opt: Use renamed enum value.
23152 * convert.c (convert_to_integer_1): Use sanitize_flags_p.
23153 * doc/extend.texi: Document no_sanitize attribute.
23154 * flag-types.h (enum sanitize_code): Rename SANITIZE_NONDEFAULT
23155 to SANITIZE_UNDEFINED_NONDEFAULT.
23156 * gcc.c (sanitize_spec_function): Use the renamed enum value.
23157 * gimple-fold.c (optimize_atomic_compare_exchange_p):
23158 Use sanitize_flags_p.
23159 * gimplify.c (gimplify_function_tree): Likewise.
23160 * ipa-inline.c (sanitize_attrs_match_for_inline_p): Likewise.
23161 * opts.c (parse_no_sanitize_attribute): New function.
23162 (common_handle_option): Use renamed enum value.
23163 * opts.h (parse_no_sanitize_attribute): Declare.
23164 * tree.c (sanitize_flags_p): New function.
23165 * tree.h: Declared here.
23166 * tsan.c: Use sanitize_flags_p.
23167 * ubsan.c (ubsan_expand_null_ifn): Likewise.
23168 (instrument_mem_ref): Likewise.
23169 (instrument_bool_enum_load): Likewise.
23170 (do_ubsan_in_current_function): Remove the function.
23171 (pass_ubsan::execute): Use sanitize_flags_p.
23172 * ubsan.h: Remove do_ubsan_in_current_function
23173 * tree-cfg.c (print_no_sanitize_attr_value): New function.
23174 (dump_function_to_file): Use it here.
23175
23176 2017-06-13 Martin Jambor <mjambor@suse.cz>
23177
23178 PR tree-optimization/80803
23179 PR tree-optimization/81063
23180 * tree-sra.c (subtree_mark_written_and_enqueue): Move up in the file.
23181 (propagate_subaccesses_across_link): Enqueue subtree whenever
23182 necessary instead of relying on the caller.
23183
23184 2017-06-13 Martin Jambor <mjambor@suse.cz>
23185
23186 * tree-sra.c (add_access_to_work_queue): Only enqueue accesses
23187 that have a first_link.
23188 (sort_and_splice_var_accesses): Do not check first_link before
23189 enquing.
23190 (subtree_mark_written_and_enqueue): Likewise.
23191 (propagate_all_subaccesses): Likewise and do not stop at first
23192 parent with a first_link.
23193
23194 2017-06-13 Martin Jambor <mjambor@suse.cz>
23195
23196 * tree-sra.c (dump_access_tree_1): Fix accidental dumping to stderr
23197 instead of f.
23198
23199 2017-06-13 Yury Gribov <tetra2005@gmail.com>
23200
23201 * match.pd: New pattern.
23202
23203 2017-06-13 Yury Gribov <tetra2005@gmail.com>
23204
23205 * tree-vrp.c (is_masked_range_test): New function.
23206 (register_edge_assert_for): Determine ranges for
23207 some bit tests.
23208
23209 2017-06-13 Yury Gribov <tetra2005@gmail.com>
23210
23211 PR tree-optimization/67328
23212 * fold-const.c (maskable_range_p): New function.
23213 (build_range_check): Generate bittests if possible.
23214
23215 2017-06-13 Martin Liska <mliska@suse.cz>
23216
23217 * gimple-pretty-print.c (dump_probability): Add new argument.
23218 (dump_edge_probability): Dump both probability and count.
23219 (dump_gimple_label): Likewise.
23220 (dump_gimple_bb_header): Likewise.
23221
23222 2017-06-13 Georg-Johann Lay <avr@gjlay.de>
23223
23224 PR target/81072
23225 * config/avr/avr-devices.c: Fix indentation.
23226 * config/avr/gen-avr-mmcu-specs.c: Dito.
23227
23228 2017-06-13 Richard Biener <rguenther@suse.de>
23229
23230 * tree-vect-loop.c (vect_model_reduction_cost): Do not fail,
23231 instead get vector type from stmt_info.
23232 (vectorizable_reduction): Adjust. Remove dead code.
23233
23234 2017-06-13 Richard Biener <rguenther@suse.de>
23235
23236 PR middle-end/81065
23237 * fold-const.c (extract_muldiv_1): Remove bogus distribution
23238 case of C * (x * C2 + C3).
23239 (fold_addr_of_array_ref_difference): Properly fold index difference.
23240
23241 2017-06-12 David S. Miller <davem@davemloft.net>
23242
23243 PR target/80968
23244 * config/sparc/sparc.md (return expander): Emit frame blockage if
23245 function uses alloca.
23246
23247 2017-06-12 Richard Sandiford <richard.sandiford@linaro.org>
23248
23249 * combine.c (make_field_assignment): Check len rather than the mode
23250 precision when calling force_to_mode.
23251
23252 2017-06-12 Georg-Johann Lay <avr@gjlay.de>
23253
23254 Support multilibs and devices that see flash in RAM address range.
23255
23256 PR target/81072
23257 * config/avr/avr-arch.h (avr_arch_id) <ARCH_AVRXMEGA3>: New enum.
23258 (avr_mcu_t) <flash_pm_offset>: New field.
23259 (avr_device_specific_features) <AVR_ISA_RCALL>: New enum.
23260 * config/avr/avr.h (AVR_SHORT_CALLS): New define.
23261 (AVR_HAVE_JMP_CALL): Don't set if AVR_SHORT_CALLS.
23262 (AVR_TINY_PM_OFFSET): Remove macro.
23263 * config/avr/avr.opt (-mshort-calls): New option.
23264 * config/avr/gen-avr-mmcu-specs.c (print_mcu)
23265 [*self_spec]: Add / remove -mshort-calls depending on AVR_ISA_RCALL.
23266 * config/avr/avr-c.c (avr_cpu_cpp_builtins)
23267 <__AVR_SHORT_CALLS__>: Built-in define if AVR_SHORT_CALLS.
23268 <__AVR_HAVE_JMP_CALL__>: Use AVR_HAVE_JMP_CALL as condition
23269 instead of avr_arch->have_jmp_call.
23270 <__AVR_PM_BASE_ADDRESS__>: Built-in define if avr_arch->flash_pm_offset.
23271 [AVR_TINY] <__AVR_TINY_PM_BASE_ADDRESS__>: Use
23272 avr_arch->flash_pm_offset to define.
23273 * config/avr/avr-devices.c (avr_arch_types): Add initializers for
23274 new field flash_pm_offset. Add entry for avrxmega3.
23275 (avr_texinfo): Add entry for avrxmega3.
23276 * config/avr/avr-mcus.def: Add entries for: avrxmega3,
23277 attiny212, attiny214,
23278 attiny412, attiny414, attiny416, attiny417,
23279 attiny814, attiny816, attiny817,
23280 attiny1614, attiny1616, attiny1617,
23281 attiny3214, attiny3216, attiny3217.
23282 * config/avr/avr.c (avr_assemble_integer)[AVR_TINY]: Use
23283 avr_arch->flash_pm_offset instead of AVR_TINY_PM_OFFSET.
23284 (avr_print_operand_address) [AVR_TINY]: Same.
23285 (avr_asm_init_sections) <readonly_data_section>: Only patch
23286 callback if avr_arch->flash_pm_offset = 0.
23287 (avr_asm_named_section) <avr_need_copy_data_p>: Skip setting it
23288 for rodata if avr_arch->flash_pm_offset != 0.
23289 (avr_encode_section_info) [AVR_TINY]: Adjust comment.
23290 * config/avr/genmultilib.awk (dir_rcall, opt_rcall): New vars.
23291 (opts) [AVR_ISA_RCALL]: Append opt_rcall.
23292 (m_options): Append opt_rcall.
23293 (m_dirnames): Append dir_rcall.
23294 * config/avr/t-multilib: Regenerate.
23295
23296 * configure.ac [target=avr]: Check whether avrxmega3 default
23297 linker description file works as needed.
23298 * configure: Regenerate.
23299 * doc/avr-mmcu.texi: Regenerate.
23300 * doc/invoke.texi (AVR Options) <-mshort-calls>: Document it.
23301 <__AVR_ARCH__>: Document avrxmega3 and 103.
23302 <__AVR_HAVE_JMP_CALL__>: Adjust documentation.
23303 <__AVR_SHORT_CALLS__>: Document it.
23304 <__AVR_PM_BASE_ADDRESS__>: Document it.
23305 * doc/extend.texi (AVR Options) <-mshort-calls>: Document it.
23306 (AVR Variable Attributes) <progmem>: Document this is
23307 not needed for avrxmega3.
23308 (AVR Named Address Spaces) <__flash>: Dito.
23309
23310 2017-06-12 Jan Hubicka <hubicka@ucw.cz>
23311
23312 * cgraph.c (cgraph_node::dump): Complain about profile insanities.
23313
23314 2017-06-12 Doug Rupp <rupp@adacore.com>
23315
23316 * config.gcc (*-*-vxworks*): Set use_gcc_stdint to "provide".
23317 Append vxworks-stdint.h to the tm_file list.
23318 * config/vxworks-stdint.h: New file.
23319
23320 2017-06-12 Martin Liska <mliska@suse.cz>
23321
23322 PR tree-optimization/81041
23323 * tree-profile.c (gimple_gen_ic_func_profiler):
23324 Create an extra BB in profile-generate
23325 (gimple_gen_time_profiler): Likewise.
23326
23327 2017-06-12 Jakub Jelinek <jakub@redhat.com>
23328
23329 PR tree-optimization/81003
23330 * tree-ssa-reassoc.c (force_into_ssa_name): New function.
23331 (update_range_test): Use it instead of force_gimple_operand_gsi.
23332
23333 2017-06-12 Richard Biener <rguenther@suse.de>
23334
23335 PR tree-optimization/81053
23336 * tree-vect-loop.c (vect_is_simple_reduction): Handle PHI
23337 with backedge value not defined in loop. Simplify def stmt
23338 compute.
23339
23340 2017-06-11 Tom de Vries <tom@codesourcery.com>
23341
23342 PR target/79939
23343 * config/nvptx/nvptx.c (nvptx_cannot_force_const_mem): New function.
23344 Return true.
23345 (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to
23346 nvptx_cannot_force_const_mem.
23347
23348 2017-06-10 Jan Hubicka <hubicka@ucw.cz>
23349
23350 * opts.c (finish_options): Move test for flag_split_stack after
23351 it has been initialized.
23352
23353 2017-06-11 Jason Merrill <jason@redhat.com>
23354
23355 * tree.h (id_equal): New.
23356 * dwarf2out.c, hsa-gen.c, ipa-devirt.c, omp-expand.c,
23357 omp-simd-clone.c, read-rtl-function.c, tree-chkp.c, tree.c: Use it
23358 instead of strcmp of IDENTIFIER_POINTER.
23359
23360 2017-06-10 Jan Hubicka <hubicka@ucw.cz>
23361
23362 * ipa-inline-transform.c: Include function.h, cfg.h and basic-block.h
23363 (mark_all_inlined_calls_cdtor): Fix formating.
23364 (inline_transform): Rescale profile before inlining.
23365
23366 2017-06-10 Jan Hubicka <hubicka@ucw.cz>
23367
23368 * cgraph.h (cgraph_edge::clone): Update prototype.
23369 * cgraphclones.c (cgraph_edge::clone): Update profile scaling.
23370 (cgraph_node::create_clone): Update.
23371 (cgraph_node::create_version_clone): Update.
23372 * tree-inline.c (copy_bb): Update.
23373 (expand_call_inline): Update.
23374
23375 2017-06-10 Segher Boessenkool <segher@kernel.crashing.org>
23376
23377 * config/rs6000/rs6000.c (emit_vrsave_prologue): New function,
23378 factored out from ...
23379 (rs6000_emit_prologue): ... here.
23380
23381 2017-06-10 Segher Boessenkool <segher@kernel.crashing.org>
23382
23383 * config/rs6000/rs6000.c (emit_split_stack_prologue): New function,
23384 factored out from ...
23385 (rs6000_emit_prologue): ... here.
23386
23387 2017-06-10 Jan Hubicka <hubicka@ucw.cz>
23388
23389 * predict.c (drop_profile): Also drop individual bb/edge and cgraph
23390 edge counts.
23391 (handle_missing_profiles): Fix computation of tp_first_run.
23392 (counts_to_freqs): Do not touch freqs when count is 0.
23393
23394 2017-06-10 Jan Hubicka <hubicka@ucw.cz>
23395
23396 * cgraphbuild.c (cgraph_edge::rebuild_references): Do not touch
23397 profile.
23398
23399 2017-06-10 Tom de Vries <tom@codesourcery.com>
23400
23401 * doc/sourcebuild.texi (Effective-Target Keywords, Environment
23402 attributes): Document signal effective target.
23403
23404 2017-06-10 Tom de Vries <tom@codesourcery.com>
23405
23406 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
23407 Document effective target stack_size.
23408
23409 2017-06-09 David Malcolm <dmalcolm@redhat.com>
23410
23411 * diagnostic.c (diagnostic_report_diagnostic): Only add fixits
23412 to the edit_context if they can be auto-applied.
23413
23414 2017-06-9 Ian Lance Taylor <iant@golang.org>
23415
23416 * opts.c (finish_options): If -fsplit-stack, disable implicit
23417 -forder-blocks-and-partition.
23418 * doc/invoke.texi (Optimize Options): Document that when using
23419 -fsplit-stack -forder-blocks-and-partition is not implicitly
23420 enabled.
23421
23422 2017-06-09 Jan Hubicka <hubicka@ucw.cz>
23423
23424 * builtin-attrs.def (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST,
23425 ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST,
23426 ATTR_TMPURE_NORETURN_NOTHROW_LEAF_COLD_LIST): New.
23427 * builtins.def (abort, trap, unreachable): Declare cold.
23428 * calls.c (flags_from_decl_or_type): Lookup ECF_COLD.
23429 * tree-core.h (ECF_COLD): New.
23430 * tree.c (set_call_expr_flags): Handle ECF_COLD.
23431 (build_common_builtin_nodes): Mark unreachable and abort as cold.
23432
23433 2017-06-09 Jan Hubicka <hubicka@ucw.cz>
23434
23435 * predict.c (unlikely_executed_stmt_p): Cleanup.
23436
23437 2017-06-09 Richard Biener <rguenther@suse.de>
23438
23439 * tree-ssa-loop-im.c (execute_sm): Do not force multi-threaded
23440 model if the ref is always written to.
23441
23442 2017-06-09 Tamar Christina <tamar.christina@arm.com>
23443
23444 * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2): New.
23445
23446 2017-06-09 Tamar Christina <tamar.christina@arm.com>
23447
23448 * config/arm/arm.c (arm_rtx_costs_internal): Make sdiv more expensive
23449 than udiv.
23450
23451 2017-06-09 Tom de Vries <tom@codesourcery.com>
23452
23453 PR target/80855
23454 * config/nvptx/nvptx.md (define_expand "mov<QHSDISDFM>"): Error out with
23455 "target cannot support label values" when encountering LABEL_REF.
23456
23457 2017-06-09 Martin Liska <mliska@suse.cz>
23458
23459 * tree-profile.c (gimple_gen_ic_profiler): Update comment.
23460 (gimple_gen_ic_func_profiler): Emit direct comparison
23461 of __gcov_indirect_call_callee with NULL.
23462 (gimple_gen_time_profiler): Change probability from
23463 PROB_VERY_UNLIKELY to PROB_UNLIKELY.
23464
23465 2017-06-09 Jan Hubicka <hubicka@ucw.cz>
23466
23467 * profile.c (edge_gcov_counts): Turn to pointer.
23468 (compute_branch_probabilities, compute_branch_probabilities): Update.
23469 (branch_prob): Do not clear edge_gcov_count.
23470 * profile.h (edge_gcov_counts): Turn to pointer.
23471 (edge_gcov_count): Update.
23472
23473 2017-06-09 Jan Hubicka <hubicka@ucw.cz>
23474
23475 * gimple.h (gimple_check_failed): Mark cold.
23476
23477 2017-06-09 Richard Biener <rguenther@suse.de>
23478
23479 PR tree-optimization/66623
23480 * tree-vect-loop.c (vect_is_simple_reduction): Cleanup,
23481 refactor check_reduction into two parts, properly computing
23482 whether we have to check reduction validity for outer loop
23483 vectorization.
23484
23485 2017-06-09 Richard Biener <rguenther@suse.de>
23486
23487 PR tree-optimization/79483
23488 * graphite-scop-detection.c (order): New global.
23489 (get_order): Compute bb to order mapping that satisfies code
23490 generation constraints.
23491 (cmp_pbbs): New helper.
23492 (build_scops): Start domwalk at entry block, sort generated
23493 pbbs.
23494
23495 2017-06-09 Richard Biener <rguenther@suse.de>
23496
23497 PR middle-end/81007
23498 * ipa-polymorphic-call.c
23499 (ipa_polymorphic_call_context::restrict_to_inner_class):
23500 Skip FIELD_DECLs with error_mark_node type.
23501 * passes.def (all_lowering_passes): Run pass_build_cgraph_edges
23502 last again.
23503
23504 2017-06-09 Martin Liska <mliska@suse.cz>
23505
23506 * predict.c (struct branch_predictor): New struct.
23507 (test_prediction_value_range): New test.
23508 (predict_c_tests): New function.
23509 * selftest-run-tests.c (selftest::run_tests): Run the function.
23510 * selftest.h: Declare new tests.
23511
23512 2017-06-09 Segher Boessenkool <segher@kernel.crashing.org>
23513
23514 PR target/80966
23515 * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
23516 gen_add3_insn did not fail.
23517 * config/rs6000/rs6000.md (add<mode>3): If asked to add a constant to
23518 r0, construct that number in a temporary reg and add that reg to r0.
23519 If asked to put the result in r0 as well, fail.
23520
23521 2017-06-08 Will Schmidt <will_schmidt@vnet.ibm.com>
23522
23523 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
23524 for early expansion of vec_eqv.
23525
23526 2017-06-08 Jakub Jelinek <jakub@redhat.com>
23527
23528 PR middle-end/81005
23529 * ubsan.c (instrument_null): Avoid pointless code temporary.
23530 (pass_ubsan::execute): Instrument aggregate arguments of calls.
23531
23532 2017-06-08 Uros Bizjak <ubizjak@gmail.com>
23533
23534 PR target/81015
23535 Revert:
23536 2016-12-14 Uros Bizjak <ubizjak@gmail.com>
23537
23538 PR target/59874
23539 * config/i386/i386.md (*ctzhi2): New insn_and_split pattern.
23540 (*clzhi2): Ditto.
23541
23542 2017-06-08 Jan Hubicka <hubicka@ucw.cz>
23543
23544 * predict.c (unlikely_executed_edge_p): Move ahead.
23545 (probably_never_executed_edge_p): Use it.
23546
23547 2017-06-08 Alexander Ivchenko <alexander.ivchenko@intel.com>
23548
23549 PR middle-end/79988
23550 * tree-chkp.c (chkp_gimple_call_builtin_p): Remove
23551 gimple_call_builtin_p call.
23552
23553 2017-06-08 Jan Hubicka <hubicka@ucw.cz>
23554
23555 * system.h (fancy_abort): Annotate by ATTRIBUTE_COLD.
23556 * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1,
23557 rtl_check_failed_type2, rtl_check_failed_code1,
23558 rtl_check_failed_code2, rtl_check_failed_code_mode,
23559 rtl_check_failed_block_symbol, cwi_check_failed_bounds,
23560 rtvec_check_failed_bounds, rtl_check_failed_flag,
23561 _fatal_insn_not_found, _fatal_insn): Likewise.
23562 * tree.h (tree_contains_struct_check_failed,
23563 tree_check_failed, tree_not_check_failed,
23564 tree_class_check_failed, tree_range_check_failed,
23565 tree_not_class_check_failed, tree_int_cst_elt_check_failed,
23566 tree_vec_elt_check_failed, phi_node_elt_check_failed,
23567 tree_operand_check_failed, omp_clause_check_failed,
23568 omp_clause_operand_check_failed, omp_clause_range_check_failed):
23569 Likewise.
23570
23571 2017-06-08 Jan Hubicka <hubicka@ucw.cz>
23572
23573 * cgraph.c (cgraph_edge::maybe_hot_p): Do not check
23574 flag_branch_probabilities.
23575 * ipa-inline.c (edge_badness): Likewise.
23576 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
23577 * postreload-gcse.c (eliminate_partially_redundant_load): Likewise.
23578 * predict.c (maybe_hot_frequency_p): Likewise.
23579 (probably_never_executed): Likewise.
23580 * sched-ebb.c (schedule_ebbs): Likewise.
23581 * sched-rgn.c (find_single_block_region): Likewise.
23582 * tracer.c (tail_duplicate): Likewise.
23583
23584 2017-06-08 Jan Hubicka <hubicka@ucw.cz>
23585
23586 * opts.c (finish_options): x_flag_reorder_blocks_and_partition no
23587 longer requires x_flag_profile_use.
23588
23589 2017-06-08 Jan Hubicka <hubicka@ucw.cz>
23590
23591 * cfgrtl.c (cfg_layout_initialize): Check crtl->has_bb_partition
23592 instead of flag_reorder_blocks_and_partition.
23593 * dbxout.c (dbxout_function_end): Likewise.
23594 * dwarf2out.c (gen_subprogram_die): Likewise.
23595 * haifa-sched.c (sched_create_recovery_edges): Likewise.
23596 * hw-doloop.c (reorg_loops): Likewise.
23597 * varasm.c (assemble_start_function,
23598 assemble_end_function): Likewise.
23599 (decide_function_section): Do not check for
23600 flag_reorder_blocks_and_partition.
23601
23602 2017-06-08 Alexander Ivchenko <alexander.ivchenko@intel.com>
23603
23604 * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
23605 New function.
23606 (chkp_get_hard_register_fake_addr_expr): Ditto.
23607 (chkp_build_addr_expr): Add check for hard reg case.
23608 (chkp_parse_array_and_component_ref): Ditto.
23609 (chkp_find_bounds_1): Ditto.
23610 (chkp_process_stmt): Don't generate bounds store for
23611 hard reg case.
23612
23613 2017-06-08 Jan Hubicka <hubicka@ucw.cz>
23614
23615 * predict.c (maybe_hot_bb_p): Do not check profile status.
23616 (maybe_hot_edge_p): Likewise.
23617 (probably_never_executed): Check for zero counts even if profile
23618 is not read.
23619 (unlikely_executed_edge_p): New function.
23620 (unlikely_executed_stmt_p): New function.
23621 (unlikely_executed_bb_p): New function.
23622 (set_even_probabilities): Use unlikely predicates.
23623 (combine_predictions_for_bb): Likewise.
23624 (predict_paths_for_bb): Likewise.
23625 (predict_paths_leading_to_edge): Likewise.
23626 (determine_unlikely_bbs): New function.
23627 (estimate_bb_frequencies): Use it.
23628 (compute_function_frequency): Use zero counts even if profile is
23629 not read.
23630 * profile-count.h: Fix typo.
23631
23632 2017-08-08 Julia Koval <julia.koval@intel.com>
23633
23634 * config/i386/avx512bwintrin.h (_mm512_mask_cvtepi16_storeu_epi8,
23635 _mm512_mask_cvtsepi16_storeu_epi8,
23636 _mm512_mask_cvtusepi16_storeu_epi8): New intrinsics.
23637 * config/i386/avx512vlbwintrin.h (_mm256_mask_cvtepi16_storeu_epi8,
23638 _mm_mask_cvtsepi16_storeu_epi8, _mm256_mask_cvtsepi16_storeu_epi8,
23639 _mm_mask_cvtusepi16_storeu_epi8, _mm256_mask_cvtusepi16_storeu_epi8,
23640 _mm_mask_cvtepi16_storeu_epi8): New intrinsics.
23641 * config/i386/i386-builtin-types.def (PV8Q, V8QI): New pointer type.
23642 (VOID_FTYPE_PV32QI_V32HI_USI, VOID_FTYPE_PV8QI_V8HI_UQI,
23643 VOID_FTYPE_PV16QI_V16HI_UHI): New function types.
23644 * config/i386/i386-builtin.def (__builtin_ia32_pmovwb128mem_mask,
23645 __builtin_ia32_pmovwb256mem_mask, __builtin_ia32_pmovswb128mem_mask,
23646 __builtin_ia32_pmovswb256mem_mask, __builtin_ia32_pmovuswb128mem_mask,
23647 __builtin_ia32_pmovuswb256mem_mask,
23648 __builtin_ia32_pmovuswb512mem_mask, __builtin_ia32_pmovswb512mem_mask)
23649 __builtin_ia32_pmovwb512mem_mask): New builtins.
23650
23651 2017-08-08 Julia Koval <julia.koval@intel.com>
23652
23653 PR target/73350,80862
23654 * config/i386/subst.md (round): Fix round pattern.
23655 * config/i386/i386.c (ix86_erase_embedded_rounding):
23656 Fix erasing rounding for the fixed pattern.
23657
23658 2017-06-08 Jan Hubicka <hubicka@ucw.cz>
23659
23660 * cfgbuild.c (find_many_sub_basic_blocks): Fix thinko.
23661
23662 2017-06-08 Martin Liska <mliska@suse.cz>
23663
23664 PR gcov-profile/80911
23665 * gcov.c (block_info::block_info): New constructor.
23666
23667 2017-06-07 Carl Love <cel@us.ibm.com>
23668
23669 * config/rs6000/rs6000-c: The return type of the following
23670 built-in functions was implemented as int not long long. Fix sign
23671 of return value for the unsigned version of vec_mulo and vec_mule.
23672 vector unsigned long long vec_bperm (vector unsigned long long,
23673 vector unsigned char)
23674 vector signed long long vec_mule (vector signed int,
23675 vector signed int)
23676 vector unsigned long long vec_mule (vector unsigned int,
23677 vector unsigned int)
23678 vector signed long long vec_mulo (vector signed int,
23679 vector signed int)
23680 vector unsigned long long vec_mulo (vector unsigned int,
23681 vector unsigned int)
23682 * doc/extend.texi: Fix the documentation for the built-in
23683 functions.
23684
23685 2017-06-07 Carl Love <cel@us.ibm.com>
23686
23687 PR target/80982
23688 * config/rs6000/altivec.md (double<mode>2): Fix the implementation of
23689 for BE.
23690
23691 2017-06-07 Carl Love <cel@us.ibm.com>
23692
23693 * config/rs6000/altivec.md: Fix argument swizzle in vec_doublel
23694 support, Generate doublehv for signed int/float for BE case only.
23695
23696 2017-06-07 Alexander Monakov <amonakov@ispras.ru>
23697
23698 * doc/invoke.texi (mcx16): Rewrite.
23699
23700 2017-06-07 Segher Boessenkool <segher@kernel.crashing.org>
23701
23702 * config/rs6000/predicates.md (rs6000_nonimmediate_operand): Delete.
23703 * config/rs6000/rs6000.md (*movsi_internal1, movsi_from_sf,
23704 *mov<mode>_softfloat, and an anonymous splitter): Use
23705 nonimmediate_operand instead of rs6000_nonimmediate_operand.
23706
23707 2017-06-07 Segher Boessenkool <segher@kernel.crashing.org>
23708
23709 * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE_ACC and
23710 SPEFSCR registers.
23711 * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
23712 (enum rs6000_reg_type): Delete SPE_ACC_TYPE and SPEFSCR_REG_TYPE.
23713 (rs6000_debug_reg_global): Adjust.
23714 (rs6000_init_hard_regno_mode_ok): Adjust.
23715 (rs6000_dbx_register_number): Adjust.
23716 * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change to 115.
23717 (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
23718 Remove SPE_ACC and SPEFSCR.
23719 (REG_ALLOC_ORDER): Ditto.
23720 (FRAME_POINTER_REGNUM): Change to 111.
23721 (enum reg_class): Remove the SPE_ACC and SPEFSCR registers.
23722 (REG_CLASS_NAMES): Ditto.
23723 (REG_CLASS_CONTENTS): Delete the SPE_ACC and SPEFSCR registers.
23724 (REGISTER_NAMES): Ditto.
23725 (ADDITIONAL_REG_NAMES): Ditto.
23726 (rs6000_reg_names): Ditto.
23727 * config/rs6000/rs6000.md: Renumber some register number
23728 define_constants.
23729
23730 2017-06-07 Segher Boessenkool <segher@kernel.crashing.org>
23731
23732 * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE high
23733 registers.
23734 * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
23735 * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change from 149
23736 to 117.
23737 (DWARF_REG_TO_UNWIND_COLUMN): Do not define.
23738 (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
23739 Delete the SPE high registers.
23740 (REG_ALLOC_ORDER): Ditto.
23741 (enum reg_class): Remove SPE_HIGH_REGS.
23742 (REG_CLASS_NAMES): Ditto.
23743 (REG_CLASS_CONTENTS): Delete the SPE high registers.
23744 (REGISTER_NAMES): Ditto.
23745 (rs6000_reg_names): Ditto.
23746 * doc/tm.texi.in: Remove SPE as example.
23747 * doc/tm.texi: Regenerate.
23748
23749 2017-06-07 Segher Boessenkool <segher@kernel.crashing.org>
23750
23751 * config/rs6000/8540.md (ppc8540_brinc): Delete.
23752 * config/rs6000/e500mc.md (e500mc_brinc): Delete.
23753 * config/rs6000/e500mc64.md (e500mc64_brinc): Delete.
23754 * config/rs6000/rs6000.md (type): Remove "brinc".
23755
23756 2017-06-07 Segher Boessenkool <segher@kernel.crashing.org>
23757
23758 * config.gcc (powerpc*-*-*): Don't add spe.h to extra_headers.
23759 (powerpc*-linux*spe*): Use ${cpu_type} instead of rs6000.
23760 * config/rs6000/linuxspe.h: Delete file.
23761 * config/rs6000/rs6000.md: Don't include spe.md.
23762 * config/rs6000/spe.h: Delete file.
23763 * config/rs6000/spe.md: Delete file.
23764 * config/rs6000/t-rs6000: Remove spe.md.
23765
23766 2017-06-07 Segher Boessenkool <segher@kernel.crashing.org>
23767
23768 * config/rs6000/predicates.md (reg_or_mem_operand): Reformat.
23769 (reg_or_none500mem_operand): Delete.
23770 * config/rs6000/rs6000.md (extendsfdf2): Use reg_or_mem_operand
23771 instead of reg_or_none500mem_operand.
23772
23773 2017-06-07 Segher Boessenkool <segher@kernel.crashing.org>
23774
23775 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
23776 handling of SPE flags.
23777 * config/rs6000/rs6000.opt (-mspe, -mspe=no, -mspe=yes): Delete.
23778
23779 2017-06-07 Segher Boessenkool <segher@kernel.crashing.org>
23780
23781 * config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
23782 SPE ABI handling.
23783 * config/rs6000/paired.md (paired_negv2sf2): Rename to negv2sf2.
23784 (paired_absv2sf2, paired_addv2sf3, paired_subv2sf3, paired_mulv2sf3,
23785 paired_divv2sf3): Similar.
23786 * config/rs6000/predicates.md: Replace TARGET_SPE, TARGET_SPE_ABI,
23787 SPE_VECTOR_MODE and SPE_HIGH_REGNO_P by 0; simplify.
23788 * config/rs6000/rs6000-builtin.def: Delete RS6000_BUILTIN_E and
23789 RS6000_BUILTIN_S.
23790 Delete BU_SPE_1, BU_SPE_2, BU_SPE_3, BU_SPE_E, BU_SPE_P, and BU_SPE_X.
23791 Rename the paired_* instruction patterns.
23792 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Do not
23793 define __SPE__.
23794 * config/rs6000/rs6000-protos.h (invalid_e500_subreg): Delete.
23795 * config/rs6000/rs6000.c: Delete RS6000_BUILTIN_E and RS6000_BUILTIN_S.
23796 (struct rs6000_stack): Delete fields spe_gp_save_offset, spe_gp_size,
23797 spe_padding_size, and spe_64bit_regs_used. Replace TARGET_SPE and
23798 TARGET_SPE_ABI with 0, simplify. Replace SPE_VECTOR_MODE with
23799 PAIRED_VECTOR_MODE.
23800 (struct machine_function): Delete field spe_insn_chain_scanned_p.
23801 (spe_func_has_64bit_regs_p): Delete.
23802 (spe_expand_predicate_builtin): Delete.
23803 (spe_expand_evsel_builtin): Delete.
23804 (TARGET_DWARF_REGISTER_SPAN): Do not define.
23805 (TARGET_MEMBER_TYPE_FORCES_BLK): Do not define.
23806 (invalid_e500_subreg): Delete.
23807 (rs6000_legitimize_address): Always force_reg op2 as well, for
23808 paired single memory accesses.
23809 (rs6000_member_type_forces_blk): Delete.
23810 (rs6000_spe_function_arg): Delete.
23811 (rs6000_expand_unop_builtin): Delete SPE handling.
23812 (rs6000_expand_binop_builtin): Ditto.
23813 (spe_expand_stv_builtin): Delete.
23814 (bdesc_2arg_spe): Delete.
23815 (spe_expand_builtin): Delete.
23816 (spe_expand_predicate_builtin): Delete.
23817 (spe_expand_evsel_builtin): Delete.
23818 (rs6000_invalid_builtin): Remove RS6000_BTM_SPE handling.
23819 (spe_init_builtins): Delete.
23820 (spe_func_has_64bit_regs_p): Delete.
23821 (savres_routine_name): Delete "info" parameter. Adjust callers.
23822 (rs6000_emit_stack_reset): Ditto.
23823 (rs6000_dwarf_register_span): Delete.
23824 * config/rs6000/rs6000.h (TARGET_SPE_ABI, TARGET_SPE,
23825 UNITS_PER_SPE_WORD, SPE_HIGH_REGNO_P, SPE_SIMD_REGNO_P,
23826 SPE_VECTOR_MODE, RS6000_BTM_SPE, RS6000_BUILTIN_E, RS6000_BUILTIN_S):
23827 Delete.
23828 * config/rs6000/rs6000.md (FIRST_SPE_HIGH_REGNO, LAST_SPE_HIGH_REGNO):
23829 Delete.
23830 * config/rs6000/rs6000.opt (-mabi=spe, -mabi=no-spe): Delete.
23831 * config/rs6000/spe.md: Delete every pattern that uses TARGET_SPE.
23832 * config/rs6000/vector.md (absv2sf2, negv2sf2, addv2sf3, subv2sf3,
23833 mulv2sf3, divv2sf3): Delete expanders.
23834
23835 2017-06-07 Segher Boessenkool <segher@kernel.crashing.org>
23836
23837 config/rs6000/rs6000.md (UNSPEC_MV_CR_GT): Delete.
23838
23839 2017-06-07 Segher Boessenkool <segher@kernel.crashing.org>
23840
23841 * config/rs6000/rs6000-protos.h (output_e500_flip_gt_bit): Delete.
23842 * config/rs6000/rs6000.c: Ditto.
23843
23844 2017-06-07 Segher Boessenkool <segher@kernel.crashing.org>
23845
23846 * config/rs6000/predicated.md (rs6000_cbranch_operator): Delete.
23847 * config/rs6000/rs6000.md: Replace rs6000_cbranch_operator by
23848 comparison_operator.
23849
23850 2017-06-07 Segher Boessenkool <segher@kernel.crashing.org>
23851
23852 * config/rs6000/rs6000.c: Remove everything related to -mfloat-gprs.
23853 * config/rs6000/rs6000.opt: Ditto.
23854 * config/rs6000/t-rtems: Ditto.
23855
23856 2017-06-07 Segher Boessenkool <segher@kernel.crashing.org>
23857
23858 * config/rs6000/predicates.md: Replace TARGET_E500_DOUBLE and
23859 TARGET_E500_SINGLE by 0, simplify.
23860 * config/rs6000/rs6000.c: Ditto.
23861 (rs6000_option_override_internal): Delete CHECK_E500_OPTIONS.
23862 (spe_build_register_parallel): Delete.
23863 * config/rs6000/rs6000.h: Delete TARGET_E500_SINGLE,
23864 TARGET_E500_DOUBLE, and CHECK_E500_OPTIONS.
23865 * config/rs6000/rs6000.md: Replace TARGET_E500_DOUBLE,
23866 TARGET_E500_SINGLE, and <E500_CONVERT> by 0, simplify.
23867 (E500_CONVERT): Delete.
23868 * config/rs6000/spe.md: Remove many patterns and all define_constants.
23869
23870 2017-06-07 Segher Boessenkool <segher@kernel.crashing.org>
23871
23872 * config/rs6000/darwin.md: Replace TARGET_FPRS by 1 and simplify.
23873 * config/rs6000/dfp.md: Ditto.
23874 (negdd2, *negdd2_fpr): Merge.
23875 (absdd2, *absdd2_fpr): Merge.
23876 (negtd2, *negtd2_fpr): Merge.
23877 (abstd2, *abstd2_fpr): Merge.
23878 * config/rs6000/e500.h: Delete file.
23879 * config/rs6000/predicates.md (rs6000_cbranch_operator): Replace
23880 TARGET_FPRS by 1 and simplify.
23881 * config/rs6000/rs6000-c.c: Ditto.
23882 * config/rs6000/rs6000.c: Ditto. Also replace TARGET_SF_SPE and
23883 TARGET_DF_SPE by 0.
23884 * config/rs6000/rs6000.h: Ditto. Delete TARGET_SF_SPE and
23885 TARGET_DF_SPE.
23886 * config/rs6000/rs6000.md: Ditto.
23887 (floatdidf2, *floatdidf2_fpr): Merge.
23888 (move_from_CR_gt_bit): Delete.
23889 * config/rs6000/spe.md: Replace TARGET_FPRS by 1 and simplify.
23890 (E500_CR_IOR_COMPARE): Delete.
23891 (All patterns that require !TARGET_FPRS): Delete.
23892 * config/rs6000/vsx.md: Replace TARGET_FPRS by 1 and simplify.
23893
23894 2017-06-07 Bin Cheng <bin.cheng@arm.com>
23895
23896 * passes.def (pass_iv_canon): Move before pass_loop_distribution.
23897
23898 2017-06-07 Bin Cheng <bin.cheng@arm.com>
23899
23900 * graphds.c (add_edge): Intitialize edge's attached data.
23901 (foll_in_subgraph, dfs_fst_edge, dfs_next_edge): New function
23902 pointer parameter. Call pointed function on each edge during
23903 graph traversing. Skip traversing the edge when the function
23904 returns true.
23905 (graphds_dfs, graphds_scc): Ditto.
23906 (for_each_edge): New parameter. Pass the new parameter to callback
23907 function.
23908 * graphds.h (skip_edge_callback): New function pointer type.
23909 (graphds_dfs, graphds_scc): New function pointer parameter.
23910 (graphds_edge_callback, for_each_edge): New parameter.
23911
23912 2017-06-07 Bin Cheng <bin.cheng@arm.com>
23913
23914 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test): Factor
23915 out code checking if runtime alias check is possible to below ...
23916 Call the new function.
23917 * tree-data-ref.c (runtime_alias_check_p): ... to new function.
23918 * tree-data-ref.h (runtime_alias_check_p): New decalaration.
23919
23920 2017-06-07 Marek Polacek <polacek@redhat.com>
23921
23922 PR sanitizer/80932
23923 * fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
23924 TYPE_OVERFLOW_WRAPS check.
23925
23926 2017-06-07 Bin Cheng <bin.cheng@arm.com>
23927
23928 * tree-vect-loop-manip.c (vect_do_peeling): Don't skip vector loop
23929 if versioning is required.
23930 * tree-vect-loop.c (vect_analyze_loop_2): Merge niter check for loop
23931 peeling with the check for versioning.
23932
23933 2017-06-07 Bin Cheng <bin.cheng@arm.com>
23934
23935 * tree-vectorizer.h (vect_build_loop_niters): New parameter.
23936 * tree-vect-loop-manip.c (vect_build_loop_niters): New parameter.
23937 Set true to new parameter if new ssa variable is defined.
23938 (vect_gen_vector_loop_niters): Refactor. Set range information
23939 for the new vector loop bound variable.
23940 (vect_do_peeling): Ditto.
23941
23942 2017-06-07 Bin Cheng <bin.cheng@arm.com>
23943
23944 * tree-affine.c (ssa.h): Include header file.
23945 (tree_to_aff_combination): Handle (T1)(X - CST) when inner type
23946 has wrapping overflow behavior.
23947
23948 2017-06-07 Bin Cheng <bin.cheng@arm.com>
23949
23950 * tree-affine.c (tree_to_aff_combination): Handle (T1)(X + X).
23951
23952 2017-06-07 Bin Cheng <bin.cheng@arm.com>
23953
23954 (aff_combination_expand): Move (T1)(X *+- CST) simplification to ...
23955 (tree_to_aff_combination): ... here.
23956
23957 2017-06-07 Bin Cheng <bin.cheng@arm.com>
23958
23959 * tree-ssa-loop-ivopts.c (ivopts_estimate_reg_pressure): New
23960 reg_pressure model function.
23961 (ivopts_global_cost_for_size): Delete.
23962 (determine_set_costs, iv_ca_recount_cost): Call new model function
23963 ivopts_estimate_reg_pressure.
23964
23965 2017-06-07 Tamar Christina <tamar.christina@arm.com>
23966
23967 * config/aarch64/aarch64.c (aarch64_rtx_costs): Make sdiv more
23968 expensive than udiv. Remove floating point cases from mod.
23969
23970 2017-06-07 Tamar Christina <tamar.christina@arm.com>
23971
23972 * config/arm/aarch-cost-tables.h (cortexa53_extra_cost):
23973 Increase idiv cost.
23974
23975 2017-06-07 Tamar Christina <tamar.christina@arm.com>
23976
23977 * config/aarch64/aarch64.md
23978 (copysignsf3): Fix mask generation.
23979
23980 2017-06-07 Jakub Jelinek <jakub@redhat.com>
23981
23982 * dumpfile.h (enum tree_dump_index): Rename TDI_generic to
23983 TDI_gimple.
23984 (class dump_manager): Add register_dumps method.
23985 * dumpfile.c: Include langhooks.h.
23986 (dump_files): Use 0 instead of 3/4/5 for TDI_{original,gimple,nested}.
23987 (FIRST_AUTO_NUMBERED_DUMP): Decrease to 1.
23988 (FIRST_ME_AUTO_NUMBERED_DUMP): Define.
23989 (dump_manager::dump_register): Start with 512 entries instead of 32.
23990 (dump_manager::register_dumps): New method.
23991 * toplev.c (general_init): Instead of invoking register_dumps
23992 langhook, invoke register_dumps method on the dump manager.
23993 * gimplify.c (gimplify_function_tree): Use TDI_gimple instead of
23994 TDI_generic.
23995
23996 2017-06-07 Richard Sandiford <richard.sandiford@linaro.org>
23997
23998 * doc/md.texi: Clarify the restrictions on a define_insn condition.
23999 Say that # requires an associated define_split to exist, and that
24000 the define_split must be suitable for use after register allocation.
24001
24002 2017-06-06 Jan Hubicka <hubicka@ucw.cz>
24003
24004 * cfgbuild.c (find_bb_boundaries): Initialize profile of split blocks.
24005 (compute_outgoing_frequencies): Also initialize zero counts.
24006 (find_many_sub_basic_blocks): Do not produce uninitialized profile
24007 around loops; preserve more of profile when nothing changes.
24008
24009 2017-06-06 Jim Wilson <jim.wilson@linaro.org>
24010
24011 * config/aarch64/aarch64-cost-tables.h (qdf24xx_extra_costs): Move to
24012 here.
24013 * config/arm/aarch-cost-tables.h (qdf24xx_extra_costs): From here.
24014 * config/arm/arm-cpu-cdata.h: Regenerate.
24015 * config/arm/arm-cpu-data.h, config/arm/arm-cpu.h: Likewise.
24016 * config/arm/arm-tables.opt, config/arm/arm-tune.md: Likewise.
24017 * config/arm/arm-cpus.in: Delete falkor and qdf24xx entries.
24018 * config/arm/arm.c (arm_qdf24xx_tune): Delete.
24019 * config/arm/bpabi.h (BE8_LINK_SPEC): Delete falkor and qdf24xx
24020 support.
24021 * config/arm/t-aprofile (MULTILIB_MATCHES): Delete falkor and qdf24xx
24022 support.
24023 * config/arm/t-rmprofile: Likewise.
24024 * doc/invoke.texi (ARM Options): Drop falkor and qdf24xx support.
24025
24026 2017-06-06 David S. Miller <davem@davemloft.net>
24027
24028 PR target/80968
24029 * config/sparc/sparc.c (sparc_expand_prologue): Emit frame
24030 blockage if function uses alloca.
24031
24032 2017-06-06 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
24033
24034 * tree-ssa-loop-prefetch.c (struct mem_ref_group, struct mem_ref):
24035 New "uid" fields to hold pretty-print IDs of group and ref.
24036 Memory references are now identified as <group_id>:<ref_id>
24037 instead of using [random] addresses.
24038 (dump_mem_details): Simplify, no functional change.
24039 (dump_mem_ref): Simplify and make output more concise.
24040 Replace couple of fprintf's throughout code with calls to dump_mem_ref.
24041 (find_or_create_group): Initialize group uid.
24042 (record_ref): Initialize ref uid. Improve debug output.
24043 (prune_group_by_reuse, should_issue_prefetch_p,)
24044 (should_issue_prefetch_p, schedule_prefetches, issue_prefetch_ref,)
24045 (mark_nontemporal_store, determine_loop_nest_reuse):
24046 Improve debug output.
24047
24048 2017-06-06 Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
24049
24050 * dbgcnt.def (prefetch): New debug counter.
24051 * tree-ssa-loop-prefetch.c (dbgcnt.h): New include.
24052 (schedule_prefetches): Stop issueing prefetches if debug counter
24053 tripped.
24054
24055 2017-06-06 Tom de Vries <tom@codesourcery.com>
24056
24057 * doc/sourcebuild.texi (Testsuites, C Language Testsuites,
24058 gcc.c-torture/compile): Remove mention of NO_LABEL_VALUES in fixme.
24059
24060 2017-06-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24061
24062 * config/aarch64/atomics.md (atomic_compare_and_swap<mode> expander):
24063 Use aarch64_reg_or_zero predicate for operand 4.
24064 (aarch64_compare_and_swap<mode> define_insn_and_split):
24065 Use aarch64_reg_or_zero predicate for operand 3. Add 'Z' constraint.
24066 (aarch64_store_exclusive<mode>): Likewise for operand 2.
24067
24068 2017-06-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
24069
24070 * config/arm/arm.c (arm_compute_save_reg_mask): Rename into ...
24071 (arm_compute_save_core_reg_mask): This.
24072 (thumb1_compute_save_reg_mask): Rename into ...
24073 (thumb1_compute_save_core_reg_mask): This.
24074 (arm_compute_save_reg0_reg12_mask): Adapt comment.
24075 (arm_compute_frame_layout): Likewise.
24076
24077 2017-06-06 Richard Biener <rguenther@suse.de>
24078
24079 PR tree-optimization/80974
24080 * tree-ssa-sccvn.c (set_ssa_val_to): Do not change but only
24081 keep or clear leaders SSA info.
24082
24083 2017-06-06 Tom de Vries <tom@codesourcery.com>
24084
24085 * config/nvptx/nvptx.c (split_mode_p): New function.
24086 (nvptx_declare_function_name, nvptx_print_operand): Use split_mode_p.
24087
24088 2017-06-06 Tom de Vries <tom@codesourcery.com>
24089
24090 * config/nvptx/nvptx.c (nvptx_print_operand): Use maybe_split_mode.
24091
24092 2017-06-06 Jan Hubicka <hubicka@ucw.cz>
24093
24094 PR bootstrap/80978
24095 * tree-cfg.c (execute_fixup_cfg): Fix condition on when to rescale
24096 profile.
24097
24098 2017-06-06 Jan Hubicka <hubicka@ucw.cz>
24099
24100 * shrink-wrap.c (handle_simple_exit): Update profile.
24101 (try_shrink_wrapping): Upate profile.
24102
24103 2017-06-06 Jan Hubicka <hubicka@ucw.cz>
24104
24105 * predict.c (tree_estimate_probability_bb): Add LOCAL_ONLY.
24106 (tree_guess_outgoing_edge_probabilities): New.
24107 * predict.h (tree_guess_outgoing_edge_probabilities): Declare.
24108 * tree-cfg.c (gimple_find_sub_bbs): Propagate profile.
24109
24110 2017-06-06 Jan Hubicka <hubicka@ucw.cz>
24111
24112 * ipa-split.c (split_function): Initialize return bb profile.
24113
24114 2017-06-06 Jan Hubicka <hubicka@ucw.cz>
24115
24116 * profile.c (compute_branch_probabilities): Also initialize
24117 EXIT_BLOCK profile.
24118
24119 2017-06-06 Richard Biener <rguenther@suse.de>
24120
24121 PR tree-optimization/80928
24122 * tree-vect-loop.c (vect_update_vf_for_slp): Amend dumps.
24123 (vect_analyze_loop_operations): Properly guard analysis for
24124 pure SLP case.
24125 (vect_transform_loop): Likewise.
24126 (vect_analyze_loop_2): Also reset SLP type on PHIs.
24127 (vect_model_induction_cost): Do not cost for pure SLP.
24128 (vectorizable_induction): Pass in SLP node, implement SLP vectorization
24129 of induction in inner loop vectorization.
24130 * tree-vect-slp.c (vect_create_new_slp_node): Handle PHIs.
24131 (vect_get_and_check_slp_defs): Handle vect_induction_def.
24132 (vect_build_slp_tree): Likewise. Handle PHIs as terminating the
24133 recursion.
24134 (vect_analyze_slp_cost_1): Cost induction.
24135 (vect_detect_hybrid_slp_stmts): Handle PHIs.
24136 (vect_get_slp_vect_defs): Likewise.
24137 * tree-vect-stmts.c (vect_analyze_stmt): Handle induction.
24138 (vect_transform_stmt): Handle SLP reductions.
24139 * tree-vectorizer.h (vectorizable_induction): Adjust.
24140
24141 2017-06-05 Michael Meissner <meissner@linux.vnet.ibm.com>
24142
24143 * config/rs6000/rs6000.c (make_resolver_func): Update
24144 init_lowered_empty_function call.
24145
24146 2017-06-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
24147
24148 * doc/invoke.texi: Document the -fprofile-abs-path option.
24149 * common.opt (fprofile-abs-path): New option.
24150 * gcov-io.h (gcov_write_filename): Declare.
24151 * gcov-io.c (gcov_write_filename): New function.
24152 * coverage.c (coverage_begin_function): Use gcov_write_filename.
24153 * profile.c (output_location): Likewise.
24154
24155 2017-06-05 Jan Hubicka <hubicka@ucw.cz>
24156
24157 * shring-wrap.c: Revert accidental commit.
24158
24159 2017-06-05 Volker Reichelt <v.reichelt@netcologne.de>
24160
24161 * doc/invoke.texi (-Wduplicated-branches): Add to warning list.
24162
24163 2017-06-05 Jan Hubicka <hubicka@ucw.cz>
24164
24165 * cfgexpand.c (expand_gimple_tailcall): Initialize profile of
24166 new edge.
24167 * ipa-inline.c (want_inline_self_recursive_call_p): Watch for missing
24168 profile in callgraph edge.
24169 * profile-count.h (apply_probability): If THIS is 0, then result is 0
24170 (apply_scale): Likewise.
24171 * tree-inline.c (copy_bb, copy_edges_for_bb, copy_cfg_body):
24172 Also scale profile when inlining function with zero profile.
24173 (initialize_cfun): Update exit block profile even when it is zero.
24174 * tree-ssa-threadupdate.c (clear_counts_path): Handle correctly case
24175 when profile is read.
24176
24177 2017-06-05 Michael Meissner <meissner@linux.vnet.ibm.com>
24178
24179 * config/rs6000/rs6000.c (toplevel): Include attribs.h.
24180 (CLONE_*): New constants to define the processors we can generate
24181 code for with the target_clone attribute.
24182 (rs6000_clone_map): New array to identify which clone processors
24183 the current program is running on.
24184 (TARGET_COMPARE_VERSION_PRIORITY): Define to enable the
24185 target_clone attribute.
24186 (TARGET_GENERATE_VERSION_DISPATCHER_BODY): Likewise.
24187 (TARGET_GET_FUNCTION_VERSIONS_DISPATCHER): Likewise.
24188 (TARGET_OPTION_FUNCTION_VERSIONS): Likewise.
24189 (cpu_expand_builtin): Add support for target_clone attribute.
24190 (rs6000_valid_attribute_p): Allow "default" attribute.
24191 (get_decl_name): New debug function to simplify printing the
24192 current function name in debugging statements.
24193 (rs6000_clone_priority): New functions to support the target_clone
24194 attribute, and be able to generate code to switch between ISA 2.05
24195 through ISA 3.0 (power6 through power9).
24196 (rs6000_compare_version_priority): Likewise.
24197 (rs6000_get_function_versions_dispatcher): Likewise.
24198 (make_resolver_func): Likewise.
24199 (add_condition_to_bb): Likewise.
24200 (dispatch_function_versions): Likewise.
24201 (rs6000_generate_version_dispatcher_body): Likewise.
24202 (rs6000_can_inline_p): Call get_decl_name for debugging usage.
24203 (fusion_gpr_load_p): Fix a spacing issue.
24204 * doc/extend.texi (Common Function Attributes): Document that the
24205 PowerPC supports the target_clone attribute.
24206
24207 2017-06-05 Thomas Preud'homme <thomas.preudhomme@arm.com>
24208
24209 * config/arm/arm.h: explain F symbol found in description of ARM
24210 register allocation in its legend.
24211
24212 2017-06-05 Jan Hubicka <hubicka@ucw.cz>
24213
24214 * config/mips/frame-header-opt.c: Include profile-count.h.
24215 * config/riscv/riscv.c: Include profile-count.h
24216
24217 2017-06-05 Jan Hubicka <hubicka@ucw.cz>
24218
24219 * tree-ssa-loop-im.c (execute_sm_if_changed): Add FLAG_BBS parameter;
24220 update profile.
24221 (sm_set_flag_if_changed): Add bbs field.
24222 (execute_sm_if_changed_flag_set): Pass BBS.
24223 (execute_sm): Update.
24224
24225 2017-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24226
24227 * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
24228 New pattern.
24229
24230 2017-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24231
24232 * config/aarch64/aarch64.md (sub<mode>3_compare1_imm): New define_insn.
24233 (peephole2): New peephole2 to emit the above.
24234 * config/aarch64/predicates.md (aarch64_sub_immediate): New predicate.
24235
24236 2017-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24237
24238 * config/aarch64/aarch64.c (define_peephole2 above
24239 *sub_<shift>_<mode>): New peephole.
24240
24241 2017-05-23 Jan Hubicka <hubicka@ucw.cz>
24242
24243 * config/i386/i386.c (make_resolver_func): Update.
24244 * Makefile.in: Add profile-count.h and profile-count.o
24245 * auto-profile.c (afdo_indirect_call): Update to new API.
24246 (afdo_set_bb_count): Update.
24247 (afdo_propagate_edge): Update.
24248 (afdo_propagate_circuit): Update.
24249 (afdo_calculate_branch_prob): Update.
24250 (afdo_annotate_cfg): Update.
24251 * basic-block.h: Include profile-count.h
24252 (struct edge_def): Turn count to profile_count.
24253 (struct basic_block_def): Likewie.
24254 (REG_BR_PROB_BASE): Move to profile-count.h
24255 (RDIV): Move to profile-count.h
24256 * bb-reorder.c (max_entry_count): Turn to profile_count.
24257 (find_traces): Update.
24258 (rotate_loop):Update.
24259 (connect_traces):Update.
24260 (sanitize_hot_paths):Update.
24261 * bt-load.c (migrate_btr_defs): Update.
24262 * cfg.c (RDIV): Remove.
24263 (init_flow): Use alloc_block.
24264 (alloc_block): Uninitialize count.
24265 (unchecked_make_edge): Uninitialize count.
24266 (check_bb_profile): Update.
24267 (dump_edge_info): Update.
24268 (dump_bb_info): Update.
24269 (update_bb_profile_for_threading): Update.
24270 (scale_bbs_frequencies_int): Update.
24271 (scale_bbs_frequencies_gcov_type): Update.
24272 (scale_bbs_frequencies_profile_count): New.
24273 * cfg.h (update_bb_profile_for_threading): Update.
24274 (scale_bbs_frequencies_profile_count): Declare.
24275 * cfgbuild.c (compute_outgoing_frequencies): Update.
24276 (find_many_sub_basic_blocks): Update.
24277 * cfgcleanup.c (try_forward_edges): Update.
24278 (try_crossjump_to_edge): Update.
24279 * cfgexpand.c (expand_gimple_tailcall): Update.
24280 (construct_exit_block): Update.
24281 * cfghooks.c (verify_flow_info): Update.
24282 (dump_bb_for_graph): Update.
24283 (split_edge): Update.
24284 (make_forwarder_block): Update.
24285 (duplicate_block): Update.
24286 (account_profile_record): Update.
24287 * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
24288 (get_estimated_loop_iterations): Update.
24289 * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
24290 (single_likely_exit): Update.
24291 * cfgloopmanip.c (scale_loop_profile): Update.
24292 (loopify): Update.
24293 (set_zero_probability): Update.
24294 (lv_adjust_loop_entry_edge): Update.
24295 * cfgrtl.c (force_nonfallthru_and_redirect): Update.
24296 (purge_dead_edges): Update.
24297 (rtl_account_profile_record): Update.
24298 * cgraph.c (cgraph_node::create): Uninitialize count.
24299 (symbol_table::create_edge): Uninitialize count.
24300 (cgraph_update_edges_for_call_stmt_node): Update.
24301 (cgraph_edge::dump_edge_flags): Update.
24302 (cgraph_node::dump): Update.
24303 (cgraph_edge::maybe_hot_p): Update.
24304 * cgraph.h: Include profile-count.h
24305 (create_clone), create_edge, create_indirect_edge): Update.
24306 (cgraph_node): Turn count to profile_count.
24307 (cgraph_edge0: Likewise.
24308 (make_speculative, clone): Update.
24309 (create_edge): Update.
24310 (init_lowered_empty_function): Update.
24311 * cgraphclones.c (cgraph_edge::clone): Update.
24312 (duplicate_thunk_for_node): Update.
24313 (cgraph_node::create_clone): Update.
24314 * cgraphunit.c (cgraph_node::analyze): Update.
24315 (cgraph_node::expand_thunk): Update.
24316 * final.c (dump_basic_block_info): Update.
24317 * gimple-streamer-in.c (input_bb): Update.
24318 * gimple-streamer-out.c (output_bb): Update.
24319 * graphite.c (print_global_statistics): Update.
24320 (print_graphite_scop_statistics): Update.
24321 * hsa-brig.c: Include basic-block.h.
24322 * hsa-dump.c: Include basic-block.h.
24323 * hsa-gen.c (T sum_slice): Update.
24324 (convert_switch_statements):Update.
24325 * hsa-regalloc.c: Include basic-block.h.
24326 * ipa-chkp.c (chkp_produce_thunks): Update.
24327 * ipa-cp.c (struct caller_statistics): Update.
24328 (init_caller_stats): Update.
24329 (gather_caller_stats): Update.
24330 (ipcp_cloning_candidate_p): Update.
24331 (good_cloning_opportunity_p): Update.
24332 (get_info_about_necessary_edges): Update.
24333 (dump_profile_updates): Update.
24334 (update_profiling_info): Update.
24335 (update_specialized_profile): Update.
24336 (perhaps_add_new_callers): Update.
24337 (decide_about_value): Update.
24338 (ipa_cp_c_finalize): Update.
24339 * ipa-devirt.c (struct odr_type_warn_count): Update.
24340 (struct decl_warn_count): Update.
24341 (struct final_warning_record): Update.
24342 (possible_polymorphic_call_targets): Update.
24343 (ipa_devirt): Update.
24344 * ipa-fnsummary.c (redirect_to_unreachable): Update.
24345 * ipa-icf.c (sem_function::merge): Update.
24346 * ipa-inline-analysis.c (do_estimate_edge_time): Update.
24347 * ipa-inline.c (compute_uninlined_call_time): Update.
24348 (compute_inlined_call_time): Update.
24349 (want_inline_small_function_p): Update.
24350 (want_inline_self_recursive_call_p): Update.
24351 (edge_badness): Update.
24352 (lookup_recursive_calls): Update.
24353 (recursive_inlining): Update.
24354 (inline_small_functions): Update.
24355 (dump_overall_stats): Update.
24356 (dump_inline_stats): Update.
24357 * ipa-profile.c (ipa_profile_generate_summary): Update.
24358 (ipa_propagate_frequency): Update.
24359 (ipa_profile): Update.
24360 * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
24361 * ipa-utils.c (ipa_merge_profiles): Update.
24362 * loop-doloop.c (doloop_modify): Update.
24363 * loop-unroll.c (report_unroll): Update.
24364 (unroll_loop_runtime_iterations): Update.
24365 * lto-cgraph.c (lto_output_edge): Update.
24366 (lto_output_node): Update.
24367 (input_node): Update.
24368 (input_edge): Update.
24369 (merge_profile_summaries): Update.
24370 * lto-streamer-in.c (input_cfg): Update.
24371 * lto-streamer-out.c (output_cfg): Update.
24372 * mcf.c (create_fixup_graph): Update.
24373 (adjust_cfg_counts): Update.
24374 (sum_edge_counts): Update.
24375 * modulo-sched.c (sms_schedule): Update.
24376 * postreload-gcse.c (eliminate_partially_redundant_load): Update.
24377 * predict.c (maybe_hot_count_p): Update.
24378 (probably_never_executed): Update.
24379 (dump_prediction): Update.
24380 (combine_predictions_for_bb): Update.
24381 (propagate_freq): Update.
24382 (handle_missing_profiles): Update.
24383 (counts_to_freqs): Update.
24384 (rebuild_frequencies): Update.
24385 (force_edge_cold): Update.
24386 * predict.h: Include profile-count.h
24387 (maybe_hot_count_p, counts_to_freqs): UPdate.
24388 * print-rtl-function.c: Do not include cfg.h
24389 * print-rtl.c: Include basic-block.h
24390 * profile-count.c: New file.
24391 * profile-count.h: New file.
24392 * profile.c (is_edge_inconsistent): Update.
24393 (correct_negative_edge_counts): Update.
24394 (is_inconsistent): Update.
24395 (set_bb_counts): Update.
24396 (read_profile_edge_counts): Update.
24397 (compute_frequency_overlap): Update.
24398 (compute_branch_probabilities): Update; Initialize and deinitialize
24399 gcov_count tables.
24400 (branch_prob): Update.
24401 * profile.h (bb_gcov_counts, edge_gcov_counts): New.
24402 (edge_gcov_count): New.
24403 (bb_gcov_count): New.
24404 * shrink-wrap.c (try_shrink_wrapping): Update.
24405 * tracer.c (better_p): Update.
24406 * trans-mem.c (expand_transaction): Update.
24407 (ipa_tm_insert_irr_call): Update.
24408 (ipa_tm_insert_gettmclone_call): Update.
24409 * tree-call-cdce.c: Update.
24410 * tree-cfg.c (gimple_duplicate_sese_region): Update.
24411 (gimple_duplicate_sese_tail): Update.
24412 (gimple_account_profile_record): Update.
24413 (execute_fixup_cfg): Update.
24414 * tree-inline.c (copy_bb): Update.
24415 (copy_edges_for_bb): Update.
24416 (initialize_cfun): Update.
24417 (freqs_to_counts): Update.
24418 (copy_cfg_body): Update.
24419 (expand_call_inline): Update.
24420 * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
24421 * tree-ssa-loop-ivcanon.c (unloop_loops): Update.
24422 (try_unroll_loop_completely): Update.
24423 (try_peel_loop): Update.
24424 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
24425 * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Update.
24426 * tree-ssa-loop-split.c (connect_loops): Update.
24427 * tree-ssa-loop-unswitch.c (hoist_guard): Update.
24428 * tree-ssa-reassoc.c (branch_fixup): Update.
24429 * tree-ssa-tail-merge.c (replace_block_by): Update.
24430 * tree-ssa-threadupdate.c (create_block_for_threading): Update.
24431 (compute_path_counts): Update.
24432 (update_profile): Update.
24433 (recompute_probabilities): Update.
24434 (update_joiner_offpath_counts): Update.
24435 (estimated_freqs_path): Update.
24436 (freqs_to_counts_path): Update.
24437 (clear_counts_path): Update.
24438 (ssa_fix_duplicate_block_edges): Update.
24439 (duplicate_thread_path): Update.
24440 * tree-switch-conversion.c (case_bit_test_cmp): Update.
24441 (struct switch_conv_info): Update.
24442 * tree-tailcall.c (decrease_profile): Update.
24443 * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
24444 * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
24445 * value-prof.c (check_counter): Update.
24446 (gimple_divmod_fixed_value): Update.
24447 (gimple_mod_pow2): Update.
24448 (gimple_mod_subtract): Update.
24449 (gimple_ic_transform): Update.
24450 (gimple_stringop_fixed_value): Update.
24451 * value-prof.h (gimple_ic): Update.
24452
24453 2017-06-02 Carl Love <cel@us.ibm.com>
24454
24455 * config/rs6000/rs6000-c: Add support for built-in functions
24456 vector double vec_doublee (vector signed int);
24457 vector double vec_doublee (vector unsigned int);
24458 vector double vec_doublee (vector float);
24459 vector double vec_doubleh (vector signed int);
24460 vector double vec_doubleh (vector unsigned int);
24461 vector double vec_doubleh (vector float);
24462 vector double vec_doublel (vector signed int);
24463 vector double vec_doublel (vector unsigned int);
24464 vector double vec_doublel (vector float);
24465 vector double vec_doubleo (vector signed int);
24466 vector double vec_doubleo (vector unsigned int);
24467 vector double vec_doubleo (vector float);.
24468 * config/rs6000/rs6000-builtin.def: Add definitions for DOUBLEE,
24469 DOUBLEO, DOUBLEH, DOUBLEL, UNS_DOUBLEO, UNS_DOUBLEE, UNS_DOUBLEH,
24470 UNS_DOUBLEL.
24471 * config/rs6000/altivec.md: Add code generator for doublee<mode>2,
24472 unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2, doubleh<mode>2,
24473 unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2, add mode attribute
24474 VS_sxwsp.
24475 * config/rs6000/altivec.h: Add define for vec_doublee, vec_doubleo,
24476 vec_doublel, vec_doubleh.
24477 * doc/extend.texi: Update the built-in documentation file for the
24478 new built-in functions.
24479
24480 2017-06-02 David Malcolm <dmalcolm@redhat.com>
24481
24482 PR jit/80954
24483 * ipa-inline-analysis.c (free_growth_caches): Set
24484 edge_removal_hook_holder to NULL after removing it.
24485
24486 2017-06-02 Sudakshina Das <sudi.das@arm.com>
24487
24488 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Return CC_SWP for
24489 comparision with zero.
24490
24491 2017-06-02 Will Schmidt <will_schmidt@vnet.ibm.com>
24492 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
24493 for early expansion of vec_min and vec_max builtins.
24494 (builtin_function_type): Add min/max unsigned variants to those
24495 identified as having unsigned arguments.
24496
24497 2017-06-02 Olivier Hainque <hainque@adacore.com>
24498
24499 * config/vx-common.h (DWARF_UNWIND_INFO): Switch #define to 1.
24500
24501 2017-06-02 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24502
24503 * config/aarch64/aarch64-simd.md (*aarch64_simd_vec_copy_lane<mode>):
24504 Use VALL_F16 iterator rather than VALL.
24505
24506 2017-06-02 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24507
24508 * config/aarch64/aarch64.c (aarch64_split_compare_and_swap):
24509 Emit CBNZ inside loop when doing a strong exchange and comparing
24510 against zero. Generate the CC flags after the loop.
24511
24512 2017-06-02 David Edelsohn <dje.gcc@gmail.com>
24513
24514 * dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE_STR): New.
24515 (dl_section_ref): New.
24516 (dwarf2out_finish): Copy debug_line_section_label to dl_section_ref.
24517 On AIX, append an expression to subtract the size of the
24518 section length to dl_section_ref.
24519
24520 2017-06-02 Will Schmidt <will_schmidt@vnet.ibm.com>
24521
24522 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
24523 for early expansion of vector absolute builtins.
24524
24525 2017-06-02 Richard Biener <rguenther@suse.de>
24526
24527 * tree-vect-slp.c (vect_detect_hybrid_slp_2): Match up
24528 what we consider a relevant use stmt with vect_detect_hybrid_slp_stmts.
24529
24530 2017-06-02 Richard Biener <rguenther@suse.de>
24531
24532 PR tree-optimization/80948
24533 * tree-tailcall.c (find_tail_calls): Track stmts to move in
24534 stmt order as well.
24535
24536 2017-06-02 Richard Biener <rguenther@suse.de>
24537
24538 * tree-vect-loop.c (vect_analyze_loop_operations): Not relevant
24539 PHIs are ok.
24540 * tree-vect-stmts.c (process_use): Do not mark backedge defs
24541 for inductions as relevant.
24542
24543 2017-06-02 Richard Biener <rguenther@suse.de>
24544
24545 * tree-vect-loop.c (get_initial_def_for_induction): Inline into ...
24546 (vectorizable_induction): ... this. Remove dead code.
24547
24548 2017-06-02 Eric Botcazou <ebotcazou@adacore.com>
24549
24550 * builtins. (expand_builtin_alloca): Remove second parameter and
24551 infer its value from the first parameter instead.
24552 (expand_builtin) <BUILT_IN_ALLOCA>: Adjust call to above.
24553
24554 2017-06-02 Jakub Jelinek <jakub@redhat.com>
24555
24556 PR rtl-optimization/80903
24557 * loop-doloop.c (add_test): Unshare sequence.
24558
24559 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
24560
24561 * doc/invoke.texi: Document the -Wsizeof-pointer-div warning.
24562
24563 2017-06-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
24564
24565 * config/i386/i386.c (x86_64_ms_sysv_extra_clobbered_registers): Make
24566 static.
24567 (xlogue_layout::get_stack_space_used, xlogue_layout::s_instances,
24568 xlogue_layout::get_instance, logue_layout::xlogue_layout,
24569 sp_valid_at, fp_valid_at, choose_basereg): Formatting.
24570 (xlogue_layout::get_stub_rtx): Make static.
24571 (xlogue_layout::get_stub_name): Avoid const-cast, make static.
24572 (xlogue_layout::compute_stub_managed_regs): Rename to...
24573 (xlogue_layout::count_stub_managed_regs): ...this.
24574 (xlogue_layout::is_stub_managed_reg): New function.
24575 (xlogue_layout::m_stub_names): Rename to...
24576 (xlogue_layout::s_stub_names): ...this, make static.
24577 (xlogue_layout::STUB_INDEX_OFFSET, xlogue_layout::MIN_REGS,
24578 xlogue_layout::MAX_REGS, xlogue_layout::MAX_EXTRA_REGS,
24579 xlogue_layout::VARIANT_COUNT, xlogue_layout::STUB_NAME_MAX_LEN,
24580 xlogue_layout::s_stub_names): Instantiate statics.
24581 (stub_managed_regs): Remove.
24582 (ix86_save_reg): Use xlogue_layout::compute_stub_managed_regs.
24583 (disable_call_ms2sysv_xlogues): Rename to...
24584 (warn_once_call_ms2sysv_xlogues): ...this, and warn only once.
24585 (ix86_initial_elimination_offset, ix86_expand_call): Fix call_ms2sysv
24586 warning logic.
24587 (ix86_static_chain): Make sure that ix86_static_chain_on_stack can't
24588 change after reload_completed.
24589 (ix86_can_use_return_insn_p): Use the ix86_frame data structure
24590 directly.
24591 (ix86_expand_prologue): Likewise.
24592 (ix86_expand_epilogue): Likewise.
24593 (ix86_expand_split_stack_prologue): Likewise.
24594 (ix86_compute_frame_layout): Remove frame parameter ...
24595 (TARGET_COMPUTE_FRAME_LAYOUT): ... and export it as a target hook.
24596 (ix86_finalize_stack_realign_flags): Call ix86_compute_frame_layout
24597 only if necessary.
24598 (ix86_init_machine_status): Don't set use_fast_prologue_epilogue_nregs.
24599 (ix86_frame): Move from here ...
24600 * config/i386/i386.h (ix86_frame): ... to here.
24601 (machine_function): Remove use_fast_prologue_epilogue_nregs, cache the
24602 complete ix86_frame data structure instead. Remove some_ld_name.
24603
24604 2017-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
24605
24606 * dwarf2out.c (dwarf2out_late_global_decl): Add locations for
24607 symbols that hold a DECL_VALUE_EXPR.
24608
24609 2017-06-01 Martin Jambor <mjambor@suse.cz>
24610
24611 PR tree-optimization/80898
24612 * tree-sra.c (process_subtree_disqualification): Removed.
24613 (disqualify_candidate): Do not acll
24614 process_subtree_disqualification.
24615 (subtree_mark_written_and_enqueue): New function.
24616 (propagate_all_subaccesses): Set grp_write of LHS subtree if the
24617 RHS has been disqualified and re-queue LHS if necessary. Apart
24618 from that, ignore disqualified RHS.
24619
24620 2017-06-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24621
24622 * config/s390/s390.c (s390_emit_epilogue): Disable early return
24623 address fetch for z10 or later.
24624
24625 2017-06-01 Claudiu Zissulescu <claziss@synopsys.com>
24626
24627 * config/arc/arc.md (tst_movb): Add guard when splitting.
24628
24629 2017-06-01 Claudiu Zissulescu <claziss@synopsys.com>
24630
24631 * config/arc/arc.c (arc_can_eliminate): Test against
24632 arc_frame_pointer_needed.
24633
24634 2017-06-01 Claudiu Zissulescu <claziss@synopsys.com>
24635
24636 * config/arc/arc.c (arc_expand_prologue): Emit a special barrier
24637 to prevent store reordering.
24638 * config/arc/arc.md (UNSPEC_ARC_STKTIE): Define.
24639 (type): Add block type.
24640 (stack_tie): Define special instruction to be used in
24641 expand_prologue.
24642
24643 2017-06-01 Claudiu Zissulescu <claziss@synopsys.com>
24644
24645 * config/arc/arc.md (commutative_binary_comparison): Remove 'I'
24646 constraint. It is not valid for the pattern.
24647 (noncommutative_binary_comparison): Likewise.
24648
24649 2017-06-01 Claudiu Zissulescu <claziss@synopsys.com>
24650
24651 * config/arc/simdext.md (movv2hi_insn): Change predicate to avoid
24652 scaled addresses.
24653
24654 2017-06-01 Claudiu Zissulescu <claziss@synopsys.com>
24655
24656 * config/arc/arc.c (arc_conditional_register_usage): Allow r30 to
24657 be used by the reg-alloc.
24658
24659 2017-06-01 Claudiu Zissulescu <claziss@synopsys.com>
24660
24661 * config/arc/arc.md (mulsi3): Avoid use of hard registers before
24662 reg-alloc when having mul64 or mul32x16 instructions.
24663 (mulsidi3): Likewise.
24664 (umulsidi3): Likewise.
24665 (mulsi32x16): New pattern.
24666 (mulsi64): Likewise.
24667 (mulsidi64): Likewise.
24668 (umulsidi64): Likewise.
24669 (MUL32x16_REG): Define.
24670 (mul64_600): Use MUL32x16_REG.
24671 (mac64_600): Likewise.
24672 (umul64_600): Likewise.
24673 (umac64_600): Likewise.
24674
24675 2017-06-01 Claudiu Zissulescu <claziss@synopsys.com>
24676
24677 * config/arc/arc.md (mulsi3_700): Make it commutative.
24678
24679 2017-06-01 Jose E. Marchesi <jose.marchesi@oracle.com>
24680
24681 * config/sparc/sparc.md (*zero_extendsidi2_insn_sp64): Set insn
24682 type for movstouw.
24683 (*sign_extendsidi2_insn): Likewise for movstosw.
24684
24685 2017-06-01 Pierre-Marie de Rodat <derodat@adacore.com>
24686
24687 * dwarf2out.c (get_discr_value): Call the get_debug_type hook on
24688 the type of the input discriminant value. Convert the
24689 discriminant value of signedness vary.
24690
24691 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
24692
24693 * doc/invoke.texi (-Wcatch-value): Document new shortcut.
24694 Add to -Wall section.
24695
24696 2017-06-01 Richard Biener <rguenther@suse.de>
24697
24698 PR middle-end/66313
24699 * fold-const.c (fold_plusminus_mult_expr): If the factored
24700 factor may be zero use a wrapping type for the inner operation.
24701 * tree-tailcall.c (independent_of_stmt_p): Pass in to_move bitmap
24702 and handle moved defs.
24703 (process_assignment): Properly guard the unary op case. Return a
24704 tri-state indicating that moving the stmt before the call may allow
24705 to continue. Pass through to_move.
24706 (find_tail_calls): Handle moving unrelated defs before
24707 the call.
24708
24709 2017-05-31 Segher Boessenkool <segher@kernel.crashing.org>
24710
24711 PR target/80618
24712 * config/rs6000/vector.md (*vector_uneq<mode>): Write the nor in the
24713 splitter result in the canonical way.
24714
24715 2017-05-31 Uros Bizjak <ubizjak@gmail.com>
24716
24717 * config/i386/i386.md (*zero_extendsidi2): Enable alternative (?r, *Yj)
24718 also for 32bit target. Update insn attributes.
24719 (zero-extendsidi2 splitter): Allow all registers for operand 1.
24720
24721 2017-05-31 Sebastian Peryt <sebastian.peryt@intel.com>
24722
24723 * config/i386/avx512fintrin.h (_mm_mask_max_sd)
24724 (_mm_maskz_max_sd, _mm_mask_max_ss, _mm_maskz_max_ss)
24725 (_mm_mask_min_sd, _mm_maskz_min_sd, _mm_mask_min_ss)
24726 (_mm_maskz_min_ss): New intrinsics.
24727
24728 2017-05-31 Martin Liska <mliska@suse.cz>
24729
24730 * tree-vect-loop.c (vect_create_epilog_for_reduction):
24731 Change comment style to one we normally use.
24732 (vectorizable_reduction): Likewise.
24733 (vectorizable_induction): Likewise.
24734 * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
24735 (vectorizable_call): Likewise.
24736 (vectorizable_simd_clone_call): Likewise.
24737 (vectorizable_conversion): Likewise.
24738 (vectorizable_assignment): Likewise.
24739 (vectorizable_shift): Likewise.
24740 (vectorizable_operation): Likewise.
24741 (vectorizable_store): Likewise.
24742 (vectorizable_load): Likewise.
24743 * tree-vectorizer.h: Likewise.
24744
24745 2017-05-31 Alexander Monakov <amonakov@ispras.ru>
24746
24747 * passes.c (emergency_dump_function): New.
24748 * tree-pass.h (emergency_dump_function): Declare.
24749 * plugin.c (plugins_internal_error_function): Remove.
24750 * plugin.h (plugins_internal_error_function): Remove declaration.
24751 * toplev.c (internal_error_function): New static function. Use it...
24752 (general_init): ...here.
24753
24754 2017-05-31 Graham Markall <graham.markall@embecosm.com>
24755
24756 * config/arc/arc.c (arc_print_operand): Handle constant operands.
24757 (arc_rtx_costs): Add costs for new patterns.
24758 * config/arc/arc.md: Additional *add_n and *sub_n patterns.
24759 * config/arc/predicates.md: Add _1_2_3_operand predicate.
24760
24761 2017-05-31 Richard Sandiford <richard.sandiford@linaro.org>
24762
24763 * tree-ssa-strlen.c (get_next_strinfo): New function.
24764 (get_stridx_plus_constant): Use it.
24765 (zero_length_string): Likewise.
24766 (adjust_related_strinfos): Likewise.
24767 (adjust_last_stmt): Likewise.
24768
24769 2017-05-31 Richard Biener <rguenther@suse.de>
24770
24771 PR target/80880
24772 * config/i386/i386.c (ix86_expand_builtin): Remove assert
24773 for arg being an SSA name when expanding IX86_BUILTIN_BNDRET.
24774
24775 2017-05-31 Richard Sandiford <richard.sandiford@linaro.org>
24776
24777 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Remove
24778 loop_vinfo argument and use of dependence distance vectors.
24779 Check instead whether the two references differ only in their
24780 initial value and assume that they have the same alignment if the
24781 difference is a multiple of the vector alignment.
24782 (vect_analyze_data_refs_alignment): Update call accordingly.
24783
24784 2017-05-31 Martin Liska <mliska@suse.cz>
24785
24786 PR target/79155
24787 * config/i386/cpuid.h: Fix typo in a comment in cpuid.h.
24788
24789 2017-05-31 Bin Cheng <bin.cheng@arm.com>
24790
24791 * tree-vect-loop-manip.c (create_intersect_range_checks_index)
24792 (create_intersect_range_checks): Move from ...
24793 * tree-data-ref.c (create_intersect_range_checks_index)
24794 (create_intersect_range_checks): ... to here.
24795 (create_runtime_alias_checks): New function factored from ...
24796 * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): ...
24797 here. Call above function.
24798 * tree-data-ref.h (create_runtime_alias_checks): New function.
24799
24800 2017-05-31 Bin Cheng <bin.cheng@arm.com>
24801
24802 * tree-data-ref.c (prune_runtime_alias_test_list): Relax minimal
24803 segment length for dr_b and compute it in wide_int.
24804
24805 2017-05-31 Richard Biener <rguenther@suse.de>
24806
24807 PR tree-optimization/80906
24808 * graphite-isl-ast-to-gimple.c (copy_loop_close_phi_nodes): Get
24809 and pass through iv_map.
24810 (copy_bb_and_scalar_dependences): Adjust.
24811 (translate_pending_phi_nodes): Likewise.
24812 (copy_loop_close_phi_args): Handle code-generating IVs instead
24813 of ICEing.
24814
24815 2017-05-30 David Malcolm <dmalcolm@redhat.com>
24816
24817 * diagnostic-color.c (color_dict): Add "type-diff".
24818 (parse_gcc_colors): Update comment.
24819 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
24820 -fdiagnostics-show-template-tree and -fno-elide-type.
24821 (GCC_COLORS): Add type-diff to example.
24822 (type-diff=): New.
24823 (-fdiagnostics-show-template-tree): New.
24824 (-fno-elide-type): New.
24825 * pretty-print.c (pp_format): Pass quote and formatters[argno] to
24826 the pp_format_decoder callback. Call any m_format_postprocessor's
24827 "handle" method.
24828 (pretty_printer::pretty_printer): Initialize
24829 m_format_postprocessor.
24830 (pretty_printer::~pretty_printer): Delete any
24831 m_format_postprocessor.
24832 * pretty-print.h (printer_fn): Add bool and const char ** parameters.
24833 (class format_postprocessor): New class.
24834 (struct pretty_printer::format_decoder): Document the new parameters.
24835 (struct pretty_printer::m_format_postprocessor): New field.
24836 * tree-diagnostic.c (default_tree_printer): Update for new
24837 bool and const char ** params.
24838 * tree-diagnostic.h (default_tree_printer): Likewise.
24839
24840 2017-05-30 Segher Boessenkool <segher@kernel.crashing.org>
24841
24842 * config/rs6000/predicates.md (cc_reg_not_micro_cr0_operand): Delete.
24843 (lwa_operand): Delete rs6000_gen_cell_microcode test.
24844 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
24845 rs6000_gen_cell_microcode code.
24846 (rs6000_final_prescan_insn): Delete.
24847 (rs6000_opt_vars): Delete the "gen-cell-microcode" and
24848 "warn-cell-microcode" entries.
24849 * config/rs6000/rs6000.h (FINAL_PRESCAN_INSN): Delete.
24850 * config/rs6000/rs6000.md: Delete rs6000_gen_cell_microcode tests
24851 throughout. Change cc_reg_not_micro_cr0_operand to
24852 cc_reg_not_cr0_operand throughout.
24853 (*extendhi<mode>2_noload): Delete.
24854 * config/rs6000/rs6000.opt (mgen-cell-microcode): Replace by stub.
24855 (mwarn-cell-microcode): Delete.
24856 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete
24857 -mgen-cell-microcode and -mwarn-cell-microcode.
24858
24859 2017-05-30 Uros Bizjak <ubizjak@gmail.com>
24860
24861 PR target/80833
24862 * config/i386/constraints.md (Yd): New constraint.
24863 (Ye): Ditto.
24864 * config/i386/i386.md (*movti_internal): Add (?r, Ye)
24865 and (?Yd, r) alternatives. Update insn attributes.
24866 * config/i386/i386.md (*movti_internal): Add (?r, *Ye)
24867 and (?*Yd, r) alternatives. Update insn attributes.
24868 (double-mode inter-unit splitters): Add new GR<->XMM splitters.
24869
24870 2017-05-30 Pierre-Marie de Rodat <derodat@adacore.com>
24871
24872 * gimplify.c (gimplify_modify_expr): Don't create a
24873 DECL_DEBUG_EXPR link if *FROM_P does not belong to the current
24874 function.
24875
24876 2017-05-30 Wilco Dijkstra <wdijkstr@arm.com>
24877
24878 * config/arm/arm-builtins.c (arm_expand_builtin): Remove const.
24879
24880 2017-05-30 Richard Biener <rguenther@suse.de>
24881
24882 * tree-vectorizer.h (struct _stmt_vec_info): Add reduc_type
24883 and reduc_def fields.
24884 (STMT_VINFO_REDUC_TYPE): New define.
24885 (STMT_VINFO_REDUC_DEF): Likewise.
24886 (vect_force_simple_reduction): Adjust prototype.
24887 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Adjust.
24888 (vect_is_simple_reduction): Remove check_reduction argument.
24889 (vect_force_simple_reduction): Adjust and set
24890 STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
24891 (vectorizable_reduction): Do not re-do reduction analysis
24892 but use STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
24893 * tree-parloops.c (gather_scalar_reductions): Adjust.
24894
24895 2017-05-30 Richard Biener <rguenther@suse.de>
24896
24897 PR middle-end/80901
24898 * cfgexpand.c (expand_gimple_cond): Match up loop fixup with
24899 split_edge code.
24900
24901 2017-05-24 Robin Dapp <rdapp@linux.vnet.ibm.com>
24902
24903 * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs):
24904 Introduce unknown_misalignment parameter and remove vf.
24905 (vect_peeling_hash_get_lowest_cost):
24906 Pass unknown_misalignment parameter.
24907 (vect_enhance_data_refs_alignment):
24908 Fix unsupportable data ref treatment.
24909
24910 2017-05-30 Robin Dapp <rdapp@linux.vnet.ibm.com>
24911
24912 * tree-vect-data-refs.c (vect_get_data_access_cost):
24913 Workaround for SLP handling.
24914 (vect_enhance_data_refs_alignment):
24915 Compute costs for doing no peeling at all, compare to the best
24916 peeling costs so far and avoid peeling if cheaper.
24917
24918 2017-05-30 Robin Dapp <rdapp@linux.vnet.ibm.com>
24919
24920 * tree-vect-data-refs.c (vect_peeling_hash_choose_best_peeling):
24921 Return peeling info and set costs to zero for unlimited cost
24922 model.
24923 (vect_enhance_data_refs_alignment): Also inspect all datarefs
24924 with unknown misalignment. Compute and costs for unknown
24925 misalignment, compare them to the costs for known misalignment
24926 and choose the cheapest for peeling.
24927
24928 2017-05-30 Robin Dapp <rdapp@linux.vnet.ibm.com>
24929
24930 * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Rename.
24931 (vect_get_peeling_costs_all_drs): Create function.
24932 (vect_peeling_hash_get_lowest_cost):
24933 Use vect_get_peeling_costs_all_drs.
24934 (vect_peeling_supportable): Create function.
24935 (vect_enhance_data_refs_alignment): Use vect_peeling_supportable.
24936
24937 2017-05-30 Robin Dapp <rdapp@linux.vnet.ibm.com>
24938
24939 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Create
24940 DR_HAS_NEGATIVE_STEP.
24941 (vect_update_misalignment_for_peel): Define DR_MISALIGNMENT.
24942 (vect_enhance_data_refs_alignment): Use.
24943 (vect_duplicate_ssa_name_ptr_info): Use.
24944 * tree-vectorizer.h (dr_misalignment): Use.
24945 (known_alignment_for_access_p): Use.
24946
24947 2017-05-30 Jozef Lawrynowicz <jozef.l@somniumtech.com>
24948
24949 PR target/78838
24950 * config/msp430/msp430.c (gen_prefix): Return NULL when section name is
24951 .lowtext.
24952 (has_section_name): New function.
24953
24954 2017-05-30 Martin Liska <mliska@suse.cz>
24955
24956 PR other/80909
24957 * auto-profile.c (get_function_decl_from_block): Fix
24958 parenthesis.
24959
24960 2017-05-30 Richard Biener <rguenther@suse.de>
24961
24962 PR middle-end/80876
24963 * cfgexpand.c (expand_gimple_cond): Fixup preserving loops again.
24964
24965 2017-05-30 Martin Liska <mliska@suse.cz>
24966
24967 * dumpfile.c: Use newly added macro DUMP_FILE_INFO.
24968 * dumpfile.h (struct dump_file_info): Remove ctors.
24969
24970 2017-05-30 Martin Liska <mliska@suse.cz>
24971
24972 * predict.def: Fix GNU coding style.
24973
24974 2017-05-29 Max Filippov <jcmvbkbc@gmail.com>
24975
24976 * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
24977 Mark 'to' argument with ATTRIBUTE_UNUSED.
24978
24979 2017-05-29 Max Filippov <jcmvbkbc@gmail.com>
24980
24981 * config/xtensa/xtensa.c (xtensa_emit_call): Use
24982 HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
24983 (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
24984 format string.
24985
24986 2017-05-29 Eric Botcazou <ebotcazou@adacore.com>
24987
24988 * doc/install.texi (Options specification): Restore entry of
24989 --enable-sjlj-exceptions.
24990
24991 2017-05-27 Michael Eager <eager@eagercon.com>
24992
24993 Revert:
24994 2016-01-21 Ajit Agarwal <ajitkum@xilinx.com>
24995
24996 See https://gcc.gnu.org/ml/gcc/2017-05/msg00221.html.
24997
24998 * config/microblaze/microblaze.h
24999 (FIXED_REGISTERS): Update in macro.
25000 (CALL_USED_REGISTERS): Update in macro.
25001
25002 2017-05-27 François-Xavier Coudett <fxcoudert@gcc.gnu.org>
25003
25004 * doc/install.texi: Add links to macOS binary distributions.
25005
25006 2017-05-27 Jakub Jelinek <jakub@redhat.com>
25007
25008 PR bootstrap/80887
25009 Revert:
25010 2017-05-25 Marc Glisse <marc.glisse@inria.fr>
25011
25012 * match.pd ((A +- CST1) +- CST2): Allow some conversions.
25013
25014 2017-05-26 Martin Liska <mliska@suse.cz>
25015
25016 * dumpfile.h (enum dump_kind): Renumber TDF_* flags to be contiguous.
25017
25018 2017-05-26 Martin Liska <mliska@suse.cz>
25019
25020 * cfg.c (check_bb_profile): Do not use TDF_COMMENT and print
25021 always leading ';; '.
25022 (dump_bb_info): Likewise.
25023 (brief_dump_cfg): Likewise.
25024 * cfgrtl.c (print_rtl_with_bb): Do not use TDF_COMMENT.
25025 * dumpfile.c: Remove usage of TDF_VERBOSE.
25026 * dumpfile.h (enum dump_kind): Likewise.
25027 (dump_gimple_bb_header): Do not use TDF_COMMENT.
25028 * print-tree.c (debug_verbose): Remove.
25029 * tree-cfg.c (gimple_dump_cfg): Do not use TDF_COMMENT.
25030 (dump_function_to_file): Remove dumps guarded with TDF_VERBOSE.
25031 * tree-diagnostic.c (default_tree_printer): Replace
25032 TDF_DIAGNOSTIC with TDF_SLIM.
25033
25034 2017-05-26 Bin Cheng <bin.cheng@arm.com>
25035
25036 * tree-vect-loop-manip.c (create_intersect_range_checks_index): Pass
25037 in parameter loop, rather than loop_vinfo.
25038 (create_intersect_range_checks): Ditto.
25039 (vect_create_cond_for_alias_checks): Update call to above functions.
25040
25041 2017-05-26 Bin Cheng <bin.cheng@arm.com>
25042
25043 PR tree-optimization/80815
25044 * tree-data-ref.c (prune_runtime_alias_test_list): Simplify condition
25045 for merging runtime alias checks. Handle negative DR_STEPs.
25046
25047 2017-05-26 Bin Cheng <bin.cheng@arm.com>
25048
25049 * tree-vect-data-refs.c (Operator==, comp_dr_with_seg_len_pair):
25050 Move from ...
25051 * tree-data-ref.c (Operator==, comp_dr_with_seg_len_pair): To here.
25052 * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Factor
25053 out code pruning runtime alias checks.
25054 * tree-data-ref.c (prune_runtime_alias_test_list): New function
25055 factored out from above.
25056 * tree-vectorizer.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
25057 Move from ...
25058 * tree-data-ref.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
25059 ... to here.
25060 (prune_runtime_alias_test_list): New decalaration.
25061
25062 2017-05-26 Bin Cheng <bin.cheng@arm.com>
25063
25064 * tree-vect-data-refs.c (compare_tree): Rename and move ...
25065 * tree-data-ref.c (data_ref_compare_tree): ... to here.
25066 * tree-data-ref.h (data_ref_compare_tree): New decalaration.
25067 * tree-vect-data-refs.c (dr_group_sort_cmp): Update uses.
25068 (operator==, comp_dr_with_seg_len_pair): Ditto.
25069 (vect_prune_runtime_alias_test_list): Ditto.
25070
25071 2017-05-26 Martin Liska <mliska@suse.cz>
25072
25073 PR ipa/80663
25074 * params.def: Bound partial-inlining-entry-probability param.
25075
25076 2017-05-26 Marek Polacek <polacek@redhat.com>
25077
25078 PR sanitizer/80875
25079 * fold-const.c (fold_binary_loc) <case MULT_EXPR>: Check if OP1
25080 can be negated.
25081
25082 2017-05-26 Richard Biener <rguenther@suse.de>
25083
25084 PR tree-optimization/80842
25085 * tree-ssa-ccp.c (set_lattice_value): Always meet with the old
25086 value.
25087
25088 2017-05-26 Richard Biener <rguenther@suse.de>
25089
25090 PR tree-optimization/80844
25091 * tree-vectorizer.c (adjust_simduid_builtins): Propagate results.
25092
25093 2017-05-25 Sebastian Peryt <sebastian.peryt@intel.com>
25094
25095 * doc/md.texi (Machine Constraints): Update x86 family
25096 machine constraints section to match 'config/i386/constraints.md'.
25097
25098 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
25099
25100 * doc/invoke.texi (-Wcatch-value=): Document new warning option.
25101
25102 2017-05-25 Nathan Sidwell <nathan@acm.org>
25103
25104 * doc/invoke.texi (--enable-languages): Update documentation.
25105
25106 2017-05-25 Martin Liska <mliska@suse.cz>
25107
25108 * dumpfile.c: Add TDF_FOLDING.
25109 * dumpfile.h (enum dump_kind): Likewise.
25110 * genmatch.c (dt_simplify::gen_1): Use it.
25111
25112 2017-05-25 Marc Glisse <marc.glisse@inria.fr>
25113
25114 * match.pd (view_convert (convert@0 @1)): Handle zero-extension.
25115
25116 2017-05-25 Marc Glisse <marc.glisse@inria.fr>
25117
25118 * match.pd ((A +- CST1) +- CST2): Allow some conversions.
25119 * tree.c (drop_tree_overflow): Handle COMPLEX_CST and VECTOR_CST.
25120
25121 2017-05-25 Marc Glisse <marc.glisse@inria.fr>
25122
25123 * fold-const.c (fold_binary_loc) [(A & C) == D]: Remove transformation.
25124 * match.pd (X == C): Rewrite it here.
25125 (with_possible_nonzero_bits, with_possible_nonzero_bits2,
25126 with_certain_nonzero_bits2): New predicates.
25127 * tree-ssanames.c (get_nonzero_bits): Handle INTEGER_CST.
25128
25129 2017-05-24 Nathan Sidwell <nathan@acm.org>
25130
25131 * lto-streamer-in.c (lto_input_data_block): Adjust T const cast to
25132 avoid warning.
25133
25134 * auto-profile.c (afdo_propagate): Adjust T const cast to avoid
25135 warning.
25136
25137 2017-05-24 Segher Boessenkool <segher@kernel.crashing.org>
25138
25139 * config/powerpcspe: New port. Files are copied from the rs6000
25140 port, with "rs6000" in filenames replaced by "powerpcspe".
25141
25142 2017-05-24 Wilco Dijkstra <wdijkstr@arm.com>
25143
25144 PR rtl-optimization/80754
25145 * lra-remat.c (do_remat): Add overlap checks for dst_regno.
25146
25147 2017-05-24 Sheldon Lobo <smlobo@sheldon.us.oracle.com>
25148
25149 * config/sparc/sparc.md (length): Return the correct value for -mflat
25150 sibcalls to match output_sibcall.
25151
25152 2017-05-24 Segher Boessenkool <segher@kernel.crashing.org>
25153
25154 PR bootstrap/80860
25155 PR bootstrap/80843
25156 * config/rs6000/rs6000.c (struct machine_function): Add new field
25157 n_components.
25158 (rs6000_get_separate_components): Init that field, use it.
25159 (rs6000_components_for_bb): Use the field.
25160
25161 2017-05-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
25162
25163 * config/arm/arm.c (arm_expand_prologue): Fix typo in comment.
25164
25165 2017-05-24 Peter Bergner <bergner@vnet.ibm.com>
25166
25167 PR middle-end/80823
25168 * tree-cfg.c (group_case_labels_stmt): Delete increment of "i";
25169
25170 2017-05-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25171
25172 PR target/80725
25173 * config/s390/s390.c (s390_check_qrst_address): Check incoming
25174 address against address_operand predicate.
25175 * config/s390/s390.md ("*indirect_jump"): Swap alternatives.
25176
25177 2017-05-24 Eric Botcazou <ebotcazou@adacore.com>
25178
25179 * var-tracking.c (track_expr_p): Do not return 0 for tracked record
25180 parameters passed indirectly.
25181
25182 2017-05-23 Uros Bizjak <ubizjak@gmail.com>
25183
25184 * config/i386/i386.md (*movdi_internal): Remove SSE4
25185 alternative 18 (?r, *v). Update insn attributes.
25186 (*movsi_internal): Remove SSE4 alternative 13 (?r, *v).
25187 Update insn attributes.
25188 (*zero_extendsidi2): Remove SSE4 alternative (?r, *x).
25189 Update insn attributes.
25190 * config/i386/sse.md (vec_extract<ssevecmodelower>_0): Remove SSE4
25191 alternative 1 (r, v). Remove isa attribute.
25192 * config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
25193 Always move value through stack for !TARGET_INTER_UNIT_MOVES_TO_VEC
25194 and !TARGET_INTER_UNIT_MOVES_TO_VEC targets.
25195
25196 2017-05-23 Tom de Vries <tom@codesourcery.com>
25197
25198 * doc/sourcebuild.texi (Directives, Verify compiler message): Document
25199 dg-line directive.
25200
25201 2017-05-23 Jan Hubicka <hubicka@ucw.cz>
25202
25203 * cgraphunit.c (symbol_table::process_new_functions): Update.
25204 * ipa-fnsummary.c (pass_data_inline_parameters): Remove.
25205 (inline_generate_summary): Rename to ...
25206 (ipa_fn_summary_generate): ... this one.
25207 (inline_read_summary): Rename to ...
25208 (ipa_fn_summary_read): ... this one.
25209 (inline_write_summary): Rename to ...
25210 (ipa_fn_summary_write): ... this one.
25211 (inline_free_summary): Rename to ...
25212 (ipa_free_fn_summary): ... this one.
25213 (pass_data_local_fn_summary, pass_local_fn_summary,
25214 make_pass_local_fn_summary, pass_data_ipa_free_fn_summary,
25215 pass_ipa_free_fn_summary, make_pass_ipa_free_fn_summary,
25216 pass_data_ipa_fn_summary, pass_ipa_fn_summary,
25217 make_pass_ipa_fn_summary): New.
25218 * ipa-fnsummary.h (inline_generate_summary, inline_read_summary,
25219 inline_write_summary, inline_free_summary): Remove.
25220 (ipa_free_fn_summary) : New.
25221 * ipa-inline.c (ipa_inline): Update.
25222 (pass_ipa_inline): Do not generate summaries.
25223 * ipa.c (pass_data_ipa_free_fn_summary, pass_ipa_free_fn_summary):
25224 Remove.
25225 * passes.def: Replace pass_inline_parameters by pass_local_fn_summary
25226 and add pass_ipa_fn_summary.
25227 * tree-pass.h (make_pass_ipa_fn_summary, make_pass_local_fn_summary):
25228 New.
25229 (make_pass_inline_parameters): Remove.
25230
25231 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
25232
25233 * omp-low.c (struct omp_context): Remove "default_kind" member.
25234 Adjust all users.
25235
25236 * omp-offload.c (execute_oacc_device_lower): Remove the
25237 parallelism dimensions function attributes for unparallelized
25238 OpenACC kernels constructs.
25239
25240 2017-05-23 Martin Liska <mliska@suse.cz>
25241
25242 * cgraph.c (cgraph_node::get_create): Use symtab_node::dump_{asm_,}name
25243 functions.
25244 (cgraph_edge::make_speculative): Likewise.
25245 (cgraph_edge::resolve_speculation): Likewise.
25246 (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
25247 (cgraph_node::dump): Likewise.
25248 * cgraph.h: Likewise.
25249 * cgraphunit.c (analyze_functions): Likewise.
25250 (symbol_table::compile): Likewise.
25251 * ipa-cp.c (print_all_lattices): Likewise.
25252 (determine_versionability): Likewise.
25253 (initialize_node_lattices): Likewise.
25254 (ipcp_verify_propagated_values): Likewise.
25255 (estimate_local_effects): Likewise.
25256 (update_profiling_info): Likewise.
25257 (create_specialized_node): Likewise.
25258 (perhaps_add_new_callers): Likewise.
25259 (decide_about_value): Likewise.
25260 (decide_whether_version_node): Likewise.
25261 (identify_dead_nodes): Likewise.
25262 (ipcp_store_bits_results): Likewise.
25263 * ipa-devirt.c (dump_targets): Likewise.
25264 (ipa_devirt): Likewise.
25265 * ipa-icf.c (sem_item::dump): Likewise.
25266 (sem_function::equals): Likewise.
25267 (sem_variable::equals): Likewise.
25268 (sem_item_optimizer::read_section): Likewise.
25269 (sem_item_optimizer::execute): Likewise.
25270 (congruence_class::dump): Likewise.
25271 * ipa-inline-analysis.c (dump_ipa_call_summary): Likewise.
25272 (dump_inline_summary): Likewise.
25273 (estimate_node_size_and_time): Likewise.
25274 (inline_analyze_function): Likewise.
25275 * ipa-inline-transform.c (inline_call): Likewise.
25276 * ipa-inline.c (report_inline_failed_reason): Likewise.
25277 (want_early_inline_function_p): Likewise.
25278 (edge_badness): Likewise.
25279 (update_edge_key): Likewise.
25280 (inline_small_functions): Likewise.
25281 * ipa-profile.c (ipa_profile): Likewise.
25282 * ipa-prop.c (ipa_print_node_jump_functions): Likewise.
25283 (ipa_make_edge_direct_to_target): Likewise.
25284 (remove_described_reference): Likewise.
25285 (ipa_impossible_devirt_target): Likewise.
25286 (propagate_controlled_uses): Likewise.
25287 (ipa_print_node_params): Likewise.
25288 (ipcp_transform_function): Likewise.
25289 * ipa-pure-const.c (pure_const_read_summary): Likewise.
25290 (propagate_pure_const): Likewise.
25291 * ipa-reference.c (generate_summary): Likewise.
25292 (read_write_all_from_decl): Likewise.
25293 (propagate): Likewise.
25294 (ipa_reference_read_optimization_summary): Likewise.
25295 * ipa-utils.c (ipa_merge_profiles): Likewise.
25296 * ipa.c (walk_polymorphic_call_targets): Likewise.
25297 (symbol_table::remove_unreachable_nodes): Likewise.
25298 (ipa_single_use): Likewise.
25299 * passes.c (execute_todo): Likewise.
25300 * predict.c (drop_profile): Likewise.
25301 * symtab.c (symtab_node::get_dump_name): New function.
25302 (symtab_node::dump_name): Likewise.
25303 (symtab_node::dump_asm_name): Likewise.
25304 (symtab_node::dump_references): Likewise.
25305 (symtab_node::dump_referring): Likewise.
25306 (symtab_node::dump_base): Likewise.
25307 (symtab_node::debug_symtab): Likewise.
25308 * tree-sra.c (convert_callers_for_node): Likewise.
25309 * tree-ssa-structalias.c (ipa_pta_execute): Likewise.
25310 * value-prof.c (init_node_map): Likewise.
25311
25312 2017-05-23 Martin Liska <mliska@suse.cz>
25313
25314 * cgraph.h: Move symtab_node::dump_table to symbol_table::dump
25315 and symtab_node::debug_symtab to symbol_table::debug.
25316 * cgraphunit.c (analyze_functions): Use the renamed function.
25317 (symbol_table::compile): Likewise.
25318 * ipa-cp.c (ipcp_verify_propagated_values): Likewise.
25319 * ipa-icf.c (sem_item_optimizer::execute): Likewise.
25320 * passes.c (execute_todo): Likewise.
25321 * symtab.c (symbol_table::dump): New function.
25322 * tree-ssa-structalias.c (ipa_pta_execute): Use the renamed function.
25323
25324 2017-05-23 Jan Hubicka <hubicka@ucw.cz>
25325
25326 * ipa-fnsummary.c (estimate_node_size_and_time): Do not sanity check
25327 that nonconst implies exec.
25328
25329 2017-05-23 Jan Hubicka <hubicka@ucw.cz>
25330
25331 * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
25332 inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
25333 (inline_edge_summary_vec): Turn into ...
25334 (ipa_call_summaries): ... this one.
25335 (redirect_to_unreachable, edge_set_predicate,
25336 evaluate_properties_for_edge, inline_summary_alloc,
25337 reset_ipa_call_summary, reset_inline_summary,
25338 inline_summary_t::duplicate): Update.
25339 (inline_edge_duplication_hook): Turn to ...
25340 (ipa_call_summary_t::duplicate): ... this one.
25341 (inline_edge_removal_hook): Turn to ...
25342 (ipa_call_summary_t::remove): ... this one.
25343 (dump_inline_edge_summary): Turn to ...
25344 (dump_ipa_call_summary): ... this one.
25345 (estimate_function_body_sizes): Update.
25346 (inline_update_callee_summaries): Update.
25347 (remap_edge_change_prob): Update.
25348 (remap_edge_summaries): Update.
25349 (inline_merge_summary): Update.
25350 (do_estimate_edge_time): Update.
25351 (inline_generate_summary): Update.
25352 (inline_read_section): Update.
25353 (inline_read_summary): Update.
25354 (inline_free_summary): Update.
25355 * ipa-inline.c (can_inline_edge_p): Update.
25356 (compute_inlined_call_time): Update.
25357 (want_inline_small_function_p): Update.
25358 (edge_badness): Update.
25359 (early_inliner): Update.
25360 * ipa-inline.h (inline_edge_summary): Turn to ...
25361 (ipa_call_summary): ... this one.
25362 (ipa_call_summary_t): New class.
25363 (inline_edge_summary_t, inline_edge_summary_vec): Remove.
25364 (ipa_call_summaries): New.
25365 (inline_edge_summary): Remove.
25366 (estimate_edge_growth): Update.
25367 * ipa-profile.c (ipa_propagate_frequency_1): Update.
25368 * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
25369 * ipa-split.c (execute_split_functions): Update.
25370 * ipa.c (symbol_table::remove_unreachable_nodes): Update.
25371
25372 2017-05-23 Tom de Vries <tom@codesourcery.com>
25373
25374 * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
25375 attributes): Document rdrand effective target.
25376
25377 2017-05-23 Tom de Vries <tom@codesourcery.com>
25378
25379 * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
25380 attributes): Sort alphabetically.
25381
25382 2017-05-23 Georg-Johann Lay <avr@gjlay.de>
25383
25384 * config/avr/genmultilib.awk: Use gsub instead of gensub.
25385
25386 2017-05-22 Michael Meissner <meissner@linux.vnet.ibm.com>
25387
25388 PR target/80718
25389 * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Split
25390 V2DF/V2DI splat into two separate patterns, one that handles
25391 registers, and the other that only handles memory. Drop support
25392 for splatting from a GPR on ISA 2.07 and then splitting the
25393 splat into direct move and splat.
25394 (vsx_splat_<mode>_reg): Likewise.
25395 (vsx_splat_<mode>_mem): Likewise.
25396
25397 2017-05-22 Segher Boessenkool <segher@kernel.crashing.org>
25398
25399 * cfgcleanup.c (bb_is_just_return): Allow CLOBBERs.
25400
25401 2017-05-22 Jakub Jelinek <jakub@redhat.com>
25402
25403 PR middle-end/80809
25404 * omp-low.c (finish_taskreg_remap): New function.
25405 (finish_taskreg_scan): If unit size of ctx->record_type
25406 is non-constant, unshare the size expression and replace
25407 decls in it with possible outer var refs.
25408
25409 PR middle-end/80809
25410 * gimplify.c (omp_add_variable): For GOVD_DEBUG_PRIVATE use
25411 GOVD_SHARED rather than GOVD_PRIVATE with it.
25412 (gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Expect
25413 GOVD_SHARED rather than GOVD_PRIVATE with GOVD_DEBUG_PRIVATE.
25414
25415 PR middle-end/80853
25416 * omp-low.c (lower_reduction_clauses): Pass OMP_CLAUSE_PRIVATE
25417 as last argument to build_outer_var_ref for pointer bases of array
25418 section reductions.
25419
25420 2017-05-19 Martin Sebor <msebor@redhat.com>
25421
25422 * print-tree.c (print_node): Print DECL_READ_P flag.
25423
25424 2017-05-22 Jan Hubicka <hubicka@ucw.cz>
25425
25426 * Makefile.in: Add ipa-fnsummary.o and ipa-fnsummary.h
25427 * auto-profile.c: Replace ipa-inline.h by ipa-fnsummary.h
25428 * cgraph.c: Likewise.
25429 * cgraphunit.c: Likewise.
25430 * gengtype.c: Likewise.
25431 * ipa-cp.c: Likewise.
25432 * ipa-devirt.c: Likewise.
25433 * ipa-icf.c: Likewise.
25434 * ipa-predicate.c: Likewise.
25435 * ipa-profile.c: Likewise.
25436 * ipa-prop.c: Likewise.
25437 * ipa-split.c: Likewise.
25438 * ipa.c: Likewise.
25439 * ipa-inline-analysis.c (inline_summaries, ipa_call_summaries,
25440 edge_predicate_pool, dump_inline_hints,
25441 inline_summary::account_size_time, redirect_to_unreachable,
25442 edge_set_predicate, set_hint_predicate,
25443 evaluate_conditions_for_known_args, evaluate_properties_for_edge,
25444 inline_summary_alloc, ipa_call_summary::reset, inline_summary::reset,
25445 inline_summary_t::remove, remap_hint_predicate_after_duplication,
25446 inline_summary_t::duplicate, ipa_call_summary_t::duplicate,
25447 ipa_call_summary_t::remove, initialize_growth_caches,
25448 free_growth_caches, dump_ipa_call_summary, dump_inline_summary,
25449 debug_inline_summary, dump_inline_summaries, initialize_inline_failed,
25450 mark_modified, unmodified_parm_1, unmodified_parm,
25451 unmodified_parm_or_parm_agg_item, eliminated_by_inlining_prob,
25452 set_cond_stmt_execution_predicate, set_switch_stmt_execution_predicate,
25453 compute_bb_predicates, will_be_nonconstant_expr_predicate,
25454 will_be_nonconstant_predicate, record_modified_bb_info,
25455 get_minimal_bb, record_modified, param_change_prob,
25456 phi_result_unknown_predicate, predicate_for_phi_result,
25457 array_index_predicate, clobber_only_eh_bb_p, fp_expression_p,
25458 estimate_function_body_sizes, compute_inline_parameters,
25459 compute_inline_parameters_for_curren, pass_data_inline_parameters,
25460 estimate_node_size_and_time, estimate_ipcp_clone_size_and_time,
25461 inline_update_callee_summaries, remap_edge_change_prob,
25462 remap_edge_summaries, remap_hint_predicate, inline_merge_summary,
25463 inline_update_overall_summary, inline_indirect_intraprocedural_analysis,
25464 inline_analyze_function, inline_summary_t::insert,
25465 inline_generate_summary, read_ipa_call_summary, inline_read_section,
25466 inline_read_summary, write_ipa_call_summary, inline_write_summary,
25467 inline_free_summary): Move to ipa-fnsummary.h
25468 (predicate_t): Remove.
25469 * ipa-fnsummary.c: New file.
25470 * ipa-inline.h: Do not include sreal.h and ipa-predicate.h
25471 (enum inline_hints_vals, inline_hints, agg_position_info,
25472 INLINE_SIZE_SCALE, size_time_entry, inline_summary, inline_summary_t,
25473 inline_summaries, ipa_call_summary, ipa_call_summary_t,
25474 ipa_call_summaries, debug_inline_summary, dump_inline_summaries,
25475 dump_inline_summary, dump_inline_hints, inline_generate_summary,
25476 inline_read_summary, inline_write_summary, inline_free_summary,
25477 inline_analyze_function, initialize_inline_failed,
25478 inline_merge_summary, inline_update_overall_summary,
25479 compute_inline_parameters): Move to ipa-fnsummary.h
25480 * ipa-fnsummary.h: New file.
25481 * ipa-inline-transform.h: Include ipa-inline.h.
25482 * ipa-inline.c: LIkewise.
25483
25484 2017-05-22 Jan Hubicka <hubicka@ucw.cz>
25485
25486 * ipa-inline.c (edge_badness): Use inlined_time instead of
25487 inline_summaries->get.
25488
25489 2017-05-22 Jan Hubicka <hubicka@ucw.cz>
25490
25491 * ipa-inline.c (edge_badness): Use estimate_size_after_inlining.
25492
25493 2017-05-22 Nathan Sidwell <nathan@acm.org>
25494
25495 * doc/invoke.texi (fdump-translation-unit): Delete documentation.
25496 (fdump-lang): Document 'raw' option.
25497 * dumpfile.h (TDI_tu): Delete.
25498 * dumpfile.c (dump_files): Remove translation-unit.
25499 (FIRST_AUTO_NUMBERED_DUMP): Decrement.
25500
25501 2017-05-22 Georg-Johann Lay <avr@gjlay.de>
25502
25503 * config/avr/t-avr (AWK) [t-multilib]: Remove "-v FORMAT=Makefile"
25504 command option from $(AWK) call.
25505 * config/avr/genmultilib.awk: Simplify and rewrite so that it
25506 generates MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS.
25507 [FORMAT]: Remove handling of variable.
25508 * config/avr/t-multilib: Regenerate.
25509
25510 2017-05-22 Jan Hubicka <hubicka@ucw.cz>
25511
25512 * ipa-inline-analysis.c (inline_summary::reset): Do not reset
25513 self_time.
25514 (dump_inline_summary): Do not print self_time.
25515 (estimate_function_body_sizes): Do not set self_time.
25516 (compute_inline_parameters): Likewise.
25517 (inline_read_section, inline_write_summary): Do not stream self_time.
25518 * ipa-inline.h (inline_summary): Drop self_time.
25519
25520 2017-05-22 Jan Hubicka <hubicka@ucw.cz>
25521
25522 * ipa-inline-analysis.c (account_size_time): Rename to ...
25523 (inline_summary::account_size_time): ... this one.
25524 (reset_ipa_call_summary): Turn to ...
25525 (ipa_call_summary::reset): ... this one.
25526 (reset_inline_summary): Turn to ...
25527 (inline_summary::reset): ... this one.
25528 (inline_summary_t::remove): Update.
25529 (inline_summary_t::duplicate): Update.
25530 (ipa_call_summary_t::remove): Update.
25531 (dump_inline_summary): Update.
25532 (estimate_function_body_sizes): Update.
25533 (compute_inline_parameters): Update.
25534 (estimate_node_size_and_time): Update.
25535 (inline_merge_summary): Update.
25536 (inline_update_overall_summary): Update.
25537 (inline_read_section): Update.
25538 (inline_write_summary): Update.
25539 * ipa-inline.h (inline_summary): Rename entry to size_time_table;
25540 add account_size_time and reset member functions.
25541 (ipa_call_summary): Add reset function.
25542 * ipa-predicate.h (predicate::operator &): Constify.
25543
25544 2017-05-22 Richard Biener <rguenther@suse.de>
25545
25546 * df-scan.c (df_insn_refs_verify): Speedup when not verifying.
25547
25548 2017-05-19 Jason Merrill <jason@redhat.com>
25549
25550 * tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t.
25551
25552 2017-05-19 Marek Polacek <polacek@redhat.com>
25553
25554 PR sanitizer/80800
25555 * fold-const.c (extract_muldiv_1) <case TRUNC_DIV_EXPR>: Add
25556 TYPE_OVERFLOW_WRAPS checks.
25557
25558 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
25559
25560 * tree-core.h (enum omp_clause_default_kind): Add
25561 "OMP_CLAUSE_DEFAULT_PRESENT".
25562 * tree-pretty-print.c (dump_omp_clause): Handle it.
25563 * gimplify.c (enum gimplify_omp_var_data): Add
25564 "GOVD_MAP_FORCE_PRESENT".
25565 (gimplify_adjust_omp_clauses_1): Map it to
25566 "GOMP_MAP_FORCE_PRESENT".
25567 (oacc_default_clause): Handle "OMP_CLAUSE_DEFAULT_PRESENT".
25568
25569 * gimplify.c (oacc_default_clause): Clarify.
25570
25571 2017-05-19 Nathan Sidwell <nathan@acm.org>
25572
25573 LANG_HOOK_REGISTER_DUMPS
25574 * toplev.c (general_init): Call register dump lang hook.
25575 * doc/invoke.texi: Document -fdump-lang option family.
25576 * dumpfile.c (dump_files): Remove class dump here.
25577 (FIRST_AUTO_NUMBERED_DUMP): Adjust.
25578 * dumpfile.h (tree_dump_index): Remove TDI_class.
25579 * langhooks-def.h (lhd_register_dumps): Declare.
25580 (LANG_HOOKS_REGISTER_DUMPS): Define.
25581 (LANG_HOOKS_INITIALIZER): Add it.
25582 * langhooks.c (lhd_register_dumps): Define.
25583 * langhooks.h (struct lang_hooks): Add register_dumps.
25584
25585 2017-05-19 Nathan Sidwell <nathan@acm.org>
25586
25587 * context.h (context::set_passes): New.
25588 * context.c (context::context): Do not create pass manager.
25589 * toplev.c (general_init): Create pass manager here.
25590
25591 2017-05-19 Segher Boessenkool <segher@kernel.crashing.org>
25592
25593 * config/rs6000/rs6000.md (splitter to load of -1 and mask): Don't
25594 use this splitter if two add or or instructions would also work for
25595 the constant we want to generate.
25596
25597 2017-05-19 Richard Biener <rguenther@suse.de>
25598
25599 PR build/80821
25600 * genmatch.c (dt_node::gen_kids_1): Add missing scope around
25601 predicate evaluation.
25602
25603 2017-05-19 Jan Hubicka <hubicka@ucw.cz>
25604
25605 * ipa-inline.h (ipa_call_summary): Turn sizes into signed;
25606 add ctor.
25607 * ipa-inline.c (want_inline_small_function_p): Do not cast to
25608 unsigned.
25609
25610 2017-05-19 Jan Hubicka <hubicka@ucw.cz>
25611
25612 * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
25613 inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
25614 (inline_edge_summary_vec): Turn into ...
25615 (ipa_call_summaries): ... this one.
25616 (redirect_to_unreachable, edge_set_predicate,
25617 evaluate_properties_for_edge, inline_summary_alloc,
25618 reset_ipa_call_summary, reset_inline_summary,
25619 inline_summary_t::duplicate): Update.
25620 (inline_edge_duplication_hook): Turn to ...
25621 (ipa_call_summary_t::duplicate): ... this one.
25622 (inline_edge_removal_hook): Turn to ...
25623 (ipa_call_summary_t::remove): ... this one.
25624 (dump_inline_edge_summary): Turn to ...
25625 (dump_ipa_call_summary): ... this one.
25626 (estimate_function_body_sizes): Update.
25627 (inline_update_callee_summaries): Update.
25628 (remap_edge_change_prob): Update.
25629 (remap_edge_summaries): Update.
25630 (inline_merge_summary): Update.
25631 (do_estimate_edge_time): Update.
25632 (inline_generate_summary): Update.
25633 (inline_read_section): Update.
25634 (inline_read_summary): Update.
25635 (inline_free_summary): Update.
25636 * ipa-inline.c (can_inline_edge_p): Update.
25637 (compute_inlined_call_time): Update.
25638 (want_inline_small_function_p): Update.
25639 (edge_badness): Update.
25640 (early_inliner): Update.
25641 * ipa-inline.h (inline_edge_summary): Turn to ...
25642 (ipa_call_summary): ... this one.
25643 (ipa_call_summary_t): New class.
25644 (inline_edge_summary_t, inline_edge_summary_vec): Remove.
25645 (ipa_call_summaries): New.
25646 (inline_edge_summary): Remove.
25647 (estimate_edge_growth): Update.
25648 * ipa-profile.c (ipa_propagate_frequency_1): Update.
25649 * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
25650 * ipa-split.c (execute_split_functions): Update.
25651 * ipa.c (symbol_table::remove_unreachable_nodes): Update.
25652
25653 2017-05-19 Richard Biener <rguenther@suse.de>
25654
25655 PR middle-end/80764
25656 * cfgexpand.c (expand_gimple_cond): Fix loop fixup.
25657
25658 2017-05-18 Segher Boessenkool <segher@kernel.crashing.org>
25659
25660 * config/rs6000/rs6000.c (struct machine_function): Add field
25661 fpr_is_wrapped_separately.
25662 (rs6000_get_separate_components): Use 64 components. Handle the
25663 new FPR components.
25664 (rs6000_components_for_bb): Handle the FPR components.
25665 (rs6000_emit_prologue_components): Handle the FPR components.
25666 (rs6000_emit_epilogue_components): Handle the FPR components.
25667 (rs6000_set_handled_components): Handle the FPR components.
25668 (rs6000_emit_prologue): Don't output prologue code for those FPRs
25669 that are already separately shrink-wrapped.
25670 (rs6000_emit_epilogue): Don't output epilogue code for those FPRs
25671 that are already separately shrink-wrapped.
25672
25673 2017-05-18 Michael Meissner <meissner@linux.vnet.ibm.com>
25674
25675 PR target/80510
25676 * config/rs6000/predicates.md (simple_offsettable_mem_operand):
25677 New predicate.
25678
25679 * config/rs6000/rs6000.md (ALTIVEC_DFORM): New iterator.
25680 (define_peephole2 for Altivec d-form load): Add peepholes to catch
25681 cases where the register allocator uses a move and an offsettable
25682 memory operation to/from a FPR register on ISA 2.06/2.07.
25683 (define_peephole2 for Altivec d-form store): Likewise.
25684
25685 2017-05-18 Uros Bizjak <ubizjak@gmail.com>
25686
25687 PR target/80799
25688 * config/i386/mmx.md (*mov<mode>_internal): Enable
25689 alternatives 11, 12, 13 and 14 also for 32bit targets.
25690 Remove alternatives 15, 16, 17 and 18.
25691 * config/i386/sse.md (vec_concatv2di): Change
25692 alternative (!x, *y) to (x, ?!*Yn).
25693
25694 2017-05-18 Paolo Carlini <paolo.carlini@oracle.com>
25695
25696 * dumpfile.h (enum dump_kind): Remove stray comma.
25697
25698 2017-05-18 Jan Hubicka <hubicka@ucw.cz>
25699
25700 * Makefile.in: Add ipa-predicate.o and ipa-predicate.h
25701 * ipa-inline-analysis.c (NUM_CONDITIONS): turn into
25702 predicate::num_conditions
25703 (IS_NOT_CONSTANT): turn into predicate::is_not_constant.
25704 (CHANGED): turn into predicate::changed.
25705 (agg_position_info): Move to ipa-predicate.h
25706 (add_condition, predicate::add_clause, predicate::operator &=,
25707 predicate::or_with, predicate::evaluate, predicate::probability,
25708 dump_condition, dump_clause, predicate::dump,
25709 predicate::remap_after_duplication, predicate::remap_after_inlining,
25710 predicate::stream_in, predicate::stream_out): Move to ipa-predicate.c
25711 (evaluate_conditions_for_known_args): Update.
25712 (set_cond_stmt_execution_predicate): Update.
25713 * ipa-inline.h: Include ipa-predicate.h
25714 (condition, inline_param_summary, conditions, agg_position_info,
25715 predicate): Move to ipa-predicate.h
25716 * ipa-predicate.c: New file.
25717 * ipa-predicate.h: New file.
25718
25719 2017-05-18 Wilco Dijkstra <wdijkstr@arm.com>
25720
25721 * final.c (leaf_function_p): Check we are not in a sequence.
25722
25723 2017-05-18 Martin Liska <mliska@suse.cz>
25724
25725 * cfgrtl.c (rtl_verify_edges): Remove usage of TDF_RTL.
25726 * dumpfile.c (dump_register): Use new enum dump_kind.
25727 (get_dump_file_name): Likewise.
25728 (dump_enable_all): Likewise.
25729 (dump_switch_p_1): Likewise.
25730 (enable_rtl_dump_file): Remove usage of TDF_RTL.
25731 * dumpfile.h (enum dump_kind): New enum type.
25732 (struct dump_file_info): Create constructor and
25733 format fields and comments.
25734 * passes.c (pass_manager::register_one_dump_file):
25735 Use num dump_kind.
25736 * statistics.c (statistics_early_init): Likewise.
25737 * tree-ssa-loop-prefetch.c (dump_mem_details): Replace
25738 TDF_TREE with TDF_SLIM.
25739 (gather_memory_references_ref): Likewise.
25740
25741 2017-05-18 Martin Liska <mliska@suse.cz>
25742
25743 * vec.h (struct vnull): Use it.
25744
25745 2017-05-18 Jan Hubicka <hubicka@ucw.cz>
25746
25747 * ipa-inline-analysis.c (predicate_conditions): Move to ipa-inline.h
25748 (true_predicate, false_predicate, true_predicate_p,
25749 false_predicate_p): Remove.
25750 (single_cond_predicate, not_inlined_predicate): Turn to member function
25751 in ipa-inline.h
25752 (add_condition): Update.
25753 (add_clause): Turn to...
25754 (predicate::add_clause): ... this one; update; allow passing NULL
25755 as parameter.
25756 (and_predicates): Turn to ...
25757 (predicate::operator &=): ... this one.
25758 (predicates_equal_p): Move to predicate::operator == in ipa-inline.h
25759 (or_predicates): Turn to ...
25760 (predicate::or_with): ... this one.
25761 (evaluate_predicate): Turn to ...
25762 (predicate::evaluate): ... this one.
25763 (predicate_probability): Turn to ...
25764 (predicate::probability): ... this one.
25765 (dump_condition): Update.
25766 (dump_predicate): Turn to ...
25767 (predicate::dump): ... this one.
25768 (account_size_time): Update.
25769 (edge_set_predicate): Update.
25770 (set_hint_predicate): UPdate.
25771 (evaluate_conditions_for_known_args): Update.
25772 (evaluate_properties_for_edge): Update.
25773 (remap_predicate_after_duplication): Turn to...
25774 (predicate::remap_after_duplication): ... this one.
25775 (remap_hint_predicate_after_duplication): Update.
25776 (inline_summary_t::duplicate): UPdate.
25777 (dump_inline_edge_summary): Update.
25778 (dump_inline_summary): Update.
25779 (set_cond_stmt_execution_predicate): Update.
25780 (set_switch_stmt_execution_predicate): Update.
25781 (compute_bb_predicates): Update.
25782 (will_be_nonconstant_expr_predicate): Update.
25783 (will_be_nonconstant_predicate): Update.
25784 (phi_result_unknown_predicate): Update.
25785 (predicate_for_phi_result): Update.
25786 (array_index_predicate): Update.
25787 (estimate_function_body_sizes): Update.
25788 (estimate_node_size_and_time): Update.
25789 (estimate_ipcp_clone_size_and_time): Update.
25790 (remap_predicate): Rename to ...
25791 (predicate::remap_after_inlining): ... this one.
25792 (remap_hint_predicate): Update.
25793 (inline_merge_summary): Update.
25794 (inline_update_overall_summary): Update.
25795 (estimate_size_after_inlining): Update.
25796 (read_predicate): Rename to ...
25797 (predicate::stream_in): ... this one.
25798 (read_inline_edge_summary): Update.
25799 (write_predicate): Rename to ...
25800 (predicate::stream_out): ... this one.
25801 (write_inline_edge_summary): Update.
25802 * ipa-inline.h (MAX_CLAUSES): Turn to predicate::max_clauses.
25803 (clause_t): Turn to uint32_t
25804 (predicate): Turn to class; implement constructor and operators
25805 ==, !=, &
25806 (size_time_entry): Update.
25807 (inline_summary): Update.
25808 (inline_edge_summary): Update.
25809
25810 2017-05-18 Marc Glisse <marc.glisse@inria.fr>
25811
25812 * fold-const.c (fold_binary_loc): Move transformation...
25813 * match.pd (C - X CMP X): ... here.
25814
25815 2017-05-18 Sheldon Lobo <sheldon.lobo@oracle.com>
25816
25817 * config/sparc/sparc.c (sparc_option_override): Set function
25818 alignment for -mcpu=niagara7 to 64 to match the I$ line.
25819 * config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
25820 latency to 1.
25821 * config/sparc/sparc.h (BRANCH_COST): Set the SPARC T4 branch
25822 latency to 2.
25823 * config/sparc/sol2.h: Fix a ASM_CPU32_DEFAULT_SPEC typo.
25824
25825 2017-05-18 Marek Polacek <polacek@redhat.com>
25826
25827 PR sanitizer/80797
25828 * ubsan.c (instrument_null): Unwrap ADDR_EXPRs.
25829 (pass_ubsan::execute): Call gimple_assign_single_p instead of
25830 gimple_assign_load_p.
25831
25832 2017-05-17 Segher Boessenkool <segher@kernel.crashing.org>
25833
25834 PR middle-end/80692
25835 * real.c (do_compare): Give decimal_do_compare preference over
25836 comparing just the signs.
25837
25838 2017-05-17 Uros Bizjak <ubizjak@gmail.com>
25839
25840 * doc/md.texi (Canonicalization of Instructions): Describe the
25841 canonical form of instructions that inherently set a condition
25842 code register.
25843
25844 2017-05-17 Peter Bergner <bergner@vnet.ibm.com>
25845
25846 PR middle-end/80775
25847 * tree-cfg.c: Move deletion of unreachable case statements to after
25848 the merging of consecutive case labels.
25849
25850 2017-05-17 Thomas Preud'homme <thomas.preudhomme@arm.com>
25851
25852 * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Refer
25853 readers to __gnu_cmse_nonsecure_call libcall for saving, clearing and
25854 restoring of callee-saved registers.
25855
25856 2017-05-17 Eric Botcazou <ebotcazou@adacore.com>
25857
25858 * compare-elim.c (equivalent_reg_at_start): Adjust outdated comment.
25859 * config/visium/visium.c (single_set_and_flags): Likewise.
25860 * config/visium/visium.md (Substitutions): Likewise.
25861
25862 2017-05-17 Martin Liska <mliska@suse.cz>
25863
25864 * cfg.c: Introduce dump_flags_t type and
25865 use it instead of int type.
25866 * cfg.h: Likewise.
25867 * cfghooks.c: Likewise.
25868 * cfghooks.h (struct cfg_hooks): Likewise.
25869 * cfgrtl.c: Likewise.
25870 * cfgrtl.h: Likewise.
25871 * cgraph.c (cgraph_node::get_body): Likewise.
25872 * coretypes.h: Likewise.
25873 * domwalk.c: Likewise.
25874 * domwalk.h: Likewise.
25875 * dumpfile.c (struct dump_option_value_info): Likewise.
25876 (dump_enable_all): Likewise.
25877 (dump_switch_p_1): Likewise.
25878 (opt_info_switch_p): Likewise.
25879 * dumpfile.h (enum tree_dump_index): Likewise.
25880 (struct dump_file_info): Likewise.
25881 * genemit.c: Likewise.
25882 * generic-match-head.c: Likewise.
25883 * gengtype.c (open_base_files): Likewise.
25884 * gimple-pretty-print.c: Likewise.
25885 * gimple-pretty-print.h: Likewise.
25886 * graph.c (print_graph_cfg): Likewise.
25887 * graphite-scop-detection.c (dot_all_sese): Likewise.
25888 * ipa-devirt.c (build_type_inheritance_graph): Likewise.
25889 * loop-unroll.c (report_unroll): Likewise.
25890 * passes.c (pass_manager::register_one_dump_file): Likewise.
25891 * print-tree.c: Likewise.
25892 * statistics.c: Likewise.
25893 * tree-cfg.c: Likewise.
25894 * tree-cfg.h: Likewise.
25895 * tree-dfa.c: Likewise.
25896 * tree-dfa.h: Likewise.
25897 * tree-dump.c (dump_function): Likewise.
25898 * tree-dump.h (struct dump_info): Likewise.
25899 * tree-pretty-print.c: Likewise.
25900 * tree-pretty-print.h: Likewise.
25901 * tree-ssa-live.c: Likewise.
25902 * tree-ssa-live.h: Likewise.
25903 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
25904 * tree-vect-loop.c: Likewise.
25905 * tree-vect-slp.c: Likewise.
25906
25907 2017-05-16 James Greenhalgh <james.greenhalgh@arm.com>
25908 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25909
25910 PR tree-optimization/80457
25911 * tree-vect-stmts.c (vect_model_simple_cost): Model the cost
25912 of all arguments to a statement as scalar_to_vec operations.
25913 (vectorizable_call): Adjust call to vect_model_simple_cost for
25914 new parameter.
25915 (vectorizable_conversion): Likewise.
25916 (vectorizable_assignment): Likewise.
25917 (vectorizable_shift): Likewise.
25918 (vectorizable_operation): Likewise.
25919 (vectorizable_comparison): Likewise.
25920 (vect_is_simple_cond): Record the def types for operands.
25921 (vectorizable_condition): Likewise, call vect_model_simple_cost.
25922 * tree-vectorizer.h (vect_model_simple_cost): Add new parameter
25923 for statement argument count.
25924
25925 2017-05-16 Carl Love <cel@us.ibm.com>
25926
25927 * config/rs6000/rs6000-c: Add support for built-in functions
25928 vector unsigned long long vec_bperm (vector unsigned long long,
25929 vector unsigned char)
25930 vector signed long long vec_mule (vector signed int,
25931 vector signed int)
25932 vector unsigned long long vec_mule (vector unsigned int,
25933 vector unsigned int)
25934 vector signed long long vec_mulo (vector signed int,
25935 vector signed int)
25936 vector unsigned long long vec_mulo (vector unsigned int,
25937 vector unsigned int)
25938 vector signed char vec_sldw (vector signed char,
25939 vector signed char,
25940 const int)
25941 vector unsigned char vec_sldw (vector unsigned char,
25942 vector unsigned char,
25943 const int)
25944 vector signed short vec_sldw (vector signed short,
25945 vector signed short,
25946 const int)
25947 vector unsigned short vec_sldw (vector unsigned short,
25948 vector unsigned short,
25949 const int)
25950 vector signed int vec_sldw (vector signed int,
25951 vector signed int,
25952 const int)
25953 vector unsigned int vec_sldw (vector unsigned int,
25954 vector unsigned int,
25955 const int)
25956 vector signed long long vec_sldw (vector signed long long,
25957 vector signed long long,
25958 const int)
25959 vector unsigned long long vec_sldw (vector unsigned long long,
25960 vector unsigned long long,
25961 const int)
25962 * config/rs6000/rs6000-c: Add support for built-in functions
25963 * config/rs6000/rs6000-builtin.def: Add definition for SLDW.
25964 * config/rs6000/altivec.h: Add defintion for vec_sldw.
25965 * doc/extend.texi: Update the built-in documentation for the
25966 new built-in functions.
25967
25968 2017-05-16 Marek Polacek <polacek@redhat.com>
25969
25970 PR sanitizer/80536
25971 PR sanitizer/80386
25972 * tree.c (save_expr): Don't fold the expression.
25973
25974 2017-05-16 Uros Bizjak <ubizjak@gmail.com>
25975
25976 * config/i386/i386.md (*movsi_internal): Split (?rm,*y) alternative
25977 to (?r,*Yn) and (?m,*y) alternatives, and (?*y,rm) to (?*Ym,r)
25978 and (?*y,m). Update insn attributes.
25979
25980 2017-05-16 Martin Liska <mliska@suse.cz>
25981
25982 * cgraph.c (cgraph_edge::resolve_speculation): Add default value for
25983 flags argument of print_gimple_stmt, print_gimple_expr,
25984 print_generic_stmt and print_generic_expr.
25985 * cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
25986 * coretypes.h: Likewise.
25987 * except.c (dump_eh_tree): Likewise.
25988 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
25989 * gimple-pretty-print.h: Likewise.
25990 * gimple-ssa-backprop.c (dump_usage_prefix): Likewise.
25991 (backprop::push_to_worklist): Likewise.
25992 (backprop::pop_from_worklist): Likewise.
25993 (backprop::process_use): Likewise.
25994 (backprop::intersect_uses): Likewise.
25995 (note_replacement): Likewise.
25996 * gimple-ssa-store-merging.c
25997 (pass_store_merging::terminate_all_aliasing_chains): Likewise.
25998 (imm_store_chain_info::coalesce_immediate_stores): Likewise.
25999 (pass_store_merging::execute): Likewise.
26000 * gimple-ssa-strength-reduction.c (dump_candidate): Likewise.
26001 (ssa_base_cand_dump_callback): Likewise.
26002 (dump_incr_vec): Likewise.
26003 (replace_refs): Likewise.
26004 (replace_mult_candidate): Likewise.
26005 (create_add_on_incoming_edge): Likewise.
26006 (create_phi_basis): Likewise.
26007 (insert_initializers): Likewise.
26008 (all_phi_incrs_profitable): Likewise.
26009 (introduce_cast_before_cand): Likewise.
26010 (replace_one_candidate): Likewise.
26011 * gimplify.c (gimplify_expr): Likewise.
26012 * graphite-isl-ast-to-gimple.c (is_valid_rename): Likewise.
26013 (set_rename): Likewise.
26014 (rename_uses): Likewise.
26015 (copy_loop_phi_nodes): Likewise.
26016 (add_close_phis_to_merge_points): Likewise.
26017 (copy_loop_close_phi_args): Likewise.
26018 (copy_cond_phi_args): Likewise.
26019 (graphite_copy_stmts_from_block): Likewise.
26020 (translate_pending_phi_nodes): Likewise.
26021 * graphite-poly.c (print_pdr): Likewise.
26022 (dump_gbb_cases): Likewise.
26023 (dump_gbb_conditions): Likewise.
26024 (print_scop_params): Likewise.
26025 * graphite-scop-detection.c (build_cross_bb_scalars_def): Likewise.
26026 (build_cross_bb_scalars_use): Likewise.
26027 (gather_bbs::before_dom_children): Likewise.
26028 * hsa-dump.c (dump_hsa_immed): Likewise.
26029 * ipa-cp.c (print_ipcp_constant_value): Likewise.
26030 (get_replacement_map): Likewise.
26031 * ipa-inline-analysis.c (dump_condition): Likewise.
26032 (estimate_function_body_sizes): Likewise.
26033 * ipa-polymorphic-call.c (check_stmt_for_type_change): Likewise.
26034 (ipa_polymorphic_call_context::get_dynamic_type): Likewise.
26035 * ipa-prop.c (ipa_dump_param): Likewise.
26036 (ipa_print_node_jump_functions_for_edge): Likewise.
26037 (ipa_modify_call_arguments): Likewise.
26038 (ipa_modify_expr): Likewise.
26039 (ipa_dump_param_adjustments): Likewise.
26040 (ipa_dump_agg_replacement_values): Likewise.
26041 (ipcp_modif_dom_walker::before_dom_children): Likewise.
26042 * ipa-pure-const.c (check_stmt): Likewise.
26043 (pass_nothrow::execute): Likewise.
26044 * ipa-split.c (execute_split_functions): Likewise.
26045 * omp-offload.c (dump_oacc_loop_part): Likewise.
26046 (dump_oacc_loop): Likewise.
26047 * trans-mem.c (tm_log_emit): Likewise.
26048 (tm_memopt_accumulate_memops): Likewise.
26049 (dump_tm_memopt_set): Likewise.
26050 (dump_tm_memopt_transform): Likewise.
26051 * tree-cfg.c (gimple_verify_flow_info): Likewise.
26052 (print_loop): Likewise.
26053 * tree-chkp-opt.c (chkp_print_addr): Likewise.
26054 (chkp_gather_checks_info): Likewise.
26055 (chkp_get_check_result): Likewise.
26056 (chkp_remove_check_if_pass): Likewise.
26057 (chkp_use_outer_bounds_if_possible): Likewise.
26058 (chkp_reduce_bounds_lifetime): Likewise.
26059 * tree-chkp.c (chkp_register_addr_bounds): Likewise.
26060 (chkp_mark_completed_bounds): Likewise.
26061 (chkp_register_incomplete_bounds): Likewise.
26062 (chkp_mark_invalid_bounds): Likewise.
26063 (chkp_maybe_copy_and_register_bounds): Likewise.
26064 (chkp_build_returned_bound): Likewise.
26065 (chkp_get_bound_for_parm): Likewise.
26066 (chkp_build_bndldx): Likewise.
26067 (chkp_get_bounds_by_definition): Likewise.
26068 (chkp_generate_extern_var_bounds): Likewise.
26069 (chkp_get_bounds_for_decl_addr): Likewise.
26070 * tree-chrec.c (chrec_apply): Likewise.
26071 * tree-data-ref.c (dump_data_reference): Likewise.
26072 (dump_subscript): Likewise.
26073 (dump_data_dependence_relation): Likewise.
26074 (analyze_overlapping_iterations): Likewise.
26075 * tree-inline.c (expand_call_inline): Likewise.
26076 (tree_function_versioning): Likewise.
26077 * tree-into-ssa.c (dump_defs_stack): Likewise.
26078 (dump_currdefs): Likewise.
26079 (dump_names_replaced_by): Likewise.
26080 (dump_update_ssa): Likewise.
26081 (update_ssa): Likewise.
26082 * tree-object-size.c (pass_object_sizes::execute): Likewise.
26083 * tree-parloops.c (build_new_reduction): Likewise.
26084 (try_create_reduction_list): Likewise.
26085 (ref_conflicts_with_region): Likewise.
26086 (oacc_entry_exit_ok_1): Likewise.
26087 (oacc_entry_exit_single_gang): Likewise.
26088 * tree-pretty-print.h: Likewise.
26089 * tree-scalar-evolution.c (set_scalar_evolution): Likewise.
26090 (get_scalar_evolution): Likewise.
26091 (add_to_evolution): Likewise.
26092 (get_loop_exit_condition): Likewise.
26093 (analyze_evolution_in_loop): Likewise.
26094 (analyze_initial_condition): Likewise.
26095 (analyze_scalar_evolution): Likewise.
26096 (instantiate_scev): Likewise.
26097 (number_of_latch_executions): Likewise.
26098 (gather_chrec_stats): Likewise.
26099 (final_value_replacement_loop): Likewise.
26100 (scev_const_prop): Likewise.
26101 * tree-sra.c (dump_access): Likewise.
26102 (disqualify_candidate): Likewise.
26103 (create_access): Likewise.
26104 (reject): Likewise.
26105 (maybe_add_sra_candidate): Likewise.
26106 (create_access_replacement): Likewise.
26107 (analyze_access_subtree): Likewise.
26108 (analyze_all_variable_accesses): Likewise.
26109 (sra_modify_assign): Likewise.
26110 (initialize_constant_pool_replacements): Likewise.
26111 (find_param_candidates): Likewise.
26112 (decide_one_param_reduction): Likewise.
26113 (replace_removed_params_ssa_names): Likewise.
26114 * tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
26115 * tree-ssa-copy.c (dump_copy_of): Likewise.
26116 (copy_prop_visit_cond_stmt): Likewise.
26117 * tree-ssa-dce.c (mark_operand_necessary): Likewise.
26118 * tree-ssa-dom.c (pass_dominator::execute): Likewise.
26119 (record_equivalences_from_stmt): Likewise.
26120 * tree-ssa-dse.c (compute_trims): Likewise.
26121 (delete_dead_call): Likewise.
26122 (delete_dead_assignment): Likewise.
26123 * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Likewise.
26124 (forward_propagate_into_cond): Likewise.
26125 (pass_forwprop::execute): Likewise.
26126 * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
26127 * tree-ssa-loop-im.c (invariantness_dom_walker::before_dom_children):
26128 Likewise.
26129 (move_computations_worker): Likewise.
26130 (execute_sm): Likewise.
26131 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
26132 (remove_exits_and_undefined_stmts): Likewise.
26133 (remove_redundant_iv_tests): Likewise.
26134 * tree-ssa-loop-ivopts.c (dump_use): Likewise.
26135 (adjust_iv_update_pos): Likewise.
26136 * tree-ssa-math-opts.c (bswap_replace): Likewise.
26137 * tree-ssa-phiopt.c (factor_out_conditional_conversion): Likewise.
26138 (value_replacement): Likewise.
26139 * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
26140 * tree-ssa-pre.c (print_pre_expr): Likewise.
26141 (get_representative_for): Likewise.
26142 (create_expression_by_pieces): Likewise.
26143 (insert_into_preds_of_block): Likewise.
26144 (eliminate_insert): Likewise.
26145 (eliminate_dom_walker::before_dom_children): Likewise.
26146 (eliminate): Likewise.
26147 (remove_dead_inserted_code): Likewise.
26148 * tree-ssa-propagate.c (substitute_and_fold): Likewise.
26149 * tree-ssa-reassoc.c (get_rank): Likewise.
26150 (eliminate_duplicate_pair): Likewise.
26151 (eliminate_plus_minus_pair): Likewise.
26152 (eliminate_not_pairs): Likewise.
26153 (undistribute_ops_list): Likewise.
26154 (eliminate_redundant_comparison): Likewise.
26155 (update_range_test): Likewise.
26156 (optimize_range_tests_var_bound): Likewise.
26157 (optimize_vec_cond_expr): Likewise.
26158 (rewrite_expr_tree): Likewise.
26159 (rewrite_expr_tree_parallel): Likewise.
26160 (linearize_expr): Likewise.
26161 (break_up_subtract): Likewise.
26162 (linearize_expr_tree): Likewise.
26163 (attempt_builtin_powi): Likewise.
26164 (attempt_builtin_copysign): Likewise.
26165 (transform_stmt_to_copy): Likewise.
26166 (transform_stmt_to_multiply): Likewise.
26167 (dump_ops_vector): Likewise.
26168 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Likewise.
26169 (print_scc): Likewise.
26170 (set_ssa_val_to): Likewise.
26171 (visit_reference_op_store): Likewise.
26172 (visit_use): Likewise.
26173 (sccvn_dom_walker::before_dom_children): Likewise.
26174 (run_scc_vn): Likewise.
26175 * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
26176 Likewise.
26177 (expr_hash_elt::print): Likewise.
26178 (const_and_copies::pop_to_marker): Likewise.
26179 (const_and_copies::record_const_or_copy_raw): Likewise.
26180 * tree-ssa-structalias.c (compute_dependence_clique): Likewise.
26181 * tree-ssa-uninit.c (collect_phi_def_edges): Likewise.
26182 (dump_predicates): Likewise.
26183 (find_uninit_use): Likewise.
26184 (warn_uninitialized_phi): Likewise.
26185 (pass_late_warn_uninitialized::execute): Likewise.
26186 * tree-ssa.c (verify_vssa): Likewise.
26187 (verify_ssa): Likewise.
26188 (maybe_optimize_var): Likewise.
26189 * tree-vrp.c (dump_value_range): Likewise.
26190 (dump_all_value_ranges): Likewise.
26191 (dump_asserts_for): Likewise.
26192 (register_edge_assert_for_2): Likewise.
26193 (vrp_visit_cond_stmt): Likewise.
26194 (vrp_visit_switch_stmt): Likewise.
26195 (vrp_visit_stmt): Likewise.
26196 (vrp_visit_phi_node): Likewise.
26197 (simplify_cond_using_ranges_1): Likewise.
26198 (fold_predicate_in): Likewise.
26199 (evrp_dom_walker::before_dom_children): Likewise.
26200 (evrp_dom_walker::push_value_range): Likewise.
26201 (evrp_dom_walker::pop_value_range): Likewise.
26202 (execute_early_vrp): Likewise.
26203
26204 2017-05-16 Richard Biener <rguenther@suse.de>
26205
26206 * dwarf2out.c (loc_list_from_tree_1): Do not create
26207 DW_OP_GNU_variable_value for DECL_IGNORED_P decls.
26208
26209 2017-05-16 Richard Biener <rguenther@suse.de>
26210
26211 * dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE
26212 just generated.
26213 (note_variable_value_in_expr): If we resolved the decl ref
26214 do not push to the stack.
26215
26216 2017-05-16 Matthew Wahab <matthew.wahab@arm.com>
26217
26218 * config/arm/arm_neon.h (vadd_f16): Use standard arithmetic
26219 operations in fast-math mode.
26220 (vaddq_f16): Likewise.
26221 (vmul_f16): Likewise.
26222 (vmulq_f16): Likewise.
26223 (vsub_f16): Likewise.
26224 (vsubq_f16): Likewise.
26225 * config/arm/neon.md (add<mode>3): New.
26226 (sub<mode>3): New.
26227 (fma:<VH:mode>3): New. Also remove outdated comment.
26228 (mul<mode>3): New.
26229
26230 2017-05-16 Martin Liska <mliska@suse.cz>
26231
26232 PR ipa/79849.
26233 PR ipa/79850.
26234 * ipa-devirt.c (warn_types_mismatch): Fix typo.
26235 (odr_types_equivalent_p): Likewise.
26236
26237 2017-05-15 Sylvestre Ledru <sylvestre@debian.org>
26238
26239 * plugin.c (try_init_one_plugin): Fix ressource leaks (CID 726637).
26240
26241 2017-05-15 Uros Bizjak <ubizjak@gmail.com>
26242
26243 PR target/80425
26244 * config/i386.i386.md (*zero_extendsidi2): Do not penalize
26245 non-interunit SSE move alternatives with '?'.
26246 (zero-extendsidi peephole2): New peephole to skip intermediate
26247 general register in SSE zero-extend sequence.
26248
26249 2017-05-15 Jeff Law <law@redhat.com>
26250
26251 * reorg.c (relax_delay_slots): Create a new variable to hold
26252 the temporary target rather than clobbering TARGET_LABEL.
26253
26254 * config/tilegx/tilegx.c (tilegx_expand_unaligned_load): Add
26255 missing argument to extract_bit_field call.
26256 * config/tilepro/tilepro.c (tilepro_expand_unaligned_load): Likewise.
26257
26258 2017-05-15 Martin Liska <mliska@suse.cz>
26259
26260 PR driver/31468
26261 * gcc.c (process_command): Do not allow empty argument of -o option.
26262
26263 2017-05-15 Renlin Li <renlin.li@arm.com>
26264
26265 * config/aarch64/aarch64-protos.h (aarch64_expand_call): Declare.
26266 * config/aarch64/aarch64.c (aarch64_expand_call): Define.
26267 * config/aarch64/constraints.md (Usf): Add long call check.
26268 * config/aarch64/aarch64.md (call): Use aarch64_expand_call.
26269 (call_value): Likewise.
26270 (sibcall): Likewise.
26271 (sibcall_value): Likewise.
26272 (call_insn): New.
26273 (call_value_insn): New.
26274 (sibcall_insn): Update rtx pattern.
26275 (sibcall_value_insn): Likewise.
26276 (call_internal): Remove.
26277 (call_value_internal): Likewise.
26278 (sibcall_internal): Likewise.
26279 (sibcall_value_internal): Likewise.
26280 (call_reg): Likewise.
26281 (call_symbol): Likewise.
26282 (call_value_reg): Likewise.
26283 (call_value_symbol): Likewise.
26284
26285 2017-05-14 Krister Walfridsson <krister.walfridsson@gmail.com>
26286
26287 PR target/80600
26288 * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always add -lgcc.
26289
26290 2017-05-14 Uros Bizjak <ubizjak@gmail.com>
26291
26292 * config/i386.i386.c (ix86_cc_modes_compatible): CCNOmode is
26293 compatible with CCGOCmode and with CCZmode.
26294
26295 2017-05-14 Martin Sebor <msebor@redhat.com>
26296
26297 PR middle-end/77671
26298 * gimple-fold.c (gimple_fold_builtin_sprintf): Make extern.
26299 (gimple_fold_builtin_snprintf): Same.
26300 * gimple-fold.h (gimple_fold_builtin_sprintf): Declare.
26301 (gimple_fold_builtin_snprintf): Same.
26302 * gimple-ssa-sprintf.c (get_format_string): Correct the detection
26303 of character types.
26304 (is_call_safe): New function.
26305 (try_substitute_return_value): Call it.
26306 (try_simplify_call): New function.
26307 (pass_sprintf_length::handle_gimple_call): Call it.
26308
26309 2017-05-14 Martin Sebor <msebor@redhat.com>
26310
26311 PR middle-end/80669
26312 * builtins.c (expand_builtin_stpncpy): Simplify.
26313
26314 2017-05-14 Daniel Santos <daniel.santos@pobox.com>
26315
26316 * config/i386/i386.opt: Add option -mcall-ms2sysv-xlogues.
26317 * config/i386/i386.h
26318 (x86_64_ms_sysv_extra_clobbered_registers): Change type to unsigned.
26319 (NUM_X86_64_MS_CLOBBERED_REGS): New macro.
26320 (struct machine_function): Add new members call_ms2sysv,
26321 call_ms2sysv_pad_in, call_ms2sysv_pad_out and call_ms2sysv_extra_regs.
26322 (struct machine_frame_state): New fields sp_realigned and
26323 sp_realigned_offset.
26324 * config/i386/i386.c
26325 (enum xlogue_stub): New enum.
26326 (enum xlogue_stub_sets): New enum.
26327 (class xlogue_layout): New class.
26328 (struct ix86_frame): New fields stack_realign_allocate_offset,
26329 stack_realign_offset and outlined_save_offset. Modify comments to
26330 detail stack layout when using out-of-line stubs.
26331 (ix86_target_string): Add -mcall-ms2sysv-xlogues option.
26332 (ix86_option_override_internal): Add sorry() for TARGET_SEH and
26333 -mcall-ms2sysv-xlogues.
26334 (stub_managed_regs): New static variable.
26335 (ix86_save_reg): Add new parameter ignore_outlined to optionally omit
26336 registers managed by out-of-line stub.
26337 (disable_call_ms2sysv_xlogues): New function.
26338 (ix86_compute_frame_layout): Modify re-alignment calculations, disable
26339 m->call_ms2sysv when appropriate and compute frame layout for
26340 out-of-line stubs.
26341 (sp_valid_at, fp_valid_at): New inline functions.
26342 (choose_basereg): New function.
26343 (choose_baseaddr): Add align parameter, use choose_basereg and modify
26344 all callers.
26345 (ix86_emit_save_reg_using_mov, ix86_emit_restore_sse_regs_using_mov):
26346 Use align parameter of choose_baseaddr to generated aligned SSE movs
26347 when possible.
26348 (pro_epilogue_adjust_stack): Modify to track
26349 machine_frame_state::sp_realigned.
26350 (ix86_nsaved_regs): Modify to accommodate changes to ix86_save_reg.
26351 (ix86_nsaved_sseregs): Likewise.
26352 (ix86_emit_save_regs): Likewise.
26353 (ix86_emit_save_regs_using_mov): Likewise.
26354 (ix86_emit_save_sse_regs_using_mov): Likewise.
26355 (get_scratch_register_on_entry): Likewise.
26356 (gen_frame_set): New function.
26357 (gen_frame_load): Likewise.
26358 (gen_frame_store): Likewise.
26359 (emit_outlined_ms2sysv_save): Likewise.
26360 (emit_outlined_ms2sysv_restore): Likewise.
26361 (ix86_expand_prologue): Modify stack re-alignment code and call
26362 emit_outlined_ms2sysv_save when appropriate.
26363 (ix86_emit_leave): Clear machine_frame_state::sp_realigned. Add
26364 parameter rtx_insn *insn, which allows the function to be used to only
26365 generate the notes.
26366 (ix86_expand_epilogue): Modify validity checks of frame and stack
26367 pointers, and call emit_outlined_ms2sysv_restore when appropriate.
26368 (ix86_expand_call): Modify to enable m->call_ms2sysv when appropriate.
26369 * config/i386/predicates.md
26370 (save_multiple): New predicate.
26371 (restore_multiple): Likewise.
26372 * config/i386/sse.md
26373 (save_multiple<mode>): New pattern.
26374 (save_multiple_realign<mode>): Likewise.
26375 (restore_multiple<mode>): Likewise.
26376 (restore_multiple_and_return<mode>): Likewise.
26377 (restore_multiple_leave_return<mode>): Likewise.
26378 * Makefile.in: Export HOSTCXX and HOSTCXXFLAGS to site.exp
26379
26380 2017-05-14 Julia Koval <julia.koval@intel.com>
26381
26382 * config/i386/i386-builtin-types.def (VOID_FTYPE_INT_INT64): New type.
26383 * config/i386/i386-builtin.def (__builtin_ia32_xgetbv)
26384 (__builtin_ia32_xsetbv): New builtins.
26385 * config/i386/i386.c (ix86_expand_special_args_builtin):
26386 Process new types.
26387 (ix86_expand_builtin): Special expand for new intrinsics.
26388 * config/i386/i386.md (UNSPECV_XGETBV, UNSPECV_XSETBV): New.
26389 (xsetbv, xsetbv_rex64, xgetbv, xgetbv_rex64): New insn patterns.
26390 * config/i386/xsaveintrin.h (_xsetbv, _getbv): New intrinsics.
26391
26392 2017-05-13 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
26393
26394 * cfganal.c (inverted_post_order_compute): Change argument type
26395 to vec *.
26396 * cfganal.h (inverted_post_order_compute): Adjust prototype.
26397 * df-core.c (rest_of_handle_df_initialize): Adjust.
26398 (rest_of_handle_df_finish): Likewise.
26399 (df_analyze_1): Likewise.
26400 (df_analyze): Likewise.
26401 (loop_inverted_post_order_compute): Change argument to be a vec *.
26402 (df_analyze_loop): Adjust.
26403 (df_get_n_blocks): Likewise.
26404 (df_get_postorder): Likewise.
26405 * df.h (struct df_d): Change field to be a vec.
26406 * lcm.c (compute_laterin): Adjust.
26407 (compute_available): Likewise.
26408 * lra-lives.c (lra_create_live_ranges_1): Likewise.
26409 * tree-ssa-dce.c (remove_dead_stmt): Likewise.
26410 * tree-ssa-pre.c (compute_antic): Likewise.
26411
26412 2017-05-13 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
26413
26414 * cfganal.c (connect_infinite_loops_to_exit): Adjust.
26415 (depth_first_search::depth_first_search): Change structure init
26416 function to this constructor.
26417 (depth_first_search::add_bb): Rename function to this member.
26418 (depth_first_search::execute): Likewise.
26419 (flow_dfs_compute_reverse_finish): Adjust.
26420
26421 2017-05-13 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
26422
26423 * ddg.c (find_nodes_on_paths): Use auto_sbitmap.
26424 (longest_simple_path): Likewise.
26425 * shrink-wrap.c (spread_components): Likewise.
26426 (disqualify_problematic_components): Likewise.
26427 (emit_common_heads_for_components): Likewise.
26428 (emit_common_tails_for_components): Likewise.
26429 (insert_prologue_epilogue_for_components): Likewise.
26430
26431 2017-05-13 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
26432
26433 * tree-ssa-dse.c (dse_dom_walker): Make m_live_byes a
26434 auto_sbitmap.
26435
26436 2017-05-13 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
26437
26438 * df-core.c (df_set_blocks): Start using auto_bitmap.
26439 (df_compact_blocks): Likewise.
26440 * df-problems.c (df_rd_confluence_n): Likewise.
26441 * df-scan.c (df_insn_rescan_all): Likewise.
26442 (df_process_deferred_rescans): Likewise.
26443 (df_update_entry_block_defs): Likewise.
26444 (df_update_exit_block_uses): Likewise.
26445 (df_entry_block_bitmap_verify): Likewise.
26446 (df_exit_block_bitmap_verify): Likewise.
26447 (df_scan_verify): Likewise.
26448 * lra-constraints.c (lra_constraints): Likewise.
26449 (undo_optional_reloads): Likewise.
26450 (lra_undo_inheritance): Likewise.
26451 * lra-remat.c (calculate_gen_cands): Likewise.
26452 (do_remat): Likewise.
26453 * lra-spills.c (assign_spill_hard_regs): Likewise.
26454 (spill_pseudos): Likewise.
26455 * tree-ssa-pre.c (bitmap_set_and): Likewise.
26456 (bitmap_set_subtract_values): Likewise.
26457
26458 2017-05-13 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
26459
26460 * haifa-sched.c (estimate_shadow_tick): Replace manual bitmap
26461 management with auto_bitmap.
26462 (fix_inter_tick): Likewise.
26463 (fix_recovery_deps): Likewise.
26464 * ira.c (add_store_equivs): Likewise.
26465 (find_moveable_pseudos): Likewise.
26466 (split_live_ranges_for_shrink_wrap): Likewise.
26467 * print-rtl.c (rtx_reuse_manager::rtx_reuse_manager): Likewise.
26468 (rtx_reuse_manager::seen_def_p): Likewise.
26469 (rtx_reuse_manager::set_seen_def): Likewise.
26470 * print-rtl.h (class rtx_reuse_manager): Likewise.
26471
26472 2017-05-13 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
26473
26474 * bt-load.c (combine_btr_defs): Use auto_bitmap to manage bitmap
26475 lifetime.
26476 (migrate_btr_def): Likewise.
26477 * cfgloop.c (get_loop_body_in_bfs_order): Likewise.
26478 * df-core.c (loop_post_order_compute): Likewise.
26479 (loop_inverted_post_order_compute): Likewise.
26480 * hsa-common.h: Likewise.
26481 * hsa-gen.c (hsa_bb::~hsa_bb): Likewise.
26482 * init-regs.c (initialize_uninitialized_regs): Likewise.
26483 * ipa-inline.c (resolve_noninline_speculation): Likewise.
26484 (inline_small_functions): Likewise.
26485 * ipa-reference.c (ipa_reference_write_optimization_summary): Likewise.
26486 * ira.c (combine_and_move_insns): Likewise.
26487 (build_insn_chain): Likewise.
26488 * loop-invariant.c (find_invariants): Likewise.
26489 * lower-subreg.c (propagate_pseudo_copies): Likewise.
26490 * predict.c (tree_predict_by_opcode): Likewise.
26491 (predict_paths_leading_to): Likewise.
26492 (predict_paths_leading_to_edge): Likewise.
26493 (estimate_loops_at_level): Likewise.
26494 (estimate_loops): Likewise.
26495 * shrink-wrap.c (try_shrink_wrapping): Likewise.
26496 (spread_components): Likewise.
26497 * tree-cfg.c (remove_edge_and_dominated_blocks): Likewise.
26498 * tree-loop-distribution.c (rdg_build_partitions): Likewise.
26499 * tree-predcom.c (tree_predictive_commoning_loop): Likewise.
26500 * tree-ssa-coalesce.c (coalesce_ssa_name): Likewise.
26501 * tree-ssa-phionlycprop.c (pass_phi_only_cprop::execute): Likewise.
26502 * tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
26503 * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise.
26504 * tree-ssa-threadupdate.c (compute_path_counts): Likewise.
26505 (mark_threaded_blocks): Likewise.
26506 (thread_through_all_blocks): Likewise.
26507 * tree-ssa.c (verify_ssa): Likewise.
26508 (execute_update_addresses_taken): Likewise.
26509 * tree-ssanames.c (verify_ssaname_freelists): Likewise.
26510
26511 2017-05-13 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
26512
26513 * cfganal.c (mark_dfs_back_edges): Replace manual stack with
26514 auto_vec.
26515 (post_order_compute): Likewise.
26516 (inverted_post_order_compute): Likewise.
26517 (pre_and_rev_post_order_compute_fn): Likewise.
26518
26519 2017-05-13 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
26520
26521 * genrecog.c (int_set::int_set): Explicitly construct our
26522 auto_vec base class.
26523 * vec.h (auto_vec::auto_vec): New constructor.
26524
26525 2017-05-13 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
26526
26527 * bitmap.h (class auto_bitmap): New constructor taking
26528 bitmap_obstack * argument.
26529
26530 2017-05-13 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
26531
26532 * bitmap.h (class auto_bitmap): Change type of m_bits to
26533 bitmap_head, and adjust ctor / dtor and member operators.
26534
26535 2017-05-13 Uros Bizjak <ubizjak@gmail.com>
26536
26537 * compare-elim.c (equivalent_reg_at_start): Return NULL_RTX
26538 when returned register mode doesn't match original mode.
26539
26540 2017-05-12 Jeff Law <law@redhat.com>
26541 Jakub Jelinek <jakub@redhat.com>
26542
26543 * config/mn10300/mn10300.c (mn10300_match_ccmode): Fix where
26544 we look for cc setter after the compare-elim changes.
26545 * config/mn10300/mn10300.md (addsi3_flags): Fix order of patterns
26546 within the vector to match what compare-elim now expects.
26547 (subsi3_flags, andsi3_flags, iorsi3_flags): Likewise.
26548 (xorsi3_flags, one_cmplsi2_flags): Likewise.
26549
26550 * config/rx/rx.c (rx_match_ccmode): Fix where we look cc setter
26551 after the compare-elim changes.
26552 * config/rx/rx.md (abssi2_flags): Fix order of patterns within
26553 the vector to match what compare-elim now expects.
26554 (addsi3_flags, adc_flags, addsi3_flags peepholes): Likewise.
26555 (andsi3_flags, negsi2_flags, one_cmplsi2_flags): Likewise.
26556 (iorsi3_flags, rotlsi3_flags, rotrsi3_flags): Likewise.
26557 (ashrsi3_flags, lshrsi3_flags, ashlsi3_flags): Likewise.
26558 (ssaddsi3, subsi3_flags, sbb_flags, xorsi3_flags): Likewise.
26559
26560 * config/visium/visium.c (single_set_and_flags): Fix where
26561 we look for cc setter after the compare-elim changes.
26562 * config/visium/visium.md (flags_subst_logic): Fix order of patterns
26563 with the vector to match what compare-elim now expects.
26564 (flags_subst_arith, add<mode>3_insn_set_carry): Likewise.
26565 (add<mode>3_insn_set_overflow, addsi3_insn_set_carry): Likewise.
26566 (addsi3_insn_set_overflow, sub<mode>3_insn_set_carry): Likewise.
26567 (sub<mode>3_insn_set_overflow, subsi3_insn_set_carry): Likewise.
26568 (subsi3_insn_set_overflow, negsi2_insn_set_carry): Likewise.
26569 (neg<mode>2_insn_set_overflow): Likewise.
26570
26571 2017-05-12 Jim Wilson <jim.wilson@linaro.org>
26572
26573 PR middle-end/79794
26574 * expmed.c (extract_bit_field_1): Add alt_rtl argument. Before
26575 maybe_expand_insn call, set ops[0].target. If still set after call,
26576 set alt_rtl. Add extra arg to recursive calls.
26577 (extract_bit_field): Add alt_rtl argument. Pass to
26578 extract_bit_field.
26579 * expmed.h (extract_bit_field): Fix prototype.
26580 * expr.c (emit_group_load_1, copy_blkmode_from_reg)
26581 (copy_blkmode_to_reg, read_complex_part, store_field): Pass extra NULL
26582 to extract_bit_field_calls.
26583 (expand_expr_real_1): Pass alt_rtl to expand_expr_real instead of 0.
26584 Pass alt_rtl to extract_bit_field calls.
26585 * calls.c (store_unaligned_arguments_into_psuedos)
26586 load_register_parameters): Pass extra NULL to extract_bit_field calls.
26587 * optabs.c (maybe_legitimize_operand): Clear op->target when call
26588 gen_reg_rtx.
26589 * optabs.h (struct expand_operand): Add target bitfield.
26590
26591 2017-05-12 Uros Bizjak <ubizjak@gmail.com>
26592
26593 * compare-elim.c (try_eliminate_compare): Canonicalize
26594 operation with embedded compare to
26595 [(set (reg:CCM) (compare:CCM (operation) (immediate)))
26596 (set (reg) (operation)].
26597
26598 * config/i386/i386.c (TARGET_FLAGS_REGNUM): New define.
26599
26600 2017-05-12 Uros Bizjak <ubizjak@gmail.com>
26601
26602 PR target/80723
26603 * config/i386/i386.c (ix86_rtx_cost) [case PLUS]: Ignore the
26604 cost of adding a carry flag for ADC instruction.
26605 [case MINUS]: Ignore the cost of subtracting a carry flag
26606 for SBB instruction.
26607
26608 2017-05-12 Steven Munroe <munroesj@gcc.gnu.org>
26609
26610 * config.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h,
26611 and x86intrin.h
26612 * config/rs6000/bmiintrin.h: New file.
26613 * config/rs6000/bmi2intrin.h: New file.
26614 * config/rs6000/x86intrin.h: New file.
26615
26616 2017-05-12 Jeff Law <law@redhat.com>
26617
26618 * tree-vrp.c (vrp_dom_walker::before_dom_children): Push unwinding
26619 markers.
26620
26621 2017-05-12 Peter Bergner <bergner@vnet.ibm.com>
26622
26623 PR middle-end/80707
26624 * tree-cfg.c: Remove cfg edges of unreachable case statements.
26625
26626 2017-05-12 Will Schmidt <will_schmidt@vnet.ibm.com>
26627
26628 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
26629 early expansion of vector divide builtins.
26630 (builtin_function_type): Add VSX_BUILTIN_UDIV_V2DI to the list of
26631 builtins identified as having unsigned arguments.
26632
26633 2017-05-12 Will Schmidt <will_schmidt@vnet.ibm.com>
26634
26635 * config/rs6000/rs6000.c (gimple-fold.h): New #include.
26636 (rs6000_gimple_fold_builtin): Add handling for early GIMPLE
26637 expansion of vector logical operations (and, andc, or, xor,
26638 nor, orc, nand).
26639
26640 2017-05-12 Will Schmidt <will_schmidt@vnet.ibm.com>
26641
26642 * gimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.
26643 * gimple-fold.h (create_tmp_reg_or_ssa_name): New prototype.
26644
26645 2017-05-12 Will Schmidt <will_schmidt@vnet.ibm.com>
26646
26647 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
26648 early GIMPLE expansion of vector multiplies.
26649
26650 2017-05-12 Prakhar Bahuguna <prakhar.bahuguna@arm.com>
26651
26652 * config/arm/arm.md (movsi): Add TARGET_32BIT in addition to the
26653 TARGET_HAVE_MOVT conditional.
26654 (movt splitter): Likewise.
26655
26656 2017-05-12 Richard Biener <rguenther@suse.de>
26657
26658 * tree-ssa-sccvn.h (has_VN_INFO): Declare.
26659 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
26660 Fold all stmts not inplace.
26661
26662 2017-05-12 Richard Biener <rguenther@suse.de>
26663
26664 PR tree-optimization/80713
26665 * tree-ssa-pre.c (remove_dead_inserted_code): Clear
26666 inserted_exprs bit for not removed stmts.
26667
26668 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
26669
26670 PR middle-end/69921
26671 * tree-parloops.c (create_parallel_loop): Set "oacc kernels
26672 parallelized" attribute for parallelized OpenACC kernels.
26673 * omp-offload.c (execute_oacc_device_lower): Use it.
26674
26675 * omp-expand.c (expand_omp_target) <GF_OMP_TARGET_KIND_OACC_KERNELS>:
26676 Set "oacc kernels" attribute.
26677 * omp-general.c (oacc_set_fn_attrib): Remove is_kernel formal
26678 parameter. Adjust all users.
26679 (oacc_fn_attrib_kernels_p): Remove function.
26680 * omp-offload.c (execute_oacc_device_lower): Look for "oacc
26681 kernels" attribute instead of calling oacc_fn_attrib_kernels_p.
26682 * tree-ssa-loop.c (gate_oacc_kernels): Likewise.
26683 * tree-parloops.c (create_parallel_loop): If oacc_kernels_p,
26684 assert "oacc kernels" attribute is set.
26685
26686 2017-05-11 Carl Love <cel@us.ibm.com>
26687
26688 * config/rs6000/rs6000-c: Add support for built-in functions
26689 vector unsigned char vec_popcnt (vector signed char)
26690 vector unsigned char vec_popcnt (vector unsigned char)
26691 vector unsigned short vec_popcnt (vector signed short)
26692 vector unsigned short vec_popcnt (vector unsigned short)
26693 vector unsigned int vec_popcnt (vector signed int)
26694 vector unsigned int vec_popcnt (vector unsigned int)
26695 vector unsigned long long vec_popcnt (vector signed long long)
26696 vector unsigned long long vec_popcnt (vector unsigned long long)
26697 vector signed long long vec_slo (vector signed long long,
26698 vector signed char)
26699 vector signed long long vec_slo (vector signed long long,
26700 vector unsigned char)
26701 vector unsigned long long vec_slo (vector unsigned long long,
26702 vector signed char)
26703 vector unsigned long long vec_slo (vector unsigned long long,
26704 vector unsigned char)
26705 * config/rs6000/rs6000-builtin.def: Add definitions for VPOPCNTUB,
26706 VPOPCNTUH, VPOPCNTUW, and VPOPCNTUD overloads.
26707 * config/rs6000/altivec.h: Add define for vec_popcnt, vec_popcntb,
26708 vec_popcnth, vec_popcntw and vec_popcntd built-in functions.
26709 * doc/extend.texi: Update the built-in documentation file for the
26710 new built-in functions.
26711
26712 2017-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
26713
26714 * attribs.h (sorted_attr_string): Move machine independent
26715 functions for target clone support from the i386 port to common
26716 code. Rename ix86_function_versions to common_function_versions.
26717 Rename make_name to make_unique_name.
26718 (common_function_versions): Likewise.
26719 (make_unique_name): Likewise.
26720 (make_dispatcher_decl): Likewise.
26721 (is_function_default_version): Likewise.
26722 * attribs.c (attr_strcmp): Likewise.
26723 (sorted_attr_string): Likewise.
26724 (common_function_versions): Likewise.
26725 (make_unique_name): Likewise.
26726 (make_dispatcher_decl): Likewise.
26727 (is_function_default_version): Likewise.
26728 * config/i386/i386.c (attr_strcmp): Likewise.
26729 (sorted_attr_string): Likewise.
26730 (ix86_function_versions): Likewise.
26731 (make_name): Likewise.
26732 (make_dispatcher_decl): Likewise.
26733 (is_function_default_version): Likewise.
26734 (TARGET_OPTION_FUNCTION_VERSIONS): Update target function hook.
26735
26736 2017-05-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26737
26738 PR target/80695
26739 * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
26740 Account for direct move costs for vec_construct of integer
26741 vectors.
26742
26743 2017-05-11 Uros Bizjak <ubizjak@gmail.com>
26744
26745 PR target/80706
26746 * config/i386/sync.md (UNSPEC_LDX_ATOMIC): New unspec.
26747 (UNSPEC_STX_ATOMIC): Ditto.
26748 (loaddi_via_sse): New insn.
26749 (storedi_via_sse): Ditto.
26750 (atomic_loaddi_fpu): Emit loaddi_via_sse and storedi_via_sse.
26751 Update corresponding peephole2 patterns.
26752 (atomic_storedi_fpu): Ditto.
26753
26754 2017-05-11 Julia Koval <julia.koval@intel.com>
26755
26756 * config/i386/avx512fintrin.h (_mm_mask_rsqrt14_sd)
26757 (_mm_maskz_rsqrt14_sd, _mm_mask_rsqrt14_ss, _mm_maskz_rsqrt14_ss):
26758 New intrinsics.
26759 * config/i386/i386-builtin.def (__builtin_ia32_rsqrt14sd_mask)
26760 (__builtin_ia32_rsqrt14ss_mask): New builtins.
26761 * config/i386/sse.md (rsqrt14_<mode>_mask): New pattern.
26762
26763 2017-05-11 Nathan Sidwell <nathan@acm.org>
26764
26765 * graphite-poly.c: Include dumpfile.h.
26766
26767 * dumpfle.h (dump_function): Declare here ...
26768 * tree-dump.h (dump_function): ... not here.
26769 * dumpfile.c: #include tree-cfg.h.
26770 (dump_function): Move here from ...
26771 * tree-dump.c (dump_function): ... here.
26772 * gimplify.c: #include splay-tree.h, not tree-dump.h.
26773 * graphite-poly.c: Don't include tree-dump.h.
26774 * cgraphclones.c: Include dumpfile.h not tree-dump.h.
26775 * print-tree.c: Likewise.
26776 * stor-layout.c: Likewise.
26777 * tree-nested.c: Likewise.
26778
26779 * dumpfile.c (dump_start): Use TDF_FLAGS.
26780 (dump_enable_all): Fix TDF_KIND check thinko.
26781
26782 2017-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
26783
26784 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
26785 array entries to represent two legal parameterizations of the
26786 overloaded __builtin_cmpb function, as represented by the
26787 P6_OV_BUILTIN_CMPB constant.
26788 (altivec_resolve_overloaded_builtin): Add special case handling
26789 for the __builtin_cmpb function, as represented by the
26790 P6_OV_BUILTIN_CMPB constant.
26791 * config/rs6000/rs6000-builtin.def (BU_P6_2): New macro.
26792 (BU_P6_64BIT_2): New macro.
26793 (BU_P6_OVERLOAD_2): New macro
26794 (CMPB_32): Add 32-bit compare-bytes support for 32-bit only targets.
26795 (CMPB): Add 64-bit compare-bytes support for 32-bit and 64-bit targets.
26796 (CMPB): Add overload support to represent both 32-bit and 64-bit
26797 compare-bytes function.
26798 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
26799 support for TARGET_CMPB.
26800 * config/rs6000/rs6000.h: Add support for RS6000_BTM_CMPB.
26801 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
26802 documentation of the __builtin_cmpb overloaded built-in function.
26803
26804 2017-05-11 Richard Biener <rguenther@suse.de>
26805
26806 PR tree-optimization/80705
26807 * tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
26808 bases are not vectorizable.
26809
26810 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26811
26812 * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
26813 when counting register pressure.
26814
26815 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26816
26817 * tree-ssa-loop-ivopts.c (compare_cost_pair): New.
26818 (iv_ca_more_deps): Renamed to ...
26819 (iv_ca_compare_deps): ... this.
26820 (iv_ca_extend): Extend iv_ca if NEW_CP is cheaper than OLD_CP.
26821
26822 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26823
26824 * tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump
26825 to ...
26826 (determine_group_iv_costs): ... here.
26827 (find_inv_vars_cb): Record inv var if it's not recorded before.
26828
26829 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26830
26831 * tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
26832 (get_shiftadd_cost): Ditto.
26833
26834 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26835
26836 * tree-ssa-address.c: Include header file.
26837 (move_hint_to_base): Return TRUE if BASE_HINT is moved to memory
26838 address.
26839 (add_to_parts): Refactor.
26840 (addr_to_parts): New parameter. Update use of move_hint_to_base.
26841 (create_mem_ref): Update use of addr_to_parts. Re-associate addr
26842 in new order.
26843
26844 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26845
26846 PR tree-optimization/53090
26847 * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New enum value
26848 COMP_IV_EXPR_2.
26849 (extract_cond_operands): Detect condition with IV on both sides
26850 and return COMP_IV_EXPR_2.
26851 (find_interesting_uses_cond): Add iv_use for both IVs in condition.
26852 (rewrite_use_compare): Simplify by removing call to function
26853 extract_cond_operands.
26854
26855 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26856
26857 * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
26858 (extract_cond_operands): Detect condition comparing against non-
26859 invariant bound and return appropriate enum value.
26860 (find_interesting_uses_cond): Update use of extract_cond_operands.
26861 Handle its return value accordingly.
26862 (determine_group_iv_cost_cond, rewrite_use_compare): Ditto.
26863
26864 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26865
26866 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate
26867 nonlinear iv_use computation in loop invariant sensitive way.
26868
26869 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26870
26871 * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
26872 (find_iv_candidates): Call relate_compare_use_with_all_cands.
26873
26874 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26875
26876 * tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
26877 (dump_cand): Support iv_cand.inv_exprs.
26878 (add_candidate_1): Record invariant exprs in iv_cand.inv_exprs
26879 for candidates.
26880 (iv_ca_set_no_cp, iv_ca_set_cp, free_loop_data): Support
26881 iv_cand.inv_exprs.
26882
26883 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26884
26885 * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move
26886 from ...
26887 * tree-ssa-address.c (multiplier_allowed_in_address_p): ... to here
26888 as local function. Include necessary header files.
26889 * tree-ssa-loop-ivopts.h (multiplier_allowed_in_address_p): Delete.
26890
26891 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26892
26893 * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
26894
26895 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26896
26897 * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more
26898 operators: TRUNC_DIV_EXPR, BIT_AND_EXPR, BIT_IOR_EXPR, LSHIFT_EXPR,
26899 RSHIFT_EXPR and BIT_NOT_EXPR.
26900
26901 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26902
26903 * tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
26904 (adjust_setup_cost): New parameter supporting round up adjustment.
26905 (struct address_cost_data): Delete.
26906 (force_expr_to_var_cost): Don't bound cost with spill_cost.
26907 (split_address_cost, ptr_difference_cost): Delete.
26908 (difference_cost, compare_aff_trees, record_inv_expr): Delete.
26909 (struct ainc_cost_data): New struct.
26910 (get_address_cost_ainc): New function.
26911 (get_address_cost, get_computation_cost): Reimplement.
26912 (determine_group_iv_cost_address): Record inv_expr for all uses of
26913 a group.
26914 (determine_group_iv_cost_cond): Call get_loop_invariant_expr.
26915 (iv_ca_has_deps): Reimplemented to ...
26916 (iv_ca_more_deps): ... this. Check if NEW_CP introduces more deps
26917 than OLD_CP.
26918 (iv_ca_extend): Call iv_ca_more_deps.
26919
26920 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26921
26922 * tree-ssa-address.c (struct mem_address): Move to header file.
26923 (valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
26924 * tree-ssa-address.h (struct mem_address): Move from C file.
26925 (valid_mem_ref_p, move_fixed_address_to_symbol): Declare.
26926
26927 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26928
26929 * tree-affine.h (aff_combination_type): New interface.
26930 (aff_combination_zero_p): Remove static.
26931 (aff_combination_const_p): New interface.
26932 (aff_combination_singleton_var_p): New interfaces.
26933
26934 2017-05-11 Richard Biener <rguenther@suse.de>
26935
26936 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
26937 Skip unreachable blocks and destinations.
26938 (eliminate): Move stmt removal and fixup ...
26939 (fini_eliminate): ... here. Skip inserted exprs.
26940 (pass_pre::execute): Move fini_pre after fini_eliminate.
26941 * tree-ssa-tailmerge.c: Include tree-cfgcleanup.h.
26942 (tail_merge_optimize): Run cleanup_tree_cfg if requested by
26943 PRE to get rid of dead code that has invalid SSA form and
26944 split critical edges again.
26945
26946 2017-05-11 Bin Cheng <bin.cheng@arm.com>
26947
26948 * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
26949
26950 2017-05-11 Richard Biener <rguenther@suse.de>
26951
26952 * passes.c (execute_function_todo): Verify loops if they are
26953 said to be up-to-date.
26954 * cfgexpand.c (pass_expand::execute): Discard loops for -dx.
26955 * trans-mem.c (pass_tm_edges::execute): Mark loops for fixup.
26956
26957 2017-05-10 John David Anglin <danglin@gcc.gnu.org>
26958
26959 PR target/80090
26960 * config/pa/pa.c (pa_assemble_integer): When outputting a SYMBOL_REF,
26961 handle calling assemble_external ourself.
26962
26963 PR target/79027
26964 * config/pa/pa.c (pa_cannot_change_mode_class): Reject changes to/from
26965 modes with zero size. Enhance comment.
26966
26967 2017-05-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26968
26969 * config/rs6000/rs6000.c (altivec_init_builtins): Define POWER8
26970 built-ins for vec_xl and vec_xst with short and char pointer
26971 arguments.
26972
26973 2017-05-10 Sebastian Peryt <sebastian.peryt@intel.com>
26974
26975 * config/i386/avx512fintrin.h (_mm_mask_max_round_sd)
26976 (_mm_maskz_max_round_sd, _mm_mask_max_round_ss)
26977 (_mm_maskz_max_round_ss, _mm_mask_min_round_sd)
26978 (_mm_maskz_min_round_sd, _mm_mask_min_round_ss)
26979 (_mm_maskz_min_round_ss): New intrinsics.
26980 * config/i386/i386-builtin-types.def (V2DF, V2DF, V2DF, V2DF, UQI, INT)
26981 (V4SF, V4SF, V4SF, V4SF, UQI, INT): New function type aliases.
26982 * config/i386/i386-builtin.def (__builtin_ia32_maxsd_mask_round)
26983 (__builtin_ia32_maxss_mask_round, __builtin_ia32_minsd_mask_round)
26984 (__builtin_ia32_minss_mask_round): New builtins.
26985 * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
26986 (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
26987 * config/i386/sse.md (<sse>_vm<code><mode>3<round_saeonly_name>):
26988 Rename to ...
26989 (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): ... this.
26990 (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|%0, %1, %<iptr>2<round_saeonly_op3>}):
26991 Change to ...
26992 (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}):
26993 ... this.
26994
26995 2017-05-10 Sebastian Peryt <sebastian.peryt@intel.com>
26996
26997 * config/i386/avx512fintrin.h (_mm_mask_mul_round_sd)
26998 (_mm_maskz_mul_round_sd, _mm_mask_mul_round_ss)
26999 (_mm_maskz_mul_round_ss, _mm_mask_div_round_sd)
27000 (_mm_maskz_div_round_sd, _mm_mask_div_round_ss)
27001 (_mm_maskz_div_round_ss, _mm_mask_mul_sd, _mm_maskz_mul_sd)
27002 (_mm_mask_mul_ss, _mm_maskz_mul_ss, _mm_mask_div_sd)
27003 (_mm_maskz_div_sd, _mm_mask_div_ss, _mm_maskz_div_ss): New intrinsics.
27004 * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
27005 (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
27006 * config/i386/i386-builtin.def (__builtin_ia32_divsd_mask_round)
27007 (__builtin_ia32_divss_mask_round, __builtin_ia32_mulsd_mask_round)
27008 (__builtin_ia32_mulss_mask_round): New builtins.
27009 * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
27010 (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
27011 * config/i386/sse.md (<sse>_vm<multdiv_mnemonic><mode>3<round_name>):
27012 Rename to ...
27013 (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): ... this.
27014 (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
27015 Change to ...
27016 (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
27017 ... this.
27018
27019 2017-05-10 Julia Koval <julia.koval@intel.com>
27020
27021 * config/i386/avxintrin.h (_mm256_set_m128, _mm256_set_m128d)
27022 (_mm256_set_m128i, _mm256_setr_m128, _mm256_setr_m128d)
27023 (_mm256_setr_m128i): New intrinsics.
27024
27025 2017-05-10 Julia Koval <julia.koval@intel.com>
27026
27027 * config/i386/avx512fintrin.h (_mm_mask_rcp14_sd)
27028 (_mm_maskz_rcp14_sd, _mm_mask_rcp14_ss)
27029 (_mm_maskz_rcp14_ss): New intrinsics.
27030 * config/i386/i386-builtin.def (__builtin_ia32_rcp14sd_mask)
27031 (__builtin_ia32_rcp14ss_mask): New builtins.
27032 * config/i386/sse.md (srcp14<mode>_mask): New pattern.
27033
27034 2017-05-10 Peter Bergner <bergner@vnet.ibm.com>
27035
27036 PR tree-optimization/51513
27037 * tree-cfg.c (gimple_seq_unreachable_p): New function.
27038 (assert_unreachable_fallthru_edge_p): Use it.
27039 (group_case_labels_stmt): Likewise.
27040 * tree-cfg.h: Prototype it.
27041 * stmt.c: Include cfghooks.h and tree-cfg.h.
27042 (emit_case_dispatch_table) <gap_label>: New local variable.
27043 Use it to fill dispatch table gaps.
27044 Test for default_label before updating probabilities.
27045 (expand_case) <default_label>: Remove unneeded initialization.
27046 Test for unreachable default case statement and remove its edge.
27047 Set default_label accordingly.
27048 * tree-ssa-ccp.c (optimize_unreachable): Update comment.
27049
27050 2017-05-10 Carl Love <cel@us.ibm.com>
27051
27052 * config/rs6000/rs6000-c: Add support for built-in functions
27053 vector signed char vec_neg (vector signed char)
27054 vector signed short int vec_neg (vector short int)
27055 vector signed int vec_neg (vector signed int)
27056 vector signed long long vec_neg (vector signed long long)
27057 vector float vec_neg (vector float)
27058 vector double vec_neg (vector double)
27059 * config/rs6000/rs6000-builtin.def: Add definitions for NEG function
27060 overload.
27061 * config/rs6000/altivec.h: Add define for vec_neg
27062 * doc/extend.texi: Update the built-in documentation for the
27063 new built-in functions.
27064
27065 2017-05-10 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27066
27067 PR tree-optimization/77644
27068 * match.pd (sqrt(x) cmp sqrt(y) -> x cmp y): New pattern.
27069
27070 2017-05-10 Nathan Sidwell <nathan@acm.org>
27071
27072 * dumpfile.h (TDI_lang_all): New.
27073 (TDF_KIND): New. Renumber others
27074 (TDF_LANG, TDF_TREE, TDF_RTL, TDF_IPA): Enumerate value, rather
27075 than bits.
27076 * dumpfile.c (dump_files): Mark language dumps as TDF_LANG. add
27077 lang-all.
27078 (get_dump_file_name): Adjust suffix generation.
27079 (dump_enable_all): Use TDF_KIND.
27080 * doc/invoke.texi (-fdump-lang-all): Document.
27081
27082 * dumpfile.h: Tabify.
27083
27084 2017-05-10 Wilco Dijkstra <wdijkstr@arm.com>
27085
27086 PR target/80671
27087 * config/aarch64/cortex-a57-fma-steering.c (merge_forest):
27088 Move member access before delete.
27089
27090 2017-05-10 Alexandre Oliva <aoliva@redhat.com>
27091
27092 * tree-inline.c (expand_call_inline): Split block at stmt
27093 before the call.
27094
27095 2017-05-09 Michael Meissner <meissner@linux.vnet.ibm.com>
27096
27097 PR target/68163
27098 * config/rs6000/rs6000.md (f32_lr): Delete mode attributes that
27099 are now unused after splitting mov{sf,sd}_hardfloat.
27100 (f32_lr2): Likewise.
27101 (f32_lm): Likewise.
27102 (f32_lm2): Likewise.
27103 (f32_li): Likewise.
27104 (f32_li2): Likewise.
27105 (f32_lv): Likewise.
27106 (f32_sr): Likewise.
27107 (f32_sr2): Likewise.
27108 (f32_sm): Likewise.
27109 (f32_sm2): Likewise.
27110 (f32_si): Likewise.
27111 (f32_si2): Likewise.
27112 (f32_sv): Likewise.
27113 (f32_dm): Likewise.
27114 (f32_vsx): Likewise.
27115 (f32_av): Likewise.
27116 (mov<mode>_hardfloat): Split into separate movsf and movsd pieces.
27117 For movsf, order stores so the VSX stores occur before the GPR
27118 store which encourages the register allocator to use a traditional
27119 FPR instead of a GPR. For movsd, order the stores so that the GPR
27120 store comes before the VSX stores to allow the power6 to work.
27121 This is due to the power6 not having a 32-bit integer store
27122 instruction from a FPR.
27123 (movsf_hardfloat): Likewise.
27124 (movsd_hardfloat): Likewise.
27125
27126 2017-05-09 Martin Sebor <msebor@redhat.com>
27127
27128 PR translation/80280
27129 * config/sol2-c.c (cmn_err_flag_specs): Initialize new data member
27130 added in r247778.
27131
27132 PR translation/80280
27133 * config/i386/msformat-c.c (ms_printf_flag_specs): Initialize new
27134 data member added in r247778.
27135 (ms_scanf_flag_specs, ms_strftime_flag_specs): Same.
27136
27137 2017-05-09 Nathan Sidwell <nathan@acm.org>
27138
27139 * tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Unconditionally pure.
27140
27141 * ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope
27142 typedefs.
27143
27144 2017-05-09 Marek Polacek <polacek@redhat.com>
27145
27146 * doc/invoke.texi: Fix typo.
27147
27148 2017-05-09 Richard Biener <rguenther@suse.de>
27149
27150 * tree-vrp.c (vrp_val_is_max): Adjust comment.
27151 (vrp_val_is_min): Likewise.
27152 (set_value_range_to_value): Likewise.
27153 (set_value_range_to_nonnegative): Likewise.
27154 (gimple_assign_nonzero_p): Likewise.
27155 (gimple_stmt_nonzero_p): Likewise.
27156 (vrp_int_const_binop): Likewise. Remove unreachable case.
27157 (adjust_range_with_scev): Adjust comments.
27158 (compare_range_with_value): Likewise.
27159 (extract_range_from_phi_node): Likewise.
27160 (test_for_singularity): Likewise.
27161
27162 2017-05-09 Richard Biener <rguenther@suse.de>
27163
27164 * tree-vrp.c (get_single_symbol): Add assert that we don't
27165 get overflowed constants as invariant part.
27166 (compare_values_warnv): Add comment before the TREE_NO_WARNING
27167 checks. Use wi::cmp instead of recursing for integer constants.
27168 (compare_values): Just ignore whether we assumed undefined
27169 overflow instead of failing the compare.
27170 (extract_range_for_var_from_comparison_expr): Add comment before the
27171 TREE_NO_WARNING sets.
27172 (test_for_singularity): Likewise.
27173 (extract_range_from_comparison): Do not disable optimization
27174 when we assumed undefined overflow.
27175 (extract_range_basic): Remove init of unused var.
27176
27177 2017-05-09 Richard Biener <rguenther@suse.de>
27178
27179 * tree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify.
27180 (extract_range_from_multiplicative_op_1): Adjust.
27181 (extract_range_from_binary_expr_1): Use int_const_binop.
27182
27183 2017-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
27184
27185 PR target/80101
27186 * config/rs6000/power6.md: Replace store_data_bypass_p calls with
27187 rs6000_store_data_bypass_p in seven define_bypass directives and
27188 in several comments.
27189 * config/rs6000/rs6000-protos.h: Add prototype for
27190 rs6000_store_data_bypass_p function.
27191 * config/rs6000/rs6000.c (rs6000_store_data_bypass_p): New
27192 function implements slightly different (rs6000-specific) semantics
27193 than store_data_bypass_p, returning false rather than aborting
27194 with assertion error when arguments do not satisfy the
27195 requirements of store data bypass.
27196 (rs6000_adjust_cost): Replace six calls of store_data_bypass_p with
27197 rs6000_store_data_bypass_p.
27198
27199 2017-05-08 Max Filippov <jcmvbkbc@gmail.com>
27200
27201 * config/xtensa/xtensa-protos.h
27202 (xtensa_initial_elimination_offset): New declaration.
27203 * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
27204 New function. Move its body from the INITIAL_ELIMINATION_OFFSET
27205 macro definition, add case for FRAME_POINTER_REGNUM when
27206 FRAME_GROWS_DOWNWARD.
27207 * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): New macro definition.
27208 (INITIAL_ELIMINATION_OFFSET): Replace body with call to
27209 xtensa_initial_elimination_offset.
27210
27211 2017-05-08 Nathan Sidwell <nathan@acm.org>
27212
27213 * doc/invoke.texi: Alphabetize -fdump options.
27214
27215 2017-05-08 Martin Sebor <msebor@redhat.com>
27216
27217 PR translation/80280
27218 * config/sol2-c.c (solaris_pragma_align): Correct quoting.
27219
27220 2017-05-08 Bernd Edlinger <bernd.edlinger@hotmail.de>
27221
27222 * target.def (compute_frame_layout): New optional target hook.
27223 * doc/tm.texi.in (TARGET_COMPUTE_FRAME_LAYOUT): Add hook.
27224 * doc/tm.texi (TARGET_COMPUTE_FRAME_LAYOUT): Add documentation.
27225 * lra-eliminations.c (update_reg_eliminate): Call compute_frame_layout
27226 target hook.
27227 * reload1.c (verify_initial_elim_offsets): Likewise.
27228 * config/arm/arm.c (TARGET_COMPUTE_FRAME_LAYOUT): Define.
27229 (use_simple_return_p): Call arm_compute_frame_layout if needed.
27230 (arm_get_frame_offsets): Split up into this ...
27231 (arm_compute_frame_layout): ... and this function.
27232
27233 2017-05-08 Richard Sandiford <richard.sandiford@arm.com>
27234
27235 * config/aarch64/constraints.md (Usa): New constraint.
27236 * config/aarch64/aarch64.md (*movsi_aarch64, *movdi_aarch64): Use it.
27237
27238 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
27239
27240 * config.gcc (arm*-*-*): Set TM_MULTILIB_CONFIG from
27241 with_multilib_list after it has been checked.
27242
27243 2017-05-08 Richard Biener <rguenther@suse.de>
27244
27245 * tree-ssa-pre.c (bitmap_set_and): Avoid bitmap copy.
27246 (bitmap_set_subtract_values): Likewise.
27247
27248 2017-05-08 Richard Biener <rguenther@suse.de>
27249
27250 * tree-vrp.c (gimple_assign_nonzero_warnv_p): Rename to ...
27251 (gimple_assign_nonzero): ... this and remove strict_overflow_p
27252 argument.
27253 (gimple_stmt_nonzero_warnv_p): Rename to ...
27254 (gimple_stmt_nonzero_p): ... this and remove strict_overflow_p
27255 argument.
27256 (vrp_stmt_computes_nonzero): Remove strict_overflow_p argument.
27257 (extract_range_basic): Adjust, do not disable propagation on
27258 strict overflow sensitive simplification.
27259 (vrp_visit_cond_stmt): Likewise.
27260
27261 2017-05-05 Jan Hubicka <hubicka@ucw.cz>
27262
27263 * ipa-inline-analysis.c (estimate_function_body_sizes): Recompute
27264 body size unconditionally.
27265
27266 2017-05-07 Jeff Law <law@redhat.com>
27267
27268 Revert:
27269 2017-05-06 Jeff Law <law@redhat.com>
27270 PR tree-optimization/78496
27271 * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
27272 code.
27273
27274 PR tree-optimization/78496
27275 * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
27276 (simplify_stmt_using_ranges): Call it.
27277 (vrp_dom_walker::before_dom_children): Extract equivalences
27278 from an ASSERT_EXPR with an equality comparison against a
27279 constant.
27280
27281 2017-05-06 Jeff Law <law@redhat.com>
27282
27283 PR tree-optimization/78496
27284 * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
27285 code.
27286
27287 PR tree-optimization/78496
27288 * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
27289 (simplify_stmt_using_ranges): Call it.
27290 (vrp_dom_walker::before_dom_children): Extract equivalences
27291 from an ASSERT_EXPR with an equality comparison against a
27292 constant.
27293
27294 2017-05-06 Richard Sandiford <richard.sandiford@linaro.org>
27295
27296 * lra-constraints.c (lra_copy_reg_equiv): New function.
27297 (split_reg): Use it to copy equivalence information from the
27298 original register to the spill register.
27299
27300 2017-05-06 Richard Sandiford <richard.sandiford@linaro.org>
27301
27302 PR rtl-optimization/75964
27303 * simplify-rtx.c (simplify_const_relational_operation): Remove
27304 invalid handling of comparisons of integer ABS.
27305
27306 2017-05-06 Uros Bizjak <ubizjak@gmail.com>
27307
27308 * config/i386/i386.c (ext_80387_constant_init): Do not explicitly
27309 initialize to zero.
27310 (init_regs): Remove declaration.
27311 (function_arg_advance_32): Initialize error_p as boolean variable.
27312
27313 2017-05-05 Nathan Sidwell <nathan@acm.org>
27314
27315 * store-motion.c (remove_reachable_equiv_notes): Reformat long
27316 lines. Use for (;;).
27317
27318 2017-05-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27319
27320 * config/rs6000/rs6000.c (rs6000_vect_nonmem): New static var.
27321 (rs6000_init_cost): Initialize rs6000_vect_nonmem.
27322 (rs6000_add_stmt_cost): Update rs6000_vect_nonmem.
27323 (rs6000_finish_cost): Avoid vectorizing simple copy loops with
27324 VF=2 that require versioning.
27325
27326 2017-05-05 David Malcolm <dmalcolm@redhat.com>
27327
27328 * diagnostic.h (CARET_LINE_MARGIN): Convert from macro to const
27329 int.
27330
27331 2017-05-05 David Malcolm <dmalcolm@redhat.com>
27332
27333 * diagnostic.h (diagnostic_override_option_index): Convert from
27334 macro to inline function.
27335
27336 2017-05-05 David Malcolm <dmalcolm@redhat.com>
27337
27338 * diagnostic.c (last_module_changed_p): New function.
27339 (set_last_module): New function.
27340 (diagnostic_report_current_module): Convert macro usage to
27341 the above functions.
27342 * diagnostic.h (diagnostic_context::last_module): Strengthen
27343 from const line_map * to const line_map_ordinary *.
27344 (diagnostic_last_module_changed): Delete macro.
27345 (diagnostic_set_last_module): Delete macro.
27346
27347 2017-05-05 David Malcolm <dmalcolm@redhat.com>
27348
27349 * diagnostic.c (diagnostic_impl): Replace report_diagnostic
27350 with diagnostic_report_diagnostic.
27351 (diagnostic_n_impl_richloc): Likewise.
27352 * diagnostic.h (report_diagnostic): Delete macro.
27353 * rtl-error.c (diagnostic_for_asm): Replace report_diagnostic
27354 with diagnostic_report_diagnostic.
27355 * substring-locations.c (format_warning_va): Likewise.
27356
27357 2017-05-05 David Malcolm <dmalcolm@redhat.com>
27358
27359 * diagnostic.c (diagnostic_report_diagnostic): Eliminate
27360 save/restor of format_spec. Move option-printing code to...
27361 (print_option_information): ...this new function, and
27362 reimplement by simply printing to the pretty_printer,
27363 rather than appending to the format string.
27364
27365 2017-05-05 David Malcolm <dmalcolm@redhat.com>
27366
27367 * diagnostic.c (diagnostic_report_diagnostic): Split out pragma
27368 handling logic into...
27369 (update_effective_level_from_pragmas): ...this new function.
27370
27371 2017-05-04 Andrew Waterman <andrew@sifive.com>
27372
27373 * config/riscv/riscv.opt (mstrict-align): New option.
27374 * config/riscv/riscv.h (STRICT_ALIGNMENT): Use it. Update comment.
27375 (SLOW_UNALIGNED_ACCESS): Define.
27376 (riscv_slow_unaligned_access): Declare.
27377 * config/riscv/riscv.c (riscv_tune_info): Add slow_unaligned_access
27378 field.
27379 (riscv_slow_unaligned_access): New variable.
27380 (rocket_tune_info): Set slow_unaligned_access to true.
27381 (optimize_size_tune_info): Set slow_unaligned_access to false.
27382 (riscv_cpu_info_table): Add entry for optimize_size_tune_info.
27383 (riscv_valid_lo_sum_p): Use TARGET_STRICT_ALIGN.
27384 (riscv_option_override): Set riscv_slow_unaligned_access.
27385 * doc/invoke.texi: Add -mstrict-align to RISC-V.
27386
27387 2017-05-04 Kito Cheng <kito.cheng@gmail.com>
27388
27389 * config/riscv/riscv.md: Unify indentation.
27390
27391 2017-05-05 Michael Meissner <meissner@linux.vnet.ibm.com>
27392
27393 PR target/79038
27394 PR target/79202
27395 PR target/79203
27396 * config/rs6000/rs6000.md (u code attribute): Add FIX and
27397 UNSIGNED_FIX.
27398 (extendsi<mode>2): Add support for doing sign extension via
27399 VUPKHSW and XXPERMDI if the value is in Altivec registers and we
27400 don't have ISA 3.0 instructions.
27401 (extendsi<mode>2 splitter): Likewise.
27402 (fix_trunc<mode>si2): If we are at ISA 2.07 (VSX small integer),
27403 generate the normal insns since SImode can now go in vector
27404 registers. Disallow the special UNSPECs needed for previous
27405 machines to hide SImode being used. Add new insns
27406 fctiw{,w}_<mode>_smallint if SImode can go in vector registers.
27407 (fix_trunc<mode>si2_stfiwx): Likewise.
27408 (fix_trunc<mode>si2_internal): Likewise.
27409 (fixuns_trunc<mode>si2): Likewise.
27410 (fixuns_trunc<mode>si2_stfiwx): Likewise.
27411 (fctiw<u>z_<mode>_smallint): Likewise.
27412 (fctiw<u>z_<mode>_mem): New combiner pattern to prevent conversion
27413 of floating point to 32-bit integer from doing a direct move to
27414 the GPR registers to do a store.
27415 (fctiwz_<mode>): Break long line.
27416
27417 2017-05-05 Bin Cheng <bin.cheng@arm.com>
27418
27419 * Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
27420 * tree-ssa-loop-ivopts.c (compute_max_addr_offset): Delete.
27421 (addr_list, addr_offset_valid_p): New.
27422 (split_address_groups): Check offset validity with above function.
27423 (gt-tree-ssa-loop-ivopts.h): Include header file.
27424
27425 2017-05-05 Nathan Sidwell <nathan@acm.org>
27426
27427 * config.gcc (arm*-*-*): Add missing 'fi'.
27428
27429 2017-05-05 Steve Ellcey <sellcey@cavium.com>
27430
27431 * doc/invoke.texi (-fopt-info): Explicitly say order of options
27432 included in -fopt-info does not matter.
27433 * doc/optinfo.texi (-fopt-info): Fix description of default
27434 behavour. Explicitly say order of options included in -fopt-info
27435 does not matter.
27436
27437 2017-05-05 Thomas Preud'homme <thomas.preudhomme@arm.com>
27438
27439 * config.gcc: Allow combinations of aprofile and rmprofile values for
27440 --with-multilib-list.
27441 * config/arm/t-multilib: New file.
27442 * config/arm/t-aprofile: Remove initialization of MULTILIB_*
27443 variables. Remove setting of ISA and floating-point ABI in
27444 MULTILIB_OPTIONS and MULTILIB_DIRNAMES. Set architecture and FPU in
27445 MULTI_ARCH_OPTS_A and MULTI_ARCH_DIRS_A rather than MULTILIB_OPTIONS
27446 and MULTILIB_DIRNAMES respectively. Add comment to introduce all
27447 matches. Add architecture matches for marvel-pj4 and generic-armv7-a
27448 CPU options.
27449 * config/arm/t-rmprofile: Likewise except for the matches changes.
27450 * doc/install.texi (--with-multilib-list): Document the combination of
27451 aprofile and rmprofile values and warn about pitfalls in doing that.
27452
27453 2017-05-05 Wilco Dijkstra <wdijkstr@arm.com>
27454
27455 * config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w.
27456 (movdi_aarch64): Likewise.
27457
27458 2017-05-05 Jakub Jelinek <jakub@redhat.com>
27459
27460 PR tree-optimization/80632
27461 * tree-switch-conversion.c (struct switch_conv_info): Add target_vop
27462 field.
27463 (build_arrays): Initialize it for virtual phis.
27464 (fix_phi_nodes): Use it for virtual phis.
27465
27466 PR tree-optimization/80558
27467 * tree-vrp.c (extract_range_from_binary_expr_1): Optimize
27468 [x, y] op z into [x op, y op z] for op & or | if conditions
27469 are met.
27470
27471 2017-05-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
27472 Prakhar Bahuguna <prakhar.bahuguna@arm.com>
27473
27474 PR target/71607
27475 * config/arm/arm.md (use_literal_pool): Remove.
27476 (64-bit immediate split): No longer takes cost into consideration
27477 if arm_disable_literal_pool is enabled.
27478 * config/arm/arm.c (arm_tls_referenced_p): Add diagnostic if TLS is
27479 used when arm_disable_literal_pool is enabled.
27480 (arm_max_const_double_inline_cost): Remove use of
27481 arm_disable_literal_pool.
27482 (push_minipool_fix): Add assert.
27483 (arm_reorg): Add return if arm_disable_literal_pool is enabled.
27484 * config/arm/vfp.md (no_literal_pool_df_immediate): New.
27485 (no_literal_pool_sf_immediate): New.
27486
27487 2017-05-05 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27488
27489 PR tree-optimization/80613
27490 * tree-ssa-dce.c (propagate_necessity): Remove cases for
27491 BUILT_IN_STRDUP and BUILT_IN_STRNDUP.
27492
27493 2017-05-05 Richard Biener <rguenther@suse.de>
27494
27495 * tree-ssa-pre.c (get_or_alloc_expr_for): Simplify.
27496
27497 2017-05-05 Georg-Johann Lay <avr@gjlay.de>
27498
27499 * config/avr/avr.md [flag_strict_overflow]: Remove any occurence
27500 of this flag from insn conditions due to removal from r247495.
27501
27502 2017-05-05 Wilco Dijkstra <wdijkstr@arm.com>
27503
27504 * config/arm/aarch-common.c (arm_early_load_addr_dep_ptr):
27505 New function.
27506 (arm_early_store_addr_dep_ptr): Likewise.
27507 * config/arm/aarch-common-protos.h
27508 (arm_early_load_addr_dep_ptr): Add prototype.
27509 (arm_early_store_addr_dep_ptr): Likewise.
27510 * config/arm/cortex-a53.md: Add new bypasses.
27511
27512 2017-05-05 Jakub Jelinek <jakub@redhat.com>
27513
27514 * tree.c (next_type_uid): Change type to unsigned.
27515 (type_hash_canon): Decrement back next_type_uid if
27516 freeing a type node with the highest TYPE_UID. For INTEGER_TYPEs
27517 also ggc_free TYPE_MIN_VALUE, TYPE_MAX_VALUE and TYPE_CACHED_VALUES
27518 if possible.
27519
27520 2017-05-04 Martin Sebor <msebor@redhat.com>
27521
27522 * builtins.c: Fix a trivial typo in a comment.
27523
27524 PR middle-end/79234
27525 * builtins.c (check_sizes): Adjust to handle reading past the end.
27526 Avoid printing excessive upper bound of ranges. Use %E to print
27527 tree nodes instead of converting them to %wu.
27528 (expand_builtin_memchr): New function.
27529 (compute_dest_size): Rename...
27530 (compute_objsize): ...to this.
27531 (expand_builtin_memcpy): Adjust.
27532 (expand_builtin_mempcpy): Adjust.
27533 (expand_builtin_strcat): Adjust.
27534 (expand_builtin_strcpy): Adjust.
27535 (check_strncat_sizes): Adjust.
27536 (expand_builtin_strncat): Adjust.
27537 (expand_builtin_strncpy): Adjust and simplify.
27538 (expand_builtin_memset): Adjust.
27539 (expand_builtin_bzero): Adjust.
27540 (expand_builtin_memcmp): Adjust.
27541 (expand_builtin): Handle memcmp.
27542 (maybe_emit_chk_warning): Check strncat just once.
27543
27544 2017-05-04 Martin Sebor <msebor@redhat.com>
27545
27546 PR preprocessor/79214
27547 PR middle-end/79222
27548 PR middle-end/79223
27549 * builtins.c (check_sizes): Add inlining context and issue
27550 warnings even when -Wno-system-headers is set.
27551 (check_strncat_sizes): Same.
27552 (expand_builtin_strncat): Same.
27553 (expand_builtin_memmove): New function.
27554 (expand_builtin_stpncpy): Same.
27555 (expand_builtin): Handle memmove and stpncpy.
27556
27557 2017-05-04 Bin Cheng <bin.cheng@arm.com>
27558
27559 * tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr
27560 which is not used any more.
27561
27562 2017-05-04 Wilco Dijkstra <wdijkstr@arm.com>
27563
27564 * config/aarch64/aarch64.c (generic_tunings): Update prefetch model.
27565
27566 2017-05-04 Wilco Dijkstra <wdijkstr@arm.com>
27567
27568 * config/aarch64/aarch64.c (cortexa35_tunings): Set jump alignment to 4.
27569 (cortexa53_tunings): Likewise.
27570 (cortexa57_tunings): Likewise.
27571 (cortexa72_tunings): Likewise.
27572 (cortexa73_tunings): Likewise.
27573
27574 2017-05-04 Wilco Dijkstra <wdijkstr@arm.com>
27575
27576 * config/aarch64/aarch64.c (generic_tunings): Set jump alignment to 4.
27577 Set loop alignment to 8.
27578
27579 2017-05-04 Martin Sebor <msebor@redhat.com>
27580
27581 PR translation/80280
27582 * builtins.c (expand_builtin_object_size): Add missing quoting to
27583 %D and like directives.
27584 * hsa-gen.c (hsa_type_for_scalar_tree_type): Same.
27585 (hsa_type_for_tree_type): Same.
27586 (verify_function_arguments): Same.
27587 * symtab.c (symbol_table::change_decl_assembler_name): Same.
27588 * varasm.c (get_section): Same.
27589 (mark_weak): Same.
27590
27591 2017-05-04 Martin Sebor <msebor@redhat.com>
27592
27593 PR translation/80280
27594 * config/i386/i386.c (ix86_function_versions): Quote a %D directive.
27595
27596 2017-05-04 Wilco Dijkstra <wdijkstr@arm.com>
27597
27598 * config/aarch64/aarch64.c (generic_addrcost_table):
27599 Change HI/TI mode setting.
27600
27601 2017-05-04 Martin Jambor <mjambor@suse.cz>
27602
27603 PR tree-optimization/80622
27604 * tree-sra.c (comes_initialized_p): New function.
27605 (build_accesses_from_assign): Only set write lazily when
27606 comes_initialized_p is false.
27607 (analyze_access_subtree): Use comes_initialized_p.
27608 (propagate_subaccesses_across_link): Assert !comes_initialized_p
27609 instead of testing for PARM_DECL.
27610
27611 2017-05-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27612
27613 * config/aarch64/aarch64.md (prefetch); Adjust predicate and
27614 constraint on operand 0 to allow more general addressing modes.
27615 Adjust output template.
27616 * config/aarch64/aarch64.c (aarch64_address_valid_for_prefetch_p):
27617 New function.
27618 * config/aarch64/aarch64-protos.h
27619 (aarch64_address_valid_for_prefetch_p): Declare prototype.
27620 * config/aarch64/constraints.md (Dp): New address constraint.
27621 * config/aarch64/predicates.md (aarch64_prefetch_operand): New
27622 predicate.
27623
27624 2017-05-04 Jan Hubicka <hubicka@ucw.cz>
27625
27626 * ipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter;
27627 update use of estimate_ipcp_clone_size_and_time.
27628 (estimate_local_effects): Update use of
27629 estimate_ipcp_clone_size_and_time and perform_estimation_of_a_value.
27630 * ipa-inline.h (estimate_ipcp_clone_size_and_time): Update prototype.
27631 * ipa-inline-analysis.c (estimate_ipcp_clone_size_and_time):
27632 Return nonspecialized time.
27633
27634 2017-05-04 Richard Biener <rguenther@suse.de>
27635
27636 * tree-ssa-alias.c (get_continuation_for_phi): Improve looking
27637 for the last VUSE which def dominates the PHI. Directly call
27638 maybe_skip_until.
27639 (get_continuation_for_phi_1): Remove.
27640
27641 2017-05-04 Richard Sandiford <richard.sandiford@linaro.org>
27642
27643 * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Add commentary
27644 to explain the use of truncating division. Cap the number of
27645 iterations to the maximum given by nb_iterations_upper_bound,
27646 if defined.
27647
27648 2017-05-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
27649
27650 * configure.ac (--enable-mingw-wildcard): Add new configurable feature.
27651 * configure: Regenerate.
27652 * config.in: Regenerate.
27653 * config/i386/driver-mingw32.c: new file.
27654 * config/i386/x-mingw32: Add rule to build driver-mingw32.o.
27655 * config.host: Link driver-mingw32.o on MinGW host.
27656 * doc/install.texi: Document new --enable-mingw-wildcard configure
27657 option.
27658
27659 2017-05-04 Marek Polacek <polacek@redhat.com>
27660
27661 PR tree-optimization/80612
27662 * calls.c (get_size_range): Check for INTEGRAL_TYPE_P.
27663
27664 2017-05-04 Prakhar Bahuguna <prakhar.bahuguna@arm.com>
27665 Andre Simoes Dias Vieira <andre.simoesdiasvieira@arm.com>
27666
27667 * config/arm/arm.md (movsi): Change TARGET_32BIT to TARGET_HAVE_MOVT.
27668 (movt splitter): Likewise.
27669 * config/arm/arm.c (arm_option_check_internal): Change arm_arch_thumb2
27670 to TARGET_HAVE_MOVT, and merge with -mslow-flash-data check.
27671 (const_ok_for_arm): Change else to else if (TARGET_THUMB2) and add else
27672 block for Thumb-1 with MOVT.
27673 (thumb2_legitimate_address_p): Move code block ...
27674 (can_avoid_literal_pool_for_label_p): ... into this new function.
27675 (thumb1_legitimate_address_p): Add check for TARGET_HAVE_MOVT and
27676 literal pool.
27677 (thumb_legitimate_constant_p): Add conditional on TARGET_HAVE_MOVT
27678 * doc/invoke.texi (-mpure-code): Change "ARMv7-M targets" for
27679 "M-profile targets with the MOVT instruction".
27680
27681 2017-05-04 Prakhar Bahuguna <prakhar.bahuguna@arm.com>
27682
27683 * config/arm/arm-builtins.c (arm_init_builtins): Rename
27684 __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
27685 __builtin_arm_stfscr to __builtin_arm_set_fpscr.
27686
27687 2017-05-04 Martin Liska <mliska@suse.cz>
27688
27689 * tree-vrp.c (simplify_cond_using_ranges_2): Remove unused
27690 variable cond_code.
27691
27692 2017-05-04 Richard Biener <rguenther@suse.de>
27693
27694 * tree.c (array_at_struct_end_p): Handle arrays at struct
27695 end with flexarrays more conservatively. Refactor and treat
27696 arrays of arrays or aggregates more strict. Fix
27697 VIEW_CONVERT_EXPR handling. Remove allow_compref argument.
27698 * tree.c (array_at_struct_end_p): Adjust prototype.
27699 * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust.
27700 * gimple-fold.c (get_range_strlen): Likewise.
27701 * tree-chkp.c (chkp_may_narrow_to_field): Likewise.
27702
27703 2017-05-04 Richard Biener <rguenther@suse.de>
27704
27705 PR tree-optimization/31130
27706 * tree-vrp.c (needs_overflow_infinity): Remove as always returning
27707 false.
27708 (supports_overflow_infinity): Likewise.
27709 (is_negative_overflow_infinity): Likewise.
27710 (is_positive_overflow_infinity): Likewise.
27711 (is_overflow_infinity): Likewise.
27712 (stmt_overflow_infinity): Likewise.
27713 (overflow_infinity_range_p): Likewise.
27714 (usable_range_p): Remove as always returning true.
27715 (make_overflow_infinity): Remove.
27716 (negative_overflow_infinity): Likewise.
27717 (positive_overflow_infinity): Likewise.
27718 (avoid_overflow_infinity): Likewise.
27719 (set_value_range): Adjust accordingly.
27720 (set_value_range_to_nonnegative): Likewise, remove now unused
27721 overflow_infinity arg.
27722 (vrp_operand_equal_p): Adjust.
27723 (update_value_range): Likewise.
27724 (range_int_cst_singleton_p): Likewise.
27725 (operand_less_p): Likewise.
27726 (compare_values_warnv): Likewise.
27727 (extract_range_for_var_from_comparison_expr): Likewise.
27728 (vrp_int_const_binop): Likewise.
27729 (zero_nonzero_bits_from_vr): Likewise.
27730 (extract_range_from_multiplicative_op_1): Likewise.
27731 (extract_range_from_binary_expr_1): Likewise.
27732 (extract_range_from_unary_expr): Likewise.
27733 (extract_range_from_comparison): Likewise.
27734 (extract_range_basic): Likewise.
27735 (adjust_range_with_scev): Likewise.
27736 (compare_ranges): Likewise.
27737 (compare_range_with_value): Likewise.
27738 (dump_value_range): Likewise.
27739 (test_for_singularity): Likewise, remove strict_overflow_p parameter
27740 never used.
27741 (simplify_cond_using_ranges): Adjust.
27742
27743 2017-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
27744
27745 * brig-builtins.def: Added a builtin for class_f64.
27746 * builtin-types.def: Added a builtin type needed by class_f64.
27747
27748 2017-05-03 Jason Merrill <jason@redhat.com>
27749
27750 * timevar.def: Add TV_CONSTEXPR.
27751
27752 2017-05-03 David Malcolm <dmalcolm@redhat.com>
27753
27754 * common.opt (fdiagnostics-parseable-fixits): Fix typo.
27755
27756 2017-05-03 Martin Jambor <mjambor@suse.cz>
27757
27758 * ipa-prop.c (ipa_update_after_lto_read): Removed.
27759 * ipa-prop.h (ipa_update_after_lto_read): Remove declaration.
27760 * ipa-cp.c (ipcp_propagate_stage): Do not call
27761 ipa_update_after_lto_read.
27762 * ipa-inline.c (ipa_inline): Likewise.
27763
27764 2017-05-03 Martin Jambor <mjambor@suse.cz>
27765
27766 * ipa-prop.h (ipa_edge_args): Make a class. Mark with for_user GTY
27767 tag. Added a default constructor and a destructor.
27768 (ipa_edge_args_sum_t): New class;
27769 (ipa_edge_args_sum): Declare.
27770 (ipa_edge_args_vector): Remove declaration.
27771 (IPA_EDGE_REF): Use ipa_edge_args_sum.
27772 (ipa_free_edge_args_substructures): Remove declaration.
27773 (ipa_check_create_edge_args): Use ipa_edge_args_sum.
27774 (ipa_edge_args_info_available_for_edge_p): Likewise.
27775 * ipa-prop.c (ipa_edge_args_vector): Removed.
27776 (edge_removal_hook_holder): Likewise.
27777 (edge_duplication_hook_holder): Likewise.
27778 (ipa_edge_args_sum): New variable.
27779 (ipa_propagate_indirect_call_infos): Test ipa_edge_args_sum instead of
27780 ipa_edge_args_vector.
27781 (ipa_free_edge_args_substructures): Likewise.
27782 (ipa_free_all_edge_args): Free ipa_edge_args_sum instead of
27783 ipa_edge_args_vector.
27784 (ipa_edge_removal_hook): Turned into method
27785 ipa_edge_args_sum_t::remove.
27786 (ipa_edge_duplication_hook): Turned into method
27787 ipa_edge_args_sum_t::duplicate.
27788 (ipa_register_cgraph_hooks): Create ipa_edge_args_sum instead of
27789 registering edge hooks.
27790 (ipa_unregister_cgraph_hooks): Do not unregister edge hooks.
27791 * ipa-inline-analysis.c (estimate_function_body_sizes): Test
27792 ipa_edge_args_sum instead of ipa_edge_args_vector.
27793 * ipa-profile.c (ipa_profile): Likewise.
27794
27795 2017-05-03 Martin Jambor <mjambor@suse.cz>
27796
27797 * symbol-summary.h (function_summary): New method exists.
27798 (function_summary::symtab_removal): Deallocate through release.
27799 (call_summary): New class.
27800 (gt_ggc_mx): New overload.
27801 (gt_pch_nx): Likewise.
27802 (gt_pch_nx): Likewise.
27803
27804 2017-05-03 Jeff Law <law@redhat.com>
27805
27806 PR tree-optimization/78496
27807 * tree-vrp.c (simplify_cond_using_ranges_1): Renamed
27808 from simplify_cond_using_ranges. Split off code to walk
27809 backwards through casts into ...
27810 (simplify_cond_using_ranges_2): New function.
27811 (simplify_stmt_using_ranges): Call simplify_cond_using_ranges_1.
27812 (execute_vrp): After identifying jump threads, call
27813 simplify_cond_using_ranges_2.
27814
27815 2017-05-03 Jan Hubicka <hubicka@ucw.cz>
27816
27817 PR bootstrap/80609
27818 * ipa-inline.h (inline_summary): Add ctor.
27819 (create_ggc): Do not use ggc_cleared_alloc.
27820
27821 2017-05-03 Jeff Downs <heydowns@somuchpressure.net>
27822 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27823
27824 * gcc.c (handle_braces): Support escaping in switch matching
27825 text.
27826 * doc/invoke.texi (Spec Files): Document it.
27827 Remove superfluous @code markup in items.
27828
27829 2017-05-03 David Malcolm <dmalcolm@redhat.com>
27830
27831 * diagnostic-show-locus.c (struct column_range): New struct.
27832 (get_affected_columns): New function.
27833 (get_printed_columns): New function.
27834 (struct correction): New struct.
27835 (correction::ensure_capacity): New function.
27836 (correction::ensure_terminated): New function.
27837 (struct line_corrections): New struct.
27838 (line_corrections::~line_corrections): New dtor.
27839 (line_corrections::add_hint): New function.
27840 (layout::print_trailing_fixits): Reimplement in terms of the new
27841 classes.
27842 (selftest::test_overlapped_fixit_printing): New function.
27843 (selftest::diagnostic_show_locus_c_tests): Call it.
27844
27845 2017-05-03 Nathan Sidwell <nathan@acm.org>
27846
27847 Canonicalize canonical type hashing
27848 * tree.h (type_hash_canon_hash): Declare.
27849 * tree.c (type_hash_list, attribute_hash_list): Move into
27850 type_hash_canon_hash.
27851 (build_type_attribute_qual_variant): Break out hash code calc into
27852 type_hash_canon_hash.
27853 (type_hash_canon_hash): New. Generic type hash computation.
27854 (build_range_type_1, build_array_type_1, build_function_type,
27855 build_method_type_directly, build_offset_type, build_complex_type,
27856 make_vector_type): Call it.
27857
27858 2017-05-03 Richard Biener <rguenther@suse.de>
27859
27860 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
27861 When all DRs have unknown misaligned do not always peel
27862 when there is a store but apply the same costing model as if
27863 there were only loads.
27864
27865 2017-05-03 Richard Biener <rguenther@suse.de>
27866
27867 Revert
27868 PR tree-optimization/80492
27869 * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
27870 compare_base_decls returning dont-know properly.
27871
27872 2017-05-03 Thomas Preud'homme <thomas.preudhomme@arm.com>
27873
27874 * config/arm/iterators.md (CCSI): New mode iterator.
27875 (arch): New mode attribute.
27876 * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Rename into ...
27877 (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): This and ...
27878 (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): This. Use CCSI
27879 code iterator for success result mode.
27880 * config/arm/arm.c (arm_expand_compare_and_swap): Adapt code to use
27881 the corresponding new insn generators.
27882
27883 2017-05-03 Bin Cheng <bin.cheng@arm.com>
27884
27885 Revert r247509
27886 2017-05-02 Bin Cheng <bin.cheng@arm.com>
27887 * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
27888
27889 2017-05-03 Richard Sandiford <richard.sandiford@linaro.org>
27890
27891 * tree-data-ref.h (SUB_CONFLICTS_IN_A): Wrap SUB argument in brackets.
27892 (SUB_CONFLICTS_IN_B, SUB_LAST_CONFLICT, SUB_DISTANCE): Likewise.
27893 (DDR_A): Wrap DDR argument in brackets.
27894 (DDR_B, DDR_AFFINE_P, DDR_ARE_DEPENDENT, DDR_SUBSCRIPTS): Likewise.
27895 (DDR_LOOP_NEST, DDR_INNER_LOOP, DDR_SELF_REFERENCE): Likewise.
27896 (DDR_REVERSED_P): Likewise.
27897
27898 2017-05-03 Jakub Jelinek <jakub@redhat.com>
27899
27900 PR tree-optimization/79472
27901 * tree-switch-conversion.c (struct switch_conv_info): Add
27902 contiguous_range and default_case_nonstandard fields.
27903 (collect_switch_conv_info): Compute contiguous_range and
27904 default_case_nonstandard fields, don't clear final_bb if
27905 contiguous_range and only the default case doesn't have the required
27906 structure.
27907 (check_all_empty_except_final): Set default_case_nonstandard instead
27908 of failing if contiguous_range and the default case doesn't have empty
27909 block.
27910 (check_final_bb): Add SWTCH argument, don't fail if contiguous_range
27911 and only the default case doesn't have the required constants. Skip
27912 virtual phis.
27913 (gather_default_values): Skip virtual phis. Allow non-NULL CASE_LOW
27914 if default_case_nonstandard.
27915 (build_constructors): Build constant 1 just once. Assert that default
27916 values aren't inserted in between cases if contiguous_range. Skip
27917 virtual phis.
27918 (build_arrays): Skip virtual phis.
27919 (prune_bbs): Add DEFAULT_BB argument, don't remove that bb.
27920 (fix_phi_nodes): Don't add e2f phi arg if default_case_nonstandard.
27921 Handle virtual phis.
27922 (gen_inbound_check): Handle default_case_nonstandard case.
27923 (process_switch): Adjust check_final_bb caller. Call
27924 gather_default_values with the first non-default case instead of
27925 default case if default_case_nonstandard.
27926
27927 2017-05-02 Nathan Sidwell <nathan@acm.org>
27928
27929 * ggc-page.c (move_ptes_to_front): Replace unsigned >0 with i--
27930 check. Fix formatting.
27931
27932 2017-05-02 Jan Hubicka <hubicka@ucw.cz>
27933
27934 * ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff
27935 errors when comparing specialized and unspecialized times.
27936
27937 2017-05-02 David Malcolm <dmalcolm@redhat.com>
27938
27939 * diagnostic-show-locus.c
27940 (layout::should_print_annotation_line_p): Make private.
27941 (layout::print_annotation_line): Make private.
27942 (layout::annotation_line_showed_range_p): Make private.
27943 (layout::show_ruler): Make private.
27944 (layout::print_source_line): Make private. Pass in line and
27945 line_width, rather than calling location_get_source_line. Drop
27946 returned value.
27947 (layout::print_leading_fixits): New method.
27948 (layout::print_any_fixits): Rename to...
27949 (layout::print_trailing_fixits): ...this, and make private.
27950 Don't print newline fixits.
27951 (diagnostic_show_locus): Move logic for printing one row into...
27952 (layout::print_line): ...this new function. Move the
27953 location_get_source_line call and error-handling from
27954 print_source_line to here. Call print_leading_fixits, and rename
27955 print_any_fixits to print_trailing_fixits.
27956 (selftest::test_fixit_insert_containing_newline): Update now that
27957 newlines are partially supported.
27958 (selftest::test_fixit_insert_containing_newline_2): New test.
27959 (selftest::test_fixit_replace_containing_newline): Update comments.
27960 (selftest::diagnostic_show_locus_c_tests): Call the new test.
27961 * edit-context.c (class added_line): New class.
27962 (class edited_line): Describe newline handling in comment.
27963 (edited_line::actually_edited_p): New method.
27964 (edited_line::print_content): Delete redundant decl.
27965 (edited_line::m_predecessors): New field.
27966 (edited_file::print_content): Call edited_line::print_content.
27967 (edited_file::print_diff): Update to support newlines.
27968 (edited_file::print_diff_hunk): Likewise.
27969 (edited_file::print_run_of_changed_lines): New function.
27970 (edited_file::print_diff_line): Convert to...
27971 (print_diff_line): ...this.
27972 (edited_file::get_effective_line_count): New function.
27973 (edited_line::edited_line): Initialize new field m_predecessors.
27974 (edited_line::~edited_line): Clean up m_predecessors.
27975 (edited_line::apply_fixit): Handle newlines.
27976 (edited_line::get_effective_line_count): New function.
27977 (edited_line::print_content): New function.
27978 (edited_line::print_diff_lines): New function.
27979 (selftest::test_applying_fixits_insert_containing_newline): New
27980 test.
27981 (selftest::test_applying_fixits_replace_containing_newline): New
27982 test.
27983 (selftest::insert_line): New function.
27984 (selftest::test_applying_fixits_multiple_lines): Add example of
27985 inserting a line.
27986 (selftest::edit_context_c_tests): Call the new tests.
27987
27988 2017-05-02 Bin Cheng <bin.cheng@arm.com>
27989
27990 * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete
27991 parameter cand. Update dump information.
27992 (get_computation_cost): Update uses.
27993
27994 2017-05-02 Bin Cheng <bin.cheng@arm.com>
27995
27996 * tree-ssa-loop-ivopts.c (get_computation_aff_1): New.
27997 (get_computation_aff): Reorder parameters. Use get_computation_aff_1.
27998 (get_computation_at, rewrite_use_address): Update use of
27999 get_computation_aff.
28000
28001 2017-05-02 Bin Cheng <bin.cheng@arm.com>
28002
28003 * tree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters.
28004 (get_computation): Delete.
28005 (get_computation_cost): Implement like get_computation_cost_at.
28006 Use get_computation_at.
28007 (get_computation_cost_at): Delete.
28008 (rewrite_use_nonlinear_expr): Use get_computation_at.
28009 (rewrite_use_compare, remove_unused_ivs): Ditto.
28010
28011 2017-05-02 Bin Cheng <bin.cheng@arm.com>
28012
28013 * tree-ssa-loop-ivopts.c (rewrite_use_address): Simple refactor.
28014
28015 2017-05-02 Bin Cheng <bin.cheng@arm.com>
28016
28017 * tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs.
28018 (ivopts_global_cost_for_size): Rename parameter and update uses.
28019 (iv_ca_recount_cost): Update uses.
28020 (iv_ca_set_remove_invs, iv_ca_set_no_cp): Record invariants and
28021 candidates seperately in n_invs and n_cands.
28022 (iv_ca_set_add_invs, iv_ca_set_cp, iv_ca_new): Ditto.
28023
28024 2017-05-02 Bin Cheng <bin.cheng@arm.com>
28025
28026 * tree-ssa-loop-ivopts.c (struct walk_tree_data): New.
28027 (find_inv_vars_cb): New.
28028 (find_depends): Renamed to ...
28029 (find_inv_vars): ... this.
28030 (add_candidate_1, force_var_cost): Call find_inv_vars.
28031 (split_address_cost, determine_group_iv_cost_cond): Ditto.
28032
28033 2017-05-02 Bin Cheng <bin.cheng@arm.com>
28034
28035 * tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to
28036 inv_vars. Add inv_exprs.
28037 (struct iv_cand): Rename depends_on to inv_vars.
28038 (struct ivopts_data): Rename max_inv_id/n_invariant_uses to
28039 max_inv_var_id/n_inv_var_uses. Move max_inv_expr_id around.
28040 Refactor field used_inv_exprs from has_map to array n_inv_expr_uses.
28041 (dump_cand): Dump inv_vars.
28042 (tree_ssa_iv_optimize_init): Support inv_vars and inv_exprs.
28043 (record_invariant, find_depends, add_candidate_1): Ditto.
28044 (set_group_iv_cost, force_var_cost): Ditto.
28045 (split_address_cost, ptr_difference_cost, difference_cost): Ditto.
28046 (get_computation_cost_at, get_computation_cost): Ditto.
28047 (determine_group_iv_cost_generic): Ditto.
28048 (determine_group_iv_cost_address): Ditto.
28049 (determine_group_iv_cost_cond, autoinc_possible_for_pair): Ditto.
28050 (determine_group_iv_costs): Ditto.
28051 (iv_ca_recount_cost): Update call to ivopts_global_cost_for_size.
28052 (iv_ca_set_remove_invariants): Renamed to ...
28053 (iv_ca_set_remove_invs): ... this. Support inv_vars and inv_exprs.
28054 (iv_ca_set_no_cp): Use iv_ca_set_remove_invs.
28055 (iv_ca_set_add_invariants): Renamed to ...
28056 (iv_ca_set_add_invs): ... this. Support inv_vars and inv_exprs.
28057 (iv_ca_set_cp): Use iv_ca_set_add_invs.
28058 (iv_ca_has_deps): Support inv_vars and inv_exprs.
28059 (iv_ca_new, iv_ca_free, iv_ca_dump, free_loop_data): Ditto.
28060 (create_new_ivs): Remove useless dump.
28061
28062 2017-05-02 Bin Cheng <bin.cheng@arm.com>
28063
28064 * tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo
28065 iv_cand code.
28066 (determine_group_iv_cost_cond, determine_iv_cost): Ditto.
28067 (iv_ca_set_no_cp, create_new_iv): Ditto.
28068
28069 2017-05-02 Bin Cheng <bin.cheng@arm.com>
28070
28071 * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
28072
28073 2017-05-02 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
28074
28075 * tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of
28076 function tree_check2.
28077
28078 2017-05-02 Martin Liska <mliska@suse.cz>
28079
28080 * doc/gcov.texi: Add missing preposition.
28081 * gcov.c (function_info::function_info): Properly fill up
28082 all member variables.
28083
28084 2017-05-02 Tamar Christina <tamar.christina@arm.com>
28085
28086 * expr.c (expand_expr_real_2): Re-cost if previous costs are the same.
28087
28088 2017-05-02 Tamar Christina <tamar.christina@arm.com>
28089
28090 * simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.
28091
28092 2017-05-02 Martin Liska <mliska@suse.cz>
28093
28094 PR lto/77954.
28095 * lto-streamer-in.c (lto_read_tree_1): Remove
28096 LTO_STREAMER_DEBUG.
28097 * lto-streamer.c (struct tree_hash_entry): Likewise.
28098 (struct tree_entry_hasher): Likewise.
28099 (tree_entry_hasher::hash): Likewise.
28100 (tree_entry_hasher::equal): Likewise.
28101 (lto_streamer_init): Likewise.
28102 (lto_orig_address_map): Likewise.
28103 (lto_orig_address_get): Likewise.
28104 (lto_orig_address_remove): Likewise.
28105 * lto-streamer.h: Likewise.
28106 * tree-streamer-in.c (streamer_alloc_tree): Likewise.
28107 * tree-streamer-out.c (streamer_write_tree_header): Likewise.
28108
28109 2017-05-02 Sebastian Peryt <sebastian.peryt@intel.com>
28110
28111 * config/i386/avx512fintrin.h (_mm_mask_add_round_sd)
28112 (_mm_maskz_add_round_sd, _mm_mask_add_round_ss)
28113 (mm_maskz_add_round_ss, _mm_mask_sub_round_sd)
28114 (mm_maskz_sub_round_sd, _mm_mask_sub_round_ss)
28115 (mm_maskz_sub_round_ss, _mm_mask_add_sd)
28116 (mm_maskz_add_sd, _mm_mask_add_ss, _mm_maskz_add_ss)
28117 (mm_mask_sub_sd, _mm_maskz_sub_sd, _mm_mask_sub_ss)
28118 (mm_maskz_sub_ss): New intrinsics.
28119 * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
28120 (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
28121 * config/i386/i386-builtin.def (__builtin_ia32_addsd_mask_round)
28122 (__builtin_ia32_addss_mask_round, __builtin_ia32_subsd_mask_round)
28123 (__builtin_ia32_subss_mask_round): New builtins.
28124 * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
28125 (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
28126 * config/i386/sse.md (<sse>_vm<plusminus_insn><mode>3<round_name>):
28127 Renamed to ...
28128 (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): ... this.
28129 (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
28130 Changed to ...
28131 (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
28132 ... this.
28133
28134 2017-05-02 Martin Jambor <mjambor@suse.cz>
28135
28136 PR tree-optimization/78687
28137 * tree-sra.c (access): New field parent.
28138 (process_subtree_disqualification): New function.
28139 (disqualify_candidate): Call it.
28140 (build_accesses_from_assign): Reset write flag if creating an
28141 assighnment link.
28142 (build_access_subtree): Fill in parent field and also prpagate
28143 down grp_write flag.
28144 (create_artificial_child_access): New parameter set_grp_write, set
28145 grp_write to its value.
28146 (propagate_subaccesses_across_link): Also propagate grp_write flag
28147 values.
28148 (propagate_all_subaccesses): Push the closest parent back to work
28149 queue if add_access_to_work_queue returned true.
28150
28151 2017-05-02 Richard Biener <rguenther@suse.de>
28152
28153 * common.opt (fstrict-overflow): Alias negative to fwrapv.
28154 * doc/invoke.texi (fstrict-overflow): Remove all traces of
28155 -fstrict-overflow documentation.
28156 * tree.h (TYPE_OVERFLOW_UNDEFINED): Do not test flag_strict_overflow.
28157 (POINTER_TYPE_OVERFLOW_UNDEFINED): Test !flag_wrapv instead of
28158 flag_strict_overflow.
28159 * ipa-inline.c (can_inline_edge_p): Do not test flag_strict_overflow.
28160 * lto-opts.c (lto_write_options): Do not stream it.
28161 * lto-wrapper.c (merge_and_complain): Do not handle it.
28162 * opts.c (default_options_table): Do not set -fstrict-overflow.
28163 (finish_options): Likewise do not clear it when sanitizing.
28164 * simplify-rtx.c (simplify_const_relational_operation): Do not
28165 test flag_strict_overflow.
28166
28167 2017-05-02 Uros Bizjak <ubizjak@gmail.com>
28168
28169 * config/alpha/alpha.md (*add<mode>3_ieee): Merge to add<mode>3
28170 using enabled attribute.
28171 (*sub<mode>3_ieee): Merge to sub<mode>3 using enabled attribute.
28172 (*mul<mode>3_ieee): Merge to mul<mode>3 using enabled attribute.
28173 (*div<mode>3_ieee): Merge to div<mode>3 using enabled attribute.
28174 (*sqrt<mode>2_ieee): Merge to sqrt<mode>2 using enabled attribute.
28175 (*fix_truncdfdi_ieee): Merge to *fix_truncdfdi2 using enabled attribute.
28176 (*fix_truncsfdi_ieee): Merge to *fix_truncsfdi2 using enabled attribute.
28177 (*floatdisf_ieee): Merge to floatdisf2 using enabled attribute.
28178 (*floatdidf_ieee): Merge to floatdidf2 using enabled attribute.
28179 (*truncdfsf2_ieee): Merge to truncdfsf2 using enabled attribute.
28180 (*cmpdf_ieee): Merge to *cmpdf_internal using enabled attribute.
28181
28182 2017-05-02 Uros Bizjak <ubizjak@gmail.com>
28183
28184 * config/i386/i386.c (ix86_code_end): Use {FIRST,LAST}_INT_REG.
28185
28186 2017-05-02 Richard Biener <rguenther@suse.de>
28187
28188 PR tree-optimization/80591
28189 Revert
28190 2017-04-10 Richard Biener <rguenther@suse.de>
28191
28192 * tree-ssa-structalias.c (find_func_aliases): Properly handle
28193 asm inputs.
28194
28195 2017-05-02 Richard Biener <rguenther@suse.de>
28196
28197 PR tree-optimization/80549
28198 * tree-cfgcleanup.c (mfb_keep_latches): New helper.
28199 (cleanup_tree_cfg_noloop): Create forwarders to known loop
28200 headers if they do not have a preheader.
28201
28202 2017-05-02 Martin Liska <mliska@suse.cz>
28203
28204 PR other/80589
28205 * common.opt: Fix typo.
28206 * doc/invoke.texi: Likewise.
28207
28208 2017-05-01 Jan Beulich <jbeulich@suse.com>
28209
28210 * config/i386/sse.md (xop_vpermil2<mode>3): Do not allow operand
28211 swapping, add (x,x,m,x,n) alternative.
28212
28213 2017-05-01 Nathan Sidwell <nathan@acm.org>
28214
28215 * calls.c (combine_pending_stack_adjustment_and_call): Remove
28216 unnecessary unadjusted_alignment check.
28217
28218 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
28219
28220 PR c++/80038
28221 * cilk_common.c (expand_builtin_cilk_detach): Move pedigree
28222 operations here.
28223 * gimplify.c (gimplify_cilk_detach): New function.
28224 (gimplify_call_expr, gimplify_modify_expr): Call it as needed.
28225 * tree-core.h: Document EXPR_CILK_SPAWN.
28226 * tree.h (EXPR_CILK_SPAWN): Define.
28227
28228 2017-05-01 David Malcolm <dmalcolm@redhat.com>
28229
28230 * diagnostic-show-locus.c (layout::get_expanded_location): Rewrite
28231 to use new fixit_hint representation, using the "replace" logic.
28232 (get_line_span_for_fixit_hint): Likewise.
28233 (layout::print_any_fixits): Likewise.
28234 (selftest::test_one_liner_many_fixits): Rename to...
28235 (selftest::test_one_liner_many_fixits_1): ...this, and update
28236 comment and expected output to reflect that the multiple fix-it
28237 hints are now consolidated into one insertion.
28238 (selftest::test_one_liner_many_fixits_2): New test.
28239 (selftest::test_diagnostic_show_locus_one_liner): Update for
28240 above.
28241 (selftest::test_fixit_consolidation): Update for fix-it API
28242 change.
28243 * diagnostic.c (print_parseable_fixits): Likewise.
28244 * edit-context.c (edited_line::m_line_events): Convert from
28245 auto_vec <line_event *> to auto_vec <line_event>.
28246 (class line_event): Convert from abstract base class to a concrete
28247 class, taking over the role of replace_event.
28248 (class insert_event): Delete.
28249 (class replace_event): Rename to class line_event. Convert to
28250 half-open range.
28251 (edit_context::add_fixits): Reimplement.
28252 (edit_context::apply_insert): Delete.
28253 (edit_context::apply_replace): Rename to...
28254 (edit_context::apply_fixit): ...this. Convert to half-open range.
28255 (edited_file::apply_insert): Delete.
28256 (edited_file::apply_replace): Rename to...
28257 (edited_file::apply_fixit): ...this.
28258 (edited_line::~edited_line): Drop deletion of events.
28259 (edited_line::apply_insert): Delete.
28260 (edited_line::apply_replace): Rename to...
28261 (edited_line::apply_fixit): ...this. Convert to half-open range.
28262 Update for change to type of m_line_events.
28263 * edit-context.h (edit_context::apply_insert): Delete.
28264 (edit_context::apply_replace): Rename to...
28265 (edit_context::apply_fixit): ...this.
28266
28267 2017-05-01 Martin Sebor <msebor@redhat.com>
28268
28269 * gimple-ssa-sprintf.c (format_integer): Set knownrange when it's
28270 known.
28271
28272 2017-05-01 Uros Bizjak <ubizjak@gmail.com>
28273
28274 PR target/68491
28275 * config/i386/cpuid.h (__get_cpuid): Always return 0 when
28276 __get_cpuid_max returns 0.
28277 (__get_cpuid_count): Ditto.
28278
28279 2017-05-01 Eric Botcazou <ebotcazou@adacore.com>
28280
28281 * tree.c (substitute_in_expr) <tcc_vl_exp>: Also inline a call if the
28282 replacement expression is another instance of one of its arguments.
28283
28284 2017-05-01 Jakub Jelinek <jakub@redhat.com>
28285
28286 PR target/79430
28287 * rtlanal.c (reg_set_p): If reg is a stack_pointer_rtx, also
28288 check for stack push/pop autoinc.
28289 * config/i386/i386.c (ix86_agi_dependent): Return false
28290 if the only reason why modified_in_p returned true is that
28291 addr is SP based and set_insn is a push or pop.
28292
28293 2017-04-29 Jan Hubicka <hubicka@ucw.cz>
28294
28295 * ipa-inline.c (compute_inlined_call_time): Remove now unnecesary
28296 overflow check.
28297
28298 2017-04-29 Jan Hubicka <hubicka@ucw.cz>
28299
28300 PR ipa/79224
28301 * ipa-inline-analysis.c (dump_predicate): Add optional parameter NL.
28302 (account_size_time): Use two predicates - exec_pred and
28303 nonconst_pred_ptr.
28304 (evaluate_conditions_for_known_args): Compute both clause and
28305 nonspec_clause.
28306 (evaluate_properties_for_edge): Evaulate both clause and nonspec_clause.
28307 (inline_summary_t::duplicate): Update.
28308 (estimate_function_body_sizes): Caluculate exec and nonconst predicates
28309 separately.
28310 (compute_inline_parameters): Likewise.
28311 (estimate_edge_size_and_time): Update caluclation of time.
28312 (estimate_node_size_and_time): Compute both time and nonspecialized
28313 time.
28314 (estimate_ipcp_clone_size_and_time): Update.
28315 (inline_merge_summary): Update.
28316 (do_estimate_edge_time): Update.
28317 (do_estimate_edge_size): Update.
28318 (do_estimate_edge_hints): Update.
28319 (inline_read_section, inline_write_summary): Stream both new predicates.
28320 * ipa-inline.c (compute_uninlined_call_time): Take uninlined_call_time
28321 as argument.
28322 (compute_inlined_call_time): Cleanup.
28323 (big_speedup_p): Update.
28324 (edge_badness): Update.
28325 * ipa-inline.h (INLINE_TIME_SCALE): Remove.
28326 (size_time_entry): Replace predicate by exec_predicate and
28327 nonconst_predicate.
28328 (edge_growth_cache_entry): Cache both time nad nonspecialized time.
28329 (estimate_edge_time): Return also nonspec_time.
28330 (reset_edge_growth_cache): Update.
28331
28332 2017-04-29 Jakub Jelinek <jakub@redhat.com>
28333
28334 PR rtl-optimization/80491
28335 * ifcvt.c (noce_process_if_block): When looking for x setter
28336 with missing else_bb, don't check only the insn right before
28337 cond_earliest, but look for the last insn that x is modified in
28338 within the same bb.
28339
28340 PR rtl-optimization/80491
28341 * alias.c (memory_modified_in_insn_p): Return true for CALL_INSNs.
28342
28343 2017-04-29 Marc Glisse <marc.glisse@inria.fr>
28344
28345 PR tree-optimization/80487
28346 * tree-ssa-alias.c (stmt_kills_ref_p): Handle stpncpy and strncpy.
28347
28348 2017-04-29 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28349
28350 PR tree-optimization/79697
28351 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Check if callee
28352 is BUILT_IN_STRDUP, BUILT_IN_STRNDUP, BUILT_IN_REALLOC.
28353 (propagate_necessity): Check if def_callee is BUILT_IN_STRDUP or
28354 BUILT_IN_STRNDUP.
28355 * gimple-fold.c (gimple_fold_builtin_realloc): New function.
28356 (gimple_fold_builtin): Call gimple_fold_builtin_realloc.
28357
28358 2017-04-28 Martin Sebor <msebor@redhat.com>
28359
28360 PR tree-optimization/80523
28361 * gimple-ssa-sprintf.c (target_to_host_charmap): New global variable.
28362 (init_target_to_host_charmap, target_to_host, target_strtol10): New
28363 functions.
28364 (maybe_warn, format_directive, parse_directive): Use new functions.
28365 (pass_sprintf_length::execute): Call init_target_to_host_charmap.
28366
28367 2017-04-28 Marc Glisse <marc.glisse@inria.fr>
28368
28369 * match.pd (X+Z OP Y+Z, X-Z OP Y-Z, Z-X OP Z-Y): New transformations.
28370
28371 2017-04-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
28372
28373 * configure.ac (SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR,
28374 target_header_dir): Set correctly.
28375 * configure: Regenerated.
28376 * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
28377 (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
28378 instead of SYSTEM_HEADER_DIR.
28379
28380 2017-04-28 Jan Hubicka <hubicka@ucw.cz>
28381
28382 * ipa-cp.c (perform_estimation_of_a_value): Turn time to sreal.
28383 (estimate_local_effects): Likewise.
28384 * ipa-inline.c (compute_inlined_call_time, want_inline_small_function_p,
28385 edge_badness, inline_small_functions, dump_overall_stats): LIkewise.
28386 * ipa-inline.h (edge_growth_cache_entry, estimate_time_after_inlining,
28387 estimate_ipcp_clone_size_and_time, do_estimate_edge_time,
28388 do_estimate_edge_time, estimate_edge_time): Likewise.
28389 * ipa-inline-analysis.c (estimate_node_size_and_time,
28390 estimate_ipcp_clone_size_and_time, do_estimate_edge_time): Likewise.
28391 (estimate_time_after_inlining): Remove.
28392
28393 2017-04-28 Martin Liska <mliska@suse.cz>
28394
28395 * doc/gcov.texi: Enhance documentation of gcov.
28396
28397 2017-04-28 Martin Liska <mliska@suse.cz>
28398
28399 * doc/gcov.texi: Sort options in alphabetic order.
28400 * doc/gcov-dump.texi: Likewise.
28401 * doc/gcov-tool.texi: Likewise.
28402 * gcov.c (print_usage): Likewise.
28403 * gcov-dump.c (print_usage): Likewise.
28404 * gcov-tool.c (print_merge_usage_message): Likewise.
28405 (print_rewrite_usage_message): Likewise.
28406 (print_overlap_usage_message): Likewise.
28407
28408 2017-04-28 Martin Liska <mliska@suse.cz>
28409
28410 PR gcov-profile/53915
28411 * gcov.c (format_gcov): Print 'NAN %' when top > bottom.
28412
28413 2017-04-28 Martin Liska <mliska@suse.cz>
28414
28415 PR gcov-profile/79891
28416 * gcov.c (add_line_counts): Assign BBs to lines just if the BB
28417 is marked by compiler as living on a line.
28418 (get_cycles_count): Remove usage of the union.
28419 (output_intermediate_file): Likewise.
28420 (find_source): Fix GNU coding style.
28421 (accumulate_line_counts): Remove old non-all block mode.
28422 (output_lines): Remove usage of the union.
28423 * profile.c (output_location): Include all BBs, even if
28424 belonging to a same line (and file) as a previous BB.
28425
28426 2017-04-28 Martin Liska <mliska@suse.cz>
28427
28428 * gcov.c (process_args): Handle new argument 'w'.
28429 (read_graph_file): Assign ID to BBs.
28430 (output_branch_count): Display BB # if verbose flag is set.
28431 (output_lines): Likewise for arcs.
28432 (print_usage): Add '--verbose' option help.
28433 * doc/gcov.texi: Document --verbose (-w) option.
28434
28435 2017-04-28 Martin Liska <mliska@suse.cz>
28436
28437 * gcov.c (struct block_location_info): New struct.
28438 (process_file): Fill up the new structure.
28439 (read_graph_file): Replace usage of encoding by the newly added
28440 struct.
28441 (add_line_counts): Likewise.
28442 (accumulate_line_counts): Remove usage of the union.
28443 (function_info::function_info): New function.
28444 (function_info::~function_info): Likewise.
28445 (process_file): Call delete instead of release_function.
28446 (release_function): Release the function.
28447 (release_structures): Call delete instead of release_function.
28448 (solve_flow_graph): Replace usage of num_blocks.
28449 (find_exception_blocks): Likewise.
28450 (output_lines): Fix GNU coding style.
28451
28452 2017-04-28 Martin Liska <mliska@suse.cz>
28453
28454 PR driver/56469
28455 * coverage.c (coverage_remove_note_file): New function.
28456 * coverage.h: Declare the function.
28457 * toplev.c (finalize): Clean if an error has been seen.
28458
28459 2017-04-28 Martin Liska <mliska@suse.cz>
28460
28461 PR gcov-profile/80031
28462 * gcov-dump.c (tag_blocks): Just print number of basic blocks.
28463 * gcov-io.h (GCOV_TAG_BLOCKS_NUM): Remove unused macro.
28464 * gcov.c (read_graph_file): Read just number of blocks.
28465 * profile.c (branch_prob): Do not stream 0 flags per a basic
28466 block.
28467
28468 2017-04-28 Martin Liska <mliska@suse.cz>
28469
28470 * gcov-dump.c (tag_*): Add new argument to declarations.
28471 (dump_gcov_file): Likewise.
28472 (tag_blocks): Add and use new argument depth.
28473 (tag_arcs): Likewise.
28474 (tag_lines): Likewise.
28475 (tag_counters): Likewise.
28476 (tag_summary): Likewise.
28477 (dump_working_sets): Use depth to do a proper indentation.
28478
28479 2017-04-28 Jakub Jelinek <jakub@redhat.com>
28480
28481 PR bootstrap/80531
28482 * cgraph.h (symtab_node::debug_symtab): No longer inline.
28483 * symtab.c (symtab_node::debug_symtab): Move definition here.
28484
28485 2017-04-28 Richard Biener <rguenther@suse.de>
28486
28487 * lto-streamer.h (LTO_major_version): Bump to 7.
28488
28489 2017-04-28 Richard Biener <rguenther@suse.de>
28490
28491 * tree-vrp.c (assert_info): New struct.
28492 (add_assert_info): New helper.
28493 (register_edge_assert_for_2): Refactor to add asserts to a vector
28494 of assert_info.
28495 (register_edge_assert_for_1): Likewise.
28496 (register_edge_assert_for): Likewise.
28497 (finish_register_edge_assert_for): New helper actually registering
28498 asserts where live on edge.
28499 (find_conditional_asserts): Adjust.
28500 (find_switch_asserts): Likewise.
28501 (evrp_dom_walker::try_find_new_range): Generalize.
28502 (evrp_dom_walker::before_dom_children): Use register_edge_assert_for.
28503
28504 2017-04-27 Marek Polacek <polacek@redhat.com>
28505
28506 PR sanitizer/80349
28507 * fold-const.c (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Convert
28508 arg10 and arg11 to itype.
28509
28510 2017-04-27 Jonathan Wakely <jwakely@redhat.com>
28511
28512 * doc/extend.texi (Object Size Checking): Improve grammar.
28513
28514 2017-04-27 Richard Earnshaw <rearnsha@arm.com>
28515
28516 PR target/80530
28517 * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Ensure
28518 that the logic for permitting reciprocal estimates matches that
28519 in use_rsqrt_p.
28520
28521 2017-04-27 Jakub Jelinek <jakub@redhat.com>
28522
28523 PR c++/80534
28524 * tree.c (type_cache_hasher::equal): Only compare
28525 TYPE_TYPELESS_STORAGE flag on non-aggregate element types.
28526 (build_array_type_1): Only hash TYPE_TYPELESS_STORAGE flag on
28527 non-aggregate element types.
28528 * tree.h (TYPE_TYPELESS_STORAGE): Fix comment typo, add more details
28529 about the flag on ARRAY_TYPEs in the comment, formatting fix.
28530
28531 2017-04-27 Richard Biener <rguenther@suse.de>
28532
28533 PR middle-end/80533
28534 * emit-rtl.c (set_mem_attributes_minus_bitpos): When
28535 stripping ARRAY_REFs from MEM_EXPR make sure we're not
28536 keeping a reference to a trailing array.
28537
28538 2017-04-27 Richard Biener <rguenther@suse.de>
28539
28540 PR middle-end/80539
28541 * tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
28542 being in loop-closed SSA form conservatively.
28543 (chrec_fold_multiply_poly_poly): Likewise.
28544
28545 2017-04-27 Tamar Christina <tamar.christina@arm.com>
28546
28547 PR middle-end/79665
28548 * expr.c (expand_expr_real_2): Move TRUNC_MOD_EXPR, FLOOR_MOD_EXPR,
28549 CEIL_MOD_EXPR, ROUND_MOD_EXPR cases.
28550
28551 2017-04-27 Jakub Jelinek <jakub@redhat.com>
28552
28553 PR target/77728
28554 * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): Remove.
28555 (aarch64_function_arg_alignment): Return unsigned int again, but still
28556 ignore TYPE_FIELDS chain decls other than FIELD_DECLs.
28557 (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
28558 Don't emit -Wpsabi note.
28559 (aarch64_function_arg_boundary): Likewise.
28560 (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
28561 caller.
28562
28563 2017-04-26 Nathan Sidwell <nathan@acm.org>
28564
28565 * tree.h (crc32_unsigned_n): Declare.
28566 (crc32_unsigned, crc32_unsigned): Make inline.
28567 * tree.c (crc32_unsigned_bits): Replace with ...
28568 (crc32_unsigned_n): ... this.
28569 (crc32_unsigned, crc32_byte): Remove.
28570 (crc32_string): Remove unnecessary braces.
28571
28572 2017-04-25 Jan Hubicka <hubicka@ucw.cz>
28573
28574 * ipa-cp.c (estimate_local_effects): Convert sreal to int.
28575 * ipa-inline-analysis.c (MAX_TIME): Remove.
28576 (account_size_time): Use sreal for time.
28577 (dump_inline_summary): Update.
28578 (estimate_function_body_sizes): Update.
28579 (estimate_edge_size_and_time): Update.
28580 (estimate_calls_size_and_time): Update.
28581 (estimate_node_size_and_time): Update.
28582 (inline_merge_summary): Update.
28583 (inline_update_overall_summary): Update.
28584 (estimate_time_after_inlining): Update.
28585 (inline_read_section): Update.
28586 (inline_write_summary): Update.
28587 * ipa-inline.c (compute_uninlined_call_time): Update.
28588 (compute_inlined_call_time): Update.
28589 (recursive_inlining): Update.
28590 (inline_small_functions): Update.
28591 (dump_overall_stats): Update.
28592 * ipa-inline.h: Include sreal.h.
28593 (size_time_entry): Turn time to sreal.
28594 (inline_summary): Turn self_time nad time to sreal.
28595
28596 2017-04-25 Jan Hubicka <hubicka@ucw.cz>
28597
28598 * sreal.c: Include backend.h, tree.h, gimple.h, cgraph.h and
28599 data-streamer.h
28600 (sreal::stream_out, sreal::stream_in): New.
28601 * sreal.h (sreal::stream_out, sreal::stream_in): Declare.
28602
28603 2017-04-25 Jakub Jelinek <jakub@redhat.com>
28604
28605 * Makefile.in (s-options): Invoke opt-gather.awk with LC_ALL=C in the
28606 environment.
28607
28608 2017-04-25 Uros Bizjak <ubizjak@gmail.com>
28609
28610 PR target/70799
28611 * config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
28612 Handle ASHIFTRT.
28613 (dimode_scalar_chain::compute_convert_gain): Ditto.
28614 (dimode_scalar_chain::make_vector_copies): Ditto.
28615 (dimode_scalar_chain::convert_reg): Ditto.
28616 (dimode_scalar_chain::convert_insn): Ditto.
28617 * config/i386/sse.md (VI24_AVX512BW_1): Remove mode iterator.
28618 (VI248_AVX512BW_1): New mode iterator.
28619 (<mask_codefor>ashr<mode>3<mask_name>): Merge insn pattern with
28620 <mask_codefor>ashrv2di3<mask_name> insn using VI248_AVX512BW_1
28621 mode iterator.
28622
28623 2017-04-25 Martin Sebor <msebor@redhat.com>
28624
28625 PR tree-optimization/80497
28626 * gimple-ssa-sprintf.c (get_int_range): Avoid assuming all integer
28627 constants are representable in HOST_WIDE_INT.
28628 (parse_directive): Ditto.
28629
28630 2017-04-25 Martin Sebor <msebor@redhat.com>
28631
28632 PR bootstrap/80486
28633 * dominance.c (dom_info::m_n_basic_blocks): Change type to unsigned.
28634 (new_zero_array): Adjust signature.
28635 (dom_info::dom_init): Used unsigned rather that size_t.
28636 (dom_info::dom_info): Same.
28637
28638 2017-04-25 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
28639 Jakub Jelinek <jakub@redhat.com>
28640
28641 PR target/77728
28642 * config/arm/arm.c: Include gimple.h.
28643 (aapcs_layout_arg): Emit -Wpsabi note if arm_needs_doubleword_align
28644 returns negative, increment ncrn only if it returned positive.
28645 (arm_needs_doubleword_align): Return int instead of bool,
28646 ignore DECL_ALIGN of non-FIELD_DECL TYPE_FIELDS chain
28647 members, but if there is any such non-FIELD_DECL
28648 > PARM_BOUNDARY aligned decl, return -1 instead of false.
28649 (arm_function_arg): Emit -Wpsabi note if arm_needs_doubleword_align
28650 returns negative, increment nregs only if it returned positive.
28651 (arm_setup_incoming_varargs): Likewise.
28652 (arm_function_arg_boundary): Emit -Wpsabi note if
28653 arm_needs_doubleword_align returns negative, return
28654 DOUBLEWORD_ALIGNMENT only if it returned positive.
28655
28656 2017-04-25 Marek Polacek <polacek@redhat.com>
28657
28658 PR sanitizer/80349
28659 * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
28660 first argument to type.
28661
28662 2017-04-25 Bill Seurer <seurer@linux.vnet.ibm.com>
28663
28664 PR target/80482
28665 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change
28666 type checks to test for compatibility instead of equality.
28667
28668 2017-04-25 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
28669 Jakub Jelinek <jakub@redhat.com>
28670
28671 PR target/77728
28672 * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): New
28673 type.
28674 (aarch64_function_arg_alignment): Return aarch64_fn_arg_alignment
28675 struct. Ignore DECL_ALIGN of decls other than FIELD_DECL for
28676 the alignment computation, but return their maximum in warn_alignment.
28677 (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
28678 Emit a -Wpsabi note if warn_alignment is 16 bytes, but alignment
28679 is smaller.
28680 (aarch64_function_arg_boundary): Likewise. Simplify using MIN/MAX.
28681 (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
28682 caller.
28683
28684 2017-04-25 Claudiu Zissulescu <claziss@synopsys.com>
28685
28686 * config/arc/simdext.md (dmpyh): Fix typo.
28687
28688 2017-04-25 Richard Biener <rguenther@suse.de>
28689
28690 PR tree-optimization/80492
28691 * alias.c (compare_base_decls): Handle registers with asm
28692 specification conservatively.
28693 * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
28694 compare_base_decls returning dont-know properly.
28695
28696 2017-04-25 Claudiu Zissulescu <claziss@synopsys.com>
28697
28698 * config/arc/arc.c (LEGITIMATE_OFFSET_ADDRESS_P): Delete macro.
28699 (legitimate_offset_address_p): New function.
28700 (arc_legitimate_address_p): Use above function.
28701
28702 2017-04-25 Claudiu Zissulescu <claziss@synopsys.com>
28703
28704 * config/arc/arc.c (arc_output_mi_thunk): Emit PIC calls.
28705
28706 2017-04-25 Claudiu Zissulescu <claziss@synopsys.com>
28707
28708 * config/arc/arc.c (arc_conditional_register_usage): Use ACCL,
28709 ACCH registers whenever they are available.
28710
28711 2017-04-25 Claudiu Zissulescu <claziss@synopsys.com>
28712
28713 * config/arc/arc.c (arc_conditional_register_usage): Make D0, D1
28714 double regs fix when not used.
28715
28716 2017-04-25 Claudiu Zissulescu <claziss@synopsys.com>
28717
28718 * config/arc/arc.h (REGNO_OK_FOR_BASE_P): Consider also extension
28719 core registers.
28720 (REG_OK_FOR_INDEX_P_NONSTRICT): Likewise.
28721 (REG_OK_FOR_BASE_P_NONSTRICT): Likewise.
28722
28723 2017-04-25 Claudiu Zissulescu <claziss@synopsys.com>
28724
28725 * config/arc/arc.c (arc_output_addsi): Check for h-register class
28726 when emitting short ADD instructions.
28727
28728 2017-04-25 Claudiu Zissulescu <claziss@synopsys.com>
28729
28730 * config/arc/arc.md (cmpsi_cc_insn_mixed): Use 'h' register
28731 constraint.
28732 (cmpsi_cc_c_insn): Likewise.
28733 (cbranchsi4_scratch): Compute proper instruction length using
28734 compact_hreg_operand.
28735 * config/arc/predicates.md (compact_hreg_operand): New predicate.
28736
28737 2017-04-25 Richard Biener <rguenther@suse.de>
28738
28739 PR middle-end/80509
28740 * passes.c (pass_manager::pass_manager): Initialize
28741 m_name_to_pass_map.
28742
28743 2017-04-25 Richard Biener <rguenther@suse.de>
28744
28745 PR tree-optimization/79201
28746 * tree-ssa-sink.c (statement_sink_location): Handle calls.
28747
28748 2017-04-25 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
28749
28750 PR target/80464
28751 * config/s390/vector.md: Split MEM->GPR vector moves for
28752 non-s_operand addresses.
28753
28754 2017-04-25 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
28755
28756 PR target/79895
28757 * config/s390/predicates.md (reload_const_wide_int_operand): New
28758 predicate.
28759 * config/s390/s390.md ("movti"): Remove d/P alternative.
28760 ("movti_bigconst"): New pattern definition.
28761
28762 2017-04-25 Dominik Vogt <vogt@linux.vnet.ibm.com>
28763
28764 PR target/80080
28765 * s390-protos.h (s390_expand_cs_hqi): Removed.
28766 (s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
28767 * config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
28768 modes as well as CCZ1mode and CCZmode.
28769 (s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
28770 signature of s390_emit_compare_and_swap.
28771 (s390_expand_cs_hqi): Likewise, make static.
28772 (s390_expand_cs_tdsi): Generate an explicit compare before trying
28773 compare-and-swap, in some cases.
28774 (s390_expand_cs): Wrapper function.
28775 (s390_expand_atomic_exchange_tdsi): New backend specific expander for
28776 atomic_exchange.
28777 (s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
28778 * config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
28779 patterns for small and large integers. Forbid symref memory operands.
28780 Move expander to s390.c. Require cc register.
28781 ("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
28782 ("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
28783 ("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
28784 ("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
28785 symref memory operands. Remove CC mode and call s390_match_ccmode
28786 instead.
28787 ("atomic_exchange<mode>"): Allow and implement all integer modes.
28788
28789 2017-04-25 Dominik Vogt <vogt@linux.vnet.ibm.com>
28790
28791 * config/s390/s390.md (define_peephole2): New peephole to help
28792 combining the load-and-test pattern with volatile memory.
28793
28794 2017-04-25 Dominik Vogt <vogt@linux.vnet.ibm.com>
28795
28796 * config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
28797 with CCZmode for TARGET_Z196.
28798
28799 2017-04-25 Jakub Jelinek <jakub@redhat.com>
28800
28801 PR rtl-optimization/80501
28802 * combine.c (make_compound_operation_int): Set subreg_code to SET
28803 even for AND with mask of the sign bit of mode.
28804
28805 PR rtl-optimization/80500
28806 * loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on
28807 sum's initial value.
28808
28809 2017-04-25 Julian Brown <julian@codesourcery.com>
28810 Naveen H.S <Naveen.Hurugalawadi@cavium.com>
28811
28812 * config/aarch64/thunderx2t99.md (thunderx2t99_crc): New Reservation.
28813
28814 2017-04-25 Marc Glisse <marc.glisse@inria.fr>
28815
28816 * fold-const.c (tree_single_nonzero_warnv_p): Handle SSA_NAME.
28817
28818 2017-04-25 Julian Brown <julian@codesourcery.com>
28819 Naveen H.S <Naveen.Hurugalawadi@cavium.com>
28820
28821 * config/aarch64/thunderx2t99.md (thunderx2t99_aes): New Reservation.
28822 (thunderx2t99_sha): New Reservation.
28823
28824 2017-04-25 Julian Brown <julian@codesourcery.com>
28825 Naveen H.S <Naveen.Hurugalawadi@cavium.com>
28826
28827 * config/aarch64/aarch64-simd.md (aarch64_simd_vec_set<mode>): Fix
28828 type for 1-element load.
28829
28830 2017-04-24 Marc Glisse <marc.glisse@inria.fr>
28831
28832 * match.pd (X/[ex]C CMP Y/[ex]C): New transformation.
28833
28834 2017-04-24 Martin Jambor <mjambor@suse.cz>
28835
28836 PR tree-optimization/80293
28837 * tree-sra.c (scalarizable_type_p): New parameter const_decl, make
28838 char arrays not totally scalarizable if it is false.
28839 (analyze_all_variable_accesses): Pass correct value in the new
28840 parameter. Add a statistics counter.
28841
28842 2017-04-24 Jan Hubicka <hubicka@ucw.cz>
28843
28844 PR middle-end/79931
28845 * ipa-devirt.c (dump_possible_polymorphic_call_targets): Fix ICE.
28846
28847 2017-04-24 Richard Biener <rguenther@suse.de>
28848
28849 PR tree-optimization/80494
28850 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Bail
28851 out for complex types.
28852
28853 2017-04-24 Richard Biener <rguenther@suse.de>
28854
28855 * tree-ssa-sccvn.h (run_scc_vn): Adjust prototype.
28856 * tree-ssa-sccvn.c (print_scc): Print SCC size.
28857 (extract_and_process_scc_for_name): Never fail but drop SCC to varying.
28858 (DFS): Adjust and never fail.
28859 (sccvn_dom_walker::fail): Remove.
28860 (sccvn_dom_walker::before_dom_children): Adjust.
28861 (run_scc_vn): Likewise and never fail.
28862 * tree-ssa-pre.c (pass_pre::execute): Adjust.
28863 (pass_fre::execute): Likewise.
28864
28865 2017-04-24 Richard Biener <rguenther@suse.de>
28866
28867 PR tree-optimization/79725
28868 * tree-ssa-sink.c (statement_sink_location): Return whether
28869 failure reason was zero uses. Move that check later.
28870 (sink_code_in_bb): Deal with zero uses by removing the stmt
28871 if possible.
28872
28873 2017-04-24 Richard Biener <rguenther@suse.de>
28874
28875 PR c++/2972
28876 * tree-ssa-uninit.c (warn_uninitialized_vars): Handle some
28877 pointer-based references.
28878
28879 2017-04-24 Richard Biener <rguenther@suse.de>
28880
28881 PR bootstrap/79814
28882 * pass_manager.h (pass_manager::operator new): Remove.
28883 (pass_manager::operator delete): Likewise.
28884 * passes.c (pass_manager::operator new): Remove.
28885 (pass_manager::operator delete): Likewise.
28886 (pass_manager::pass_manager): Zero individual pass members.
28887
28888 2017-04-23 Uros Bizjak <ubizjak@gmail.com>
28889
28890 PR target/70799
28891 * config/i386/i386.c (dimode_scalar_to_vector_candidate_p)
28892 <case ASHIFT, case LSHIFTRT>: Also consider variable shifts.
28893 Check "XEXP (src, 1)" operand here.
28894 <case PLUS, case MINUS, case IOR, case XOR, case AND>:
28895 Check "XEXP (src, 1)" operand here.
28896 (dimode_scalar_chain::make_vector_copies): Detect count register
28897 of a shift instruction. Zero extend count register from QImode
28898 to DImode to satisfy vector shift pattern count operand predicate.
28899 Substitute vector shift count operand with a DImode copy.
28900 (dimode_scalar_chain::convert_reg): Ditto, zero-extend from
28901 vector register.
28902
28903 2017-04-21 Uros Bizjak <ubizjak@gmail.com>
28904
28905 * config/i386/i386.md (*extzvqi_mem_rex64): Move above *extzv<mode>.
28906 Remove UNSPEC_NOREX_MEM tag. Update corresponding peephole2 pattern.
28907 (*insvqi_1_mem_rex64): Move above insv<mode>_1. Remove
28908 UNSPEC_NOREX_MEM tag. Update corresponding peephole2 pattern.
28909 (UNSPEC_NOREX_MEM): Remove definition.
28910
28911 2017-04-21 Richard Biener <rguenther@suse.de>
28912
28913 PR tree-optimization/79547
28914 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
28915 Handle strlen, strcmp, strncmp, strcasecmp, strncasecmp, memcmp,
28916 bcmp, strspn, strcspn, __builtin_object_size and __builtin_constant_p
28917 without any constraints.
28918
28919 2017-04-21 Richard Biener <rguenther@suse.de>
28920
28921 PR tree-optimization/78847
28922 * fold-const.c (split_tree): Handle POINTER_PLUS_EXPR.
28923
28924 2017-04-21 Richard Biener <rguenther@suse.de>
28925
28926 * tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO.
28927 (build_distinct_type_copy): Likewise.
28928 (build_variant_type_copy): Likewise.
28929 * tree.c (build_qualified_type): Pass down mem-stat info.
28930 (build_distinct_type_copy): Likewise.
28931 (build_variant_type_copy): Likewise.
28932
28933 2017-04-21 Richard Biener <rguenther@suse.de>
28934
28935 PR tree-optimization/80237
28936 * tree-ssa-pre.c (find_leader_in_sets): Add third set argument,
28937 defaulted to NULL.
28938 (phi_translate_1): Also allow a leader in AVAIL_OUT of pred
28939 for a simplified result.
28940
28941 2016-04-21 Richard Biener <rguenther@suse.de>
28942
28943 * tree-ssa-loop-ivcanon.c (constant_after_peeling): Do not require
28944 sth as strict as a simple_iv but a chrec without symbols and an
28945 operand defined in the loop we are peeling (and not some subloop).
28946 (propagate_constants_for_unrolling): Propagate all constants.
28947
28948 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
28949
28950 PR target/79804
28951 * config/i386/i386.c (print_reg): Remove assert for disalowed
28952 regno values, call output_operand_lossage instead.
28953
28954 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
28955
28956 PR target/78090
28957 * config/i386/constraints.md (Yc): New register constraint.
28958 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
28959 Use Yc constraint for alternative 2 of operand 0. Remove
28960 preferred_for_speed attribute.
28961
28962 2017-04-20 Alexander Monakov <amonakov@ispras.ru>
28963
28964 * omp-low.c (lower_lastprivate_clauses): Correct handling of linear and
28965 lastprivate clauses in SIMT case.
28966
28967 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
28968
28969 * doc/invoke.texi (-Wextra-semi): Document new warning option.
28970
28971 2017-04-20 Richard Biener <rguenther@suse.de>
28972
28973 PR tree-optimization/57796
28974 * tree-vect-stmts.c (vect_model_store_cost): Cost scatters
28975 as N scalar stores.
28976 (vect_model_load_cost): Cost gathers as N scalar loads.
28977
28978 2017-04-20 Richard Biener <rguenther@suse.de>
28979
28980 * ggc-page.c (ggc_allocated_p): Rename to ...
28981 (safe_lookup_page_table_entry): ... this and return the lookup
28982 result.
28983 (gt_ggc_m_S): Use safe_lookup_page_table_entry.
28984
28985 2017-04-20 Richard Biener <rguenther@suse.de>
28986
28987 PR tree-optimization/80453
28988 * tree-ssa-sccvn.h (struct vn_phi_s): Add cclhs and ccrhs members.
28989 * tree-ssa-sccvn.c (cond_stmts_equal_p): Use recorded lhs and rhs
28990 from the conditions.
28991 (vn_phi_eq): Pass them down.
28992 (vn_phi_lookup): Record them.
28993 (vn_phi_insert): Likewise.
28994
28995 2017-04-20 Matthew Fortune <matthew.fortune@imgtec.com>
28996
28997 * config/mips/mips.c (mips_expand_vec_perm_const): Re-fix
28998 uninitialized variable warning to avoid buffer overrun.
28999
29000 2017-04-20 Alexander Monakov <amonakov@ispras.ru>
29001
29002 PR other/71250
29003 * doc/invoke.texi (-Wmissing-field-initializers): Mention that warning
29004 is suppressed for '{ 0 }' in C.
29005
29006 2017-04-20 Jakub Jelinek <jakub@redhat.com>
29007
29008 * BASE-VER: Set to 8.0.0.
29009
29010 2017-04-20 Thomas Preud'homme <thomas.preudhomme@arm.com>
29011
29012 * config/arm/arm.c (arm_elf_asm_cdtor): Create non-default
29013 priority .init_array and .fini_array section with SECTION_NOTYPE
29014 flag.
29015
29016 2017-04-20 Jakub Jelinek <jakub@redhat.com>
29017
29018 PR middle-end/80423
29019 * tree.h (build_array_type): Add typeless_storage default argument.
29020 * tree.c (type_cache_hasher::equal): Also compare
29021 TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs.
29022 (build_array_type): Add typeless_storage argument, set
29023 TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to
29024 recursive call.
29025 (build_nonshared_array_type): Adjust build_array_type_1 caller.
29026 (build_array_type): Likewise. Add typeless_storage argument.
29027
29028 2017-04-19 Eric Botcazou <ebotcazou@adacore.com>
29029 Jakub Jelinek <jakub@redhat.com>
29030
29031 PR tree-optimization/80426
29032 * tree-vrp.c (extract_range_from_binary_expr_1): For an additive
29033 operation on symbolic operands, also compute the overflow for the
29034 invariant part when the operation degenerates into a negation.
29035
29036 2017-04-19 Jakub Jelinek <jakub@redhat.com>
29037
29038 PR debug/80461
29039 * dwarf2out.c (modified_type_die, gen_type_die_with_usage):
29040 Check for t with zero TYPE_QUALS_NO_ADDR_SPACE.
29041
29042 PR debug/80436
29043 * tree-ssa-loop-manip.c (find_uses_to_rename_def): Ignore debug uses.
29044
29045 2017-04-19 Georg-Johann Lay <avr@gjlay.de>
29046
29047 PR target/80462
29048 * config/avr/avr.c (tree.h): Include it.
29049 (cgraph.h): Include it.
29050 (avr_encode_section_info): Don't warn for uninitialized progmem
29051 variable if it's just an alias.
29052
29053 2017-04-19 Richard Biener <rguenther@suse.de>
29054
29055 PR ipa/65972
29056 * auto-profile.c (afdo_vpt_for_early_inline): Update SSA
29057 when needed by AutoPGO.
29058
29059 2017-04-19 Paulo J. Matos <paulo@matos-sorge.com>
29060
29061 PR lto/50345
29062 * doc/lto.texi: Remove an extra 'that'.
29063
29064 2017-04-19 Segher Boessenkool <segher@kernel.crashing.org>
29065
29066 PR rtl-optimization/80429
29067 * ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
29068 are only used in debug insns.
29069
29070 2017-04-19 Eric Botcazou <ebotcazou@adacore.com>
29071 Vladimir Makarov <vmakarov@redhat.com>
29072
29073 * config/sparc/predicates.md (input_operand): Add comment. Return
29074 true for any memory operand when LRA is in progress.
29075 * config/sparc/sparc.c (sparc_expand_move): Minor formatting fix.
29076
29077 2017-04-18 Jeff Law <law@redhat.com>
29078
29079 PR target/74563
29080 * mips.md ({return,simple_return}_internal): Do not overwrite
29081 operands[0].
29082
29083 2017-04-18 Jakub Jelinek <jakub@redhat.com>
29084
29085 PR tree-optimization/80443
29086 * tree-vrp.c (intersect_ranges): For signed 1-bit precision type,
29087 instead of adding 1, subtract -1 and similarly instead of subtracting
29088 1 add -1.
29089
29090 2017-04-18 Richard Sandiford <richard.sandiford@arm.com>
29091
29092 PR rtl-optimization/80357
29093 * haifa-sched.c (tmp_bitmap): New variable.
29094 (model_recompute): Handle duplicate use records.
29095 (alloc_global_sched_pressure_data): Initialize tmp_bitmap.
29096 (free_global_sched_pressure_data): Free it.
29097
29098 2017-04-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
29099
29100 Revert:
29101 2017-02-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
29102 * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
29103 (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
29104 instead of SYSTEM_HEADER_DIR.
29105
29106 2017-04-18 Jeff Law <law@redhat.com>
29107
29108 PR middle-end/80422
29109 * cfgcleanup.c (try_crossjump_to_edge): Verify SRC1 and SRC2 have
29110 predecessors after walking up the insn chain.
29111
29112 2017-04-18 Jakub Jelinek <jakub@redhat.com>
29113
29114 PR debug/80263
29115 * dwarf2out.c (modified_type_die): Try harder not to emit internal
29116 sizetype type into debug info.
29117
29118 2017-04-18 Michael Meissner <meissner@linux.vnet.ibm.com>
29119
29120 PR target/80099
29121 * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Eliminate
29122 unneeded test for TARGET_UPPER_REGS_SF.
29123 * config/rs6000/vsx.md (vsx_extract_v4sf_var): Likewise.
29124
29125 2017-04-18 Jakub Jelinek <jakub@redhat.com>
29126
29127 PR sanitizer/80444
29128 * sancov.c (sancov_pass): Use gsi_start_nondebug_after_labels_bb
29129 instead of gsi_after_labels.
29130
29131 2017-04-18 Jeff Law <law@redhat.com>
29132
29133 * regcprop.c (maybe_mode_change): Avoid creating copies of the
29134 stack pointer.
29135
29136 Revert:
29137 2017-04-13 Jeff Law <law@redhat.com>
29138 * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
29139 in operands[1] if it is a MEM and TARGET_MIPS16 is active.
29140
29141 2017-04-18 Georg-Johann Lay <avr@gjlay.de>
29142
29143 PR target/79453
29144 * config/avr/avr.c (intl.h): Include it.
29145 (avr_pgm_check_var_decl) [reason]: Wrap diagnostic snippets into _().
29146
29147 2017-04-18 Martin Liska <mliska@suse.cz>
29148
29149 PR gcov-profile/78783
29150 * gcov-tool.c (gcov_output_files): Validate that destination
29151 file is either removed by the tool or by a user.
29152
29153 2017-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
29154 Guy Benyei <guybe@mellanox.com>
29155
29156 * config/arc/arc.c (arc_reorg): Move loop_end_id into a more local
29157 block, and do not negate it, the stored id is already negative.
29158
29159 2017-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
29160
29161 * config/arc/arc.md (doloop_begin_i): Use @pcl assembler syntax.
29162
29163 2017-04-14 Michael Meissner <meissner@linux.vnet.ibm.com>
29164
29165 PR target/80098
29166 * config/rs6000/rs6000-cpus.def (OTHER_P9_VECTOR_MASKS): Define
29167 masks of options that should be turned off if the VSX vector
29168 options are turned off.
29169 (OTHER_P8_VECTOR_MASKS): Likewise.
29170 (OTHER_VSX_VECTOR_MASKS): Likewise.
29171 * config/rs6000/rs6000.c (rs6000_option_override_internal): Call
29172 rs6000_disable_incompatible_switches to validate no type switches
29173 like -mvsx.
29174 (rs6000_incompatible_switch): New function to disallow turning on
29175 other vector options if -mno-vsx, -mno-power8-vector, or
29176 -mno-power9-vector are specified.
29177
29178 2017-04-14 Claudiu Zissulescu <claziss@synopsys.com>
29179
29180 * config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls.
29181
29182 2017-04-14 Claudiu Zissulescu <claziss@synopsys.com>
29183
29184 * config/arc/arc-protos.h (arc_decl_pretend_args): Remove.
29185 * config/arc/arc.c (arc_decl_pretend_args): Likewise.
29186 * config/arc/arc.h (CFA_FRAME_BASE_OFFSET): Likewise.
29187 (ARG_POINTER_CFA_OFFSET): Likewise.
29188
29189 2017-04-14 Claudiu Zissulescu <claziss@synopsys.com>
29190
29191 * config/arc/arc.c (arc_mode_dependent_address_p): Relax
29192 conditions to take advantage of various optimizations.
29193
29194 2017-04-13 Jeff Law <law@redhat.com>
29195
29196 * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
29197 in operands[1] if it is a MEM and TARGET_MIPS16 is active.
29198 (zero_extendsidi2_dext): Likewise.
29199
29200 2017-04-13 Jakub Jelinek <jakub@redhat.com>
29201
29202 PR sanitizer/80403
29203 * fold-const.c (fold_ternary_loc): Revert
29204 use op0 instead of fold_convert_loc (loc, type, arg0) part of
29205 2017-04-12 change.
29206
29207 2017-04-13 Vladimir Makarov <vmakarov@redhat.com>
29208
29209 PR rtl-optimization/80343
29210 * lra-remat.c (update_scratch_ops): Assign original hard reg to
29211 new scratch pseudo.
29212
29213 2017-04-13 Denis Khalikov <d.khalikov@partner.samsung.com>
29214
29215 PR sanitizer/80414
29216 * ubsan.c (ubsan_expand_bounds_ifn): Pass original index
29217 to ubsan_encode_value.
29218
29219 2017-04-13 Jeff Law <law@redhat.com>
29220
29221 * reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs
29222 appearing in DEBUG_INSNs.
29223
29224 2017-04-13 Martin Liska <mliska@suse.cz>
29225
29226 PR gcov-profile/80413
29227 * gcov-io.c (gcov_write_string): Copy to buffer just when
29228 allocated size is greater than zero.
29229
29230 2017-04-13 Jakub Jelinek <jakub@redhat.com>
29231
29232 PR debug/80321
29233 * dwarf2out.c (decls_for_scope): Ignore declarations of
29234 current_function_decl in BLOCK_NONLOCALIZED_VARS.
29235
29236 2017-04-12 Jan Hubicka <hubicka@ucw.cz>
29237
29238 PR lto/69953
29239 * ipa-visibility.c (non_local_p): Fix typos.
29240 (localize_node): When localizing symbol in same comdat group,
29241 dissolve the group only when we know external symbols are going
29242 to be privatized.
29243 (function_and_variable_visibility): Do not localize DECL_EXTERNAL.
29244
29245 2017-04-12 Jakub Jelinek <jakub@redhat.com>
29246
29247 PR tree-optimization/79390
29248 * optabs.c (emit_conditional_move): If the preferred op2/op3 operand
29249 order does not result in usable sequence, retry with reversed operand
29250 order.
29251
29252 PR sanitizer/80403
29253 PR sanitizer/80404
29254 PR sanitizer/80405
29255 * fold-const.c (fold_ternary_loc): Use op1 instead of arg1 as argument
29256 to fold_build2_loc. Convert TREE_OPERAND (tem, 0) to type. Use
29257 op0 instead of fold_convert_loc (loc, type, arg0).
29258
29259 2017-04-12 Jeff Law <law@redhat.com>
29260
29261 * genattrtab.c (write_eligible_delay): Verify DELAY_INSN still
29262 has a delay slot in the generated code.
29263
29264 * config/cris/cris.md (cris_preferred_reload_class): Return
29265 GENNONACR_REGS rather than GENERAL_REGS.
29266
29267 2017-04-12 Jakub Jelinek <jakub@redhat.com>
29268
29269 PR c/80163
29270 * expr.c <CASE_CONVERT>: For EXPAND_INITIALIZER determine SIGN_EXTEND
29271 vs. ZERO_EXTEND based on signedness of treeop0's type rather than
29272 signedness of the result type.
29273
29274 2017-04-12 Richard Biener <rguenther@suse.de>
29275 Jeff Law <law@redhat.com>
29276
29277 PR tree-optimization/80359
29278 * tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not
29279 trim stores to TARGET_MEM_REFs.
29280
29281 2017-04-12 Richard Biener <rguenther@suse.de>
29282
29283 PR tree-optimization/79390
29284 * gimple-ssa-split-paths.c (is_feasible_trace): Restrict
29285 threading case even more.
29286
29287 2017-04-12 Segher Boessenkool <segher@kernel.crashing.org>
29288
29289 PR target/80382
29290 * config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
29291 for quad_address_p for TImode, instead of just not indexed_address.
29292
29293 2017-04-12 Richard Biener <rguenther@suse.de>
29294 Bernd Edlinger <bernd.edlinger@hotmail.de>
29295
29296 PR middle-end/79671
29297 * alias.c (component_uses_parent_alias_set_from): Handle
29298 TYPE_TYPELESS_STORAGE.
29299 (get_alias_set): Likewise.
29300 * tree-core.h (tree_type_common): Add typeless_storage flag.
29301 * tree.h (TYPE_TYPELESS_STORAGE): New macro.
29302 * stor-layout.c (place_union_field): Set TYPE_TYPELESS_STORAGE
29303 for types containing members with TYPE_TYPELESS_STORAGE.
29304 (place_field): Likewise.
29305 (layout_type): Likewise for ARRAY_TYPE.
29306 * lto-streamer-out.c (hash_tree): Hash TYPE_TYPELESS_STORAGE.
29307 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Stream
29308 TYPE_TYPELESS_STORAGE.
29309 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
29310
29311 2017-04-12 Jakub Jelinek <jakub@redhat.com>
29312
29313 PR sanitizer/80349
29314 * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
29315 first argument to type.
29316
29317 2017-04-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29318
29319 PR target/80376
29320 PR target/80315
29321 * config/rs6000/rs6000.c (rs6000_expand_unop_builtin): Return
29322 CONST0_RTX (mode) rather than const0_rtx where appropriate.
29323 (rs6000_expand_binop_builtin): Likewise.
29324 (rs6000_expand_ternop_builtin): Likewise; also add missing
29325 vsx_xxpermdi_* variants; also fix typo (arg1 => arg2) for
29326 vshasigma built-ins.
29327 * doc/extend.texi: Document that vec_xxpermdi's third argument
29328 must be a constant.
29329
29330 2017-04-11 Uros Bizjak <ubizjak@gmail.com>
29331
29332 * config/i386/i386.c (dimode_scalar_chain::compute_convert_gain):
29333 Use shift_const cost parameter when calculating gain of STV shifts.
29334
29335 2017-04-11 Vladimir Makarov <vmakarov@redhat.com>
29336
29337 PR rtl-optimization/70478
29338 * lra-constraints.c (process_alt_operands): Check memory for
29339 disfavoring memory insn operand.
29340
29341 2017-04-11 Jakub Jelinek <jakub@redhat.com>
29342
29343 PR middle-end/80100
29344 * simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Perform
29345 left shift in unsigned HOST_WIDE_INT type.
29346
29347 PR rtl-optimization/80385
29348 * simplify-rtx.c (simplify_unary_operation_1): Don't transform
29349 (not (neg X)) into (plus X -1) for complex or non-integral modes.
29350
29351 PR libgomp/80394
29352 * omp-low.c (scan_omp_task): Don't optimize away empty tasks
29353 if they have any depend clauses.
29354
29355 2017-04-11 Martin Liska <mliska@suse.cz>
29356
29357 PR ipa/80212
29358 * cgraph.c (cgraph_node::dump): Dump calls_comdat_local.
29359 * ipa-split.c (split_function): Create a local comdat symbol
29360 if caller is in a comdat group.
29361
29362 2017-04-11 Martin Liska <mliska@suse.cz>
29363
29364 PR ipa/80212
29365 * ipa-cp.c (determine_versionability): Handle calls_comdat_local
29366 flags.
29367
29368 2017-04-11 Martin Sebor <msebor@redhat.com>
29369
29370 PR middle-end/80364
29371 * gimple-ssa-sprintf.c (get_int_range): Remove second argument and
29372 always use the int type. Use INTEGRAL_TYPE_P() rather than testing
29373 for INTEGER_TYPE.
29374 (directive::set_width, directive::set_precision, format_character):
29375 Adjust.
29376 (parse_directive): Use INTEGRAL_TYPE_P() rather than testing for
29377 INTEGER_TYPE.
29378
29379 2017-04-11 Richard Earnshaw <rearnsha@arm.com>
29380
29381 PR target/80389
29382 * config/arm/arm.c (arm_configure_build_target): When -mcpu and -arch
29383 conflict, set target->arch_name instead of target->cpu_name.
29384
29385 2017-04-11 Richard Biener <rguenther@suse.de>
29386
29387 PR tree-optimization/80374
29388 * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Use
29389 build_zero_cst, remove fold_convertible_p check again.
29390
29391 2017-04-11 Martin Liska <mliska@suse.cz>
29392
29393 PR sanitizer/70878
29394 * ubsan.c (instrument_object_size): Do not instrument register
29395 variables.
29396
29397 2017-04-11 Jakub Jelinek <jakub@redhat.com>
29398
29399 PR target/80381
29400 * config/i386/i386-builtin-types.def
29401 (V16HI_FTYPE_V16HI_INT_V16HI_UHI_COUNT,
29402 V16HI_FTYPE_V16HI_V8HI_V16HI_UHI_COUNT,
29403 V16SI_FTYPE_V16SI_INT_V16SI_UHI_COUNT,
29404 V16SI_FTYPE_V16SI_V4SI_V16SI_UHI_COUNT,
29405 V2DI_FTYPE_V2DI_INT_V2DI_UQI_COUNT,
29406 V2DI_FTYPE_V2DI_V2DI_V2DI_UQI_COUNT,
29407 V32HI_FTYPE_V32HI_INT_V32HI_USI_COUNT,
29408 V32HI_FTYPE_V32HI_V8HI_V32HI_USI_COUNT,
29409 V4DI_FTYPE_V4DI_INT_V4DI_UQI_COUNT,
29410 V4DI_FTYPE_V4DI_V2DI_V4DI_UQI_COUNT,
29411 V4SI_FTYPE_V4SI_INT_V4SI_UQI_COUNT,
29412 V4SI_FTYPE_V4SI_V4SI_V4SI_UQI_COUNT,
29413 V8DI_FTYPE_V8DI_INT_V8DI_UQI_COUNT,
29414 V8DI_FTYPE_V8DI_V2DI_V8DI_UQI_COUNT,
29415 V8HI_FTYPE_V8HI_INT_V8HI_UQI_COUNT,
29416 V8HI_FTYPE_V8HI_V8HI_V8HI_UQI_COUNT,
29417 V8SI_FTYPE_V8SI_INT_V8SI_UQI_COUNT,
29418 V8SI_FTYPE_V8SI_V4SI_V8SI_UQI_COUNT): New function type aliases.
29419 * config/i386/i386-builtin.def (__builtin_ia32_pslld512_mask,
29420 __builtin_ia32_pslldi512_mask, __builtin_ia32_psllq512_mask,
29421 __builtin_ia32_psllqi512_mask, __builtin_ia32_psrad512_mask,
29422 __builtin_ia32_psradi512_mask, __builtin_ia32_psraq512_mask,
29423 __builtin_ia32_psraqi512_mask, __builtin_ia32_psrld512_mask,
29424 __builtin_ia32_psrldi512_mask, __builtin_ia32_psrlq512_mask,
29425 __builtin_ia32_psrlqi512_mask, __builtin_ia32_psllwi128_mask,
29426 __builtin_ia32_pslldi128_mask, __builtin_ia32_psllqi128_mask,
29427 __builtin_ia32_psllw128_mask, __builtin_ia32_pslld128_mask,
29428 __builtin_ia32_psllq128_mask, __builtin_ia32_psllwi256_mask,
29429 __builtin_ia32_psllw256_mask, __builtin_ia32_pslldi256_mask,
29430 __builtin_ia32_pslld256_mask, __builtin_ia32_psllqi256_mask,
29431 __builtin_ia32_psllq256_mask, __builtin_ia32_psradi128_mask,
29432 __builtin_ia32_psrad128_mask, __builtin_ia32_psradi256_mask,
29433 __builtin_ia32_psrad256_mask, __builtin_ia32_psraqi128_mask,
29434 __builtin_ia32_psraq128_mask, __builtin_ia32_psraqi256_mask,
29435 __builtin_ia32_psraq256_mask, __builtin_ia32_psrldi128_mask,
29436 __builtin_ia32_psrld128_mask, __builtin_ia32_psrldi256_mask,
29437 __builtin_ia32_psrld256_mask, __builtin_ia32_psrlqi128_mask,
29438 __builtin_ia32_psrlq128_mask, __builtin_ia32_psrlqi256_mask,
29439 __builtin_ia32_psrlq256_mask, __builtin_ia32_psrawi256_mask,
29440 __builtin_ia32_psraw256_mask, __builtin_ia32_psrawi128_mask,
29441 __builtin_ia32_psraw128_mask, __builtin_ia32_psrlwi256_mask,
29442 __builtin_ia32_psrlw256_mask, __builtin_ia32_psrlwi128_mask,
29443 __builtin_ia32_psrlw128_mask, __builtin_ia32_psllwi512_mask,
29444 __builtin_ia32_psllw512_mask, __builtin_ia32_psrawi512_mask,
29445 __builtin_ia32_psraw512_mask, __builtin_ia32_psrlwi512_mask,
29446 __builtin_ia32_psrlw512_mask): Use _COUNT suffixed function type
29447 aliases.
29448 * config/i386/i386.c (ix86_expand_args_builtin): Rename last_arg_count
29449 flag to second_arg_count, handle 4 argument function type _COUNT
29450 aliases, handle second_arg_count on second argument rather than last.
29451
29452 2017-04-10 Jeff Law <law@redhat.com>
29453
29454 PR tree-optimization/80374
29455 * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Do not try to
29456 record anything if we can not convert integer_zero_node to the
29457 desired type.
29458
29459 2017-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
29460
29461 PR target/80108
29462 * config/rs6000/rs6000.c (rs6000_option_override_internal):
29463 Enhance special handling given to the TARGET_P9_MINMAX option in
29464 relation to certain other options.
29465
29466 2017-04-10 Bin Cheng <bin.cheng@arm.com>
29467
29468 PR tree-optimization/80153
29469 * tree-ssa-loop-ivopts.c (add_iv_candidate_for_use): Check and
29470 remove POINTER_PLUS_EXPR's base part directly, rather than through
29471 aff_tree.
29472
29473 2017-04-10 Richard Biener <rguenther@suse.de>
29474 Bin Cheng <bin.cheng@arm.com>
29475
29476 PR tree-optimization/80153
29477 * tree-affine.c (aff_combination_to_tree): Get base pointer from
29478 the first element of pointer type aff_tree. Build result expr in
29479 aff_tree's type.
29480 (add_elt_to_tree): Convert to type unconditionally. Remove other
29481 fold_convert calls.
29482 * tree-ssa-loop-ivopts.c (alloc_iv): Pass in consistent types.
29483 (rewrite_use_nonlinear_expr): Check invariant using iv information.
29484
29485 2017-04-10 Richard Biener <rguenther@suse.de>
29486
29487 * tree-ssa-structalias.c (find_func_aliases): Properly handle
29488 asm inputs.
29489
29490 2017-04-10 Vladimir Makarov <vmakarov@redhat.com>
29491
29492 PR rtl-optimization/70478
29493 * lra-constraints.c (curr_small_class_check): New.
29494 (update_and_check_small_class_inputs): New.
29495 (process_alt_operands): Update curr_small_class_check. Disfavor
29496 alternative insn memory operands. Check available regs for small
29497 class operands.
29498
29499 2017-03-31 Matthew Fortune <matthew.fortune@imgtec.com>
29500
29501 PR target/80057
29502 * config/mips/mips.opt (-mvirt): Update description.
29503 * doc/invoke.texi (-mvirt): Likewise.
29504
29505 2017-04-10 Richard Biener <rguenther@suse.de>
29506
29507 PR middle-end/80362
29508 * fold-const.c (fold_binary_loc): Look at unstripped ops when
29509 looking for NEGATE_EXPR in -A / -B to A / B folding.
29510
29511 2017-04-10 Martin Liska <mliska@suse.cz>
29512
29513 PR gcov-profile/80224
29514 * gcov.c (print_usage): Fix usage string.
29515 (get_gcov_intermediate_filename): Remove.
29516 (output_gcov_file): Use both for normal and intermediate format.
29517 (generate_results): Do not initialize special file for
29518 intermediate format.
29519
29520 2017-04-10 Richard Biener <rguenther@suse.de>
29521
29522 PR tree-optimization/80304
29523 * tree-ssa-loop-im.c (ref_indep_loop_p_1): Also recurse
29524 for safelen.
29525
29526 2017-04-10 Nathan Sidwell <nathan@acm.org>
29527
29528 PR target/79905
29529 * config/rs6000/rs6000.c (rs6000_vector_type): New.
29530 (rs6000_init_builtins): Use it.
29531
29532 2016-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29533
29534 * config/arm/arm.md (<mrc>): Add mode to SET source.
29535 (<mrrc>): Likewise.
29536
29537 2017-04-10 Richard Biener <rguenther@suse.de>
29538
29539 PR middle-end/80344
29540 * gimplify.c (is_gimple_mem_rhs_or_call): Allow CLOBBERs.
29541
29542 2017-04-10 Jakub Jelinek <jakub@redhat.com>
29543
29544 PR target/80324
29545 * config/i386/avx512fintrin.h (_mm512_reduce_add_epi32,
29546 _mm512_reduce_mul_epi32, _mm512_reduce_and_epi32,
29547 _mm512_reduce_or_epi32, _mm512_mask_reduce_add_epi32,
29548 _mm512_mask_reduce_mul_epi32, _mm512_mask_reduce_and_epi32,
29549 _mm512_mask_reduce_or_epi32, _mm512_reduce_min_epi32,
29550 _mm512_reduce_max_epi32, _mm512_reduce_min_epu32,
29551 _mm512_reduce_max_epu32, _mm512_mask_reduce_min_epi32,
29552 _mm512_mask_reduce_max_epi32, _mm512_mask_reduce_min_epu32,
29553 _mm512_mask_reduce_max_epu32, _mm512_reduce_add_ps,
29554 _mm512_reduce_mul_ps, _mm512_mask_reduce_add_ps,
29555 _mm512_mask_reduce_mul_ps, _mm512_reduce_min_ps, _mm512_reduce_max_ps,
29556 _mm512_mask_reduce_min_ps, _mm512_mask_reduce_max_ps,
29557 _mm512_reduce_add_epi64, _mm512_reduce_mul_epi64,
29558 _mm512_reduce_and_epi64, _mm512_reduce_or_epi64,
29559 _mm512_mask_reduce_add_epi64, _mm512_mask_reduce_mul_epi64,
29560 _mm512_mask_reduce_and_epi64, _mm512_mask_reduce_or_epi64,
29561 _mm512_reduce_min_epi64, _mm512_reduce_max_epi64,
29562 _mm512_mask_reduce_min_epi64, _mm512_mask_reduce_max_epi64,
29563 _mm512_reduce_min_epu64, _mm512_reduce_max_epu64,
29564 _mm512_mask_reduce_min_epu64, _mm512_mask_reduce_max_epu64,
29565 _mm512_reduce_add_pd, _mm512_reduce_mul_pd, _mm512_mask_reduce_add_pd,
29566 _mm512_mask_reduce_mul_pd, _mm512_reduce_min_pd, _mm512_reduce_max_pd,
29567 _mm512_mask_reduce_min_pd, _mm512_mask_reduce_max_pd): New intrinsics.
29568
29569 2017-04-08 Vladimir Makarov <vmakarov@redhat.com>
29570
29571 PR rtl-optimization/70478
29572 * lra-constraints.c: Reverse the last patch.
29573
29574 2017-04-08 Andreas Tobler <andreast@gcc.gnu.org>
29575
29576 * config/aarch64/aarch64-freebsd.h: Define MCOUNT_NAME.
29577 Add comment for WCHAR_T.
29578
29579 2017-04-08 Martin Liska <mliska@suse.cz>
29580
29581 Revert:
29582 2017-04-07 Martin Liska <mliska@suse.cz>
29583
29584 PR ipa/80212
29585 * ipa-split.c (split_function): Add function part to a same comdat
29586 group.
29587
29588 2017-04-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29589
29590 PR target/80358
29591 * config/rs6000/rs6000.c (expand_block_compare): Fix boundary check.
29592
29593 2017-04-07 Pat Haugen <pthaugen@us.ibm.com>
29594
29595 * rs6000/rs6000.c (vec_load_pendulum): Rename...
29596 (vec_pairing): ...to this.
29597 (power9_sched_reorder2): Rewrite code for pairing vector/vecload insns.
29598 (rs6000_sched_init): Adjust for name change.
29599 (struct rs6000_sched_context): Likewise.
29600 (rs6000_init_sched_context): Likewise.
29601 (rs6000_set_sched_context): Likewise.
29602
29603 2017-04-07 Jakub Jelinek <jakub@redhat.com>
29604
29605 PR target/80322
29606 PR target/80323
29607 PR target/80325
29608 PR target/80326
29609 * config/i386/avxintrin.h (_mm256_cvtsd_f64, _mm256_cvtss_f32): New
29610 intrinsics.
29611 * config/i386/avx512fintrin.h (_mm512_int2mask, _mm512_mask2int,
29612 _mm512_abs_ps, _mm512_mask_abs_ps, _mm512_abs_pd, _mm512_mask_abs_pd,
29613 _mm512_cvtsd_f64, _mm512_cvtss_f32): Likewise.
29614
29615 2017-04-07 Andreas Tobler <andreast@gcc.gnu.org>
29616
29617 * config/aarch64/aarch64-freebsd.h: Define WCHAR_TYPE.
29618
29619 2017-04-07 Vladimir Makarov <vmakarov@redhat.com>
29620
29621 PR rtl-optimization/70703
29622 * ira-color.c (update_conflict_hard_regno_costs): Use
29623 int64_t instead of HOST_WIDE_INT.
29624
29625 2017-04-07 Vladimir Makarov <vmakarov@redhat.com>
29626
29627 PR rtl-optimization/70478
29628 * lra-constraints.c (process_alt_operands): Disfavor alternative
29629 insn memory operands.
29630
29631 2017-04-07 Jeff Law <law@redhat.com>
29632
29633 * config/iq2000/iq2000.c (final_prescan_insn): Do not separate a
29634 CALL and NOTE_INSN_CALL_ARG_LOCATION.
29635
29636 2017-04-07 Martin Liska <mliska@suse.cz>
29637
29638 PR target/79889
29639 * config/aarch64/aarch64.c (aarch64_process_target_attr):
29640 Show error message instead of an ICE.
29641
29642 2017-04-07 Martin Liska <mliska@suse.cz>
29643
29644 PR ipa/80212
29645 * ipa-split.c (split_function): Add function part to a same comdat
29646 group.
29647
29648 2017-04-07 Richard Biener <rguenther@suse.de>
29649
29650 PR middle-end/80341
29651 * tree.c (get_unwidened): Also handle ! for_type case for
29652 INTEGER_CSTs.
29653 * convert.c (do_narrow): Split out from ...
29654 (convert_to_integer_1): ... here. Do not pass final truncation
29655 type to get_unwidened for TRUNC_DIV_EXPR.
29656
29657 2017-04-07 Richard Biener <rguenther@suse.de>
29658
29659 * tree-affine.c (wide_int_ext_for_comb): Take type rather
29660 than aff_tree.
29661 (aff_combination_const): Adjust.
29662 (aff_combination_scale): Likewise.
29663 (aff_combination_add_elt): Likewise.
29664 (aff_combination_add_cst): Likewise.
29665 (aff_combination_convert): Likewise.
29666 (add_elt_to_tree): Likewise. Remove unused argument.
29667 (aff_combination_to_tree): Adjust calls to add_elt_to_tree.
29668
29669 2017-04-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
29670
29671 * config/arm/arm.h (ARM_DEFAULT_SHORT_ENUMS): Provide default
29672 definition.
29673 * config/arm/arm.c (arm_default_short_enums): Use
29674 ARM_DEFAULT_SHORT_ENUMS.
29675 * config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS): Define.
29676
29677 2017-04-06 Jakub Jelinek <jakub@redhat.com>
29678
29679 PR debug/80234
29680 * dwarf2out.c (gen_member_die): Handle C++17 inline static data
29681 members with redundant out-of-class redeclaration.
29682
29683 2017-04-06 Uros Bizjak <ubizjak@gmail.com>
29684
29685 PR target/80286
29686 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): New pattern.
29687 * config/i386/i386.md (*zero_extendsidi2):
29688 Add (?*x,*x) and (?*v,*v) alternatives.
29689
29690 2017-04-06 Uros Bizjak <ubizjak@gmail.com>
29691
29692 PR target/79733
29693 * config/i386/i386.c (ix86_expand_builtin)
29694 <case IX86_BUILTIN_K{,OR}TEST{C,Z}{8,16,32,64}>: Determine insn operand
29695 mode from insn data. Convert operands to insn operand mode.
29696 Copy operands that don't satisfy insn predicate to a register.
29697
29698 2017-04-06 Sam Thursfield <sam.thursfield@codethink.co.uk>
29699
29700 * config/rs6000/x-aix: Increase memory limit for genautomata on AIX.
29701 Update comments.
29702
29703 2017-04-06 Richard Biener <rguenther@suse.de>
29704
29705 PR tree-optimization/80334
29706 * tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
29707 preserve alignment of accesses.
29708
29709 2017-04-06 Richard Biener <rguenther@suse.de>
29710
29711 PR tree-optimization/80262
29712 * tree-sra.c (build_ref_for_offset): Preserve address-space
29713 information.
29714 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
29715 Drop useless address-space information on MEM_REF offsets.
29716
29717 2017-04-05 Andreas Schwab <schwab@linux-m68k.org>
29718
29719 * builtins.def (BUILT_IN_UPDATE_SETJMP_BUF): Fix type.
29720
29721 2017-04-05 Vladimir Makarov <vmakarov@redhat.com>
29722
29723 PR rtl-optimization/70703
29724 * ira-color.c (update_conflict_hard_regno_costs): Use
29725 HOST_WIDE_INT instead of long.
29726
29727 2017-04-05 Uros Bizjak <ubizjak@gmail.com>
29728
29729 PR target/80298
29730 * config/i386/mmintrin.h: Add -msse target option when __SSE__ is
29731 not defined for x86_64 target. Add -mmmx target option when __SSE2__
29732 is not defined.
29733 * config/i386/mm3dnow.h: Add -msse target when __SSE__ is not defined
29734 for x86_64 target. Handle -m3dnowa option.
29735
29736 2017-04-05 Vladimir Makarov <vmakarov@redhat.com>
29737
29738 PR rtl-optimization/70703
29739 * ira-color.c (update_costs_from_allocno): Use the smallest mode.
29740 (update_conflict_hard_regno_costs): Use long instead of unsigned
29741 arithmetic for cost calculation.
29742
29743 2017-04-05 Jakub Jelinek <jakub@redhat.com>
29744 Bernd Edlinger <bernd.edlinger@hotmail.de>
29745
29746 PR sanitizer/80308
29747 * asan.c (asan_store_shadow_bytes): Fix location of last_chunk_value
29748 for big endian.
29749
29750 2017-04-05 Eric Botcazou <ebotcazou@adacore.com>
29751
29752 PR target/78002
29753 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Replace
29754 ptr_mode with Pmode throughout.
29755 * config/aarch64/aarch64.md (probe_stack_range_<PTR:mode): Rename
29756 into probe_stack_range and use DImode.
29757
29758 2017-04-05 Dominik Vogt <vogt@linux.vnet.ibm.com>
29759
29760 PR target/79890
29761 * config/s390/s390.c (s390_register_info_gprtofpr): Return if
29762 call_eh_return is true.
29763
29764 2017-04-05 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
29765
29766 * config/s390/s390-c.c (s390_resolve_overloaded_builtin):
29767 Initialize last_match_fntype_index.
29768
29769 2017-04-05 Jakub Jelinek <jakub@redhat.com>
29770
29771 PR target/80310
29772 * tree-nvr.c: Include internal-fn.h.
29773 (pass_return_slot::execute): Ignore internal calls without
29774 direct optab.
29775
29776 2017-04-04 Jakub Jelinek <jakub@redhat.com>
29777 Richard Biener <rguenther@suse.de>
29778
29779 PR c++/80297
29780 * genmatch.c (capture::gen_transform): For GENERIC unshare_expr
29781 captures used multiple times, except for the last use.
29782 * generic-match-head.c: Include gimplify.h.
29783
29784 2017-04-04 Jakub Jelinek <jakub@redhat.com>
29785
29786 PR tree-optimization/79390
29787 * target.h (struct noce_if_info): Declare.
29788 * targhooks.h (default_noce_conversion_profitable_p): Declare.
29789 * target.def (noce_conversion_profitable_p): New target hook.
29790 * ifcvt.h (struct noce_if_info): New type, moved from ...
29791 * ifcvt.c (struct noce_if_info): ... here.
29792 (noce_conversion_profitable_p): Renamed to ...
29793 (default_noce_conversion_profitable_p): ... this. No longer
29794 static nor inline.
29795 (noce_try_store_flag_constants, noce_try_addcc,
29796 noce_try_store_flag_mask, noce_try_cmove, noce_try_cmove_arith,
29797 noce_convert_multiple_sets): Use targetm.noce_conversion_profitable_p
29798 instead of noce_conversion_profitable_p.
29799 * config/i386/i386.c: Include ifcvt.h.
29800 (ix86_option_override_internal): Don't override
29801 PARAM_MAX_RTL_IF_CONVERSION_INSNS default.
29802 (ix86_noce_conversion_profitable_p): New function.
29803 (TARGET_NOCE_CONVERSION_PROFITABLE_P): Redefine.
29804 * config/i386/x86-tune.def (X86_TUNE_ONE_IF_CONV_INSN): Adjust comment.
29805 * doc/tm.texi.in (TARGET_NOCE_CONVERSION_PROFITABLE_P): Add.
29806 * doc/tm.texi: Regenerated.
29807
29808 2017-04-04 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29809
29810 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Grammar
29811 correction.
29812
29813 2017-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
29814
29815 PR target/80307
29816 * config/arm/arm.c (thumb1_rtx_costs): Give a cost of 32
29817 instructions for small multiply cores.
29818
29819 2017-04-04 Jeff Law <law@redhat.com>
29820
29821 * config/mips/mips.c (mips_multi_add): Zero initialize the newly
29822 added member.
29823 (mips_expand_vec_perm_const): Initialize elements in orig_perm
29824 that are not set by the loop over the elements.
29825
29826 2017-04-04 Jakub Jelinek <jakub@redhat.com>
29827
29828 PR target/80286
29829 * config/i386/i386.c (ix86_expand_args_builtin): If op has scalar
29830 int mode, convert_modes it to mode as unsigned, otherwise use
29831 lowpart_subreg to mode rather than SImode.
29832 * config/i386/sse.md (<mask_codefor>ashr<mode>3<mask_name>,
29833 ashr<mode>3, ashr<mode>3<mask_name>, <shift_insn><mode>3<mask_name>):
29834 Use DImode instead of SImode for the shift count operand.
29835 * config/i386/mmx.md (mmx_ashr<mode>3, mmx_<shift_insn><mode>3):
29836 Likewise.
29837
29838 2017-04-04 Richard Biener <rguenther@suse.de>
29839
29840 PR middle-end/80281
29841 * match.pd (A + (-B) -> A - B): Make sure to preserve unsigned
29842 arithmetic done for the negate or the plus. Simplify.
29843 (A - (-B) -> A + B): Likewise.
29844 * fold-const.c (split_tree): Make sure to not negate pointers.
29845
29846 2017-04-04 Segher Boessenkool <segher@kernel.crashing.org>
29847
29848 PR rtl-optimization/60818
29849 * simplify-rtx.c (simplify_binary_operation_1): Do not replace
29850 a compare of comparisons with the thing compared if this results
29851 in a different machine mode.
29852
29853 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
29854
29855 * alias.c (base_alias_check): Fix typo in comment.
29856 * cgraph.h (class ipa_polymorphic_call_context): Likewise.
29857 * cgraphunit.c (symbol_table::compile): Likewise.
29858 * collect2.c (maybe_run_lto_and_relink): Likewise.
29859 * config/arm/arm.c (arm_thumb1_mi_thunk): Likewise.
29860 * config/avr/avr-arch.h (avr_arch_info_t): Likewise.
29861 * config/avr/avr.c (avr_map_op_t): Likewise.
29862 * config/cr16/cr16.h (DATA_ALIGNMENT): Likewise.
29863 * config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise.
29864 * config/epiphany/epiphany.md (movcc): Likewise.
29865 * config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise.
29866 * config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue):
29867 Likewise.
29868 * config/mips/mips.c (mips_save_restore_reg): Likewise.
29869 * config/rx/rx.c (rx_is_restricted_memory_address): Likewise.
29870 * config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise.
29871 * config/sh/sh.c (sh_rtx_costs): Likewise.
29872 * fold-const.c (fold_truth_andor): Likewise.
29873 * genautomata.c (collapse_flag): Likewise.
29874 * gengtype.h (struct type::u::s): Likewise.
29875 * gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise.
29876 * input.c (FORMAT_AMOUNT): Likewise.
29877 * ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector)
29878 (known_aggs_to_agg_replacement_list): Likewise.
29879 * ipa-inline-analysis.c: Likewise.
29880 * ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise.
29881 * ipa-polymorphic-call.c
29882 (ipa_polymorphic_call_context::restrict_to_inner_class): Likewise.
29883 * loop-unroll.c (analyze_insn_to_expand_var): Likewise.
29884 * lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos):
29885 Likewise.
29886 * modulo-sched.c (apply_reg_moves): Likewise.
29887 * omp-expand.c (build_omp_regions_1): Likewise.
29888 * trans-mem.c (struct tm_wrapper_hasher): Likewise.
29889 * tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise.
29890 * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise.
29891 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
29892 * value-prof.c: Likewise.
29893 * var-tracking.c (val_reset): Likewise.
29894
29895 2017-04-03 Richard Biener <rguenther@suse.de>
29896
29897 PR tree-optimization/80275
29898 * fold-const.c (split_address_to_core_and_offset): Handle
29899 POINTER_PLUS_EXPR.
29900
29901 2017-04-03 Eric Botcazou <ebotcazou@adacore.com>
29902
29903 * tree-nested.c (get_descriptor_type): Make sure that the alignment of
29904 descriptors is at least equal to that of functions.
29905
29906 2017-04-02 Uros Bizjak <ubizjak@gmail.com>
29907
29908 * config/i386/sse.md (movdi_to_sse): Add missing DONE.
29909
29910 2017-04-02 Uros Bizjak <ubizjak@gmail.com>
29911
29912 PR target/80250
29913 * config/i386/sse.md (mov<IMOD4:mode>): Remove insn pattern.
29914 (mov<IMOD4:mode>): New expander.
29915 (*mov<IMOD4:mode>_internal): New insn and split pattern.
29916
29917 2017-03-31 Segher Boessenkool <segher@kernel.crashing.org>
29918
29919 PR rtl-optimization/79405
29920 * fwprop.c (propagations_left): New variable.
29921 (forward_propagate_into): Decrement it.
29922 (fwprop_init): Initialize it.
29923 (fw_prop): If the variable has reached zero, stop propagating.
29924 (fwprop_addr): Ditto.
29925
29926 2017-03-31 Jakub Jelinek <jakub@redhat.com>
29927
29928 PR debug/79255
29929 * dwarf2out.c (decls_for_scope): If BLOCK_NONLOCALIZED_VAR is
29930 a FUNCTION_DECL, pass it as decl instead of origin to
29931 process_scope_var.
29932
29933 2017-03-31 Alexander Monakov <amonakov@ispras.ru>
29934
29935 * config/nvptx/nvptx.c (nvptx_output_softstack_switch): Correct format
29936 string.
29937
29938 2017-03-31 Pat Haugen <pthaugen@us.ibm.com>
29939
29940 PR target/80107
29941 * config/rs6000/rs6000.md (extendhi<mode>2): Add test for
29942 TARGET_VSX_SMALL_INTEGER.
29943
29944 2017-03-31 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29945
29946 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
29947 reference to the OpenPOWER 64-Bit ELF V2 ABI Specification.
29948
29949 2017-03-31 Matthew Fortune <matthew.fortune@imgtec.com>
29950
29951 * config/mips/mips-msa.md (msa_vec_extract_<msafmt_f>): Update
29952 extraction from odd-numbered MSA register.
29953
29954 2017-03-31 Jakub Jelinek <jakub@redhat.com>
29955
29956 PR middle-end/80173
29957 * expmed.c (store_bit_field_1): Don't attempt to create
29958 a word subreg out of hard registers wider than word if they
29959 have HARD_REGNO_NREGS of 1 for their mode.
29960
29961 PR middle-end/80163
29962 * varasm.c (initializer_constant_valid_p_1): Disallow sign-extending
29963 conversions to integer types wider than word and pointer.
29964
29965 PR debug/80025
29966 * cselib.h (rtx_equal_for_cselib_1): Add depth argument.
29967 (rtx_equal_for_cselib_p): Pass 0 to it.
29968 * cselib.c (cselib_hasher::equal): Likewise.
29969 (rtx_equal_for_cselib_1): Add depth argument. If depth
29970 is 128, don't look up VALUE locs and punt. Increment
29971 depth in recursive calls when walking VALUE locs.
29972
29973 2017-03-31 Bernd Edlinger <bernd.edlinger@hotmail.de>
29974
29975 * gcov.c (md5sum_to_hex): Fix output of MD5 hex bytes.
29976 (make_gcov_file_name): Use the canonical path name for generating
29977 the MD5 value.
29978 (read_line): Fix handling of files with ascii null bytes.
29979
29980 2017-03-30 Matthew Fortune <matthew.fortune@imgtec.com>
29981
29982 * config/mips/mips.c (mips_expand_vector_init): Create a const_vector
29983 to initialise a vector register instead
29984 of using a const_int.
29985
29986 2017-03-30 Jakub Jelinek <jakub@redhat.com>
29987
29988 PR translation/80189
29989 * gimplify.c (omp_default_clause): Use %qs instead of %s in
29990 diagnostic messages.
29991
29992 2017-03-30 Peter Bergner <bergner@vnet.ibm.com>
29993
29994 PR target/80246
29995 * config/rs6000/dfp.md (dfp_dxex_<mode>): Update mode of operand 0.
29996 (dfp_diex_<mode>): Update mode of operand 1.
29997 * doc/extend.texi (dxex, dxexq): Document change to return type.
29998 (diex, diexq): Document change to argument type.
29999
30000 2017-03-30 Martin Jambor <mjambor@suse.cz>
30001
30002 PR ipa/77333
30003 * cgraph.h (cgraph_build_function_type_skip_args): Declare.
30004 * cgraph.c (redirect_call_stmt_to_callee): Set gimple fntype so that
30005 it reflects the signature changes performed at the callee side.
30006 * cgraphclones.c (build_function_type_skip_args): Make public, renamed
30007 to cgraph_build_function_type_skip_args.
30008 (build_function_decl_skip_args): Adjust call to the above function.
30009
30010 2017-03-30 Jakub Jelinek <jakub@redhat.com>
30011
30012 PR target/80206
30013 * config/i386/sse.md
30014 (<extract_type>_vextract<shuffletype><extract_suf>_mask): Use
30015 register as dest whenever it is a MEM not rtx_equal_p to the
30016 corresponding dup operand, and when forcing into reg move the
30017 reg into the memory afterwards.
30018 (<extract_type_2>_vextract<shuffletype><extract_suf_2>_mask):
30019 Likewise. Use <ssehalfvecmode> instead of <ssequartermode>
30020 for the force_reg mode.
30021 (avx512vl_vextractf128<mode>): Use register as dest either
30022 always when a MEM, or when it is a MEM not rtx_equal_p to the
30023 corresponding dup operand, or even not when it is a CONST_VECTOR
30024 depending on the mode and lo vs. hi.
30025 (avx512dq_vextract<shuffletype>64x2_1_maskm): Remove extraneous
30026 parens.
30027 (avx512f_vextract<shuffletype>32x4_1_maskm): Likewise.
30028 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name>):
30029 Likewise. Require that operands[2] is even.
30030 (<mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name>):
30031 Remove extraneous parens. Require that operands[2] is a multiple
30032 of 4.
30033 (vec_extract_lo_<mode><mask_name>): Don't bother testing if
30034 operands[0] is a MEM if <mask_applied>, the predicates/constraints
30035 disallow memory then.
30036
30037 2017-03-30 Richard Biener <rguenther@suse.de>
30038
30039 PR tree-optimization/77498
30040 * tree-ssa-pre.c (phi_translate_1): Do not allow simplifications
30041 to non-constants over backedges.
30042
30043 2017-03-29 Segher Boessenkool <segher@kernel.crashing.org>
30044
30045 PR rtl-optimization/80233
30046 * combine.c (combine_instructions): Only take NONDEBUG_INSN_P insns
30047 as last_combined_insn. Do not test for BARRIER_P separately.
30048
30049 2017-03-29 Andreas Schwab <schwab@suse.de>
30050
30051 PR ada/80146
30052 * calls.c (prepare_call_address): Convert funexp to Pmode before
30053 copying to temp reg.
30054
30055 2017-03-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30056
30057 PR tree-optimization/80158
30058 * gimple-ssa-strength-reduction.c (replace_mult_candidate):
30059 Handle possible future case of more than one alternate
30060 interpretation.
30061 (replace_rhs_if_not_dup): Likewise.
30062 (replace_one_candidate): Likewise.
30063
30064 2017-03-28 Vladimir Makarov <vmakarov@redhat.com>
30065
30066 PR rtl-optimization/80193
30067 * ira.c (ira): Do not check allocation for LRA.
30068
30069 2017-03-28 Alexander Monakov <amonakov@ispras.ru>
30070
30071 * config/nvptx/nvptx-protos.h (nvptx_output_simt_enter): Declare.
30072 (nvptx_output_simt_exit): Declare.
30073 * config/nvptx/nvptx.c (nvptx_init_unisimt_predicate): Use
30074 cfun->machine->unisimt_location. Handle NULL unisimt_predicate.
30075 (init_softstack_frame): Move initialization of crtl->is_leaf to...
30076 (nvptx_declare_function_name): ...here. Emit declaration of local
30077 memory space buffer for omp_simt_enter insn.
30078 (nvptx_output_unisimt_switch): New.
30079 (nvptx_output_softstack_switch): New.
30080 (nvptx_output_simt_enter): New.
30081 (nvptx_output_simt_exit): New.
30082 * config/nvptx/nvptx.h (struct machine_function): New fields
30083 has_simtreg, unisimt_location, simt_stack_size, simt_stack_align.
30084 * config/nvptx/nvptx.md (UNSPECV_SIMT_ENTER): New unspec.
30085 (UNSPECV_SIMT_EXIT): Ditto.
30086 (omp_simt_enter_insn): New insn.
30087 (omp_simt_enter): New expansion.
30088 (omp_simt_exit): New insn.
30089 * config/nvptx/nvptx.opt (msoft-stack-reserve-local): New option.
30090
30091 * internal-fn.c (expand_GOMP_SIMT_ENTER): New.
30092 (expand_GOMP_SIMT_ENTER_ALLOC): New.
30093 (expand_GOMP_SIMT_EXIT): New.
30094 * internal-fn.def (GOMP_SIMT_ENTER): New internal function.
30095 (GOMP_SIMT_ENTER_ALLOC): Ditto.
30096 (GOMP_SIMT_EXIT): Ditto.
30097 * target-insns.def (omp_simt_enter): New insn.
30098 (omp_simt_exit): Ditto.
30099 * omp-low.c (struct omplow_simd_context): New fields simt_eargs,
30100 simt_dlist.
30101 (lower_rec_simd_input_clauses): Implement SIMT privatization.
30102 (lower_rec_input_clauses): Likewise.
30103 (lower_lastprivate_clauses): Handle SIMT privatization.
30104
30105 * omp-offload.c: Include langhooks.h, tree-nested.h, stor-layout.h.
30106 (ompdevlow_adjust_simt_enter): New.
30107 (find_simtpriv_var_op): New.
30108 (execute_omp_device_lower): Handle IFN_GOMP_SIMT_ENTER,
30109 IFN_GOMP_SIMT_ENTER_ALLOC, IFN_GOMP_SIMT_EXIT.
30110
30111 * tree-inline.h (struct copy_body_data): New field dst_simt_vars.
30112 * tree-inline.c (expand_call_inline): Handle SIMT privatization.
30113 (copy_decl_for_dup_finish): Ditto.
30114
30115 * tree-ssa.c (execute_update_addresses_taken): Handle GOMP_SIMT_ENTER.
30116
30117 2017-03-28 Uros Bizjak <ubizjak@gmail.com>
30118
30119 PR target/53383
30120 * config/i386/i386.c (ix86_option_override_internal): Always
30121 allow -mpreferred-stack-boundary=3 for 64-bit targets.
30122
30123 2017-03-28 Bin Cheng <bin.cheng@arm.com>
30124
30125 * tree-vect-loop.c (optimize_mask_stores): Add bb to the right loop.
30126
30127 2017-03-28 Bin Cheng <bin.cheng@arm.com>
30128
30129 * tree-vect-loop-manip.c (slpeel_add_loop_guard): New param and
30130 mark new edge's irreducible flag accordign to it.
30131 (vect_do_peeling): Check loop preheader edge's irreducible flag
30132 and pass it to function slpeel_add_loop_guard.
30133
30134 2017-03-28 Richard Sandiford <richard.sandiford@arm.com>
30135
30136 PR tree-optimization/80218
30137 * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
30138 Update block frequencies and counts.
30139
30140 2017-03-28 Richard Biener <rguenther@suse.de>
30141
30142 PR tree-optimization/78644
30143 * tree-ssa-ccp.c (evaluate_stmt): When we may not use the value
30144 of a simplification result we may not use it at all.
30145
30146 2017-03-28 Richard Biener <rguenther@suse.de>
30147
30148 PR ipa/80205
30149 * tree-inline.c (copy_phis_for_bb): Do not create PHI node
30150 without arguments, generate default definition of a SSA name.
30151
30152 2017-03-28 Richard Biener <rguenther@suse.de>
30153
30154 PR middle-end/80222
30155 * gimple-fold.c (gimple_fold_indirect_ref): Do not touch
30156 TYPE_REF_CAN_ALIAS_ALL references.
30157 * fold-const.c (fold_indirect_ref_1): Likewise.
30158
30159 2017-03-28 Martin Liska <mliska@suse.cz>
30160
30161 PR ipa/80104
30162 * cgraphunit.c (cgraph_node::expand_thunk): Mark argument of a
30163 thunk call as DECL_GIMPLE_REG_P when vector or complex type.
30164
30165 2017-03-28 Claudiu Zissulescu <claziss@synopsys.com>
30166 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
30167
30168 * config/arc/arc.h (CPP_SPEC): Add subtarget_cpp_spec.
30169 (EXTRA_SPECS): Define.
30170 (SUBTARGET_EXTRA_SPECS): Likewise.
30171 (SUBTARGET_CPP_SPEC): Likewise.
30172 * config/arc/elf.h (EXTRA_SPECS): Renamed to
30173 SUBTARGET_EXTRA_SPECS.
30174 * config/arc/linux.h (SUBTARGET_CPP_SPEC): Define.
30175
30176 2017-03-28 Claudiu Zissulescu <claziss@synopsys.com>
30177
30178 * config/arc/simdext.md (vst64_insn): Update pattern.
30179 (vld32wh_insn): Likewise.
30180 (vld32wl_insn): Likewise.
30181 (vld64_insn): Likewise.
30182 (vld32_insn): Likewise.
30183
30184 2017-03-28 Marek Polacek <polacek@redhat.com>
30185
30186 PR sanitizer/80067
30187 * fold-const.c (fold_comparison): Use protected_set_expr_location
30188 instead of SET_EXPR_LOCATION.
30189
30190 2017-03-28 Markus Trippelsdorf <markus@trippelsdorf.de>
30191
30192 * tree.c (add_expr): Avoid name lookup warning.
30193
30194 2017-03-27 Jeff Law <law@redhat.com>
30195
30196 PR tree-optimization/80216
30197 * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Fix typo in
30198 function name. Limit recursion depth.
30199 (record_temporary_equivalences): Corresponding changes.
30200
30201 2017-03-27 Jonathan Wakely <jwakely@redhat.com>
30202
30203 * doc/invoke.texi (-Wno-narrowing): Reorder so default behavior is
30204 covered first.
30205
30206 2017-03-27 Jakub Jelinek <jakub@redhat.com>
30207
30208 PR target/80102
30209 * reg-notes.def (REG_CFA_NOTE): Define. Use it for CFA related
30210 notes.
30211 * cfgcleanup.c (reg_note_cfa_p): New array.
30212 (insns_have_identical_cfa_notes): New function.
30213 (old_insns_match_p): Don't cross-jump in between /f
30214 and non-/f instructions. If both i1 and i2 are frame related,
30215 verify all CFA notes, their order and content.
30216
30217 2017-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
30218
30219 PR target/78543
30220 * config/rs6000/rs6000.md (bswaphi2_extenddi): Combine bswap
30221 HImode and SImode with zero extend to DImode to one insn.
30222 (bswap<mode>2_extenddi): Likewise.
30223 (bswapsi2_extenddi): Likewise.
30224 (bswaphi2_extendsi): Likewise.
30225 (bswaphi2): Combine bswap HImode and SImode into one insn.
30226 Separate memory insns from swapping register.
30227 (bswapsi2): Likewise.
30228 (bswap<mode>2): Likewise.
30229 (bswaphi2_internal): Delete, no longer used.
30230 (bswapsi2_internal): Likewise.
30231 (bswap<mode>2_load): Split bswap HImode/SImode into separate load,
30232 store, and gpr<-gpr swap insns.
30233 (bswap<mode>2_store): Likewise.
30234 (bswaphi2_reg): Register only splitter, combine with the splitter.
30235 (bswaphi2 splitter): Likewise.
30236 (bswapsi2_reg): Likewise.
30237 (bswapsi2 splitter): Likewise.
30238 (bswapdi2): If we have the LDBRX and STDBRX instructions, split
30239 the insns into load, store, and register/register insns.
30240 (bswapdi2_ldbrx): Likewise.
30241 (bswapdi2_load): Likewise.
30242 (bswapdi2_store): Likewise.
30243 (bswapdi2_reg): Likewise.
30244
30245 2017-03-27 Gunther Nikl <gnikl@users.sourceforge.net>
30246
30247 * system.h (HAVE_DESIGNATED_INITIALIZERS): Fix non C++ case.
30248 (HAVE_DESIGNATED_UNION_INITIALIZERS): Likewise.
30249
30250 2017-03-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
30251
30252 PR target/80103
30253 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Edit and
30254 add comments.
30255 * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
30256 special handling for target option conflicts between dform
30257 options (-mpower9-dform, -mpower9-dform-vector,
30258 -mpower9-dform-scalar) and -mno-direct-move.
30259
30260 2017-03-27 Richard Biener <rguenther@suse.de>
30261
30262 PR tree-optimization/80181
30263 * tree-ssa-ccp.c (likely_value): UNDEFINED ^ X is UNDEFINED.
30264
30265 2017-03-27 Claudiu Zissulescu <claziss@synopsys.com>
30266
30267 * config/arc/predicates.md (move_double_src_operand): Replace the
30268 call to move_double_src_operand with a call to address_operand.
30269
30270 2017-03-27 Claudiu Zissulescu <claziss@synopsys.com>
30271
30272 * config/arc/elf.h (ARGET_ARC_TP_REGNO_DEFAULT): Define.
30273 * config/arc/linux.h (ARGET_ARC_TP_REGNO_DEFAULT): Likewise.
30274 * config/arc/arc.opt (mtp-regno): Use ARGET_ARC_TP_REGNO_DEFAULT.
30275
30276 2017-03-27 Claudiu Zissulescu <claziss@synopsys.com>
30277
30278 * config/arc/predicates.md (long_immediate_loadstore_operand):
30279 Consider scaled addresses cases.
30280
30281 2017-03-27 Claudiu Zissulescu <claziss@synopsys.com>
30282
30283 * config/arc/arc.c (arc_epilogue_uses): BLINK should be also
30284 restored when in interrupt.
30285 * config/arc/arc.md (simple_return): ARCv2 rtie instruction
30286 doesn't have delay slot.
30287
30288 2017-03-27 Richard Biener <rguenther@suse.de>
30289
30290 PR ipa/79776
30291 * tree-ssa-structalias.c (associate_varinfo_to_alias): Skip
30292 inlined thunk clones.
30293
30294 2017-03-27 Jakub Jelinek <jakub@redhat.com>
30295
30296 PR sanitizer/80168
30297 * asan.c (instrument_derefs): Copy over last operand from
30298 original COMPONENT_REF to the new COMPONENT_REF with
30299 DECL_BIT_FIELD_REPRESENTATIVE.
30300 * ubsan.c (instrument_object_size): Likewise.
30301
30302 2017-03-27 Richard Biener <rguenther@suse.de>
30303
30304 PR tree-optimization/80170
30305 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Make
30306 sure DR/SCEV didnt fold in constants we do not see when looking
30307 at the reference base alignment.
30308
30309 2017-03-27 Richard Biener <rguenther@suse.de>
30310
30311 PR middle-end/80171
30312 * gimple-fold.c (fold_ctor_reference): Properly guard against
30313 NULL return value from canonicalize_constructor_val.
30314
30315 2017-03-25 Uros Bizjak <ubizjak@gmail.com>
30316
30317 PR target/80180
30318 * config/i386/i386.c (ix86_expand_builtin)
30319 <IX86_BUILTIN_RDSEED{16,32,64}_STEP>: Do not expand arg0 between
30320 flags reg setting and flags reg using instructions.
30321 <IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Ditto. Use non-flags reg
30322 clobbering instructions to zero extend op2.
30323
30324 2017-03-25 Gerald Pfeifer <gerald@pfeifer.com>
30325
30326 * doc/install.texi (Configuration) <--with-aix-soname>:
30327 Update link to AIX ld.
30328
30329 2017-03-25 Bernd Schmidt <bschmidt@redhat.com>
30330
30331 PR rtl-optimization/80160
30332 PR rtl-optimization/80159
30333 * lra-assigns.c (must_not_spill_p): Tighten new test to also take
30334 reg_alternate_class into account.
30335
30336 2017-03-24 Vladimir Makarov <vmakarov@redhat.com>
30337
30338 PR target/80148
30339 * lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos
30340 to consider in curr_insn_transform.
30341
30342 2017-03-24 Jakub Jelinek <jakub@redhat.com>
30343
30344 * genrecog.c (validate_pattern): Add VEC_SELECT validation.
30345 * genmodes.c (emit_min_insn_modes_c): Call emit_mode_nunits
30346 and emit_mode_inner.
30347
30348 2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30349
30350 * config/s390/s390-builtins.def: Add VXE builtins. Add a flags
30351 argument to the overloaded builtin variants. Use the new flag to
30352 deprecate certain builtin variants.
30353 * config/s390/s390-builtin-types.def: Add new builtin types.
30354 * config/s390/s390-builtins.h: Support new flags field for
30355 overloaded builtins.
30356 * config/s390/s390-c.c (OB_DEF_VAR): New flags field.
30357 (s390_macro_to_expand): Enable vector float data type.
30358 (s390_cpu_cpp_builtins_internal): Indicate support of the new
30359 builtins by incrementing the __VEC__ version number.
30360 (s390_expand_overloaded_builtin): Support expansion of vec_xl and
30361 vec_xst.
30362 (s390_resolve_overloaded_builtin): Emit error messages depending
30363 on the builtin flags.
30364 * config/s390/s390.c (s390_expand_builtin): Support additional
30365 flags argument. Change error message to match the messages
30366 emitted in s390-c.c.
30367 * config/s390/s390.md: New UNSPEC_* constants.
30368 (op_type): Add new instruction types.
30369 * config/s390/vecintrin.h: Add new builtins and test data class
30370 constants.
30371 * config/s390/vx-builtins.md (V_HW_32_64): Add V4SF.
30372 (V_HW_4, VEC_HW, VECF_HW): New mode iterators.
30373 (VEC_INEXACT, VEC_NOINEXACT): New constants.
30374 ("vec_splats<mode>", "vec_insert<mode>", "vec_promote<mode>")
30375 ("vec_insert_and_zero<mode>", "vec_mergeh<mode>")
30376 ("vec_mergel<mode>"): V_HW -> VEC_HW.
30377
30378 ("vlrlrv16qi", "vstrlrv16qi", "vbpermv16qi", "vec_msumv2di")
30379 ("vmslg", "*vftci<mode>_cconly", "vftci<mode>_intcconly")
30380 ("*vftci<mode>", "vftci<mode>_intcc", "vec_double_s64")
30381 ("vec_double_u64", "vfmin<mode>", "vfmax<mode>"): New definition.
30382
30383 ("and_av2df3", "and_cv2df3", "vec_andc_av2df3")
30384 ("vec_andc_cv2df3", "xor_av2df3", "xor_cv2df3", "vec_nor_av2df3")
30385 ("vec_nor_cv2df3", "ior_av2df3", "ior_cv2df3", "vec_nabs")
30386 ("*vftcidb", "*vftcidb_cconly", "vftcidb"): Remove definition.
30387
30388 ("vec_all_<fpcmpcc:code>v2df", "vec_any_<fpcmpcc:code>v2df")
30389 ("vec_scatter_elementv4si_DI", "vec_cmp<fpcmp:code>v2df")
30390 ("vec_di_to_df_s64", "vec_di_to_df_u64", "vec_df_to_di_u64")
30391 ("vfidb", "*vldeb", "*vledb", "*vec_cmp<insn_cmp>v2df_cconly")
30392 ("vec_cmpeqv2df_cc", "vec_cmpeqv2df_cc", "vec_cmphv2df_cc")
30393 ("vec_cmphev2df_cc", "*vec_cmpeqv2df_cc")
30394 ("*vec_cmphv2df_cc", "*vec_cmphev2df_cc"): Enable new modes as ...
30395
30396 ("vec_all_<fpcmpcc:code><mode>", "vec_any_<fpcmpcc:code><mode>")
30397 ("vec_scatter_element<V_HW_4:mode>_DI")
30398 ("vec_cmp<fpcmp:code><mode>", "vcdgb", "vcdlgb", "vclgdb")
30399 ("vec_fpint<mode>", "vflls")
30400 ("vflrd", "*vec_cmp<insn_cmp><mode>_cconly", "vec_cmpeq<mode>_cc")
30401 ("vec_cmpeq<mode>_cc", "vec_cmph<mode>_cc", "vec_cmphe<mode>_cc")
30402 ("*vec_cmpeq<mode>_cc", "*vec_cmph<mode>_cc")
30403 ("*vec_cmphe<mode>_cc"): ... these.
30404
30405 ("vec_ctd_s64", "vec_ctsl", "vec_ctul", "vec_st2f"): Use rounding
30406 mode constant instead of magic value.
30407
30408 2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30409
30410 * config/s390/s390.c (s390_expand_vec_compare): Support other
30411 vector floating point modes than just V2DF.
30412 (s390_expand_vcond): Likewise.
30413 (s390_hard_regno_mode_ok): Allow SFmode values in VRs.
30414 (s390_cannot_change_mode_class): Prevent mode changes between TF
30415 and V1TF in vector registers.
30416 * config/s390/s390.md (DF, SF): New mode attributes.
30417 ("*cmp<mode>_ccs", "add<mode>3", "sub<mode>3", "mul<mode>3")
30418 ("fma<mode>4", "fms<mode>4", "div<mode>3", "*neg<mode>2"): Add
30419 SFmode support for VRs.
30420 * config/s390/vector.md (V_HW, V_HW2, VT_HW, ti*, nonvec): Add new
30421 vector fp modes.
30422 (VFT, VF_HW): New mode iterators.
30423 (vw, sdx): New mode attributes.
30424 ("addv2df3", "subv2df3", "mulv2df3", "divv2df3", "sqrtv2df2")
30425 ("fmav2df4","fmsv2df4", "negv2df2", "absv2df2", "*negabsv2df2")
30426 ("smaxv2df3", "sminv2df3", "*vec_cmp<VFCMP_HW_OP:code>v2df_nocc")
30427 ("vec_cmpuneqv2df", "vec_cmpltgtv2df", "vec_orderedv2df")
30428 ("vec_unorderedv2df"): Adjust the v2df only patterns to support
30429 also the new vector floating point modes. Renaming to ...
30430
30431 ("add<mode>3", "sub<mode>3", "mul<mode>3", "div<mode>3")
30432 ("sqrt<mode>2", "fma<mode>4", "fms<mode>4", "neg<mode>2")
30433 ("abs<mode>2", "negabs<mode>2", "smax<mode>3")
30434 ("smin<mode>3", "*vec_cmp<VFCMP_HW_OP:code><mode>_nocc")
30435 ("vec_cmpuneq<mode>", "vec_cmpltgt<mode>", "vec_ordered<mode>")
30436 ("vec_unordered<mode>"): ... these.
30437
30438 ("neg_fma<mode>4", "neg_fms<mode>4", "*smax<mode>3_vxe")
30439 ("*smin<mode>3_vxe", "*sminv2df3_vx", "*vec_extendv4sf")
30440 ("*vec_extendv2df"): New insn definitions.
30441
30442 2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30443
30444 * config/s390/s390.md ("*adddi3_sign", "*subdi3_sign", "mulditi3")
30445 ("mulditi3_2", "*muldi3_sign"): New patterns.
30446 ("muldi3", "*muldi3", "mulsi3", "*mulsi3"): Add an expander and
30447 rename the pattern definition.
30448
30449 2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30450
30451 * config/s390/s390.md ("indirect_jump"): Turn insn definition into
30452 expander.
30453 ("*indirect_jump", "*indirect2_jump"): New pattern definitions.
30454
30455 2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30456
30457 * config/s390/s390.c (s390_expand_vec_init): Use vllezl
30458 instruction if possible.
30459 * config/s390/vector.md (vec_halfnumelts): New mode
30460 attribute.
30461 ("*vec_vllezlf<mode>"): New pattern.
30462
30463 2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30464
30465 * config/s390/vector.md ("popcountv16qi2", "popcountv8hi2")
30466 ("popcountv4si2", "popcountv2di2"): Rename to ...
30467 ("popcount<mode>2", "popcountv8hi2_vx", "popcountv4si2_vx")
30468 ("popcountv2di2_vx"): ... these and add !TARGET_VXE to the
30469 condition.
30470 ("popcount<mode>2_vxe"): New pattern.
30471
30472 2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30473
30474 * common/config/s390/s390-common.c (processor_flags_table): Add
30475 arch12.
30476 * config.gcc: Add arch12.
30477 * config/s390/driver-native.c (s390_host_detect_local_cpu):
30478 Default to arch12 for unknown CPU model numbers.
30479 * config/s390/s390-builtins.def: Add B_VXE builtin flag.
30480 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Adjust
30481 PROCESSOR_max sanity check.
30482 * config/s390/s390-opts.h (enum processor_type): Add
30483 PROCESSOR_ARCH12.
30484 * config/s390/s390.c (processor_table): Add arch12.
30485 (s390_expand_builtin): Add check for B_VXE flag.
30486 (s390_issue_rate): Add PROCESSOR_ARCH12.
30487 (s390_get_sched_attrmask): Likewise.
30488 (s390_get_unit_mask): Likewise.
30489 (s390_sched_score): Enable z13 scheduling for arch12.
30490 (s390_sched_reorder): Likewise.
30491 (s390_sched_variable_issue): Likewise.
30492 * config/s390/s390.h (enum processor_flags): Add PF_ARCH12 and
30493 PF_VXE.
30494 (s390_tune_attr): Use z13 scheduling also for arch12.
30495 (TARGET_CPU_ARCH12, TARGET_CPU_ARCH12_P, TARGET_CPU_VXE)
30496 (TARGET_CPU_VXE_P, TARGET_ARCH12, TARGET_ARCH12_P, TARGET_VXE)
30497 (TARGET_VXE_P): New macros.
30498 * config/s390/s390.md: Add arch12 to cpu attribute. Add arch12
30499 and vxe to cpu_facility. Add arch12 and vxe to enabled attribute.
30500 * config/s390/s390.opt: Add arch12 as processor_type.
30501
30502 2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30503
30504 * config/s390/s390.md
30505 ("fixuns_truncdddi2", "fixuns_trunctddi2")
30506 ("fixuns_trunc<BFP:mode><GPR:mode>2"): Merge into ...
30507 ("fixuns_trunc<FP:mode><GPR:mode>2"): New expander.
30508
30509 ("fixuns_trunc<BFP:mode><GPR:mode>2", "fixuns_trunc<mode>si2"):
30510 Rename expanders to ...
30511
30512 ("fixuns_trunc<BFP:mode><GPR:mode>2_emu")
30513 ("fixuns_truncdddi2_emu"): ... these.
30514
30515 ("fixuns_trunc<mode>si2_emu"): New expander.
30516
30517 ("*fixuns_truncdfdi2_z13"): Rename to ...
30518 ("*fixuns_truncdfdi2_vx"): ... this.
30519
30520 2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30521
30522 * config/s390/2964.md: Remove the single element vector compare
30523 instructions which are no longer used.
30524 * config/s390/s390.c (s390_select_ccmode): Remove handling of
30525 vector CCmodes.
30526 (s390_canonicalize_comparison): Remove handling of DFmode
30527 compares.
30528 (s390_expand_vec_compare_scalar): Remove function.
30529 (s390_emit_compare): Don't call s390_expand_vec_compare_scalar.
30530 * config/s390/s390.md ("*vec_cmp<insn_cmp>df_cconly"): Remove
30531 pattern.
30532 ("*cmp<mode>_ccs"): Add wfcdb instruction.
30533
30534 2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30535
30536 * config/s390/s390.md ("mov<mode>_64dfp" DD_DF): Use vleig for loading a
30537 FP zero.
30538 ("*mov<mode>_64" DD_DF): Remove the vector instructions. These
30539 will anyway by matched by mov<mode>_64dfp.
30540
30541 2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30542
30543 * config/s390/s390.md ("mov<mode>" SD_SF): Change vleg/vsteg to
30544 vlef/vstef. Add missing operand to vleif.
30545
30546 2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30547
30548 * config/s390/s390.c (s390_expand_vec_init): Enable vector load
30549 pair for all vector types with 64 bit elements.
30550 * config/s390/vx-builtins.md (V_HW_64): Move mode iterator to ...
30551 * config/s390/vector.md (V_HW_64): ... here.
30552 (V_128_NOSINGLE): New mode iterator.
30553 ("vec_init<V_HW:mode>"): Use V_128 as mode iterator.
30554 ("*vec_splat<mode>"): Use V_128_NOSINGLE mode iterator.
30555 ("*vec_tf_to_v1tf", "*vec_ti_to_v1ti"): New pattern definitions.
30556 ("*vec_load_pairv2di"): Change to ...
30557 ("*vec_load_pair<mode>"): ... this one.
30558
30559 2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30560
30561 * config/s390/constraints.md: Add comments.
30562 (jKK): Reject element sizes > 8 bytes.
30563 * config/s390/s390.c (s390_split_ok_p): Enable splitting also for
30564 s_operands.
30565 * config/s390/s390.md: Add the s_operand checks formerly in
30566 s390_split_ok_p to various splitters where they are still
30567 required.
30568 * config/s390/vector.md ("mov<mode>" V_128): Add GPR alternatives
30569 for 128 bit vectors. Plus two splitters.
30570
30571 2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30572
30573 * config/s390/s390.md: Rename the cpu facilty vec to vx throughout
30574 the file.
30575
30576 2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30577
30578 PR target/79893
30579 * config/s390/s390-c.c (s390_adjust_builtin_arglist): Issue an
30580 error if the boundary argument is not constant.
30581
30582 2017-03-24 Jakub Jelinek <jakub@redhat.com>
30583
30584 PR rtl-optimization/80112
30585 * loop-doloop.c (doloop_condition_get): Don't check condition
30586 if cmp isn't SET with IF_THEN_ELSE src.
30587
30588 2017-03-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30589
30590 PR tree-optimization/80158
30591 * gimple-ssa-strength-reduction.c (replace_mult_candidate): When
30592 replacing a candidate statement, also replace it for the
30593 candidate's alternate interpretation.
30594 (replace_rhs_if_not_dup): Likewise.
30595 (replace_one_candidate): Likewise.
30596
30597 2017-03-24 Richard Biener <rguenther@suse.de>
30598
30599 PR tree-optimization/80167
30600 * graphite-isl-ast-to-gimple.c
30601 (translate_isl_ast_to_gimple::is_valid_rename): Handle default-defs
30602 properly.
30603 (translate_isl_ast_to_gimple::get_rename): Likewise.
30604
30605 2017-03-23 Kelvin Nilsen <kelvin@gcc.gnu.org>
30606
30607 * config/rs6000/rs6000.c (rs6000_option_override_internal): Change
30608 handling of certain combinations of target options, including the
30609 combinations -mpower8-vector vs. -mno-vsx, -mpower9-vector vs.
30610 -mno-power8-vector, and -mpower9_dform vs. -mno-power9-vector.
30611
30612 2017-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30613
30614 PR target/71436
30615 * config/arm/arm.md (*load_multiple): Add reload_completed to
30616 matching condition.
30617
30618 2017-03-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30619 Richard Biener <rguenth@suse.de>
30620
30621 PR tree-optimization/79908
30622 PR tree-optimization/80136
30623 * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
30624 been cast away, gimplify_and_add suffices.
30625
30626 2017-03-23 Markus Trippelsdorf <markus@trippelsdorf.de>
30627
30628 * tree-vrp.c (identify_jump_threads): Delete avail_exprs.
30629
30630 2017-03-23 Richard Biener <rguenther@suse.de>
30631
30632 PR tree-optimization/80032
30633 * gimplify.c (gimple_push_cleanup): Forced unconditional
30634 cleanups still have to go to the conditional_cleanups
30635 sequence.
30636
30637 2017-03-22 Jakub Jelinek <jakub@redhat.com>
30638
30639 PR tree-optimization/80072
30640 * tree-ssa-reassoc.c (struct operand_entry): Change id field type
30641 to unsigned int.
30642 (next_operand_entry_id): Change type to unsigned int.
30643 (sort_by_operand_rank): Make sure to return the right return value
30644 even if unsigned fields are bigger than INT_MAX.
30645 (struct oecount): Change cnt and id type to unsigned int.
30646 (oecount_hasher::equal): Formatting fix.
30647 (oecount_cmp): Make sure to return the right return value
30648 even if unsigned fields are bigger than INT_MAX.
30649 (undistribute_ops_list): Change next_oecount_id type to unsigned int.
30650
30651 PR c++/80129
30652 * gimplify.c (gimplify_modify_expr_rhs) <case COND_EXPR>: Clear
30653 TREE_READONLY on result if writing it more than once.
30654
30655 PR sanitizer/80110
30656 * doc/invoke.texi (-fsanitize=thread): Document that with
30657 -fnon-call-exceptions atomics are not able to throw
30658 exceptions.
30659
30660 PR sanitizer/80110
30661 * tsan.c: Include tree-eh.h.
30662 (instrument_builtin_call): Call maybe_clean_eh_stmt or
30663 maybe_clean_or_replace_eh_stmt where needed.
30664 (instrument_memory_accesses): Add cfg_changed argument.
30665 Call gimple_purge_dead_eh_edges on each block and set *cfg_changed
30666 if it returned true.
30667 (tsan_pass): Adjust caller. Return TODO_cleanup_cfg if cfg_changed.
30668
30669 PR rtl-optimization/63191
30670 * config/i386/i386.c (ix86_delegitimize_address): Turn into small
30671 wrapper function, moved the whole old content into ...
30672 (ix86_delegitimize_address_1): ... this. New inline function.
30673 (ix86_find_base_term): Use ix86_delegitimize_address_1 with
30674 true as last argument instead of ix86_delegitimize_address.
30675
30676 2017-03-22 Wilco Dijkstra <wdijkstr@arm.com>
30677
30678 * config/aarch64/aarch64.c (generic_branch_cost): Copy
30679 cortexa57_branch_cost.
30680
30681 2017-03-22 Wilco Dijkstra <wdijkstr@arm.com>
30682
30683 * config/aarch64/aarch64.c (generic_tunings): Add AES fusion.
30684
30685 2017-03-21 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30686
30687 PR target/80123
30688 * doc/md.texi (Constraints): Document wA constraint.
30689 * config/rs6000/constraints.md (wA): New.
30690 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Add wA reg_class.
30691 (rs6000_init_hard_regno_mode_ok): Init wA constraint.
30692 * config/rs6000/rs6000.h (RS6000_CONSTRAINT_wA): New.
30693 * config/rs6000/vsx.md (vsx_splat_<mode>): Use wA constraint.
30694
30695 2017-03-22 Cesar Philippidis <cesar@codesourcery.com>
30696
30697 PR c++/80029
30698 * gimplify.c (is_oacc_declared): New function.
30699 (oacc_default_clause): Use it to set default flags for acc declared
30700 variables inside parallel regions.
30701 (gimplify_scan_omp_clauses): Strip firstprivate pointers for acc
30702 declared variables.
30703 (gimplify_oacc_declare): Gimplify the declare clauses. Add the
30704 declare attribute to any decl as necessary.
30705
30706 2017-03-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
30707
30708 PR target/80082
30709 * config/arm/arm-isa.h (isa_bit_lpae): New feature bit.
30710 (ISA_ARMv7ve): Add isa_bit_lpae to the definition.
30711 * config/arm/arm-protos.h (arm_arch7ve): Rename into ...
30712 (arm_arch_lpae): This.
30713 * config/arm/arm.c (arm_arch7ve): Rename into ...
30714 (arm_arch_lpae): This. Define it in term of isa_bit_lpae.
30715 * config/arm/arm.h (TARGET_HAVE_LPAE): Redefine in term of
30716 arm_arch_lpae.
30717
30718 2017-03-22 Martin Liska <mliska@suse.cz>
30719
30720 PR target/79906
30721 * config/rs6000/rs6000.c (rs6000_inner_target_options): Show
30722 error message instead of an ICE.
30723
30724 2017-03-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30725
30726 * doc/extend.texi (6.11 Additional Floating Types): Revise.
30727
30728 2017-03-21 Kelvin Nilsen <kelvin@gcc.gnu.org>
30729
30730 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
30731 comments.
30732 * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
30733 comments.
30734
30735 2017-03-21 Martin Sebor <msebor@redhat.com>
30736
30737 * doc/extend.texi: Use "cannot" instead of "can't."
30738 * doc/hostconfig.texi: Same.
30739 * doc/install.texi: Same.
30740 * doc/invoke.texi: Same.
30741 * doc/loop.texi: Same.
30742 * doc/md.texi: Same.
30743 * doc/objc.texi: Same.
30744 * doc/rtl.texi: Same.
30745 * doc/tm.texi: Same.
30746 * doc/tm.texi.in: Same.
30747 * doc/trouble.texi: Same.
30748
30749 2017-03-21 Alexandre Oliva <aoliva@redhat.com>
30750
30751 PR debug/63238
30752 * dwarf2out.c (struct checksum_attributes): Add at_alignment.
30753 (collect_checksum_attributes): Set it.
30754 (die_checksum_ordered): Use it.
30755
30756 2017-03-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30757
30758 PR tree-optimization/79908
30759 * tree-stdarg.c (expand_ifn_va_arg_1): Revert the following
30760 change: For a VA_ARG whose LHS has been cast away, use
30761 force_gimple_operand to construct the side effects.
30762
30763 2017-03-21 David Malcolm <dmalcolm@redhat.com>
30764
30765 PR translation/80001
30766 * omp-offload.c (oacc_loop_fixed_partitions): Make diagnostics
30767 more amenable to translation.
30768 (oacc_loop_auto_partitions): Likewise.
30769
30770 2017-03-21 Marek Polacek <polacek@redhat.com>
30771 Martin Sebor <msebor@redhat.com>
30772
30773 PR tree-optimization/80109
30774 * gimple-ssa-warn-alloca.c (alloca_call_type): Only call get_range_info
30775 on INTEGRAL_TYPE_P.
30776
30777 2017-03-21 Jakub Jelinek <jakub@redhat.com>
30778 Segher Boessenkool <segher@kernel.crashing.org>
30779
30780 PR target/80125
30781 * combine.c (can_combine_p): Revert the 2017-03-20 change, only
30782 check reg_used_between_p between insn and one of succ or succ2
30783 depending on if succ is artificial insn not inserted into insn
30784 stream.
30785
30786 2017-03-21 Martin Liska <mliska@suse.cz>
30787
30788 PR gcov-profile/80081
30789 * Makefile.in: Add gcov-dump and fix installation of gcov-tool.
30790 * doc/gcc.texi: Include gcov-dump stuff.
30791 * doc/gcov-dump.texi: New file.
30792
30793 2017-03-21 Toma Tabacu <toma.tabacu@imgtec.com>
30794
30795 PR rtl-optimization/79150
30796 * config/mips/mips.c (mips_block_move_loop): Emit a NOP after the
30797 conditional jump, if the jump is the last insn of the loop.
30798
30799 2017-03-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30800 Richard Biener <rguenth@suse.de>
30801
30802 PR tree-optimization/79908
30803 * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
30804 been cast away, use force_gimple_operand to construct the side
30805 effects.
30806
30807 2017-03-21 Martin Liska <mliska@suse.cz>
30808
30809 PR libfortran/79956
30810 * simplify-rtx.c (simplify_immed_subreg): Initialize a variable
30811 to NULL.
30812
30813 2017-03-21 Brad Spengler <spender@grsecurity.net>
30814
30815 PR plugins/80094
30816 * plugin.c (htab_hash_plugin): New function.
30817 (add_new_plugin): Use it and adjust.
30818 (parse_plugin_arg_opt): Adjust.
30819 (init_one_plugin): Likewise.
30820
30821 2017-03-21 Richard Biener <rguenther@suse.de>
30822
30823 PR tree-optimization/80032
30824 * gimplify.c (gimple_push_cleanup): Add force_uncond parameter,
30825 if set force the cleanup to happen unconditionally.
30826 (gimplify_target_expr): Push inserted clobbers with force_uncond
30827 to avoid them being removed by control-dependent DCE.
30828
30829 2017-03-21 Richard Biener <rguenther@suse.de>
30830
30831 PR tree-optimization/80122
30832 * tree-inline.c (copy_bb): Do not expans va-arg packs or
30833 va_arg_pack_len when the inlined call stmt requires pack
30834 expansion itself.
30835 * tree-inline.h (struct copy_body_data): Make call_stmt a gcall *.
30836
30837 2017-03-21 Jakub Jelinek <jakub@redhat.com>
30838
30839 PR sanitizer/78158
30840 * tsan.c (instrument_builtin_call): If the memory model argument
30841 is not a constant, assume it is valid.
30842
30843 PR c/67338
30844 * fold-const.c (round_up_loc): Negate divisor in unsigned type to
30845 avoid UB.
30846
30847 2017-03-20 Segher Boessenkool <segher@kernel.crashing.org>
30848
30849 PR rtl-optimization/79910
30850 * combine.c (can_combine_p): Do not allow combining an I0 or I1
30851 if its dest is used by an insn before I2 (other than the combined
30852 insns themselves, which are properly handled already).
30853
30854 2017-03-20 Segher Boessenkool <segher@kernel.crashing.org>
30855
30856 Revert:
30857 2017-03-17 Bernd Schmidt <bschmidt@redhat.com>
30858
30859 * combine.c (record_used_regs): New static function.
30860 (try_combine): Handle situations where there is an additional
30861 instruction between I2 and I3 which needs to have a LOG_LINK
30862 updated.
30863
30864 Revert:
30865 2017-03-17 Jim Wilson <jim.wilson@linaro.org>
30866
30867 * combine.c (try_combine): Delete redundant i1 test. Call
30868 prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
30869
30870 2017-03-20 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30871
30872 PR target/80083
30873 * config/rs6000/rs6000.md (*movsi_internal1): Fix constraints for
30874 alternatives 13/14.
30875
30876 2017-03-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30877
30878 PR tree-optimization/80054
30879 * gimple-ssa-strength-reduction.c (all_phi_incrs_profitable): Fail
30880 the optimization if a PHI or any of its arguments is not dominated
30881 by the candidate's basis. Use gphi* rather than gimple* as
30882 appropriate.
30883 (replace_profitable_candidates): Clean up a gimple* variable that
30884 should be a gphi* variable.
30885
30886 2017-03-20 Martin Sebor <msebor@redhat.com>
30887
30888 PR c++/52477
30889 * doc/extend.texi (attribute constructor): Document present limitation.
30890
30891 2017-03-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
30892
30893 PR target/79963
30894 * config/rs6000/altivec.h (vec_all_ne): Under __cplusplus__ and
30895 __POWER9_VECTOR__ #ifdef control, change template definition to
30896 use Power9-specific built-in function.
30897 (vec_any_eq): Likewise.
30898 * config/rs6000/vector.md (vector_ae_v2di_p): Change the flag used
30899 to control outcomes from this test.
30900 (vector_ae_<mode>p): For VEC_F modes, likewise.
30901
30902 2017-03-20 Ian Lance Taylor <iant@google.com>
30903
30904 * config/i386/i386.c (ix86_function_regparm): Save an extra
30905 register for -fsplit-stack with DECL_STATIC_CHAIN.
30906
30907 2017-03-17 Palmer Dabbelt <palmer@dabbelt.com>
30908
30909 PR target/79912
30910 * config/riscv/riscv.c (riscv_preferred_reload_class): Remove.
30911 (TARGET_PREFERRED_RELOAD_CLASS): Likewise.
30912
30913 2017-03-17 Palmer Dabbelt <palmer@dabbelt.com>
30914
30915 * config/riscv/riscv.c (riscv_print_operand): Use "fence
30916 iorw,ow".
30917 * config/riscv/sync.mc (mem_thread_fence_1): Use "fence
30918 iorw,iorw".
30919
30920 2017-03-20 Marek Polacek <polacek@redhat.com>
30921
30922 PR sanitizer/80063
30923 * asan.c (DEF_SANITIZER_BUILTIN): Use do { } while (0).
30924
30925 2017-03-20 Richard Biener <rguenther@suse.de>
30926
30927 PR tree-optimization/80113
30928 * graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Do not
30929 allocate extra SSA name for PHI def.
30930 (add_close_phis_to_outer_loops): Likewise.
30931 (add_close_phis_to_merge_points): Likewise.
30932 (copy_loop_close_phi_args): Likewise.
30933 (copy_cond_phi_nodes): Likewise.
30934
30935 2017-03-20 Martin Liska <mliska@suse.cz>
30936
30937 PR middle-end/79753
30938 * tree-chkp.c (chkp_build_returned_bound): Do not build
30939 returned bounds for a LHS that's not a BOUNDED_P type.
30940
30941 2017-03-20 Martin Liska <mliska@suse.cz>
30942
30943 PR target/79769
30944 PR target/79770
30945 * tree-chkp.c (chkp_find_bounds_1): Handle REAL_CST,
30946 COMPLEX_CST and VECTOR_CST.
30947
30948 2017-03-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30949
30950 PR target/78857
30951 * config/s390/s390.md ("cmp<mode>_ccs_0"): Add a clobber of the
30952 target operand. A new splitter adds the clobber statement in case
30953 the target operand is dead anyway.
30954
30955 2017-03-19 Gerald Pfeifer <gerald@pfeifer.com>
30956
30957 * doc/install.texi (Specific) <sparc-*-linux*>: No longer refer
30958 to age-old versions of binutils and glibc.
30959
30960 2017-03-18 Segher Boessenkool <segher@kernel.crashing.org>
30961
30962 * doc/contrib.texi (Contributors): Remove duplicate entry for myself.
30963
30964 2017-03-18 Gerald Pfeifer <gerald@pfeifer.com>
30965
30966 * doc/contrib.texi (Contributors): Add Segher Boessenkool.
30967
30968 2017-03-18 Gerald Pfeifer <gerald@pfeifer.com>
30969
30970 * doc/install.texi (Specific) <arm-*-eabi>: Remove old
30971 requirement for binutils 2.13.
30972
30973 2017-03-17 Jim Wilson <jim.wilson@linaro.org>
30974
30975 * combine.c (try_combine): Delete redundant i1 test. Call
30976 prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
30977
30978 2017-03-17 Palmer Dabbelt <palmer@dabbelt.com
30979
30980 * doc/install.texi (Specific) <riscv32-*-elf>: Add riscv32-*-elf,
30981 riscv32-*-linux, riscv64-*-elf, riscv64-*-linux to the table of
30982 contents.
30983 <riscv64-*-elf>: Re-arrange section
30984 <riscv32-*-elf>: Add a note about requiring binutils 2.28.
30985 <riscv32-*-linux>: Likewise.
30986 <riscv64-*-elf>: Likewise
30987 <riscv64-*-linux>: Likewise.
30988
30989 2017-03-17 Richard Earnshaw <rearnsha@arm.com>
30990
30991 PR target/80052
30992 * aarch64.opt(verbose-cost-dump): Fix typo.
30993
30994 2017-03-17 Pat Haugen <pthaugen@us.ibm.com>
30995
30996 PR target/79951
30997 * config/rs6000/rs6000.md (copysign<mode>3_fcpsgn): Test
30998 for VECTOR_UNIT_VSX_P (<MODE>mode) too.
30999
31000 2017-03-17 Bernd Schmidt <bschmidt@redhat.com>
31001
31002 * reload.c (find_reloads): When reloading a nonoffsettable address,
31003 use RELOAD_OTHER for it and its address reloads.
31004
31005 PR rtl-optimization/79910
31006 * combine.c (record_used_regs): New static function.
31007 (try_combine): Handle situations where there is an additional
31008 instruction between I2 and I3 which needs to have a LOG_LINK
31009 updated.
31010
31011 2017-03-17 Jeff Law <law@redhat.com>
31012
31013 PR tree-optimization/71437
31014 * tree-vrp.c (simplify_stmt_for_jump_threading): Lookup the
31015 conditional in the hash table first.
31016 (vrp_dom_walker::before_dom_children): Extract condition from
31017 ASSERT_EXPR. Record condition, its inverion and any implied
31018 conditions as well.
31019
31020 2017-03-17 Marek Polacek <polacek@redhat.com>
31021 Markus Trippelsdorf <markus@trippelsdorf.de>
31022
31023 PR tree-optimization/80079
31024 * gimple-ssa-store-merging.c (class pass_store_merging): Initialize
31025 m_stores_head.
31026
31027 2017-03-17 Richard Biener <rguenther@suse.de>
31028
31029 PR middle-end/80075
31030 * tree-eh.c (stmt_could_throw_1_p): Only handle gimple assigns.
31031 Properly verify the LHS before the RHS possibly claims to be
31032 handled.
31033 (stmt_could_throw_p): Hande gimple conds fully here. Clobbers
31034 do not throw.
31035
31036 2017-03-17 Martin Jambor <mjambor@suse.cz>
31037
31038 * doc/invoke.texi (Option Options): Include -fipa-vrp in the list.
31039 (List of -O2 options): Likewise.
31040 (-fipa-bit-cp): Replace "ipa" with "interprocedural."
31041 (-fipa-vrp) New.
31042
31043 2017-03-17 Tom de Vries <tom@codesourcery.com>
31044
31045 * gcov-dump.c (print_usage): Print bug_report_url.
31046
31047 2017-03-17 Richard Biener <rguenther@suse.de>
31048
31049 PR middle-end/80050
31050 * genmatch.c (parser::next): Remove pointless check for CPP_EOF.
31051 (parser::peek): Likewise.
31052
31053 2017-03-17 Richard Biener <rguenther@suse.de>
31054
31055 PR tree-optimization/80048
31056 * sese.c (free_sese_info): Properly release rename_map and
31057 copied_bb_map elements.
31058
31059 2017-03-16 Alexandre Oliva <aoliva@redhat.com>
31060
31061 * gimple-ssa-store-merging.c (struct imm_store_chain_info):
31062 Add linked-list forward and backlinks. Insert on
31063 construction, remove on destruction.
31064 (class pass_store_merging): Add m_stores_head field.
31065 (pass_store_merging::terminate_and_process_all_chains):
31066 Iterate over m_stores_head list.
31067 (pass_store_merging::terminate_all_aliasing_chains):
31068 Likewise.
31069 (pass_store_merging::execute): Check for debug stmts first.
31070 Push new chains onto the m_stores_head stack.
31071
31072 2017-03-16 Michael Meissner <meissner@linux.vnet.ibm.com>
31073
31074 PR target/71294
31075 * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Allow a
31076 SPLAT operation on ISA 2.07 64-bit systems that have direct move,
31077 but no MTVSRDD support, by doing MTVSRD and XXPERMDI.
31078
31079 2017-03-16 Jeff Law <law@redhat.com>
31080
31081 PR tree-optimization/71437
31082 * tree-ssa-dom.c (dom_opt_dom_walker): Remove thread_across_edge
31083 member function. Implementation moved into after_dom_children
31084 member function and into the threader's thread_outgoing_edges
31085 function.
31086 (dom_opt_dom_walker::after_dom_children): Simplify by moving
31087 some code into new thread_outgoing_edges.
31088 * tree-ssa-threadedge.c (thread_across_edge): Make static and simplify
31089 definition. Simplify marker handling (do it here). Assume we always
31090 have the available expression and the const/copies tables.
31091 (thread_outgoing_edges): New function extracted from tree-ssa-dom.c
31092 and tree-vrp.c
31093 * tree-ssa-threadedge.h (thread_outgoing_edges): Declare.
31094 * tree-vrp.c (equiv_stack): No longer file scoped.
31095 (vrp_dom_walker): New class.
31096 (vrp_dom_walker::before_dom_children): New member function.
31097 (vrp_dom_walker::after_dom_children): Likewise.
31098 (identify_jump_threads): Setup domwalker. Use it rather than
31099 walking edges in a random order by hand. Simplify setup/finalization.
31100 (finalize_jump_threads): Remove.
31101 (vrp_finalize): Do not call identify_jump_threads here.
31102 (execute_vrp): Do it here instead and call thread_through_all_blocks
31103 here too.
31104
31105 PR tree-optimization/71437
31106 * tree-ssa-dom.c (pfn_simplify): Add basic_block argument. All
31107 callers changed.
31108 (simplify_stmt_for_jump_threading): Add basic_block argument. All
31109 callers changed.
31110 (lhs_of_dominating_assert): Moved from here into tree-vrp.c.
31111 (dom_opt_dom_walker::thread_across_edge): Remove
31112 handle_dominating_asserts argument. All callers changed.
31113 (record_temporary_equivalences_from_stmts_at_dest): Corresponding
31114 changes. Remove calls to lhs_of_dominating_assert. Other
31115 uses of handle_dominating_asserts turn into unconditional code
31116 (simplify_control_stmt_condition_1): Likewise.
31117 (simplify_control_stmt_condition): Likewise.
31118 (thread_through_normal_block, thread_across_edge): Likewise.
31119 * tree-ssa-threadedge.h (thread_across_edge): Corresponding changes.
31120 * tree-vrp.c (lhs_of_dominating_assert): Move here. Return original
31121 object if it is not an SSA_NAME.
31122 (simplify_stmt_for_jump_threading): Call lhs_of_dominating_assert
31123 before calling into the VRP specific simplifiers.
31124 (identify_jump_threads): Remove handle_dominating_asserts
31125 argument.
31126
31127 2017-03-16 Jakub Jelinek <jakub@redhat.com>
31128
31129 PR fortran/79886
31130 * tree-diagnostic.c (default_tree_printer): No longer static.
31131 * tree-diagnostic.h (default_tree_printer): New prototype.
31132
31133 2017-03-16 Tamar Christina <tamar.christina@arm.com>
31134
31135 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>)
31136 Change ins into fmov.
31137
31138 2017-03-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31139
31140 * config/aarch64/iterators.md (h_con): Return "x" for V4HF and V8HF.
31141 * config/aarch64/aarch64-simd.md (*aarch64_fma4_elt_from_dup<mode>):
31142 Use h_con constraint for operand 1.
31143 (*aarch64_fnma4_elt_from_dup<mode>): Likewise.
31144 (*aarch64_mulx_elt_from_dup<mode>): Likewise for operand 2.
31145
31146 2017-03-15 Jeff Law <law@redhat.com>
31147
31148 PR tree-optimization/71437
31149 * tree-ssa-dom.c (derive_equivalences_from_bit_ior): New function.
31150 (record_temporary_equivalences): Use it.
31151
31152 PR tree-optimization/71437
31153 * tree-ssa-dom.c (struct cond_equivalence): Moved from here into
31154 tree-ssa-scopedtables.
31155 (lookup_avail_expr, build_and_record_new_cond): Likewise.
31156 (record_conditions, record_cond, vuse_eq): Likewise.
31157 (record_edge_info): Adjust to API tweak of record_conditions.
31158 (simplify_stmt_for_jump_threading): Similarly for lookup_avail_expr.
31159 (record_temporary_equivalences, optimize_stmt): Likewise.
31160 (eliminate_redundant_computations): Likewise.
31161 (record_equivalences_from_stmt): Likewise.
31162 * tree-ssa-scopedtables.c: Include options.h and params.h.
31163 (vuse_eq): New function, moved from tree-ssa-dom.c
31164 (build_and_record_new_cond): Likewise.
31165 (record_conditions): Likewise. Accept vector of conditions rather
31166 than edge_equivalence structure for first argument.
31167 for the first argument.
31168 (avail_exprs_stack::lookup_avail_expr): New member function, moved
31169 from tree-ssa-dom.c.
31170 (avail_exprs_stack::record_cond): Likewise.
31171 * tree-ssa-scopedtables.h (struct cond_equivalence): Moved here
31172 from tree-ssa-dom.c.
31173 (avail_exprs_stack): Add new member functions lookup_avail_expr
31174 and record_cond.
31175 (record_conditions): Declare.
31176
31177 2017-03-15 Vladimir Makarov <vmakarov@redhat.com>
31178
31179 PR target/80017
31180 * lra-constraints.c (process_alt_operands): Increase reject for
31181 reloading an input/output operand.
31182
31183 2017-03-15 Michael Meissner <meissner@linux.vnet.ibm.com>
31184
31185 PR target/79038
31186 * config/rs6000/rs6000.md (float<QHI:mode><IEEE128:mode>2): Define
31187 insns to convert from signed/unsigned char/short to IEEE 128-bit
31188 floating point.
31189 (floatuns<QHI:mode><IEEE128:mode>2): Likewise.
31190
31191 2017-03-15 Uros Bizjak <ubizjak@gmail.com>
31192
31193 PR target/80019
31194 * config/i386/i386.c (ix86_vector_duplicate_value): Create
31195 subreg of inner mode for values already in registers.
31196
31197 2017-03-15 Bernd Schmidt <bschmidt@redhat.com>
31198
31199 * config/c6x/c6x.c (hwloop_optimize): Handle case where the old
31200 iteration reg is used after the loop.
31201
31202 2017-03-14 Martin Sebor <msebor@redhat.com>
31203
31204 PR tree-optimization/79800
31205 * gimple-ssa-sprintf.c (format_floating: Add argument. Handle
31206 precision in negative-positive range.
31207 (format_floating): Call non-const overload with adjusted precision.
31208
31209 2017-03-14 Michael Meissner <meissner@linux.vnet.ibm.com>
31210
31211 PR target/79947
31212 * config/rs6000/rs6000.h (TARGET_FRSQRTES): Add check for
31213 -mpowerpc-gfxopt.
31214
31215 2017-03-14 Martin Sebor <msebor@redhat.com>
31216
31217 PR middle-end/80020
31218 * builtin-attrs.def (ATTR_ALLOC_SIZE_2_NOTHROW_LIST): New macro.
31219 * builtins.def (aligned_alloc): Use it.
31220
31221 PR c/79936
31222 * Makefile.in (GTFILES): Add calls.c.
31223 * calls.c: Include "gt-calls.h".
31224
31225 2017-03-14 Bernd Schmidt <bschmidt@redhat.com>
31226
31227 PR rtl-optimization/79728
31228 * regs.h (struct target_regs): New field
31229 x_contains_allocatable_regs_of_mode.
31230 (contains_allocatable_regs_of_mode): New macro.
31231 * reginfo.c (init_reg_sets_1): Initialize it, and change
31232 contains_reg_of_mode so it includes global regs as well.
31233 * reload.c (push_reload): Use contains_allocatable_regs_of_mode
31234 rather than contains_regs_of_mode.
31235
31236 2017-03-14 Martin Liska <mliska@suse.cz>
31237
31238 * doc/invoke.texi: Document options that can't be combined with
31239 -fcheck-pointer-bounds.
31240
31241 2017-03-14 Martin Liska <mliska@suse.cz>
31242
31243 PR middle-end/79831
31244 * doc/invoke.texi (-Wchkp): Document the option.
31245
31246 2017-03-14 Martin Liska <mliska@suse.cz>
31247
31248 * Makefile.in: Install gcov-dump.
31249
31250 2017-03-14 Martin Liska <mliska@suse.cz>
31251
31252 * multiple_target.c (expand_target_clones): Bail out for
31253 an invalid attribute.
31254
31255 2017-03-14 Richard Biener <rguenther@suse.de>
31256
31257 * alias.c (struct alias_set_entry): Pack properly.
31258 * cfgloop.h (struct loop): Likewise.
31259 * cse.c (struct set): Likewise.
31260 * ipa-utils.c (struct searchc_env): Likewise.
31261 * loop-invariant.c (struct invariant): Likewise.
31262 * lra-remat.c (struct cand): Likewise.
31263 * recog.c (struct change_t): Likewise.
31264 * rtl.h (struct address_info): Likewise.
31265 * symbol-summary.h (function_summary): Likewise.
31266 * tree-loop-distribution.c (struct partition): Likewise.
31267 * tree-object-size.c (struct object_size_info): Likewise.
31268 * tree-ssa-loop-ivopts.c (struct cost_pair): Likewise.
31269 * tree-ssa-threadupdate.c (struct ssa_local_info_t): Likewise.
31270 * tree-vect-data-refs.c (struct _vect_peel_info): Likewise.
31271 * tree-vect-slp.c (struct _slp_oprnd_info): Likewise.
31272 * tree-vect-stmts.c (struct simd_call_arg_info): Likewise.
31273 * tree-vectorizer.h (struct _loop_vec_info): Likewise.
31274 (struct _stmt_vec_info): Likewise.
31275
31276 2017-03-14 Martin Liska <mliska@suse.cz>
31277
31278 PR target/79892
31279 * multiple_target.c (create_dispatcher_calls): Check that
31280 a target can create a function dispatcher.
31281
31282 2017-03-14 Martin Liska <mliska@suse.cz>
31283
31284 PR lto/66295
31285 * multiple_target.c (expand_target_clones): Drop local.local
31286 flag for default implementation.
31287
31288 2017-03-14 Richard Biener <rguenther@suse.de>
31289
31290 PR tree-optimization/80030
31291 * tree-vect-stmts.c (vectorizable_store): Plug memleak.
31292
31293 2017-03-13 Kito Cheng <kito.cheng@gmail.com>
31294
31295 * config/riscv/riscv.c (riscv_emit_float_compare>: Use
31296 gcc_fallthrough() instead of __attribute__((fallthrough));
31297
31298 2017-03-13 Gerald Pfeifer <gerald@pfeifer.com>
31299
31300 * doc/gcc.texi: Remove "up" link to (DIR).
31301 * doc/gccint.texi: Ditto.
31302
31303 2017-03-13 Gerald Pfeifer <gerald@pfeifer.com>
31304
31305 * doc/install.texi (Specific) <avr>: Remove reference to
31306 binutils 2.13.
31307
31308 2017-03-13 Jeff Law <law@redhat.com>
31309
31310 * config/riscv/riscv.c (riscv_emit_float_compare): Use fallthru
31311 attribute rather than comments.
31312
31313 * config/pdp11/pdp11.md (movmemhi): Adjust operand numbers to
31314 match_scratch operand is highest.
31315
31316 2017-03-13 Martin Liska <mliska@suse.cz>
31317
31318 PR middle-end/78339
31319 * ipa-pure-const.c (warn_function_noreturn): If the declarations
31320 is a CHKP clone, use original declaration.
31321
31322 2017-03-13 Claudiu Zissulescu <claziss@synopsys.com>
31323
31324 * config/arc/arc.c (arc_init): Use multiplier whenever we have it.
31325 (arc_conditional_register_usage): Use a different allocation order
31326 when optimizing for size.
31327 * common/config/arc/arc-common.c (arc_option_optimization_table):
31328 Section anchors default on when optimizing for size.
31329
31330 2017-03-13 Claudiu Zissulescu <claziss@synopsys.com>
31331
31332 * config/arc/arc.md (*tst_bitfield_tst): Fix pattern.
31333
31334 2017-03-13 Claudiu Zissulescu <claziss@synopsys.com>
31335
31336 * config/arc/arc.c (arc_output_addsi): Emit code density adds.
31337 * config/arc/arc.md (cpu_facility): Add cd variant.
31338 (*movqi_insn): Add code density variant.
31339 (*movhi_insn): Likewise.
31340 (*movqi_insn): Likewise.
31341 (*addsi3_mixed): Likewise.
31342 (subsi3_insn): Likewise.
31343
31344 2017-03-13 Claudiu Zissulescu <claziss@synopsys.com>
31345
31346 * config/arc/arc.md (movsi_cond_exec): Update constraint.
31347
31348 2017-03-13 Claudiu Zissulescu <claziss@synopsys.com>
31349
31350 * config/arc/arc.c (arc_legitimize_pic_address): Handle PIC
31351 expressions with MINUS and UNARY ops.
31352
31353 2017-03-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31354
31355 PR target/79911
31356 * config/arm/neon.md (vec_sel_widen_ssum_lo<VQI:mode><VW:mode>3):
31357 Rename to...
31358 (vec_sel_widen_ssum_lo<mode><V_half>3): ... This. Avoid mismatch
31359 between vec_select and vector argument.
31360 (vec_sel_widen_ssum_hi<VQI:mode><VW:mode>3): Rename to...
31361 (vec_sel_widen_ssum_hi<mode><V_half>3): ... This. Likewise.
31362 (vec_sel_widen_usum_lo<VQI:mode><VW:mode>3): Rename to...
31363 (vec_sel_widen_usum_lo<mode><V_half>3): ... This.
31364 (vec_sel_widen_usum_hi<VQI:mode><VW:mode>3): Rename to...
31365 (vec_sel_widen_usum_hi<mode><V_half>3): ... This.
31366
31367 2017-03-13 Richard Biener <rguenther@suse.de>
31368
31369 PR other/79991
31370 * params.def (vect-max-peeling-for-alignment): Fix typo.
31371
31372 2017-03-12 Gerald Pfeifer <gerald@pfeifer.com>
31373
31374 * doc/install.texi (Specific) <mips-*-*>: Remove description of
31375 issue that only occurred with binutils below 2.18.
31376
31377 2017-03-12 Gerald Pfeifer <gerald@pfeifer.com>
31378
31379 * doc/install.texi (Specific) <cris-axis-elf>: No longer
31380 refer to binutils 2.11/2.12 minimum.
31381
31382 2017-03-12 Gerald Pfeifer <gerald@pfeifer.com>
31383
31384 * doc/install.texi (Specific) <powerpc-*-*>: Remove link to
31385 ftp.kernel.org and simplify binutils requirement.
31386
31387 2017-03-11 Gerald Pfeifer <gerald@pfeifer.com>
31388
31389 * doc/invoke.texi (Warning Options): Fix spelling of link-time
31390 optimization.
31391 (Optimize Options): Ditto. Also remove redundancy.
31392
31393 2017-03-10 David Malcolm <dmalcolm@redhat.com>
31394
31395 PR translation/79848
31396 * ipa-devirt.c (warn_types_mismatch): Simplify uses of "%<%s%>" to
31397 "%qs".
31398 * ipa-pure-const.c (suggest_attribute): Likewise. Convert _
31399 to G_ to avoid double translation.
31400
31401 2017-03-10 David Malcolm <dmalcolm@redhat.com>
31402
31403 PR translation/79923
31404 * auto-profile.c (get_combined_location): Convert leading
31405 character of diagnostics to lower case and remove trailing period.
31406 (read_profile): Likewise for various diagnostics.
31407 * config/arm/arm.c (arm_option_override): Remove trailing period
31408 from various diagnostics.
31409 * config/msp430/msp430.c (msp430_expand_delay_cycles): Likewise.
31410 (msp430_expand_delay_cycles): Likewise.
31411
31412 2017-03-10 David Malcolm <dmalcolm@redhat.com>
31413
31414 PR target/79925
31415 * config/aarch64/aarch64.c (aarch64_validate_mcpu): Quote the
31416 full command-line argument, rather than just "str".
31417 (aarch64_validate_march): Likewise.
31418 (aarch64_validate_mtune): Likewise.
31419
31420 2017-03-10 Bernd Schmidt <bschmidt@redhat.com>
31421
31422 PR rtl-optimization/78911
31423 * lra-assigns.c (must_not_spill_p): New function.
31424 (spill_for): Use it.
31425
31426 2017-03-10 Jakub Jelinek <jakub@redhat.com>
31427
31428 PR tree-optimization/79981
31429 * tree-vrp.c (extract_range_basic): Handle IMAGPART_EXPR of
31430 ATOMIC_COMPARE_EXCHANGE ifn result.
31431 (stmt_interesting_for_vrp, vrp_visit_stmt): Handle
31432 IFN_ATOMIC_COMPARE_EXCHANGE.
31433
31434 2017-03-10 David Malcolm <dmalcolm@redhat.com>
31435
31436 PR driver/79875
31437 * opts.c (parse_sanitizer_options): Add missing question mark to
31438 "did you mean" message.
31439
31440 2017-03-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31441
31442 * config/rs6000/rs6000-builtin.def (VMULEUB_UNS): Remove orphaned
31443 built-in.
31444 (VMULEUH_UNS): Likewise.
31445 (VMULOUB_UNS): Likewise.
31446 (VMULOUH_UNS): Likewise.
31447 * config/rs6000/rs6000.c (builtin_function_type): Remove
31448 references to ALTIVEC_BUILTIN_VMUL[EO]U[BH]_UNS.
31449
31450 2017-03-10 David Malcolm <dmalcolm@redhat.com>
31451
31452 PR bootstrap/79952
31453 * read-rtl-function.c (function_reader::read_rtx_operand): Update
31454 x with result of extra_parsing_for_operand_code_0.
31455 (function_reader::extra_parsing_for_operand_code_0): Convert
31456 return type from void to rtx, returning x. When reading
31457 SYMBOL_REF with SYMBOL_FLAG_HAS_BLOCK_INFO, reallocate x to the
31458 larger size containing struct block_symbol.
31459
31460 2017-03-10 Segher Boessenkool <segher@kernel.crashing.org>
31461
31462 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
31463 -mfloat128-hardware without -m64.
31464
31465 2017-03-10 Will Schmidt <will_schmidt@vnet.ibm.com>
31466
31467 PR target/79941
31468 * config/rs6000/rs6000.c (builtin_function_type): Add VMUL*U[HB]
31469 entries to the case statement that marks unsigned arguments to
31470 overloaded functions.
31471
31472 2017-03-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
31473
31474 * config/rs6000/rs6000.c (rs6000_option_override_internal): Fix
31475 two typographic errors in the handling of TARGET_UPPER_REGS_DI.
31476
31477 2017-03-10 Pat Haugen <pthaugen@us.ibm.com>
31478
31479 PR target/79907
31480 * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Test
31481 TARGET_UPPER_REGS_DI when setting 'wi' constraint regclass.
31482
31483 2017-03-10 Martin Liska <mliska@suse.cz>
31484
31485 PR target/65705
31486 PR target/69804
31487 * toplev.c (process_options): Enable MPX with LSAN and UBSAN.
31488 * tree-chkp.c (chkp_walk_pointer_assignments): Verify that
31489 FIELD != NULL.
31490
31491 2017-03-10 Olivier Hainque <hainque@adacore.com>
31492
31493 * tree-switch-conversion (array_value_type): Start by resetting
31494 candidate type to it's main variant.
31495
31496 2017-03-10 Jakub Jelinek <jakub@redhat.com>
31497
31498 PR rtl-optimization/79909
31499 * combine.c (try_combine): Use simplify_replace_rtx on individual
31500 CALL_INSN_FUNCTION_USAGE elements instead of replace_rtx on copy_rtx
31501 of the whole CALL_INSN_FUNCTION_USAGE.
31502
31503 PR tree-optimization/79972
31504 * gimple-ssa-warn-alloca.c (alloca_call_type): Only call
31505 get_range_info on SSA_NAMEs. Formatting fixes.
31506
31507 2017-03-10 Richard Biener <rguenther@suse.de>
31508 Jakub Jelinek <jakub@redhat.com>
31509
31510 PR tree-optimization/77975
31511 * tree-ssa-loop-niter.c (get_base_for): Allow phi argument from latch
31512 edge to be constant.
31513 (get_val_for): For constant x return it. Formatting fix.
31514 (loop_niter_by_eval): Avoid pointless looping if the next iteration
31515 would use the same bases as the current one.
31516
31517 2017-03-09 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31518
31519 * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Use rotate
31520 instead of vec_select for V1TImode.
31521 * conifg/rs6000/vsx.md (VSX_LE): Remove mode iterator that is no
31522 longer needed.
31523 (VSX_LE_128): Add V1TI to this mode iterator.
31524 (*vsx_le_perm_load_<mode>): Change to use VSX_D mode iterator.
31525 (*vsx_le_perm_store_<mode>): Likewise.
31526 (pre-reload splitter for VSX stores): Likewise.
31527 (post-reload splitter for VSX stores): Likewise.
31528 (*vsx_xxpermdi2_le_<mode>): Likewise.
31529 (*vsx_lxvd2x2_le_<mode>): Likewise.
31530 (*vsx_stxvd2x2_le_<mode>): Likewise.
31531
31532 2017-03-09 Michael Eager <eager@eagercon.com>
31533
31534 Correct failures with --enable-checking=yes,rtl.
31535
31536 * config/microblaze/microblaze.c (microblaze_expand_shift):
31537 Replace GET_CODE test with CONST_INT_P and INTVAL test with
31538 test for const0_rtx.
31539 * config/microblaze/microblaze.md (ashlsi3_byone, ashrsi3_byone,
31540 lshrsi3_byone): Replace INTVAL with test for const1_rtx.
31541
31542 2017-03-09 Richard Biener <rguenther@suse.de>
31543
31544 PR tree-optimization/79977
31545 * graphite-scop-detection.c (scop_detection::merge_sese):
31546 Handle the case of extra exits to blocks dominating the entry.
31547
31548 2017-03-09 Toma Tabacu <toma.tabacu@imgtec.com>
31549
31550 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
31551 Document rdynamic.
31552
31553 2017-03-09 Vladimir Makarov <vmakarov@redhat.com>
31554
31555 PR rtl-optimization/79949
31556 * lra-constraints.c (process_alt_operands): Check memory when
31557 trying to predict a cycle. Print about the overall increase.
31558
31559 2017-03-09 Richard Biener <rguenther@suse.de>
31560
31561 PR middle-end/79971
31562 * gimple-expr.c (useless_type_conversion_p): Preserve
31563 TYPE_SATURATING for fixed-point types.
31564
31565 2017-03-09 Richard Biener <rguenther@suse.de>
31566
31567 PR ipa/79970
31568 * ipa-prop.c (ipa_modify_formal_parameters): Avoid changing
31569 alignment of BLKmode params.
31570
31571 2017-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31572
31573 PR target/79913
31574 * config/aarch64/iterators.md (VALL_F16_NO_V2Q): New mode iterator.
31575 (VALL_NO_V2Q): Likewise.
31576 (VDQF_DF): Delete.
31577 * config/aarch64/aarch64-simd.md
31578 (aarch64_dup_lane_<vswap_width_name><mode>): Use VALL_F16_NO_V2Q
31579 iterator.
31580 (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Use
31581 VALL_NO_V2Q mode iterator.
31582 (*aarch64_vgetfmulx<mode>): Use VDQF iterator.
31583
31584 2017-03-09 Martin Liska <mliska@suse.cz>
31585
31586 PR tree-optimization/79631
31587 * tree-chkp-opt.c (chkp_is_constant_addr): Call
31588 tree_int_cst_sign_bit just for INTEGER constants.
31589
31590 2017-03-09 Martin Liska <mliska@suse.cz>
31591
31592 PR target/65705
31593 PR target/69804
31594 * toplev.c (process_options): Disable -fcheck-pointer-bounds with
31595 sanitizers.
31596
31597 2017-03-09 Marek Polacek <polacek@redhat.com>
31598
31599 PR c++/79672
31600 * tree.c (inchash::add_expr): Handle TREE_VEC.
31601
31602 2017-03-09 Martin Liska <mliska@suse.cz>
31603
31604 PR ipa/79764
31605 (chkp_narrow_size_and_offset): New function.
31606 (chkp_parse_array_and_component_ref): Support BIT_FIELD_REF.
31607 (void chkp_parse_bit_field_ref): New function.
31608 (chkp_make_addressed_object_bounds): Add case for BIT_FIELD_REF.
31609 (chkp_process_stmt): Use chkp_parse_bit_field_ref.
31610
31611 2017-03-09 Martin Liska <mliska@suse.cz>
31612
31613 PR ipa/79761
31614 * tree-chkp.c (chkp_get_bound_for_parm): Get bounds for a param.
31615 (chkp_find_bounds_1): Remove gcc_unreachable.
31616
31617 2017-03-09 Jakub Jelinek <jakub@redhat.com>
31618
31619 PR sanitizer/79944
31620 * asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
31621 BUILT_IN_SYNC*, determine the access type from the size suffix and
31622 always build a MEM_REF with that type. Handle forgotten
31623 BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.
31624
31625 PR target/79932
31626 * config/i386/avx512vlintrin.h (_mm256_cmpge_epi32_mask,
31627 _mm256_cmpge_epi64_mask, _mm256_cmpge_epu32_mask,
31628 _mm256_cmpge_epu64_mask, _mm256_cmple_epi32_mask,
31629 _mm256_cmple_epi64_mask, _mm256_cmple_epu32_mask,
31630 _mm256_cmple_epu64_mask, _mm256_cmplt_epi32_mask,
31631 _mm256_cmplt_epi64_mask, _mm256_cmplt_epu32_mask,
31632 _mm256_cmplt_epu64_mask, _mm256_cmpneq_epi32_mask,
31633 _mm256_cmpneq_epi64_mask, _mm256_cmpneq_epu32_mask,
31634 _mm256_cmpneq_epu64_mask, _mm256_mask_cmpge_epi32_mask,
31635 _mm256_mask_cmpge_epi64_mask, _mm256_mask_cmpge_epu32_mask,
31636 _mm256_mask_cmpge_epu64_mask, _mm256_mask_cmple_epi32_mask,
31637 _mm256_mask_cmple_epi64_mask, _mm256_mask_cmple_epu32_mask,
31638 _mm256_mask_cmple_epu64_mask, _mm256_mask_cmplt_epi32_mask,
31639 _mm256_mask_cmplt_epi64_mask, _mm256_mask_cmplt_epu32_mask,
31640 _mm256_mask_cmplt_epu64_mask, _mm256_mask_cmpneq_epi32_mask,
31641 _mm256_mask_cmpneq_epi64_mask, _mm256_mask_cmpneq_epu32_mask,
31642 _mm256_mask_cmpneq_epu64_mask, _mm_cmpge_epi32_mask,
31643 _mm_cmpge_epi64_mask, _mm_cmpge_epu32_mask, _mm_cmpge_epu64_mask,
31644 _mm_cmple_epi32_mask, _mm_cmple_epi64_mask, _mm_cmple_epu32_mask,
31645 _mm_cmple_epu64_mask, _mm_cmplt_epi32_mask, _mm_cmplt_epi64_mask,
31646 _mm_cmplt_epu32_mask, _mm_cmplt_epu64_mask, _mm_cmpneq_epi32_mask,
31647 _mm_cmpneq_epi64_mask, _mm_cmpneq_epu32_mask, _mm_cmpneq_epu64_mask,
31648 _mm_mask_cmpge_epi32_mask, _mm_mask_cmpge_epi64_mask,
31649 _mm_mask_cmpge_epu32_mask, _mm_mask_cmpge_epu64_mask,
31650 _mm_mask_cmple_epi32_mask, _mm_mask_cmple_epi64_mask,
31651 _mm_mask_cmple_epu32_mask, _mm_mask_cmple_epu64_mask,
31652 _mm_mask_cmplt_epi32_mask, _mm_mask_cmplt_epi64_mask,
31653 _mm_mask_cmplt_epu32_mask, _mm_mask_cmplt_epu64_mask,
31654 _mm_mask_cmpneq_epi32_mask, _mm_mask_cmpneq_epi64_mask,
31655 _mm_mask_cmpneq_epu32_mask, _mm_mask_cmpneq_epu64_mask): Move
31656 definitions outside of __OPTIMIZE__ guarded section.
31657
31658 PR target/79932
31659 * config/i386/avx512bwintrin.h (_mm512_packs_epi32,
31660 _mm512_maskz_packs_epi32, _mm512_mask_packs_epi32,
31661 _mm512_packus_epi32, _mm512_maskz_packus_epi32,
31662 _mm512_mask_packus_epi32): Move definitions outside of __OPTIMIZE__
31663 guarded section.
31664
31665 2017-03-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
31666
31667 * config/s390/vx-builtins.md ("vfee<mode>", "vfeez<mode>")
31668 ("vfenez<mode>"): Add missing constraints.
31669
31670 2017-03-08 Martin Sebor <msebor@redhat.com>
31671
31672 PR target/79928
31673 * config/nds32/nds32.c (nds32_option_override):
31674 Fix misspelled diagnostic.
31675
31676 2017-03-08 Jakub Jelinek <jakub@redhat.com>
31677
31678 PR c/79940
31679 * gimplify.c (gimplify_omp_for): Replace index var in outer
31680 taskloop statement with an artificial variable and add
31681 OMP_CLAUSE_PRIVATE clause for it.
31682
31683 2017-03-08 Richard Biener <rguenther@suse.de>
31684
31685 PR tree-optimization/79955
31686 * tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn
31687 for accesses that are completely outside of the variable.
31688
31689 2017-03-08 Andrew Haley <aph@redhat.com>
31690
31691 PR tree-optimization/79943
31692 * tree-ssa-loop-split.c (compute_new_first_bound): When
31693 calculating the new upper bound, (END-BEG) should be added, not
31694 subtracted.
31695
31696 2017-03-08 Jakub Jelinek <jakub@redhat.com>
31697
31698 * config/avr/avr.md (setmemhi): Make sure match_dup
31699 operand number comes before match_scratch.
31700
31701 2017-03-08 Richard Biener <rguenther@suse.de>
31702
31703 PR tree-optimization/79920
31704 * tree-vect-slp.c (vect_create_mask_and_perm): Remove and inline
31705 with ncopies == 1 to ...
31706 (vect_transform_slp_perm_load): ... here. Properly compute
31707 all element loads by iterating VF times over the group. Do
31708 not handle ncopies (computed in a broken way) in
31709 vect_create_mask_and_perm.
31710
31711 2017-03-08 Jakub Jelinek <jakub@redhat.com>
31712
31713 PR sanitizer/79904
31714 * internal-fn.c (expand_vector_ubsan_overflow): If arg0 or arg1
31715 is a uniform vector, use uniform_vector_p return value instead of
31716 building ARRAY_REF on folded VIEW_CONVERT_EXPR to array type.
31717
31718 2017-03-07 Marek Polacek <polacek@redhat.com>
31719
31720 PR middle-end/79809
31721 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Use HOST_WIDE_INT.
31722 (alloca_call_type): Likewise.
31723
31724 2017-03-07 Martin Liska <mliska@suse.cz>
31725
31726 * gcov.c (process_args): Put comment to correct location.
31727
31728 2017-03-07 Martin Liska <mliska@suse.cz>
31729
31730 PR middle-end/68270
31731 * tree-chkp.c (chkp_may_narrow_to_field): Add new argument ref.
31732 Use array_at_struct_end_p instead of DECL_CHAIN (field).
31733 (chkp_narrow_bounds_for_field): Likewise.
31734 (chkp_parse_array_and_component_ref): Pass one more argument to
31735 call.
31736
31737 2017-03-07 Richard Biener <rguenther@suse.de>
31738
31739 * tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
31740 preheaders.
31741
31742 2017-03-07 Segher Boessenkool <segher@kernel.crashing.org>
31743
31744 * config/i386/i386.c (ix86_local_alignment): Align most aggregates
31745 of 16 bytes and more to 16 bytes, not those of 16 bits and more.
31746
31747 2017-03-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31748
31749 PR c/79855
31750 * params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Add full stop
31751 to end of description.
31752 (PARAM_MAX_STORES_TO_MERGE): Likewise.
31753
31754 2017-03-07 Jakub Jelinek <jakub@redhat.com>
31755
31756 PR rtl-optimization/79901
31757 * config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
31758 ...
31759 (*avx512f_<code><mode>3<mask_name>): ... this.
31760 (<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
31761 iterator instead of VI8_AVX2_AVX512BW.
31762
31763 PR rtl-optimization/79901
31764 * expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
31765 min/max expander, expand it using expand_vec_cond_expr.
31766
31767 PR sanitizer/79897
31768 * ubsan.c (ubsan_encode_value): Call mark_addressable on the
31769 temporary.
31770
31771 2017-03-06 Jakub Jelinek <jakub@redhat.com>
31772
31773 PR c++/79821
31774 * dwarf2out.h (dw_vec_const): Change array type from unsigned char *
31775 to void * for PCH reasons.
31776 * dwarf2out.c (output_loc_operands, output_die): Cast
31777 v.val_vec.array to unsigned char *.
31778
31779 2017-03-06 John David Anglin <danglin@gcc.gnu.org>
31780
31781 PR target/77850
31782 * config/pa/pa-64.h (PAD_VARARGS_DOWN): Don't pad down complex and
31783 vector types.
31784
31785 2017-03-06 Vladimir Makarov <vmakarov@redhat.com>
31786
31787 PR rtl-optimization/79571
31788 * lra-constraints.c (process_alt_operands): Calculate static
31789 reject and subtract it from overall when only addresses will be
31790 reloaded.
31791
31792 2017-03-06 Julia Koval <julia.koval@intel.com>
31793
31794 PR target/79793
31795 * config/i386/i386.c (ix86_minimum_incoming_stack_boundary): Set
31796 incoming stack boundary to 128 for 64-bit targets.
31797
31798 2017-03-06 Richard Biener <rguenther@suse.de>
31799
31800 PR tree-optimization/79894
31801 * tree-vectorizer.c (vectorize_loops): Set loop_vectorized_call
31802 to NULL after folding it.
31803
31804 2017-03-06 Richard Biener <rguenther@suse.de>
31805
31806 PR tree-optimization/79824
31807 * tree-vect-stmts.c (get_group_load_store_type): Fix alignment
31808 check disabling peeling for gaps.
31809
31810 2017-03-06 Toma Tabacu <toma.tabacu@imgtec.com>
31811
31812 * doc/sourcebuild.texi (Effective-Target Keywords, Environment
31813 attributes): Document gettimeofday.
31814
31815 2017-03-06 Robin Dapp <rdapp@linux.vnet.ibm.com>
31816
31817 * config/s390/s390.c (s390_option_override_internal): Set
31818 PARAM_MIN_VECT_LOOP_BOUND
31819
31820 2017-03-06 Robin Dapp <rdapp@linux.vnet.ibm.com>
31821
31822 * config/s390/s390.c (s390_asm_output_function_label): Use nopr %r0.
31823 * config/s390/s390.md: Likewise.
31824
31825 2017-03-06 Jakub Jelinek <jakub@redhat.com>
31826
31827 PR target/79812
31828 * config/i386/sse.md (VI8F_256_512): Remove mode iterator.
31829 (<avx2_avx512>_perm<mode>): Rename to ...
31830 (avx2_perm<mode>): ... this. Use VI8F_256 iterator instead
31831 of VI8F_256_512.
31832 (<avx512>_perm<mode>_mask): Rename to ...
31833 (avx512vl_perm<mode>_mask): ... this. Use VI8F_256 iterator instead
31834 of VI8F_256_512.
31835 (<avx2_avx512>_perm<mode>_1<mask_name>): Rename to ...
31836 (avx2_perm<mode>_1<mask_name): ... this. Use VI8F_256 iterator
31837 instead of VI8F_256_512.
31838 (avx512f_perm<mode>): New define_expand.
31839 (avx512f_perm<mode>_mask): Likewise.
31840 (avx512f_perm<mode>_1<mask_name>): New define_insn.
31841 (<avx512>_vec_dup<mode>_1): Fix up vec_select mode.
31842
31843 2017-03-06 Prachi Godbole <prachi.godbole@imgtec.com>
31844
31845 * config/mips/mips-msa.md (msa_fmax_a_<msafmt>, msa_fmin_a_<msafmt>,
31846 msa_max_a_<msafmt>, msa_min_a_<msafmt>): Introduce mode interator for
31847 if_then_else.
31848 (smin<mode>3, smax<mode>3): Change operand print code from 'B' to 'E'.
31849
31850 2017-03-06 Martin Liska <mliska@suse.cz>
31851
31852 PR sanitize/79783
31853 * asan.c (asan_expand_poison_ifn): Do not expand ASAN_POISON
31854 when having a SSA NAME w/o VAR_DECL assigned to it.
31855
31856 2017-03-06 Prachi Godbole <prachi.godbole@imgtec.com>
31857
31858 * config/mips/mips-msa.md (msa_dotp_<su>_d, msa_dpadd_<su>_d,
31859 msa_dpsub_<su>_d): Fix MODE for vec_select.
31860
31861 2017-03-06 Prachi Godbole <prachi.godbole@imgtec.com>
31862
31863 * config/mips/mips.c (mips_gen_const_int_vector): Change type of last
31864 argument.
31865 * config/mips/mips-protos.h (mips_gen_const_int_vector): Likewise.
31866
31867 2017-03-06 Richard Biener <rguenther@suse.de>
31868
31869 * lto-streamer.c (lto_check_version): Use %qs in diagnostics.
31870 * plugin.c (register_plugin_info): Likewise.
31871 * tree-chkp.c (chkp_make_static_const_bounds): Likewise.
31872
31873 2017-03-05 Jakub Jelinek <jakub@redhat.com>
31874
31875 * config/i386/sse.md (sse_storehps, sse_storelps,
31876 avx_<castmode><avxsizesuffix>_<castmode>,
31877 avx512f_<castmode><avxsizesuffix>_<castmode>,
31878 avx512f_<castmode><avxsizesuffix>_256<castmode>): Require
31879 in condition that at least one operand is not a MEM.
31880
31881 2017-03-03 Jakub Jelinek <jakub@redhat.com>
31882
31883 PR middle-end/79805
31884 * internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_RESET,
31885 ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_COMPARE_EXCHANGE): Remove
31886 ECF_NOTHROW.
31887 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Set
31888 gimple_call_nothrow_p flag based on whether original builtin can throw.
31889 If it can, emit following stmts on the fallthrough edge.
31890 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Similarly, except
31891 don't create new bb if inserting just debug stmts on the edge, try to
31892 insert them on the fallthru bb or just reset debug stmts.
31893
31894 2017-03-03 Segher Boesssenkool <segher@kernel.crashing.org>
31895
31896 PR target/43763
31897 * config/rs6000/rs6000.c (rs6000_final_prescan_insn): Save and
31898 restore recog_data (including the operand rtxes inside it) around
31899 the call to get_insn_template.
31900
31901 2017-03-03 Martin Sebor <msebor@redhat.com>
31902
31903 PR tree-optimization/79699
31904 * context.c (context::~context): Free MPFR caches to avoid
31905 a memory leak on program exit.
31906
31907 2017-03-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31908
31909 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
31910 Use wide_int::ulow () instead of .elt (0).
31911
31912 2017-03-03 Uros Bizjak <ubizjak@gmail.com>
31913
31914 * config/i386/i386.md (*pushtf): Change *roF constraint to *roC.
31915 (*pushxf): Limit oF constraint to 32bit targets and add oC
31916 constraint for 64bit targets.
31917 (pushxf splitter): Use PUSH_ROUNDING to calculate stack adjustment.
31918 (*pushdf): Change rmF constraint to rmC.
31919
31920 2017-03-03 Martin Liska <mliska@suse.cz>
31921
31922 * tree-ssa-loop-prefetch.c (pass_loop_prefetch::execute):
31923 Remove unused variable.
31924
31925 2017-03-03 Jakub Jelinek <jakub@redhat.com>
31926
31927 PR target/79807
31928 * config/i386/i386.c (ix86_expand_multi_arg_builtin): If target
31929 is a memory operand, increase num_memory.
31930 (ix86_expand_args_builtin): Likewise.
31931
31932 2017-03-03 Jan Hubicka <jh@suse.cz>
31933
31934 PR lto/79760
31935 * ipa-devirt.c (maybe_record_node): Properly handle
31936 __cxa_pure_virtual visibility.
31937
31938 2017-03-03 Martin Liska <mliska@suse.cz>
31939
31940 PR tree-optimization/79803
31941 * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Remove
31942 assert.
31943 (pass_loop_prefetch::execute): Disabled optimization if an
31944 assumption about L1 cache size is not met.
31945
31946 2017-03-03 Martin Liska <mliska@suse.cz>
31947
31948 PR rtl-optimization/79574
31949 * gcse.c (struct gcse_expr): Use HOST_WIDE_INT instead of int.
31950 (hash_scan_set): Likewise.
31951 (dump_hash_table): Likewise.
31952 (hoist_code): Likewise.
31953
31954 2017-03-03 Richard Biener <rguenther@suse.de>
31955
31956 * fixed-value.c (fixed_from_string): Restore use of elt (1)
31957 in place of uhigh ().
31958 (fixed_convert_from_real): Likewise.
31959
31960 2017-03-03 Uros Bizjak <ubizjak@gmail.com>
31961
31962 PR target/79514
31963 * config/i386/i386.md (*pushxf_rounded): Use Pmode instead of DImode.
31964
31965 2017-03-03 Richard Biener <rguenther@suse.de>
31966
31967 PR middle-end/79818
31968 * match.pd ( X +- C1 CMP C2 -> X CMP C2 -+ C1): Add missing
31969 TYPE_OVERFLOW_UNDEFINED check.
31970
31971 2017-03-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31972
31973 * config/rs6000/vector.md (vector_ne_<mode>_p): Correct operand
31974 numbers.
31975 (vector_ae_<mode>_p): Likewise.
31976 (vector_nez_<mode>_p): Likewise.
31977 (vector_ne_v2di_p): Likewise.
31978 (vector_ae_v2di_p): Likewise.
31979 (vector_ne_<mode>_p): Likewise.
31980 * config/rs6000/vsx.md (vsx_tsqrt<mode>2_fg): Correct operand
31981 numbers.
31982 (vsx_tsqrt<mode>2_fe): Likewise.
31983
31984 2017-03-02 Uros Bizjak <ubizjak@gmail.com>
31985
31986 PR target/79514
31987 * config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern.
31988
31989 2017-03-02 Jakub Jelinek <jakub@redhat.com>
31990
31991 PR rtl-optimization/79780
31992 * cprop.c (one_cprop_pass): When second and further conditional trap
31993 in a single basic block is turned into an unconditional trap, turn it
31994 into a deleted note to avoid RTL verification failures.
31995
31996 2017-03-02 Richard Biener <rguenther@suse.de>
31997
31998 * fold-const.c (const_binop): Use ulow () instead of elt (0).
31999
32000 2017-03-02 Richard Biener <rguenther@suse.de>
32001
32002 PR tree-optimization/79345
32003 PR c++/42000
32004 * tree-ssa-alias.c (walk_aliased_vdefs_1): Take a limit
32005 param and abort the walk, returning -1 if it is hit.
32006 (walk_aliased_vdefs): Take a limit param and pass it on.
32007 * tree-ssa-alias.h (walk_aliased_vdefs): Add a limit param,
32008 defaulting to 0 and return a signed int.
32009 * tree-ssa-uninit.c (struct check_defs_data): New struct.
32010 (check_defs): New helper.
32011 (warn_uninitialized_vars): Use walk_aliased_vdefs to warn
32012 about uninitialized memory.
32013 * fixed-value.c (fixed_from_string): Use ulow/uhigh to avoid
32014 bogus uninitialized warning.
32015 (fixed_convert_from_real): Likewise.
32016
32017 2017-03-02 Bin Cheng <bin.cheng@arm.com>
32018
32019 PR tree-optimization/66768
32020 * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Skip addr
32021 iv_use if base object can't be determined.
32022
32023 2017-03-02 Jakub Jelinek <jakub@redhat.com>
32024
32025 PR tree-optimization/79345
32026 * gensupport.h (struct pattern_stats): Add min_scratch_opno field.
32027 * gensupport.c (get_pattern_stats_1) <case MATCH_SCRATCH>: Update it.
32028 (get_pattern_stats): Initialize it.
32029 * genemit.c (gen_expand): Verify match_scratch numbers come after
32030 match_operand/match_dup numbers.
32031 * config/i386/i386.md (<s>mul<mode>3_highpart): Swap match_dup and
32032 match_scratch numbers.
32033 * config/i386/sse.md (avx2_gathersi<mode>, avx2_gatherdi<mode>):
32034 Likewise.
32035 * config/s390/s390.md (trunctdsd2): Likewise.
32036
32037 2017-03-02 Richard Biener <rguenther@suse.de>
32038
32039 * wide-int.h (wide_int_storage::operator=): Implement in terms
32040 of wi::copy.
32041
32042 2017-03-02 Richard Biener <rguenther@suse.de>
32043
32044 PR tree-optimization/79777
32045 * tree-ssa-pre.c (eliminate_insert): Give up if we simplify
32046 the to insert expression to sth existing.
32047
32048 2017-03-01 Martin Sebor <msebor@redhat.com>
32049
32050 PR middle-end/79692
32051 * gimple-ssa-sprintf.c
32052 (directive::known_width_and_precision): New function.
32053 (format_integer): Use it.
32054 (get_mpfr_format_length): Consider the full range of precision
32055 when computing %g output with the # flag. Set the likely byte
32056 count to 3 rather than 1 when precision is indeterminate.
32057 (format_floating): Correct the lower bound of precision.
32058
32059 2017-03-01 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
32060
32061 * doc/invoke.texi: Document default code model for 64-bit Linux.
32062
32063 2017-03-01 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32064
32065 PR target/79752
32066 * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
32067 udiv rather than div since input pattern is unsigned.
32068
32069 2017-03-01 Uros Bizjak <ubizjak@gmail.com>
32070
32071 * config/i386/i386.c (print_reg): Warn for values of
32072 unsupported size in integer register.
32073
32074 2017-03-01 Michael Meissner <meissner@linux.vnet.ibm.com>
32075
32076 PR target/79439
32077 * config/rs6000/predicates.md (current_file_function_operand): Do
32078 not allow self calls to be local if the function is replaceable.
32079
32080 2017-03-01 Kelvin Nilsen <kelvin@gcc.gnu.org>
32081
32082 PR target/79395
32083 * config/rs6000/altivec.h (vec_ctz and others): Change the
32084 preprocessor macro that controls conditional compilation from
32085 _ARCH_PWR9 to __POWER9_VECTOR__.
32086 (vec_all_ne): Change parameterization of __altivec_scalar_pred
32087 macro expansion under preprocessor #ifdef __POWER9_VECTOR__
32088 control (instead of _ARCH_PWR9 control) so that template
32089 definition uses power9-specific function.
32090 (vec_any_eq): Likewise.
32091 (vec_all_ne): Change macro definition to use a power9-specific
32092 expansion under #ifdef __POWER9_VECTOR__ control (instead of
32093 _ARCH_PWR9 control).
32094 (vec_any_eq) Likewise.
32095 * config/rs6000/rs6000-builtin.def (CMPNEF): Remove BU_P9V_AV_2
32096 expansion for CMPNEF to remove support for xvcmpnesp instruction.
32097 (CMPNED): Remove BU_P9V_AV2 expansion for CMPNED to remove
32098 support for xvcmpnedp instruction.
32099 (VCMPNEB_P): Replace BU_P9V_AV_P macro expansion with BU_P9V_AV_2
32100 macro expansion so that Power9 implementation of vec_all_ne does
32101 not use the AltiVec predicate framework.
32102 (VCMPNEH_P): Likewise.
32103 (VCMPNEW_P): Likewise.
32104 (VCMPNED_P): Likewise.
32105 (VCMPNEFP_P): Likewise.
32106 (VCMPNEDP_P): Likewise.
32107 (VCMPAEB_P): Add BU_P9V_AV_2 macro expansion to change
32108 implementation of vec_any_eq to not use AltiVec predicate
32109 framework.
32110 (VCMPAEH_P): Likewise.
32111 (VCMPAEW_P): Likewise.
32112 (VCMPAED_P): Likewise.
32113 (VCMPAEFP_P): Likewise.
32114 (VCMPAEDP_P): Likewise.
32115 (VCMPNE_P): Replace BU_P9V_OVERLOAD_P macro expansion with
32116 BU_P9V_OVERLOAD_2 so that Power9 implementation of vec_all_ne does
32117 not use the AltiVec predicate framework.
32118 (VCMPAE_P): Add BU_P9V_OVERLOAD_2 macro to change implementation
32119 of vec_any_eq to not use AltiVec predicate framework.
32120 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
32121 support for predefined __POWER9_VECTOR__ macro to indicate that
32122 Power9 instruction selection is enabled.
32123 (altivec_overloaded_builtins): Remove extraneous
32124 ALTIVEC_BUILTIN_VEC_CMPNE entry for overloaded
32125 function argument types RS6000_BTI_bool_V16QI and
32126 RS6000_BTI_bool_V16QI. Remove erroneous ALTIVEC_BUILTIN_VEC_CMPNE
32127 entry for overloaded function argument types RS6000_BTI_bool_V4SI
32128 andRS6000_BTI_bool_V4SI, mapping to P9V_BUILTIN_CMPNEB. Remove
32129 two entries mapping to P9V_BUITIN_CMPNED and one entry mapping to
32130 P9V_BUILTIN_CMPNEF to force use of instructions not specific to
32131 Power9 for implementations of vec_cmpne. Change the signature for
32132 all definitions of the overloaded P9V_BUILTIN_VEC_CMPNE_P function
32133 (representing vec_all_ne) to remove the previously described first
32134 argument of type RS6000_BTI_INTSI, as this was an artifact of
32135 reliance on the AltiVec predicate framework, which is no longer
32136 used in the implementation of these functions. Add
32137 P9V_BUILTIN_VEC_VCMPAE_P entries (representing the vec_anyeq
32138 function) to match all of the P9V_BUILTIN_VEC_VCMNE_P entries
32139 since, unlike the AltiVec predicate framework implementation, we
32140 do not share function descriptors between vec_alle and vec_anyeq.
32141 (altivec_resolve_overloaded_builtin): Add SFmode and DFmode to the
32142 set of modes that receive special treatment even when
32143 TARGET_P9_VECTOR is true. The special treatment emits code that
32144 does not depend on Power9 instructions.
32145 * config/rs6000/vector.md (vector_ne_<mode>_p): Change this
32146 define_expand to not rely on AltiVec predicate framework.
32147 (vector_ae_<mode>p): New define_expand to represent vec_any_eq
32148 function.
32149 (vector_ne_v2di_p): Change this define_expand to not rely on
32150 AltiVec predicate framework.
32151 (vector_ae_v2di_p): New define_expand to represent vec_any_eq
32152 function.
32153 (vector_ne_<mode>_p): Change this define_expand to not rely on
32154 AltiVec predicate framework.
32155 (vector_ae_<mode>p): New define_expand to represent vec_any_eq
32156 function.
32157 * config/rs6000/vsx.md (*vsx_ne_<mode>_p): For modes VSX_EXTRACT_I
32158 (V16QI, V8HI, V4SI), correct a typo in the code emitted for this
32159 define_insn pattern.
32160 (*vsx_ne_<mode>_p): For modes VSX_F (V4SF and V2DF), remove this
32161 define_insn pattern because the xvcmpne<VSs>. instruction is not
32162 supported.
32163 (vcmpne<VSs>): Remove this define_insn because xvcmpne<VSs>
32164 instruction is not supported.
32165
32166 2017-03-01 Jakub Jelinek <jakub@redhat.com>
32167
32168 * config/nvptx/nvptx.c: Include intl.h.
32169
32170 2017-03-01 Martin Jambor <mjambor@suse.cz>
32171
32172 PR lto/78140
32173 * ipa-prop.h (ipa_bits): Removed field known.
32174 (ipa_jump_func): Removed field vr_known. Changed fields bits and m_vr
32175 to pointers. Adjusted their comments to warn about their sharing.
32176 (ipcp_transformation_summary): Change bits to a vector of pointers.
32177 (ipa_check_create_edge_args): Moved to ipa-prop.c, declare.
32178 (ipa_get_ipa_bits_for_value): Declare.
32179 * tree-vrp.h (value_range): Mark as GTY((for_user)).
32180 * ipa-prop.c (ipa_bit_ggc_hash_traits): New.
32181 (ipa_bits_hash_table): Likewise.
32182 (ipa_vr_ggc_hash_traits): Likewise.
32183 (ipa_vr_hash_table): Likewise.
32184 (ipa_print_node_jump_functions_for_edge): Adjust for bits and m_vr
32185 being pointers and vr_known being removed.
32186 (ipa_set_jf_unknown): Likewise.
32187 (ipa_get_ipa_bits_for_value): New function.
32188 (ipa_set_jfunc_bits): Likewise.
32189 (ipa_get_value_range): New overloaded functions.
32190 (ipa_set_jfunc_vr): Likewise.
32191 (ipa_compute_jump_functions_for_edge): Use the above functions to
32192 construct bits and vr parts of jump functions.
32193 (ipa_check_create_edge_args): Move here from ipa-prop.h, also allocate
32194 ipa_bits_hash_table and ipa_vr_hash_table if they do not already
32195 exist.
32196 (ipcp_grow_transformations_if_necessary): Also allocate
32197 ipa_bits_hash_table and ipa_vr_hash_table if they do not already
32198 exist.
32199 (ipa_node_params_t::duplicate): Do not copy bits, just pointers to
32200 them. Fix too long lines.
32201 (ipa_write_jump_function): Adjust for bits and m_vr being pointers and
32202 vr_known being removed.
32203 (ipa_read_jump_function): Use new setter functions to construct bits
32204 and vr parts of jump functions or set them to NULL.
32205 (write_ipcp_transformation_info): Adjust for bits being pointers.
32206 (read_ipcp_transformation_info): Likewise.
32207 (ipcp_update_bits): Likewise. Fix excessively long lines a trailing
32208 space.
32209 Include gt-ipa-prop.h.
32210 * ipa-cp.c (propagate_bits_across_jump_function): Adjust for bits
32211 being pointers.
32212 (ipcp_store_bits_results): Likewise.
32213 (propagate_vr_across_jump_function): Adjust for m_vr being a pointer.
32214 Do not write to existing jump functions but use a temporary instead.
32215
32216 2017-03-01 Jakub Jelinek <jakub@redhat.com>
32217
32218 PR c++/79681
32219 * fold-const.c (make_bit_field_ref): If orig_inner is COMPONENT_REF,
32220 attempt to use its first operand as BIT_FIELD_REF base.
32221
32222 2017-03-01 Richard Biener <rguenther@suse.de>
32223
32224 PR middle-end/79721
32225 * tree-chrec.c (chrec_evaluate): Perform computation of Newtons
32226 interpolating formula in wrapping arithmetic.
32227 (chrec_apply): Convert chrec_evaluate return value to wanted type.
32228
32229 2017-03-01 Jakub Jelinek <jakub@redhat.com>
32230
32231 PR tree-optimization/79734
32232 * tree-vect-generic.c (expand_vector_condition): Optimize
32233 AVX512 vector boolean VEC_COND_EXPRs into bitwise operations.
32234 Handle VEC_COND_EXPR where comparison has different inner width from
32235 type's inner width.
32236
32237 2017-02-28 Sandra Loosemore <sandra@codesourcery.com>
32238
32239 * doc/invoke.texi (ARC Options): Copy-edit to fix punctuation,
32240 markup, and similar issues. Remove @opindex entries for things
32241 that aren't options. Add missing -mmpy-option entries.
32242
32243 2017-02-28 Jakub Jelinek <jakub@redhat.com>
32244
32245 PR tree-optimization/79737
32246 * gimple-ssa-store-merging.c (encode_tree_to_bitpos): If bitlen is
32247 a multiple of BITS_PER_UNIT and !BYTES_BIG_ENDIAN, clear
32248 tmpbuf[byte_size - 1]. Call natice_encode_expr with byte_size - 1
32249 instead of byte_size. Formatting fix.
32250 (shift_bytes_in_array_right): Formatting fix.
32251
32252 2017-02-28 Eric Botcazou <ebotcazou@adacore.com>
32253
32254 PR target/79749
32255 * config/sparc/sparc.c (sparc_frame_pointer_required): Add missing
32256 condition on optimize for the leaf function test.
32257
32258 2017-02-28 Martin Liska <mliska@suse.cz>
32259
32260 PR lto/79625
32261 * read-rtl-function.c (function_reader::handle_unknown_directive):
32262 Bail out when one uses -flto.
32263
32264 2017-02-28 Martin Liska <mliska@suse.cz>
32265
32266 * common.opt: Replace space with tabular for options of <number>
32267 type.
32268 * config/i386/i386.opt: Show <number> value for
32269 -mlarge-data-threshold.
32270 * opts.c (print_filtered_help): Do not display number in hexadecimal
32271 format.
32272
32273 2017-02-28 Martin Liska <mliska@suse.cz>
32274
32275 * common.opt: Fix --help=option -Q for options which are of
32276 an enum type.
32277
32278 2017-02-28 Uros Bizjak <ubizjak@gmail.com>
32279
32280 * config/i386/i386.c (print_reg): Error out for values
32281 of 8-bit size in invalid integer register.
32282
32283 2017-02-28 Martin Sebor <msebor@redhat.com>
32284
32285 PR tree-optimization/79691
32286 * passes.def (pass_all_optimizations_g): Enable pass_sprintf_length.
32287
32288 2017-02-28 Jakub Jelinek <jakub@redhat.com>
32289
32290 PR target/79729
32291 * config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
32292 gcc_unreachable with output_operand_lossage.
32293
32294 2017-02-28 Richard Biener <rguenther@suse.de>
32295
32296 PR tree-optimization/79740
32297 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Allow redundant
32298 inserts.
32299 (visit_nary_op): Insert the nary into the hashtable if we
32300 pattern-matched sth.
32301 * tree-ssa-pre.c (eliminate_insert): Robustify.
32302
32303 2017-02-28 Richard Biener <rguenther@suse.de>
32304
32305 PR middle-end/79731
32306 * fold-const.c (decode_field_reference): Reject out-of-bound
32307 accesses.
32308
32309 2017-02-28 Jakub Jelinek <jakub@redhat.com>
32310
32311 * config/i386/i386.c: Include intl.h.
32312 (ix86_option_override_internal): Use cond ? G_("...") : G_("...")
32313 instead of just cond ? "..." : "...".
32314 * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Likewise.
32315 * coverage.c (read_counts_file): Likewise.
32316 * omp-offload.c: Include intl.h.
32317 (oacc_loop_fixed_partitions): Use cond ? G_("...") : G_("...") instead
32318 of just cond ? "..." : "...".
32319 * gcov.c (read_count_file): Use cond ? N_("...") : N_("...") instead
32320 of just cond ? "..." : "...".
32321
32322 2017-02-28 Richard Earnshaw <rearnsha@arm.com>
32323
32324 PR target/79742
32325 * config/arm/parsecpu.awk (gen_data): Set tuning target to 'tune for'
32326 entry, if present.
32327 * config/arm/arm-cpus.in (cortex-m0plus.small-multiply): Correct
32328 'tune for' CPU name.
32329 * config/arm/arm-cpu-data.h: Regenerated.
32330
32331 2017-02-28 Richard Biener <rguenther@suse.de>
32332
32333 PR tree-optimization/79732
32334 * tree-inline.c (expand_call_inline): Do not shadow var.
32335
32336 2017-02-28 Richard Biener <rguenther@suse.de>
32337
32338 PR tree-optimization/79723
32339 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Preserve
32340 address-space properly.
32341
32342 2017-02-28 Thomas Schwinge <thomas@codesourcery.com>
32343
32344 * doc/optinfo.texi (Optimization groups): Fix option used for
32345 OPTGROUP_ALL.
32346 * doc/invoke.texi (-fopt-info): Document "omp".
32347 * dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
32348 (OPTGROUP_ALL): Add OPTGROUP_OMP.
32349 * hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
32350 * ipa-hsa.c (pass_data_ipa_hsa): Likewise.
32351 * omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.
32352
32353 * dumpfile.h (OPTGROUP_OPENMP): Rename to OPTGROUP_OMP. Adjust
32354 all users.
32355 * dumpfile.c (optgroup_options): Instead of "openmp", associate
32356 OPTGROUP_OMP with "omp".
32357
32358 2017-02-27 Pat Haugen <pthaugen@us.ibm.com>
32359
32360 PR target/79544
32361 * config/rs6000/rs6000-c.c (struct altivec_builtin_types): Use VSRAD
32362 for arithmetic shift of unsigned V2DI.
32363
32364 2017-02-27 Claudiu Zissulescu <claziss@synopsys.com>
32365
32366 * config.gcc (arc*-): Clean up, use arc/big.h, arc/elf.h, and
32367 arc/linux.h headers.
32368 * config/arc/arc.h (TARGET_OS_CPP_BUILTINS): Remove.
32369 (LINK_SPEC): Likewise.
32370 (ARC_TLS_EXTRA_START_SPEC): Likewise.
32371 (EXTRA_SPECS): Likewise.
32372 (STARTFILE_SPEC): Likewise.
32373 (ENDFILE_SPEC): Likewise.
32374 (LIB_SPEC): Likewise.
32375 (TARGET_SDATA_DEFAULT): Likewise.
32376 (TARGET_MMEDIUM_CALLS_DEFAULT): Likewise.
32377 (MULTILIB_DEFAULTS): Likewise.
32378 (DWARF2_UNWIND_INFO): Likewise.
32379 * config/arc/big.h: New file.
32380 * config/arc/elf.h: Likewise.
32381 * config/arc/linux.h: Likewise.
32382 * config/arc/t-uClibc: Remove.
32383
32384 2017-02-27 Bin Cheng <bin.cheng@arm.com>
32385
32386 PR tree-optimization/77536
32387 * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function.
32388 (tree_transform_and_unroll_loop): Use above function to compute the
32389 estimated niter of unrolled loop and use it when scaling profile.
32390 Also use count info rather than frequency if it's non-zero.
32391 * tree-ssa-loop-manip.h niter_for_unrolled_loop(): New declaration.
32392 * tree-vect-loop.c (scale_profile_for_vect_loop): New function.
32393 (vect_transform_loop): Call above function.
32394
32395 2017-02-27 Richard Biener <rguenther@suse.de>
32396
32397 PR tree-optimization/45397
32398 * tree-ssa-pre.c (eliminate_insert): Handle BIT_AND_EXPR.
32399 * tree-ssa-sccvn.c (valueized_wider_op): New helper.
32400 (visit_nary_op): Add pattern matching for CSEing sign-changed
32401 or truncated operations with wider ones.
32402
32403 2017-02-27 Richard Biener <rguenther@suse.de>
32404
32405 PR tree-optimization/79690
32406 * tree-vect-stmts.c (vectorizable_store): Use vector type
32407 built from the DR with address-space.
32408
32409 2017-02-26 Gerald Pfeifer <gerald@pfeifer.com>
32410
32411 * doc/invoke.texi (Optimize Options): Refine the description
32412 of asan-use-after-return.
32413
32414 2017-02-25 Alan Modra <amodra@gmail.com>
32415
32416 PR rtl-optimization/79584
32417 * lra-constraints.c (base_to_reg): Reload ad->base, the entire
32418 base, not ad->base_term, the reg within base. Remove assertion
32419 that ad->base == ad->base_term. Replace gen_int_mode using
32420 bogus mode with const0_rtx.
32421
32422 2017-02-25 Jakub Jelinek <jakub@redhat.com>
32423
32424 PR middle-end/79396
32425 * tree-eh.c (operation_could_trap_p, stmt_could_throw_1_p): Handle
32426 FMA_EXPR like tcc_binary or tcc_unary.
32427
32428 * tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning.
32429
32430 PR debug/77589
32431 * dwarf2out.c (struct dw_loc_list_struct): Add noted_variable_value
32432 bitfield.
32433 (size_of_loc_descr): Handle DW_OP_GNU_variable_value.
32434 (output_loc_operands): Handle DW_OP_call_ref and
32435 DW_OP_GNU_variable_value.
32436 (struct variable_value_struct): New type.
32437 (struct variable_value_hasher): Likewise.
32438 (variable_value_hash): New variable.
32439 (string_types): Remove.
32440 (copy_loc_descr): New function.
32441 (add_loc_descr_to_each): Clarify comment. Use copy_loc_descr.
32442 (prepend_loc_descr_to_each): New function.
32443 (add_loc_list): Fix comment typo. Use prepend_loc_descr_to_each
32444 instead of add_loc_descr_to_each if the first argument is single
32445 location list and the second has multiple.
32446 (resolve_args_picking_1): Handle DW_OP_GNU_variable_value.
32447 (loc_list_from_tree_1): For early_dwarf, emit DW_OP_GNU_variable_value
32448 when looking for variable value which doesn't have other location info.
32449 (loc_list_from_tree): Formatting fix.
32450 (gen_array_type_die): Simplify DW_AT_string_length handling.
32451 (adjust_string_types): Remove.
32452 (gen_subprogram_die): Don't call adjust_string_types nor test/set
32453 string_types. Call resolve_variable_values.
32454 (prune_unused_types_walk_loc_descr): Handle DW_OP_GNU_variable_value.
32455 (resolve_addr_in_expr): Likewise. Add A argument.
32456 (copy_deref_exprloc): Remove deref argument. Adjust for the
32457 original expression being DW_OP_GNU_variable_value with optionally
32458 DW_OP_stack_value after it instead of DW_OP_call4 with DW_OP_deref
32459 optionally after it.
32460 (optimize_string_length): Rework for DW_OP_GNU_variable_value.
32461 (resolve_addr): Adjust optimize_string_length and resolve_addr_in_expr
32462 callers. Set remove_AT_byte_size if removing DW_AT_string_length.
32463 (variable_value_hasher::hash, variable_value_hasher::equal): New
32464 methods.
32465 (resolve_variable_value_in_expr, resolve_variable_value,
32466 resolve_variable_values, note_variable_value_in_expr,
32467 note_variable_value): New functions.
32468 (dwarf2out_early_finish): Call note_variable_value on all toplevel
32469 DIEs.
32470
32471 2017-02-24 Jakub Jelinek <jakub@redhat.com>
32472
32473 PR c/79677
32474 * opts.h (handle_generated_option): Add GENERATED_P argument.
32475 * opts-common.c (handle_option): Adjust function comment.
32476 (handle_generated_option): Add GENERATED_P argument, pass it to
32477 handle_option.
32478 (control_warning_option): Pass false to handle_generated_option
32479 GENERATED_P.
32480 * opts.c (maybe_default_option): Pass true to handle_generated_option
32481 GENERATED_P.
32482 * optc-gen.awk: Likewise.
32483
32484 2017-02-24 Segher Boessenkool <segher@kernel.crashing.org>
32485
32486 * config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of
32487 a REG, look at the REG it is a SUBREG of.
32488 (splitter for cmpeqsi_t): Ditto.
32489
32490 2017-02-24 Segher Boessenkool <segher@kernel.crashing.org>
32491
32492 * config/pa/pa.c (pa_combine_instructions): Do not share RTL. Make
32493 the special USEs with the pattern of the insn, not the insn itself.
32494
32495 2017-02-24 Matthew Fortune <matthew.fortune@imgtec.com>
32496
32497 PR target/79473
32498 * doc/invoke.texi: Document -mload-store-pairs.
32499
32500 2017-02-24 Segher Boessenkool <segher@kernel.crashing.org>
32501 Sandra Loosemore <sandra@codesourcery.com>
32502
32503 * config/nios2/nios2.c (nios2_simple_const_p): Returns false if the
32504 argument isn't a CONST_INT.
32505 (nios2_alternate_compare_const): Assert op is a CONST_INT.
32506 (nios2_valid_compare_const_p): Assert op is a CONST_INT.
32507 (nios2_validate_compare): Bypass alternate compare logic if *op2
32508 is not a CONST_INT.
32509 (ldstwm_operation_p): Return false if first_base is not a REG or
32510 if first_offset is not a CONST_INT.
32511
32512 2017-02-24 Segher Boessenkool <segher@kernel.crashing.org>
32513
32514 * config/cris/cris.md: Use correct operand in a define_peephole2.
32515
32516 2017-02-24 Segher Boessenkool <segher@kernel.crashing.org>
32517
32518 * config/c6x/c6x.c (predicate_insn): Do not incorrectly share RTL.
32519
32520 2017-02-24 Segher Boessenkool <segher@kernel.crashing.org>
32521
32522 * config/arc/arc.c (arc_ccfsm_advance): Only take the PATTERN of
32523 this_insn if it is an INSN or JUMP_INSN.
32524 (force_offsettable): Look at base, not at addr.
32525 * config/arc/predicates.md (brcc_nolimm_operator): Don't call INTVAL
32526 on things that aren't necessarily CONST_INTs.
32527
32528 2017-02-24 Uros Bizjak <ubizjak@gmail.com>
32529
32530 * doc/invoke.texi (x86 Options, -mfpmath=sse): Mention that
32531 -mfpmath=sse is the default also for x86-32 targets with SSE2
32532 instruction set when @option{-ffast-math} is enabled
32533
32534 2017-02-24 Jeff Law <law@redhat.com>
32535
32536 PR rtl-optimizatoin/79286
32537 * ira.c (update_equiv_regs): Drop may_trap_p exception to
32538 dominance test.
32539
32540 2017-02-24 Richard Biener <rguenther@suse.de>
32541
32542 PR tree-optimization/79389
32543 * gimple-ssa-split-paths.c (is_feasible_trace): Properly skip
32544 debug insns.
32545
32546 2017-02-24 Aldy Hernandez <aldyh@redhat.com>
32547
32548 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update
32549 function comment to reflect reality.
32550 (loop_exits_before_overflow): Fix typo in function description.
32551
32552 2017-02-24 Richard Biener <rguenther@suse.de>
32553
32554 PR tree-optimization/79389
32555 * gimple-ssa-split-paths.c (is_feasible_trace): Verify more
32556 properly that a threading opportunity exists. Detect conditional
32557 copy/constant propagation opportunities.
32558
32559 2017-02-23 Eric Botcazou <ebotcazou@adacore.com>
32560
32561 * config/visium/visium.md (type): Add trap.
32562 (b): New mode attribute.
32563 (*btst): Rename into...
32564 (*btst<mode>): ...this and adjust.
32565 (*cbranchsi4_btst_insn): Rename into...
32566 (*cbranch<mode>4_btst_insn): ...this and adjust.
32567 (trap): New define_insn.
32568
32569 2017-02-23 Jakub Jelinek <jakub@redhat.com>
32570
32571 PR tree-optimization/79389
32572 * ifcvt.c (struct noce_if_info): Add rev_cond field.
32573 (noce_reversed_cond_code): New function.
32574 (noce_emit_store_flag): Use rev_cond if non-NULL instead of
32575 reversed_comparison_code. Formatting fix.
32576 (noce_try_store_flag): Test rev_cond != NULL in addition to
32577 reversed_comparison_code.
32578 (noce_try_store_flag_constants): Likewise.
32579 (noce_try_store_flag_mask): Likewise.
32580 (noce_try_addcc): Use rev_cond if non-NULL instead of
32581 reversed_comparison_code.
32582 (noce_try_cmove_arith): Likewise. Formatting fixes.
32583 (noce_try_minmax, noce_try_abs): Clear rev_cond.
32584 (noce_find_if_block): Initialize rev_cond.
32585 (find_cond_trap): Call noce_get_condition with then_bb == trap_bb
32586 instead of false as last argument never attempt to reverse it
32587 afterwards.
32588
32589 2017-02-23 Bin Cheng <bin.cheng@arm.com>
32590
32591 PR tree-optimization/79663
32592 * tree-predcom.c (combine_chains): Process refs in reverse order
32593 only for ZERO length chains, and add explaining comment.
32594
32595 2017-02-23 Jeff Law <law@redhat.com>
32596
32597 PR tree-optimization/79578
32598 * tree-ssa-dse.c (clear_bytes_written_by): Use OEP_ADDRESS_OF
32599 in call to operand_equal_p.
32600
32601 2017-01-23 Dominique d'Humieres <dominiq@lps.ens.fr>
32602
32603 PR target/71017
32604 * config/i386/cpuid.h: Fix another undefined behavior.
32605
32606 2017-02-23 Richard Biener <rguenther@suse.de>
32607
32608 PR tree-optimization/79683
32609 * tree-vect-stmts.c (vect_analyze_stmt): Do not overwrite
32610 vector types for data-refs.
32611
32612 2017-02-23 Martin Liska <mliska@suse.cz>
32613
32614 * params.def (PARAM_MIN_NONDEBUG_INSN_UID): Change default to 0.
32615
32616 2017-02-23 Jakub Jelinek <jakub@redhat.com>
32617
32618 PR middle-end/79665
32619 * internal-fn.c (get_range_pos_neg): Moved to ...
32620 * tree.c (get_range_pos_neg): ... here. No longer static.
32621 * tree.h (get_range_pos_neg): New prototype.
32622 * expr.c (expand_expr_real_2) <case TRUNC_DIV_EXPR>: If both arguments
32623 are known to be in between 0 and signed maximum inclusive, try to
32624 expand both unsigned and signed divmod and use the cheaper one from
32625 those.
32626
32627 2017-02-22 Jeff Law <law@redhat.com>
32628
32629 PR tree-optimization/79578
32630 * tree-ssa-dse.c (clear_bytes_written_by): Use operand_equal_p
32631 to compare base operands.
32632
32633 2017-02-22 Segher Boessenkool <segher@kernel.crashing.org>
32634
32635 PR target/79211
32636 * config/rs6000/rs6000.md (*fsel<SFDF:mode><SFDF2:mode>4): Use
32637 gpc_reg_operand instead of fpr_reg_operand.
32638
32639 2017-02-22 Sameera Deshpande <sameera.deshpande@imgtec.com>
32640
32641 * config/mips/mips.c (mips_return_in_memory): Force FP
32642 vector types to be returned in memory for o32 ABI.
32643
32644 2017-02-22 Jakub Jelinek <jakub@redhat.com>
32645
32646 * dwarf2out.c (gen_variable_die): For -gdwarf-5, use DW_TAG_variable
32647 instead of DW_TAG_member for static data member declarations and don't
32648 set no_linkage_name for static inline data members.
32649 (gen_member_die): For -gdwarf-5 don't change DW_TAG_variable
32650 to DW_TAG_member.
32651
32652 2017-02-22 Martin Liska <mliska@suse.cz>
32653
32654 * doc/invoke.texi: Replace inequality signs with square brackets
32655 for -Wnormalized.
32656
32657 2017-02-22 Matthew Fortune <matthew.fortune@imgtec.com>
32658
32659 PR target/78660
32660 * lra-constraints.c (simplify_operand_subreg): Handle
32661 WORD_REGISTER_OPERATIONS targets.
32662
32663 2017-02-22 Jakub Jelinek <jakub@redhat.com>
32664
32665 PR target/70465
32666 * reg-stack.c (emit_swap_insn): Treat (float_extend:?F (mem:?F))
32667 and (const_double:?F) like (mem:?F) for the purpose of fxch %st(1)
32668 elimination by swapping fld*.
32669
32670 2017-02-22 Richard Biener <rguenther@suse.de>
32671
32672 PR tree-optimization/79673
32673 * tree-ssa-pre.c (compute_avail): Use wide_int_to_tree to
32674 convert the [TARGET_]MEM_REF offset INTEGER_CST, scrapping off
32675 irrelevant address-space qualifiers and avoiding a
32676 ADDR_SPACE_CONVERT_EXPR from fold_convert.
32677
32678 2017-02-22 Richard Biener <rguenther@suse.de>
32679
32680 PR tree-optimization/79666
32681 * tree-vrp.c (extract_range_from_binary_expr_1): Make sure
32682 to not symbolically negate if that may introduce undefined
32683 overflow.
32684
32685 2017-02-22 Martin Liska <mliska@suse.cz>
32686
32687 PR lto/79587
32688 * data-streamer-in.c (streamer_read_gcov_count): Remove assert.
32689 * data-streamer-out.c (streamer_write_gcov_count_stream):
32690 Likewise.
32691 * value-prof.c (stream_out_histogram_value): Make assert more
32692 precise based on type of counter.
32693
32694 2017-02-21 Uros Bizjak <ubizjak@gmail.com>
32695
32696 PR target/79593
32697 * config/i386/i386.md (standard_x87sse_constant_load splitter):
32698 Use nonimmediate_operand instead of memory_operand for operand 1.
32699 (float-extend standard_x87sse_constant_load splitter): Ditto.
32700
32701 2017-02-21 Jeff Law <law@redhat.com>
32702
32703 PR tree-optimization/79621
32704 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Ignore
32705 blocks with edges to themselves.
32706
32707 2017-02-21 Jakub Jelinek <jakub@redhat.com>
32708
32709 PR target/79633
32710 * tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
32711 is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
32712 Use gimple_call_builtin_p.
32713
32714 PR target/79570
32715 * sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
32716 on temporarily removed DEBUG_INSNs.
32717
32718 PR tree-optimization/79649
32719 * tree-loop-distribution.c (classify_partition): Give up on
32720 non-generic address space loads/stores.
32721
32722 2017-02-21 Aldy Hernandez <aldyh@redhat.com>
32723
32724 * doc/loop.texi (Loop manipulation): Remove nonexistent
32725 tree_ssa_loop_version from the documentation.
32726 * cfgloopmanip.c (loop_version): Document CONDITION_BB argument.
32727
32728 2017-02-21 Jakub Jelinek <jakub@redhat.com>
32729
32730 PR target/79494
32731 * config/i386/i386.c (ix86_expand_split_stack_prologue): Call
32732 make_reg_eh_region_note_nothrow_nononlocal on call_insn.
32733 * config/rs6000/rs6000.c: Include except.h.
32734 (rs6000_expand_split_stack_prologue): Call
32735 make_reg_eh_region_note_nothrow_nononlocal on the call insn.
32736
32737 2017-02-21 Martin Jambor <mjambor@suse.cz>
32738
32739 PR lto/79579
32740 * ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
32741 have been analyzed.
32742
32743 2017-02-21 Martin Jambor <mjambor@suse.cz>
32744
32745 * common.opt (-fipa-cp-alignment): Mark as ignored and preserved
32746 for backward compatibility only.
32747 * doc/invoke.texi (Option Summary): Remove all references to
32748 -fipa-cp-alignment.
32749
32750 2017-02-21 Matthew Fortune <matthew.fortune@imgtec.com>
32751
32752 PR target/78660
32753 Revert:
32754 2017-02-20 Matthew Fortune <matthew.fortune@imgtec.com>
32755
32756 * lra-constraints.c (curr_insn_transform): Handle
32757 WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
32758
32759 2017-02-21 Martin Liska <mliska@suse.cz>
32760
32761 * config/i386/i386.opt: Replace -masm-dialect with -masm.
32762
32763 2017-02-21 Thomas Schwinge <thomas@codesourcery.com>
32764
32765 PR translation/79638
32766 * config/nvptx/nvptx.c (ENTRY_TEMPLATE): Single out "%ntid.y".
32767
32768 2017-02-21 Eric Botcazou <ebotcazou@adacore.com>
32769
32770 PR ada/67205
32771 * config/arm/arm.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define.
32772 (arm_function_ok_for_sibcall): Return false for an indirect call by
32773 descriptor if all the argument registers are used.
32774 (arm_relayout_function): Use FUNCTION_ALIGNMENT macro to adjust the
32775 alignment of the function.
32776
32777 2017-02-21 Jakub Jelinek <jakub@redhat.com>
32778
32779 PR tree-optimization/61441
32780 * simplify-rtx.c (simplify_const_unary_operation): For
32781 -fsignaling-nans and sNaN operand, return NULL_RTX rather than
32782 the sNaN unmodified.
32783
32784 2017-02-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
32785
32786 * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
32787 (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
32788 instead of SYSTEM_HEADER_DIR.
32789
32790 2017-02-20 Gerald Pfeifer <gerald@pfeifer.com>
32791 Martin Liška <mliska@suse.cz>
32792
32793 * doc/invoke.texi (use-after-scope-direct-emission-threshold):
32794 Fix typos and grammar, use active voice, and clarify.
32795
32796 2017-02-20 Marek Polacek <polacek@redhat.com>
32797
32798 PR middle-end/79537
32799 * gimplify.c (gimplify_expr): Handle unused *&&L;.
32800
32801 PR sanitizer/79558
32802 * ubsan.c (ubsan_type_descriptor): Check if TYPE_MAX_VALUE is null.
32803
32804 2017-02-20 Jakub Jelinek <jakub@redhat.com>
32805
32806 PR target/79568
32807 * config/i386/i386.c (ix86_expand_builtin): Handle
32808 OPTION_MASK_ISA_AVX512VL and OPTION_MASK_ISA_64BIT in
32809 ix86_builtins_isa[fcode].isa as a requirement of those
32810 flags and any other flag in the bitmask.
32811 (ix86_init_mmx_sse_builtins): Use 0 instead of
32812 ~OPTION_MASK_ISA_64BIT as mask.
32813 * config/i386/i386-builtin.def (__builtin_ia32_rdtsc,
32814 __builtin_ia32_rdtscp, __builtin_ia32_pause, __builtin_ia32_bsrsi,
32815 __builtin_ia32_rdpmc, __builtin_ia32_rolqi, __builtin_ia32_rolhi,
32816 __builtin_ia32_rorqi, __builtin_ia32_rorhi): Likewise.
32817
32818 2017-02-20 Matthew Fortune <matthew.fortune@imgtec.com>
32819
32820 PR target/78012
32821 * lra-constraints.c (split_reg): Check requested split mode
32822 is supported by the register.
32823
32824 2017-02-20 Matthew Fortune <matthew.fortune@imgtec.com>
32825
32826 * lra-constraints.c (simplify_operand_subreg): Remove early
32827 return false.
32828
32829 2017-02-20 Matthew Fortune <matthew.fortune@imgtec.com>
32830
32831 PR target/78660
32832 * lra-constraints.c (curr_insn_transform): Tighten condition
32833 for converting SUBREG reloads from OP_OUT to OP_INOUT.
32834
32835 2017-02-20 Matthew Fortune <matthew.fortune@imgtec.com>
32836
32837 PR target/78660
32838 * lra-constraints.c (curr_insn_transform): Handle
32839 WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
32840
32841 2017-02-19 Uros Bizjak <ubizjak@gmail.com>
32842
32843 Revert:
32844 2016-05-30 Uros Bizjak <ubizjak@gmail.com>
32845
32846 * config/i386/sync.md (mfence_nosse): Use "lock orl $0, -4(%esp)".
32847
32848 2017-02-19 Jonathan Wakely <jwakely@redhat.com>
32849
32850 PR c++/69523
32851 * doc/invoke.texi (C++ Dialect Options) [-Wliteral-suffix]: Update
32852 description.
32853
32854 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
32855
32856 * gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format
32857 for FMA_EXPR.
32858
32859 2017-02-18 Jakub Jelinek <jakub@redhat.com>
32860
32861 * final.c (last_columnnum, override_columnnum): New variables.
32862 (final_start_function): Set last_columnnum, pass it to begin_prologue
32863 hook and pass 0 to dwarf2out_begin_prologue.
32864 (final_scan_insn): Update override_columnnum. Pass last_columnnum
32865 to source_line debug hook.
32866 (notice_source_line): Compute last_columnnum and for debug_column_info
32867 return true on column changes.
32868 * debug.h (struct gcc_debug_hooks): Add column argument to
32869 source_line and begin_prologue hooks.
32870 (debug_nothing_int_charstar_int_bool): Remove prototype.
32871 (debug_nothing_int_int_charstar,
32872 debug_nothing_int_int_charstar_int_bool): New prototypes.
32873 (dwarf2out_begin_prologue): Add column argument.
32874 * debug.c (do_nothing_debug_hooks): Adjust source_line and
32875 begin_prologue hooks.
32876 (debug_nothing_int_charstar_int_bool): Remove.
32877 (debug_nothing_int_int_charstar,
32878 debug_nothing_int_int_charstar_int_bool): New functions.
32879 * dwarf2out.c (dwarf2out_begin_prologue): Add column argument, pass it
32880 through to dwarf2out_source_line.
32881 (dwarf2_lineno_debug_hooks): Adjust begin_prologue hook.
32882 (dwarf2out_source_line): Add column argument, emit it if requested.
32883 * sdbout.c (sdbout_source_line, sdbout_begin_prologue): Add column
32884 arguments.
32885 * xcoffout.h (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
32886 * xcoffout.c (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
32887 * vmsdbgout.c (vmsdbgout_begin_prologue): Add column argument, pass it
32888 through to dwarf2out_begin_prologue.
32889 (vmsdbgout_source_line): Add column argument, pass it through to
32890 dwarf2out_source_line.
32891 * dbxout.c (dbxout_begin_prologue): Add column argument, adjust
32892 dbxout_source_line caller.
32893 (dbxout_source_line): Add column argument.
32894
32895 * common.opt (gno-column-info, gcolumn-info): New options.
32896 * dwarf2out.c (dwarf2_lineno_debug_hooks): Formatting fix.
32897 (check_die): Also test for multiple DW_AT_decl_column attributes.
32898 (add_src_coords_attributes, dwarf2out_imported_module_or_decl_1): Add
32899 DW_AT_decl_column if requested.
32900 (gen_subprogram_die): Compare and/or add also DW_AT_decl_column
32901 if requested.
32902 (gen_variable_die): Likewise.
32903 (add_call_src_coords_attributes): Add DW_AT_call_column if requested.
32904 * doc/invoke.texi (-gcolumn-info, -gno-column-info): Document.
32905
32906 PR target/79569
32907 * config/i386/i386.opt (m3dnowa): Replace Undocumented with Report.
32908 * common/config/i386/i386-common.c (OPTION_MASK_ISA_3DNOW_A_SET): Define.
32909 (ix86_handle_option): Handle OPT_m3dnowa.
32910 * doc/invoke.texi (-m3dnowa): Document.
32911 * doc/extend.texi (__builtin_ia32_pmulhuw, __builtin_ia32_pf2iw): Use
32912 -m3dnowa instead of -m3dnow -march=athlon.
32913
32914 PR target/79559
32915 * config/i386/i386.c (ix86_print_operand): Use output_operand_lossage
32916 instead of gcc_assert for K, r and R code checks. Formatting fixes.
32917
32918 2017-02-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
32919
32920 PR target/79261
32921 * config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Add
32922 support for CODE_FOR_vsx_xxpermdi_v2d[fi]_be.
32923 * config/rs6000/rs6000.md (reload_gpr_from_vsx<mode>): Call
32924 generator for vsx_xxpermdi_<mode>_be.
32925 * config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Remove logic to
32926 force big-endian semantics.
32927 (vsx_xxpermdi_<mode>_be): New define_expand with same
32928 implementation as previous version of vsx_xxpermdi_<mode>.
32929
32930 2017-02-17 Jakub Jelinek <jakub@redhat.com>
32931
32932 PR tree-optimization/79327
32933 * gimple-ssa-sprintf.c (format_integer): Remove likely_adjust
32934 variable, its initialization and use.
32935
32936 2017-02-17 Julia Koval <julia.koval@intel.com>
32937
32938 * common/config/i386/i386-common.c (OPTION_MASK_ISA_RDPID_SET): New.
32939 (OPTION_MASK_ISA_PKU_UNSET): New.
32940 (ix86_handle_option): Handle -mrdpid.
32941 * config/i386/cpuid.h (bit_RDPID): New.
32942 * config/i386/driver-i386.c (host_detect_local_cpu):
32943 Detect RDPID feature.
32944 * config/i386/i386-builtin.def (__builtin_ia32_rdpid): New.
32945 * config/i386/i386-c.c (ix86_target_macros_internal):
32946 Handle RDPID flag.
32947 * config/i386/i386.c (ix86_target_string): Add -mrdpid to isa2_opts.
32948 (ix86_valid_target_attribute_inner_p): Add "rdpid".
32949 (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
32950 * config/i386/i386.h (TARGET_RDPID, TARGET_RDPID_P): New.
32951 * config/i386/i386.md (define_insn "rdpid"): New.
32952 * config/i386/i386.opt Add -mrdpid.
32953 * config/i386/immintrin.h (_rdpid_u32): New.
32954
32955 2017-02-17 Vladimir Makarov <vmakarov@redhat.com>
32956
32957 PR rtl-optimization/79541
32958 * lra-constraints.c (curr_insn_transform): Remove wrong asm insn
32959 instead of transforming it into USE.
32960
32961 2017-02-17 Segher Boessenkool <segher@kernel.crashing.org>
32962
32963 * config/rs6000/rs6000.md (extendsfdf2): Remove default arguments.
32964 If HONOR_SNANS (SFmode) force the input to a register.
32965 (*extendsfdf2_fpr): Add !HONOR_SNANS (SFmode) condition.
32966 (*extendsfdf2_snan): New pattern, used when using SNaNs; it generates
32967 an frsp or similar insn.
32968
32969 2017-02-17 Martin Liska <mliska@suse.cz>
32970
32971 PR rtl-optimization/79577
32972 * params.def (selsched-max-sched-times): Increase minimum to 1.
32973
32974 2017-02-17 Martin Liska <mliska@suse.cz>
32975
32976 PR rtl-optimization/79574
32977 * gcse.c (want_to_gcse_p): Prevent integer overflow.
32978
32979 2017-02-17 Martin Liska <mliska@suse.cz>
32980
32981 PR tree-optimization/79529
32982 * tree-ssa-loop-unswitch.c (is_maybe_undefined): Use
32983 ssa_defined_default_def_p to handle cases which are implicitly
32984 defined.
32985 * tree-ssa.c (ssa_defined_default_def_p): New function.
32986 (ssa_undefined_value_p): Use ssa_defined_default_def_p to handle cases
32987 which are implicitly defined.
32988 * tree-ssa.h (ssa_defined_default_def_p): Declare.
32989
32990 2017-02-17 Richard Biener <rguenther@suse.de>
32991
32992 PR middle-end/79576
32993 * params.def (max-ssa-name-query-depth): Limit to 10.
32994
32995 2017-02-17 Richard Biener <rguenther@suse.de>
32996
32997 PR tree-optimization/79552
32998 * tree-ssa-structalias.c (visit_loadstore): Properly verify
32999 default defs.
33000
33001 2017-02-17 Richard Biener <rguenther@suse.de>
33002
33003 PR bootstrap/79567
33004 * genmatch.c (output_line_directive): Handle DIR_SEPARATOR_2.
33005
33006 2017-02-17 Marek Polacek <polacek@redhat.com>
33007
33008 PR middle-end/79536
33009 * fold-const.c (fold_negate_expr_1): Renamed from fold_negate_expr.
33010 (fold_negate_expr): New wrapper.
33011
33012 2017-02-16 Sandra Loosemore <sandra@codesourcery.com>
33013
33014 * doc/invoke.texi (C++ Dialect Options) [-Wno-non-template-friend]:
33015 Correct terminology and de-emphasize pre-standard behavior.
33016
33017 2017-02-16 Alan Modra <amodra@gmail.com>
33018
33019 PR rtl-optimization/79286
33020 * ira.c (def_dominates_uses): New function.
33021 (update_equiv_regs): Don't create an equivalence for insns that
33022 may trap where the register def does not dominate the use.
33023
33024 2017-02-16 Vladimir Makarov <vmakarov@redhat.com>
33025
33026 PR rtl-optimization/78127
33027 * lra.c (lra): Call lra_eliminate before finish the loop after
33028 lra_constraint.
33029
33030 2017-02-16 Richard Biener <rguenther@suse.de>
33031
33032 * graphite.h: Do not include isl/isl_val_gmp.h, instead include
33033 isl/isl_val.h.
33034 * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
33035 (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
33036 * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
33037 (isl_val_int_from_wi): New function.
33038 (extract_affine_gmp): Rename to ...
33039 (extract_affine_wi): ... this, take a widest_int.
33040 (extract_affine_int): Just wrap extract_affine_wi.
33041 (add_param_constraints): Use isl_val_int_from_wi.
33042 (add_loop_constraints): Likewise, and extract_affine_wi.
33043
33044 2017-02-15 Jeff Law <law@redhat.com>
33045
33046 PR middle-end/79521
33047 * ira-costs.c (scan_one_insn): Check have_regs_of_mode before calling
33048 ira_init_register_move_cost_if_necessary.
33049
33050 2017-02-15 Martin Sebor <msebor@redhat.com>
33051
33052 PR middle-end/32003
33053 * doc/invoke.texi (-fdump-final-insns): Replace option accidentally
33054 removed in a prior commit.
33055
33056 2017-02-15 Bin Cheng <bin.cheng@arm.com>
33057
33058 PR tree-optimization/79347
33059 * tree-vect-loop-manip.c (vect_do_peeling): Maintain profile
33060 counters during peeling.
33061
33062 2017-02-15 Thomas Schwinge <thomas@codesourcery.com>
33063
33064 * Makefile.in (site.exp): Remove "set ISLVER".
33065
33066 2017-02-15 Jakub Jelinek <jakub@redhat.com>
33067
33068 PR target/79487
33069 * real.c (real_from_integer): Call real_convert even for decimal.
33070
33071 2017-02-15 Dominik Vogt <vogt@linux.vnet.ibm.com>
33072
33073 PR target/79421
33074 * config/s390/s390.c: define TARGET_CUSTOM_FUNCTION_DESCRIPTORS.
33075
33076 2017-02-14 Andrew Pinski <apinski@cavium.com>
33077
33078 * config/aarch64/aarch64-cores.def (thunderx2t99): Move to under 'C"
33079 cores and change the partno/implementer to be correct.
33080 (thunderx2t99p1): New core which replaces thunderx2t99 and still has
33081 the 'B" as the implementer.
33082 * config/aarch64/aarch64-tune.md: Regenerate.
33083
33084 2017-02-14 Carl Love <cel@us.ibm.com>
33085
33086 * config/rs6000/rs6000.c: Add case statement entry to make the
33087 xvcvuxdsp built-in argument unsigned.
33088 * config/rs6000/vsx.md: Fix the source and return operand types so they
33089 match the instruction definitions from the ISA document. Fix typo
33090 in the instruction generation for the (define_insn "vsx_xvcvuxdsp"
33091 statement.
33092
33093 2017-02-14 Vladimir Makarov <vmakarov@redhat.com>
33094
33095 PR target/79282
33096 * lra-int.h (struct lra_operand_data, struct lra_insn_reg): Add
33097 member early_clobber_alts.
33098 * lra-lives.c (reg_early_clobber_p): New.
33099 (process_bb_lives): Use it.
33100 * lra.c (new_insn_reg): New arg early_clobber_alts. Use it.
33101 (debug_operand_data): Initialize early_clobber_alts.
33102 (setup_operand_alternative): Set up early_clobber_alts.
33103 (collect_non_operand_hard_regs): Ditto. Pass early clobber
33104 alternatives to new_insn_reg.
33105 (add_regs_to_insn_regno_info): Add arg early_clobber_alts. Use
33106 it.
33107 (lra_update_insn_regno_info): Pass the new arg.
33108
33109 2017-02-14 Jakub Jelinek <jakub@redhat.com>
33110
33111 PR middle-end/79505
33112 * omp-offload.c (free_oacc_loop): Release loop->ifns vector.
33113 (new_oacc_loop_raw): Don't clear already cleared fields.
33114
33115 PR target/79481
33116 * config/i386/avx512pfintrin.h (_mm512_prefetch_i32gather_pd,
33117 _mm512_prefetch_i32gather_ps, _mm512_prefetch_i64gather_pd,
33118 _mm512_prefetch_i64gather_ps): New inline functions and macros.
33119
33120 2017-02-14 Uros Bizjak <ubizjak@gmail.com>
33121
33122 PR target/79495
33123 * config/i386/i386.md (*movxf_internal): Add (o,rC) alternative.
33124
33125 2017-02-14 H.J. Lu <hongjiu.lu@intel.com>
33126
33127 PR target/79498
33128 * config/i386/i386.c (timode_scalar_chain::convert_insn): Insert
33129 the extra instruction to the right place to store 128-bit constant
33130 when needed.
33131
33132 2017-02-14 Martin Sebor <msebor@redhat.com>
33133
33134 PR middle-end/79448
33135 * gimple-ssa-sprintf.c (format_directive): Avoid issuing INT_MAX
33136 warning for strings of unknown length.
33137
33138 2017-02-13 Segher Boessenkool <segher@kernel.crashing.org>
33139
33140 * config.gcc (supported_defaults) [powerpc*-*-*]: Update.
33141
33142 2017-02-14 Jeff Law <law@redhat.com>
33143
33144 PR target/79404
33145 * ira-costs.c (scan_one_insn): Initialize register move costs
33146 for pseudos seen in USE/CLOBBER insns.
33147
33148 PR tree-optimization/79095
33149 * tree-vrp.c (extract_range_from_binary_expr_1): For EXACT_DIV_EXPR,
33150 if the numerator has the range ~[0,0] make the resultant range ~[0,0].
33151 (extract_range_from_binary_expr): For MINUS_EXPR with no derived range,
33152 if the operands are known to be not equal, then the resulting range
33153 is ~[0,0].
33154 (intersect_ranges): If the new range is ~[0,0] and the old range is
33155 wide, then prefer ~[0,0].
33156 * tree-vrp.c (overflow_comparison_p_1): New function.
33157 (overflow_comparison_p): New function.
33158 * tree-vrp.c (register_edge_assert_for_2): Register additional asserts
33159 if NAME is used in an overflow test.
33160 (vrp_evaluate_conditional_warnv_with_ops): If the ops represent an
33161 overflow check that can be expressed as an equality test, then adjust
33162 ops to be that equality test.
33163
33164 2017-02-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
33165
33166 * config/s390/s390-builtin-types.def: Remove flags argument.
33167 * config/s390/s390.c (s390_init_builtins): Likewise.
33168
33169 2017-02-14 Martin Liska <mliska@suse.cz>
33170
33171 * tree-ssa-loop-unswitch.c (hoist_guard): Release get_loop_body
33172 vector. Fix trailing white spaces.
33173
33174 2017-02-14 James Greenhalgh <james.greenhalgh@arm.com>
33175
33176 * config/aarch64/aarch64.c (aarch64_simd_container_mode): Handle
33177 HFmode.
33178
33179 2017-02-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33180
33181 PR rtl-optimization/68664
33182 * config/arm/arm.c (arm_sched_can_speculate_insn):
33183 New function. Declare prototype.
33184 (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
33185
33186 2017-02-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33187
33188 PR rtl-optimization/68664
33189 * config/aarch64/aarch64.c (aarch64_sched_can_speculate_insn):
33190 New function.
33191 (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
33192
33193 2017-02-14 Amit Pawar <amit.pawar@amd.com>
33194
33195 * config/i386/i386.c (znver1_cost): Fix the alignment for function and
33196 max skip bytes for function, loop and jump.
33197
33198 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
33199
33200 * gimple-pretty-print.c (dump_unary_rhs): Adjust dump format for
33201 ABS_EXPR for gimple dump.
33202
33203 2017-02-14 Jakub Jelinek <jakub@redhat.com>
33204
33205 PR target/79462
33206 * config/sh/sh.c (expand_cbranchdi4): Don't clear operands[4].
33207
33208 PR tree-optimization/79408
33209 * tree-vrp.c (simplify_div_or_mod_using_ranges): Handle also the
33210 case when on TRUNC_MOD_EXPR op0 is INTEGER_CST.
33211 (simplify_stmt_using_ranges): Call simplify_div_or_mod_using_ranges
33212 also if rhs1 is INTEGER_CST.
33213
33214 2017-02-14 Richard Biener <rguenther@suse.de>
33215
33216 PR middle-end/79432
33217 * tree-into-ssa.c (insert_phi_nodes): When the function can
33218 have abnormal edges rewrite SSA names with broken use-def
33219 dominance out of SSA and register them for PHI insertion.
33220
33221 2017-02-13 Martin Sebor <msebor@redhat.com>
33222
33223 PR middle-end/79496
33224 * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call): Avoid
33225 clearing info.nowrite flag when snprintf size argument is a range.
33226
33227 2017-02-13 Jakub Jelinek <jakub@redhat.com>
33228
33229 * cprop.c (cprop_jump): Add missing space in string literal.
33230 * tree-ssa-structalias.c (rewrite_constraints): Likewise.
33231 (get_constraint_for_component_ref): Likewise.
33232 * df-core.c (df_worklist_dataflow_doublequeue): Likewise.
33233 * tree-outof-ssa.c (insert_partition_copy_on_edge): Likewise.
33234 * lra-constraints.c (process_alt_operands): Likewise.
33235 * ipa-inline.c (inline_small_functions): Likewise.
33236 * tree-ssa-sccvn.c (visit_reference_op_store): Likewise.
33237 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
33238 * trans-mem.c (diagnose_tm_1_op): Likewise.
33239 * omp-grid.c (grid_find_single_omp_among_assignments): Likewise.
33240 (grid_parallel_clauses_gridifiable): Likewise.
33241
33242 * config/nvptx/mkoffload.c (process): Add space in between
33243 , and %d.
33244
33245 * config/i386/i386.h (REG_CLASS_NAMES): Add , in between
33246 "MOD4_SSE_REGS" and "ALL_REGS".
33247
33248 * spellcheck.c (test_data): Add , in between "foo" and "food".
33249
33250 2017-02-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
33251
33252 PR target/79449
33253 * config/rs6000/rs6000.c (expand_block_compare): Make sure runtime
33254 boundary crossing check and subsequent code generation agree.
33255
33256 2017-02-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33257
33258 * config/aarch64/aarch64.c (has_memory_op): Delete.
33259 (aarch64_madd_needs_nop): Use contains_mem_rtx_p instead of
33260 has_memory_op.
33261
33262 2017-02-13 Jakub Jelinek <jakub@redhat.com>
33263
33264 PR rtl-optimization/79388
33265 PR rtl-optimization/79450
33266 * combine.c (distribute_notes): When removing TEM_INSN for which
33267 corresponding dest has last value recorded, invalidate that last
33268 value.
33269
33270 2017-02-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33271
33272 * config/arm/arm.c (arm_print_tune_info): Use ASM_COMMENT_START instead
33273 of explicit '@'. Add missing assembly comment marker on branch costs
33274 printout.
33275
33276 2017-02-13 Nathan Sidwell <nathan@acm.org>
33277
33278 * gengtype-lex.l (<in_struct>): Add '/'.
33279
33280 2017-02-13 Martin Liska <mliska@suse.cz>
33281
33282 PR c/79471
33283 * calls.c (expand_call): Replace XALLOCAVEC with XCNEWVEC.
33284
33285 2017-02-13 Richard Biener <rguenther@suse.de>
33286
33287 * configure.ac (HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS):
33288 Remove.
33289 * configure: Re-generate.
33290 * config.in: Likewise.
33291 * graphite-dependences.c: Simplify as if
33292 HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS was defined.
33293 * graphite-isl-ast-to-gimple.c: Likewise.
33294 * graphite-optimize-isl.c: Likewise.
33295 * graphite-poly.c: Likewise.
33296 * graphite-sese-to-poly.c: Likewise.
33297 * graphite.h: Likewise.
33298 * toplev.c: Include isl/version.h and use isl_version () for
33299 printing the ISL version.
33300 * doc/install.texi: Update ISL requirement.
33301
33302 2017-02-12 Gerald Pfeifer <gerald@pfeifer.com>
33303
33304 * doc/standards.texi (Standards): Update reference to
33305 Objective-C 2.0.
33306
33307 2017-02-12 Gerald Pfeifer <gerald@pfeifer.com>
33308
33309 * doc/extend.texi (Named Address Spaces): sourceware.org now
33310 defaults to https.
33311 * doc/install.texi (Binaries): Ditto.
33312 (Specific): Ditto.
33313
33314 2017-02-11 Sandra Loosemore <sandra@codesourcery.com>
33315
33316 * doc/cpp.texi: Replace "stringify"/"stringification" with C
33317 standard terminology "stringize"/"stringizing" throughout.
33318 * doc/cppinternals.texi: Likewise.
33319
33320 2017-02-11 Sandra Loosemore <sandra@codesourcery.com>
33321
33322 * doc/extend.texi: Fix some spelling mistakes and typos.
33323 * doc/invoke.texi: Likewise.
33324
33325 2017-02-11 Jan Hubicka <hubicka@ucw.cz>
33326
33327 PR ipa/79224
33328 * params.def (inline-min-speedup) Change from 10 to 8.
33329
33330 2017-02-11 Jakub Jelinek <jakub@redhat.com>
33331
33332 * doc/invoke.texi (fopenmp): Bump OpenMP version from 4.0 to
33333 4.5.
33334
33335 2017-02-11 Jan Hubicka <hubicka@ucw.cz>
33336
33337 PR ipa/79224
33338 * ipa-inline-analysis.c (get_minimal_bb): New function.
33339 (record_modified): Use it.
33340 (remap_edge_change_prob): Handle also ancestor functions.
33341
33342 2017-02-11 Gerald Pfeifer <gerald@pfeifer.com>
33343
33344 * doc/contrib.texi (Contributors): Remove broken link into
33345 the Mauve CVS repository.
33346
33347 2017-02-11 Jakub Jelinek <jakub@redhat.com>
33348
33349 PR middle-end/79454
33350 * internal-fn.c (expand_vector_ubsan_overflow): Use piece-wise
33351 result computation whenever lhs doesn't have vector mode, not
33352 just when it has BLKmode.
33353
33354 2017-02-10 Gerald Pfeifer <gerald@pfeifer.com>
33355
33356 * doc/makefile.texi (profiledbootstrap): Refer to the
33357 installation instructions only in textual form.
33358
33359 2017-02-10 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
33360
33361 PR target/79295
33362 * config/rs6000/altivec.md (bcd<bcd_add_sub>): Fix constraints.
33363
33364 2017-02-10 Gerald Pfeifer <gerald@pfeifer.com>
33365
33366 * doc/install.texi (Specific): Use https for blackfin.uclinux.org.
33367 (Specific): Update mingw-w64 reference.
33368 (Binaries): Ditto.
33369 (Specific): Remove broken link to Renesas RX processor.
33370
33371 2017-02-10 Richard Biener <rguenther@suse.de>
33372
33373 * toplev.c (process_options): Do not mention obsolete graphite
33374 options when printing sorry message about missing graphite support.
33375 Mention -floop-nest-optimize.
33376
33377 2017-02-10 Christophe Lyon <christophe.lyon@linaro.org>
33378
33379 * config/aarch64/arm_neon.h (vtst_p8): Rewrite without asm.
33380 (vtst_p16): Likewise.
33381 (vtstq_p8): Likewise.
33382 (vtstq_p16): Likewise.
33383 (vtst_p64): New.
33384 (vtstq_p64): Likewise.
33385 * config/arm/arm_neon.h (vgetq_lane_p64): New.
33386 (vset_lane_p64): New.
33387 (vsetq_lane_p64): New.
33388
33389 2017-02-10 Jakub Jelinek <jakub@redhat.com>
33390
33391 PR tree-optimization/79411
33392 * tree-ssa-reassoc.c (is_reassociable_op): Return false if
33393 stmt operands are SSA_NAMEs used in abnormal phis.
33394 (can_reassociate_p): Return false if op is SSA_NAME used in abnormal
33395 phis.
33396
33397 2017-02-09 Jan Hubicka <hubicka@ucw.cz>
33398
33399 PR ipa/70795
33400 * cgraphunit.c (cgraph_node::add_new_function): Set externally_visible
33401 flag if needed.
33402
33403 2017-02-09 Jan Hubicka <hubicka@ucw.cz>
33404
33405 * tree-ssa-loop-unswitch.c (hoist_guard): Update profile.
33406
33407 2017-02-09 Jakub Jelinek <jakub@redhat.com>
33408
33409 * omp-offload.c (oacc_loop_auto_partitions): Use || instead of |
33410 to avoid warning.
33411
33412 PR c/79413
33413 * gimplify.h (is_gimple_sizepos): Only test for INTEGER_CST constants,
33414 not arbitrary TREE_CONSTANT.
33415
33416 PR c/79431
33417 * gimplify.c (gimplify_adjust_omp_clauses): Ignore
33418 "omp declare target link" attribute unless is_global_var.
33419 * omp-offload.c (find_link_var_op): Likewise.
33420
33421 2017-02-09 Nathan Sidwell <nathan@codesourcery.com>
33422 Chung-Lin Tang <cltang@codesourcery.com>
33423
33424 * gimplify.c (gimplify_scan_omp_clauses): No special handling for
33425 OMP_CLAUSE_TILE.
33426 (gimplify_adjust_omp_clauses): Don't delete TILE.
33427 (gimplify_omp_for): Deal with TILE.
33428 * internal-fn.c (expand_GOACC_TILE): New function.
33429 * internal-fn.def (GOACC_DIM_POS): Comment may be overly conservative.
33430 (GOACC_TILE): New.
33431 * omp-expand.c (struct oacc_collapse): Add tile and outer fields.
33432 (expand_oacc_collapse_init): Add LOC paramter. Initialize tile
33433 element fields.
33434 (expand_oacc_collapse_vars): Add INNER parm, adjust for tiling,
33435 avoid DIV for outermost collapse var.
33436 (expand_oacc_for): Insert tile element loop as needed. Adjust.
33437 Remove out of date comments, fix whitespace.
33438 * omp-general.c (omp_extract_for_data): Deal with tiling.
33439 * omp-general.h (enum oacc_loop_flags): Add OLF_TILE flag,
33440 adjust OLF_DIM_BASE value.
33441 (struct omp_for_data): Add tiling field.
33442 * omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_TILE.
33443 (lower_oacc_head_mark): Add OLF_TILE as appropriate. Ensure 2 levels
33444 for auto loops. Remove default auto determining, moved to
33445 oacc_loop_fixed_partitions.
33446 * omp-offload.c (struct oacc_loop): Change 'ifns' to vector of call
33447 stmts, add e_mask field.
33448 (oacc_dim_call): New function, abstracted out from oacc_thread_numbers.
33449 (oacc_thread_numbers): Use oacc_dim_call.
33450 (oacc_xform_tile): New.
33451 (new_oacc_loop_raw): Initialize e_mask, adjust for ifns vector.
33452 (finish_oacc_loop): Adjust for ifns vector.
33453 (oacc_loop_discover_walk): Append loop abstraction sites to list,
33454 add case for GOACC_TILE fns.
33455 (oacc_loop_xform_loop): Delete.
33456 (oacc_loop_process): Iterate over call list directly, and add
33457 handling for GOACC_TILE fns.
33458 (oacc_loop_fixed_partitions): Determine default auto, deal with TILE,
33459 dump partitioning.
33460 (oacc_loop_auto_partitions): Add outer_assign parm. Assign all but
33461 vector partitioning to outer loops. Assign 2 partitions to loops
33462 when available. Add TILE handling.
33463 (oacc_loop_partition): Adjust oacc_loop_auto_partitions call.
33464 (execite_oacc_device_lower): Process GOACC_TILE fns,
33465 ignore unknown specs.
33466 * tree-nested.c (convert_nonlocal_omp_clauses): Allow OMP_CLAUSE_TILE.
33467 * tree.c (omp_clause_num_ops): Adjust TILE ops.
33468 * tree.h (OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_COUNT): New.
33469
33470 2017-02-09 Gerald Pfeifer <gerald@pfeifer.com>
33471
33472 * configure.ac (ACX_BUGURL): Update.
33473 * configure: Regenerate.
33474
33475 2017-02-09 Richard Biener <rguenther@suse.de>
33476
33477 PR tree-optimization/69823
33478 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
33479 Properly enumerate all BBs in the region. Use auto_vec/auto_bitmap.
33480
33481 2017-02-09 Andrew Burgess <andrew.burgess@embecosm.com>
33482
33483 * config/arc/arc-c.def: Add __NPS400__ definition.
33484 * config/arc/arc.h (CPP_SPEC): Don't define __NPS400__ here.
33485 (TARGET_NPS400): Define.
33486
33487 2017-02-09 Andrew Burgess <andrew.burgess@embecosm.com>
33488
33489 * config/arc/arc-arch.h (arc_arch_t): Move unchanged to earlier in
33490 file.
33491 (arc_cpu_t): Change base_architecture field, arch, to a arc_arc_t
33492 pointer, arch_info.
33493 (arc_cpu_types): Fill the arch_info field with a pointer into the
33494 arc_arch_types table.
33495 (arc_selected_cpu): Declare.
33496 * config/arc/arc.c (arc_selected_cpu): Make global.
33497 (arc_selected_arch): Delete.
33498 (arc_base_cpu): Delete.
33499 (arc_override_options): Remove references to deleted variables,
33500 update access to arch information.
33501 (ARC_OPT): Update access to arch information.
33502 (ARC_OPTX): Likewise.
33503 * config/arc/arc.h (arc_base_cpu): Remove declaration.
33504 (TARGET_ARC600): Update access to arch information.
33505 (TARGET_ARC601): Likewise.
33506 (TARGET_ARC700): Likewise.
33507 (TARGET_EM): Likewise.
33508 (TARGET_HS): Likewise.
33509 * config/arc/driver-arc.c (arc_cpu_to_as): Update access to arch
33510 information.
33511
33512 2017-02-08 Pat Haugen <pthaugen@us.ibm.com>
33513
33514 PR target/78604
33515 * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Invert
33516 condition/operands for integer GE/LE/GEU/LEU operations.
33517
33518 2017-02-08 Segher Boessenkool <segher@kernel.crashing.org>
33519
33520 PR translation/79397
33521 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Fix spelling
33522 of AltiVec.
33523
33524 2017-02-08 Martin Jambor <mjambor@suse.cz>
33525
33526 PR ipa/79375
33527 * ipa-prop.c (ipa_alloc_node_params): Make static, return bool
33528 whether allocation happened.
33529 (ipa_initialize_node_params): Do not call ipa_alloc_node_params if
33530 nothing was allocated.
33531
33532 2017-02-08 Jakub Jelinek <jakub@redhat.com>
33533
33534 PR tree-optimization/79408
33535 * tree-vrp.c (simplify_div_or_mod_using_ranges): If op1 is not
33536 constant, but SSA_NAME with a known integer range, use the minimum
33537 of that range instead of op1 to determine if modulo can be replaced
33538 with its first operand.
33539
33540 2016-02-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
33541
33542 * config/riscv/riscv.c (riscv_build_integer_1): Avoid use of INT16_MAX.
33543
33544 2017-02-08 Richard Biener <rguenther@suse.de>
33545
33546 PR tree-optimization/71824
33547 * graphite-scop-detection.c (scop_detection::build_scop_breadth):
33548 Check all loops contained in the merged region.
33549
33550 2017-02-07 Andrew Pinski <apinski@cavium.com>
33551
33552 * config/aarch64/aarch64.md (popcount<mode>2): New pattern.
33553
33554 2017-02-07 Andrew Pinski <apinski@cavium.com>
33555
33556 * config/aarch64/aarch64-cores.def (thunderx): Disable LSE.
33557 (thunderxt88): Likewise.
33558 (thunderxt81): Disable LSE and change v8.1 to v8.
33559 (thunderxt83): Likewise.
33560
33561 2017-02-07 Jakub Jelinek <jakub@redhat.com>
33562 Richard Biener <rguenther@suse.de>
33563
33564 PR middle-end/79399
33565 * ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
33566 type from int to size_t.
33567 * ira-costs.c (struct_costs_size): Change type from int to size_t.
33568
33569 2017-02-07 Jakub Jelinek <jakub@redhat.com>
33570
33571 PR rtl-optimization/79386
33572 * cprop.c (bypass_conditional_jumps): Initialize
33573 bypass_last_basic_block already before splitting bbs after
33574 unconditional traps...
33575 (bypass_conditional_jumps): ... rather than here.
33576
33577 PR target/79299
33578 * config/i386/sse.md (xtg_mode, gatherq_mode): New mode attrs.
33579 (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2,
33580 *avx512f_gatherdi<mode>, *avx512f_gatherdi<mode>_2): Use them,
33581 fix -masm=intel patterns.
33582
33583 2017-02-07 Richard Biener <rguenther@suse.de>
33584
33585 PR tree-optimization/79256
33586 PR middle-end/79278
33587 * builtins.c (get_object_alignment_2): Use min_align_of_type
33588 to extract alignment for MEM_REFs to honor BIGGEST_FIELD_ALIGNMENT
33589 and ADJUST_FIELD_ALIGN.
33590
33591 * doc/tm.texi.in (ADJUST_FIELD_ALIGN): Adjust to take additional
33592 type parameter.
33593 * doc/tm.texi: Regenerate.
33594 * stor-layout.c (layout_decl): Adjust.
33595 (update_alignment_for_field): Likewise.
33596 (place_field): Likewise.
33597 (min_align_of_type): Likewise.
33598 * config/arc/arc.h (ADJUST_FIELD_ALIGN): Adjust.
33599 * config/epiphany/epiphany.h (ADJUST_FIELD_ALIGN): Likewise.
33600 * config/epiphany/epiphany.c (epiphany_adjust_field_align): Likewise.
33601 * config/frv/frv.h (ADJUST_FIELD_ALIGN): Likewise.
33602 * config/frv/frv.c (frv_adjust_field_align): Likewise.
33603 * config/i386/i386.h (ADJUST_FIELD_ALIGN): Likewise.
33604 * config/i386/i386.c (x86_field_alignment): Likewise.
33605 * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Likewise.
33606 * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Likewise.
33607 * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
33608 * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
33609 * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Likewise.
33610 * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p):
33611 Likewise.
33612
33613 Revert
33614 2017-01-30 Richard Biener <rguenther@suse.de>
33615
33616 PR tree-optimization/79256
33617 * targhooks.c (default_builtin_vector_alignment_reachable): Honor
33618 BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
33619 alignment on TYPE.
33620
33621 2017-02-07 Toma Tabacu <toma.tabacu@imgtec.com>
33622
33623 * config/mips/mips.c (mips_expand_builtin_insn): Convert the QImode
33624 argument of the pshufh, psllh, psllw, psrah, psraw, psrlh, psrlw
33625 builtins to SImode and emit a zero-extend, if necessary.
33626
33627 2017-02-06 Palmer Dabbelt <palmer@dabbelt.com>
33628
33629 * docs/invoke.texi (RISC-V Options): Alphabetize.
33630
33631 2017-02-06 Palmer Dabbelt <palmer@dabbelt.com>
33632
33633 * doc/invoke.texi (RISC-V Options): Use two spaces to separate
33634 options.
33635
33636 2017-02-06 Palmer Dabbelt <palmer@dabbelt.com>
33637
33638 * config/riscv/riscv.c: New file.
33639 * common/config/riscv/riscv-common.c: Likewise.
33640 * config.gcc: Likewise.
33641 * config/riscv/constraints.md: Likewise.
33642 * config/riscv/elf.h: Likewise.
33643 * config/riscv/generic.md: Likewise.
33644 * config/riscv/linux.h: Likewise.
33645 * config/riscv/multilib-generator: Likewise.
33646 * config/riscv/peephole.md: Likewise.
33647 * config/riscv/pic.md: Likewise.
33648 * config/riscv/predicates.md: Likewise.
33649 * config/riscv/riscv-builtins.c: Likewise.
33650 * config/riscv/riscv-c.c: Likewise.
33651 * config/riscv/riscv-ftypes.def: Likewise.
33652 * config/riscv/riscv-modes.def: Likewise.
33653 * config/riscv/riscv-opts.h: Likewise.
33654 * config/riscv/riscv-protos.h: Likewise.
33655 * config/riscv/riscv.h: Likewise.
33656 * config/riscv/riscv.md: Likewise.
33657 * config/riscv/riscv.opt: Likewise.
33658 * config/riscv/sync.md: Likewise.
33659 * config/riscv/t-elf-multilib: Likewise.
33660 * config/riscv/t-linux: Likewise.
33661 * config/riscv/t-linux-multilib: Likewise.
33662 * config/riscv/t-riscv: Likewise.
33663 * configure.ac: Likewise.
33664 * doc/contrib.texi: Add Kito Cheng, Palmer Dabbelt, and Andrew
33665 Waterman as RISC-V maintainers.
33666 * doc/install.texi: Add RISC-V entries.
33667 * doc/invoke.texi: Add RISC-V options section.
33668 * doc/md.texi: Add RISC-V constraints section.
33669 * configure: Regenerated.
33670
33671 2017-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
33672
33673 PR target/66144
33674 * config/rs6000/vector.md (vcond<mode><mode>): Allow the true and
33675 false values to be constant vectors with all 0 or all 1 bits set.
33676 (vcondu<mode><mode>): Likewise.
33677 * config/rs6000/predicates.md (vector_int_reg_or_same_bit): New
33678 predicate.
33679 (fpmask_comparison_operator): Update comment.
33680 (vecint_comparison_operator): New predicate.
33681 * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Optimize
33682 vector conditionals when the true and false values are constant
33683 vectors with all 0 bits or all 1 bits set.
33684
33685 2017-02-06 Martin Sebor <msebor@redhat.com>
33686
33687 PR tree-optimization/79376
33688 * gimple-fold.c (get_range_strlen): Set the minimum length to zero.
33689
33690 2017-02-06 Uros Bizjak <ubizjak@gmail.com>
33691
33692 * config/i386/sse.md (vector modes -> vec_extract* splitter): Use
33693 explicit subreg RTX with operand 1. Use VECTOR_MODE_P predicate
33694 to simplify split condition.
33695
33696 2017-02-06 Jakub Jelinek <jakub@redhat.com>
33697
33698 * omp-expand.c (oxpand_omp_atomic_fetch_op,
33699 expand_omp_atomic_pipeline): Return false if can_atomic_load_p is
33700 false.
33701
33702 2017-02-06 Segher Boessenkool <segher@kernel.crashing.org>
33703
33704 PR rtl-optimization/68664
33705 * target.def (can_speculate_insn): New hook.
33706 * doc/tm.texi.in (TARGET_SCHED_CAN_SPECULATE_INSN): New hook.
33707 * doc/tm.texi: Regenerate.
33708 * sched-rgn.c (can_schedule_ready_p): Use the new hook.
33709 * config/rs6000/rs6000.c (TARGET_SCHED_CAN_SPECULATE_INSN): New macro.
33710 (rs6000_sched_can_speculate_insn): New function.
33711
33712 2017-02-06 Jakub Jelinek <jakub@redhat.com>
33713
33714 PR tree-optimization/79284
33715 * tree-vectorizer.h (VECT_SCALAR_BOOLEAN_TYPE_P): Define.
33716 * tree-vect-stmts.c (vect_get_vec_def_for_operand,
33717 vectorizable_mask_load_store, vectorizable_operation,
33718 vect_is_simple_cond, get_same_sized_vectype): Use it instead
33719 of comparing TREE_CODE of a type against BOOLEAN_TYPE.
33720 * tree-vect-patterns.c (check_bool_pattern, search_type_for_mask_1,
33721 vect_recog_bool_pattern, vect_recog_mask_conversion_pattern): Likewise.
33722 * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
33723 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
33724 Remove redundant gimple_code (stmt) == GIMPLE_ASSIGN test after
33725 is_gimple_assign (stmt). Replace another such test with
33726 is_gimple_assign (stmt).
33727
33728 2017-02-06 Georg-Johann Lay <avr@gjlay.de>
33729
33730 PR target/78883
33731 * config/avr/avr.c (rtl-iter.h): Include it.
33732 (TARGET_LEGITIMATE_COMBINED_INSN): New hook define...
33733 (avr_legitimate_combined_insn): ...and implementation.
33734
33735 2017-02-06 Dominik Vogt <vogt@linux.vnet.ibm.com>
33736
33737 * config/s390/predicates.md ("larl_operand"): Use macros from hwint.h.
33738 * config/s390/s390.c (s390_const_operand_ok)
33739 (s390_canonicalize_comparison, s390_extract_part)
33740 (s390_single_part, s390_contiguous_bitmask_nowrap_p)
33741 (s390_contiguous_bitmask_p, s390_rtx_costs)
33742 (legitimize_pic_address): Likewise.
33743 * config/s390/s390.md ("clzdi2", "clztidi2"): Likewise.
33744 * config/s390/vx-builtins.md ("vec_genbytemaskv16qi")
33745 ("vec_permi<mode>", "vfae<mode>", "*vfaes<mode>", "vstrc<mode>")
33746 ("*vstrcs<mode>"): Use UINTVAL() to set unsigned HOST_WIDE_INT.
33747 * config/s390/vector.md ("vec_vfenes<mode>"): Likewise.
33748
33749 2017-02-06 Georg-Johann Lay <avr@gjlay.de>
33750
33751 * config/avr/avr.md (*addhi3_zero_extend): Add alternative where
33752 REGNO($0) == REGNO($1).
33753
33754 2017-02-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
33755
33756 * config/s390/linux.h(SIZE_TYPE): Add comment.
33757
33758 2017-02-06 Julian Brown <julian@codesourcery.com>
33759 Naveen H.S <Naveen.Hurugalawadi@cavium.com>
33760 Virendra Pathak <virendra.pathak@broadcom.com>
33761
33762 * config/aarch64/aarch64-cores.def: Change the scheduler
33763 to Thunderx2t99.
33764 * config/aarch64/aarch64.md: Include thunderx2t99.md.
33765 * config/aarch64/thunderx2t99.md: New file.
33766
33767 2017-02-05 Gerald Pfeifer <gerald@pfeifer.com>
33768
33769 * doc/standards.texi (Go Language): Update link to language
33770 standard.
33771
33772 2017-02-05 Jan Hubicka <hubicka@ucw.cz>
33773
33774 * tree-eh.c (lower_resx): Sanitize profile.
33775 (cleanup_empty_eh_move_lp): Likewise.
33776
33777 2017-02-05 Jan Hubicka <hubicka@ucw.cz>
33778
33779 PR tree-ssa/79347
33780 * cfgloopmanip.c (lv_adjust_loop_entry_edge, loop_version): Add
33781 ELSE_PROB.
33782 * cfgloopmanip.h (loop_version): Update prototype.
33783 * modulo-sched.c (sms_schedule): Update call of loop_version.
33784 * tree-if-conv.c(version_loop_for_if_conversion): Likewise.
33785 * tree-parloops.c (gen_parallel_loop): Likewise.
33786 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Likewise.
33787 * tree-ssa-loop-split.c (split_loop): Likewise.
33788 * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Likewise.
33789 * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
33790
33791 2017-02-05 Martin Liska <mliska@suse.cz>
33792
33793 PR bootstrap/78985
33794 * config/s390/s390.c (s390_gimplify_va_arg): Initialize local
33795 variable to NULL.
33796 (print_operand_address): Initialize a struct to zero.
33797
33798 2017-02-05 Gerald Pfeifer <gerald@pfeifer.com>
33799
33800 * doc/contrib.texi (Contributors): Refer to Hans Boehm's
33801 garbage collector only in textual form.
33802
33803 2017-02-05 Gerald Pfeifer <gerald@pfeifer.com>
33804
33805 * doc/extend.texi (x86 specific memory model extensions for
33806 transactional memory): Simplify a phrase.
33807
33808 2017-02-05 Eric Botcazou <ebotcazou@adacore.com>
33809
33810 PR target/79353
33811 * config/sparc/sync.md (atomic_loaddi_1): Replace 'U' constraint with
33812 'r', 'm' constraint with 'T' and !TARGET_ARCH64 with TARGET_ARCH32.
33813 (atomic_storedi_1): Likewise.
33814
33815 2017-02-04 Jakub Jelinek <jakub@redhat.com>
33816
33817 PR tree-optimization/79338
33818 * tree-parloops.c (gather_scalar_reductions): Don't call
33819 vect_analyze_loop_form for loop->inner before destroying loop's
33820 loop_vinfo.
33821
33822 2017-02-03 Martin Sebor <msebor@redhat.com>
33823
33824 PR tree-optimization/79327
33825 * gimple-ssa-sprintf.c (tree_digits): Avoid adding the base prefix
33826 when precision has resulted in leading zeros.
33827 (format_integer): Adjust the likely counter to assume an unknown
33828 argument that may be zero is non-zero.
33829
33830 2017-02-03 Jason Merrill <jason@redhat.com>
33831
33832 PR c++/78689
33833 * tree-inline.c (copy_tree_body_r) [COND_EXPR]: Revert change to
33834 avoid copying non-taken branch.
33835
33836 2017-02-03 Jakub Jelinek <jakub@redhat.com>
33837
33838 PR tree-optimization/79340
33839 * tree-vect-loop.c (vectorizable_reduction): Release
33840 vec_defs elements after safe_splicing them into other vectors.
33841 Formatting fixes.
33842
33843 PR tree-optimization/79327
33844 * gimple-ssa-sprintf.c (adjust_range_for_overflow): If returning
33845 true, always set *argmin and *argmax to TYPE_{MIN,MAX}_VALUE of
33846 dirtype.
33847 (format_integer): Use wide_int_to_tree instead of build_int_cst
33848 + to_?hwi. If argmin is NULL, just set argmin and argmax to
33849 TYPE_{MIN,MAX}_VALUE of argtype. Simplify and fix computation
33850 of shortest and longest sequence.
33851
33852 2017-02-03 Uros Bizjak <ubizjak@gmail.com>
33853
33854 * config/i386/i386.c (dimode_scalar_chain::convert_reg):
33855 Use pextrd for TARGET_SSE4_1 when creating scalar copy.
33856
33857 2017-02-03 Walter Lee <walt@tilera.com>
33858
33859 PR target/78862
33860 * config/tilegx/tilegx.md (tilegx_expand_prologue): Add blockage
33861 after initial stackframe link reg save.
33862 * config/tilepro/tilepro.md (tilepro_expand_prologue): Likewise.
33863
33864 2017-02-03 Jakub Jelinek <jakub@redhat.com>
33865
33866 PR target/79354
33867 * config/rs6000/rs6000.md (movsi_from_sf): Use wb constraint instead of
33868 wu for stxssp alternative.
33869
33870 2017-02-03 Martin Sebor <msebor@redhat.com>
33871
33872 PR tree-optimization/79352
33873 * gimple-fold.c (get_range_strlen): Add argument.
33874 (get_range_strlen): Change return type to bool.
33875 (get_maxval_strlen): Pass in a dummy argument.
33876 * gimple-fold.h (get_range_strlen): Change return type to bool.
33877 * gimple-ssa-sprintf.c (get_string_length): Set unlikely counter.
33878 * tree.h (array_at_struct_end_p): Add argument.
33879 * tree.c (array_at_struct_end_p): Handle it.
33880
33881 2017-02-03 Martin Liska <mliska@suse.cz>
33882
33883 PR lto/66295
33884 * multiple_target.c (create_dispatcher_calls): Redirect edge
33885 from a caller of a dispatcher.
33886 (expand_target_clones): Make the clones local.
33887 (ipa_target_clone): Do both target clones and resolvers.
33888 (ipa_dispatcher_calls): Remove the pass.
33889 (pass_dispatcher_calls::gate): Likewise.
33890 (make_pass_dispatcher_calls): Likewise.
33891 * passes.def (pass_target_clone): Put as very first IPA early
33892 pass.
33893
33894 2017-02-03 Martin Liska <mliska@suse.cz>
33895
33896 * symtab.c (symtab_node::binds_to_current_def_p): Bail out
33897 in case of a function with ifunc attribute.
33898
33899 2017-02-03 Martin Liska <mliska@suse.cz>
33900
33901 * cgraph.c (cgraph_node::dump): Dump function version info.
33902 * symtab.c (symtab_node::dump_base): Add missing new line.
33903
33904 2017-02-02 Jan Hubicka <hubicka@ucw.cz>
33905
33906 * tree-ssa-ifcombine.c (update_profile_after_ifcombine): New function.
33907 (ifcombine_ifandif): Use it.
33908
33909 2017-02-03 Martin Liska <mliska@suse.cz>
33910
33911 * doc/invoke.texi: Document default value for
33912 use-after-scope-direct-emission-threshold.
33913
33914 2017-02-03 Martin Liska <mliska@suse.cz>
33915
33916 PR tree-optimization/79339
33917 * gimple-ssa-sprintf.c (format_floating_max): Call mpfr_clear.
33918 (format_floating): Likewise.
33919
33920 2017-02-03 Martin Liska <mliska@suse.cz>
33921
33922 PR ipa/79337
33923 * ipa-prop.c (ipa_node_params_t::insert): Remove current
33924 implementation.
33925 (ipa_node_params_t::remove): Likewise.
33926 * ipa-prop.h (ipa_node_params::ipa_node_params): Make default
33927 initialization from removed ipa_node_params_t::insert.
33928 (ipa_node_params::~ipa_node_params): Move from removed
33929 ipa_node_params_t::release.
33930 * symbol-summary.h (symbol_summary::m_released): New member.
33931 Do not release a summary twice. Do not allow to call finalizer
33932 for types of a summary that live in GGC memory.
33933
33934 2017-02-02 Naveen H.S <Naveen.Hurugalawadi@cavium.com>
33935
33936 * config/aarch64/aarch64.c (thunderx2t99_tunings): Enable AES and
33937 cmp_branch fusion.
33938
33939 2017-02-02 Martin Sebor <msebor@redhat.com>
33940
33941 PR middle-end/79275
33942 * gimple-ssa-sprintf.c (get_string_length): Set lower bound to zero.
33943 (format_string): Tighten up the range of output for non-constant
33944 strings and correct the expected range for wide non-constant strings.
33945
33946 2017-02-02 Martin Sebor <msebor@redhat.com>
33947
33948 * doc/invoke.texi (-maccumulate-args): Fix bad grammar.
33949
33950 PR middle-end/32003
33951 * doc/invoke.texi (-fdump-tree-): Remove pass-specific options from
33952 index.
33953 (-fdump-tree-@var): Add to index and document how to come up
33954 with pass-specific option and dump file names.
33955 (-fdump-passes): Clarify where to look for output.
33956
33957 2017-02-02 Jan Hubicka <hubicka@ucw.cz>
33958
33959 PR middle-end/77445
33960 * tree-ssa-threadbackward.c (profitable_jump_thread_path): Dump
33961 statistics of the analyzed path; allow threading for speed when
33962 any of BBs along the path are optimized for speed.
33963
33964 2017-02-02 Eric Botcazou <ebotcazou@adacore.com>
33965
33966 PR middle-end/78468
33967 * emit-rtl.c (init_emit): Add ??? comment for problematic alignment
33968 settings of the virtual registers.
33969
33970 Revert again
33971 2016-08-23 Dominik Vogt <vogt@linux.vnet.ibm.com>
33972
33973 * explow.c (get_dynamic_stack_size): Take known alignment of stack
33974 pointer + STACK_DYNAMIC_OFFSET into account when calculating the size
33975 needed.
33976
33977 2017-02-02 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
33978
33979 * config/s390/vx-builtins.md ("vec_ceil", "vec_floor")
33980 ("vec_trunc", "vec_roundc", "vec_round"): Remove expanders.
33981
33982 2017-02-02 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
33983
33984 * config/s390/s390.md: Add missing comments with the expanded
33985 mnemonics.
33986 * config/s390/vector.md: Likewise.
33987 * config/s390/vx-builtins.md: Likewise.
33988
33989 2017-02-02 Jakub Jelinek <jakub@redhat.com>
33990
33991 PR target/79197
33992 * config/rs6000/rs6000.md (*fixuns_trunc<mode>di2_fctiduz): Rename to ...
33993 (fixuns_trunc<mode>di2): ... this, remove previous expander. Put all
33994 conditions on a single line.
33995
33996 2017-02-02 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
33997
33998 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
33999 __S390_VX__ to __VX__.
34000
34001 2017-02-01 Andrew Pinski <apinski@cavium.com>
34002
34003 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Pass
34004 stmt_info to record_stmt_cost.
34005 (vect_get_known_peeling_cost): Pass stmt_info if known to
34006 record_stmt_cost.
34007 * config/aarch64/aarch64-protos.h (cpu_vector_cost): Split
34008 cpu_vector_cost field into
34009 scalar_int_stmt_cost and scalar_fp_stmt_cost. Split vec_stmt_cost
34010 field into vec_int_stmt_cost and vec_fp_stmt_cost.
34011 * config/aarch64/aarch64.c (generic_vector_cost): Update for the
34012 splitting of scalar_stmt_cost and vec_stmt_cost.
34013 (thunderx_vector_cost): Likewise.
34014 (cortexa57_vector_cost): LIkewise.
34015 (exynosm1_vector_cost): Likewise.
34016 (xgene1_vector_cost): Likewise.
34017 (thunderx2t99_vector_cost): Improve after the splitting of the two
34018 fields.
34019 (aarch64_builtin_vectorization_cost): Update for the splitting of
34020 scalar_stmt_cost and vec_stmt_cost.
34021
34022 2017-02-01 Torvald Riegel <triegel@redhat.com>
34023 Richard Henderson <rth@redhat.com>
34024
34025 * builtins.c (fold_builtin_atomic_always_lock_free): Make "lock-free"
34026 conditional on existance of a fast atomic load.
34027 * optabs-query.c (can_atomic_load_p): New function.
34028 * optabs-query.h (can_atomic_load_p): Declare it.
34029 * optabs.c (expand_atomic_exchange): Always delegate to libatomic if
34030 no fast atomic load is available for the particular size of access.
34031 (expand_atomic_compare_and_swap): Likewise.
34032 (expand_atomic_load): Likewise.
34033 (expand_atomic_store): Likewise.
34034 (expand_atomic_fetch_op): Likewise.
34035 * testsuite/lib/target-supports.exp
34036 (check_effective_target_sync_int_128): Remove x86 because it provides
34037 no fast atomic load.
34038 (check_effective_target_sync_int_128_runtime): Likewise.
34039
34040 2017-02-01 Richard Biener <rguenther@suse.de>
34041
34042 * graphite.c: Include tree-vectorizer.h for find_loop_location.
34043 (graphite_transform_loops): Provide opt-info for optimized nests.
34044 * tree-parloop.c (parallelize_loops): Provide opt-info for
34045 parallelized loops.
34046
34047 2017-02-01 Richard Biener <rguenther@suse.de>
34048
34049 PR middle-end/79315
34050 * tree-cfg.c (move_stmt_op): Never set TREE_BLOCK when it
34051 was not set before.
34052
34053 2017-02-01 Richard Biener <rguenther@suse.de>
34054
34055 PR tree-optimization/71824
34056 * graphite-scop-detection.c (scop_detection::build_scop_breadth):
34057 Verify the loops are valid in the merged SESE region.
34058 (scop_detection::can_represent_loop_1): Check analyzing the
34059 evolution of the number of iterations in the region succeeds.
34060
34061 2017-01-31 Ian Lance Taylor <iant@golang.org>
34062
34063 * config/i386/i386.c (ix86_expand_split_stack_prologue): Add
34064 REG_ARGS_SIZE note to 32-bit push insns and call insn.
34065
34066 2017-01-31 David Malcolm <dmalcolm@redhat.com>
34067
34068 PR preprocessor/79210
34069 * input.c (get_substring_ranges_for_loc): Replace line_width
34070 assertion with error-handling.
34071
34072 2017-01-31 Richard Biener <rguenther@suse.de>
34073
34074 PR tree-optimization/77318
34075 * graphite-sese-to-poly.c (extract_affine): Fix assert.
34076 (create_pw_aff_from_tree): Take loop parameter.
34077 (add_condition_to_pbb): Pass loop of the condition to
34078 create_pw_aff_from_tree.
34079
34080 2017-01-31 Jakub Jelinek <jakub@redhat.com>
34081
34082 * config/s390/s390.c (s390_asan_shadow_offset): New function.
34083 (TARGET_ASAN_SHADOW_OFFSET): Redefine.
34084
34085 2017-01-31 Michael Meissner <meissner@linux.vnet.ibm.com>
34086
34087 PR target/78597
34088 PR target/79038
34089 * config/rs6000/rs6000-protos.h (convert_float128_to_int): Delete,
34090 no longer used.
34091 (convert_int_to_float128): Likewise.
34092 * config/rs6000/rs6000.c (convert_float128_to_int): Likewise.
34093 (convert_int_to_float128): Likewise.
34094 * config/rs6000/rs6000.md (UNSPEC_IEEE128_MOVE): Likewise.
34095 (UNSPEC_IEEE128_CONVERT): Likewise.
34096 (floatsi<mode>2, FLOAT128 iterator): Bypass calling
34097 rs6000_expand_float128_convert if we have IEEE 128-bit hardware.
34098 Use local variables for IBM extended format.
34099 (fix_trunc<mode>si2, FLOAT128 iterator): Likewise.
34100 (fix_trunc<mode>si2_fprs): Likewise.
34101 (fixuns_trunc<IEEE128:mode><SDI:mode>2): Likewise.
34102 (floatuns<IEEE128:mode>2, IEEE128 iterator): Likewise.
34103 (fix<uns>_<mode>si2_hw): Rework the IEEE 128-bt hardware support
34104 to know that we can now have integers of all sizes in vector
34105 registers.
34106 (fix<uns>_<mode>di2_hw): Likewise.
34107 (float<uns>_<mode>si2_hw): Likewise.
34108 (fix_<mode>si2_hw): Likewise.
34109 (fixuns_<mode>si2_hw): Likewise.
34110 (float<uns>_<mode>di2_hw): Likewise.
34111 (float_<mode>di2_hw): Likewise.
34112 (float_<mode>si2_hw): Likewise.
34113 (floatuns_<mode>di2_hw): Likewise.
34114 (floatuns_<mode>si2_hw): Likewise.
34115 (xscvqp<su>wz_<mode>): Delete, no longer used.
34116 (xscvqp<su>dz_<mode>): Likewise.
34117 (xscv<su>dqp_<mode>): Likewise.
34118 (ieee128_mfvsrd_64bit): Likewise.
34119 (ieee128_mfvsrd_32bit): Likewise.
34120 (ieee128_mfvsrwz): Likewise.
34121 (ieee128_mtvsrw): Likewise.
34122 (ieee128_mtvsrd_64bit): Likewise.
34123 (ieee128_mtvsrd_32bit): Likewise.
34124
34125 2017-01-31 Martin Liska <mliska@suse.cz>
34126
34127 PR ipa/79285
34128 * ipa-prop.c (ipa_free_all_node_params): Call release method
34129 instead of ~sumbol_summary to not to trigger double times
34130 dtor of hash_map.
34131
34132 2017-01-31 Aldy Hernandez <aldyh@redhat.com>
34133
34134 PR tree-optimization/71691
34135 * bitmap.h (class auto_bitmap): New.
34136 * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Call
34137 is_maybe_undefined instead of ssa_undefined_value_p.
34138
34139 2017-01-31 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
34140
34141 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
34142 __S390_ARCH_LEVEL__ to __ARCH__.
34143
34144 2017-01-31 Jakub Jelinek <jakub@redhat.com>
34145
34146 PR tree-optimization/79267
34147 * value-prof.c (gimple_ic): Only drop lhs for noreturn calls
34148 if should_remove_lhs_p is true.
34149
34150 2017-01-30 Alexandre Oliva <aoliva@redhat.com>
34151
34152 PR debug/63238
34153 * dwarf2out.c (clone_as_declaration): Drop DW_AT_alignment.
34154 (add_alignment_attribute): New.
34155 (base_type_die): Add alignment attribute.
34156 (subrange_type_die): Likewise.
34157 (modified_type_die): Likewise.
34158 (gen_array_type_die): Likewise.
34159 (gen_descr_array_type_die: Likewise.
34160 (gen_enumeration_type_die): Likewise.
34161 (gen_subprogram_die): Likewise.
34162 (gen_variable_die): Likewise.
34163 (gen_field_die): Likewise.
34164 (gen_ptr_to_mbr_type_die): Likewise.
34165 (gen_struct_or_union_type_die): Likewise.
34166 (gen_subroutine_type_die): Likewise.
34167 (gen_typedef_die): Likewise.
34168 (base_type_cmp): Compare alignment attribute.
34169
34170 2017-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
34171
34172 PR target/79170
34173 * config/rs6000/altivec.md (*setb_internal): Rename to setb_signed.
34174 (setb_unsigned) New pattern for setb with CCUNS.
34175 * config/rs6000/rs6000.c (expand_block_compare): Use a different
34176 subfc./subfe sequence to avoid overflow problems. Generate a
34177 shorter sequence with cmpld/setb for power9.
34178 * config/rs6000/rs6000.md (subf<mode>3_carry_dot2): Add a new pattern
34179 for generating subfc. instruction.
34180 (cmpstrsi): Add TARGET_POPCNTD predicate as the generate sequence
34181 now uses this instruction.
34182
34183 2017-01-30 Ian Lance Taylor <iant@google.com>
34184
34185 PR debug/79289
34186 * dwarf2out.c (gen_type_die_with_usage): When picking a variant
34187 for FUNCTION_TYPE/METHOD_TYPE, use the first matching one.
34188
34189 2017-01-30 Martin Sebor <msebor@redhat.com>
34190
34191 * gimple-ssa-sprintf.c (fmtresult::adjust_for_width_or_precision):
34192 Move constant to the right of a relational operator.
34193 (get_mpfr_format_length, format_character, format_string): Ditto.
34194 (should_warn_p, maybe_warn): Same.
34195
34196 * doc/invoke.texi (-Wformat-truncation=1): Fix typo.
34197
34198 2017-01-30 Maxim Ostapenko <m.ostapenko@samsung.com>
34199
34200 PR lto/79061
34201 * asan.c (get_translation_unit_decl): Remove function.
34202 (asan_add_global): Force has_dynamic_init to zero in LTO mode.
34203
34204 2017-01-30 Martin Liska <mliska@suse.cz>
34205
34206 PR gcov-profile/79259
34207 * opts.c (common_handle_option): Enable flag_ipa_bit_cp w/
34208 -fprofile-generate.
34209
34210 2017-01-30 Martin Liska <mliska@suse.cz>
34211
34212 PR bootstrap/78985
34213 * config/aarch64/cortex-a57-fma-steering.c (func_fma_steering::analyze):
34214 Initialize variables with NULL value.
34215
34216 2017-01-30 Richard Earnshaw <rearnsh@arm.com>
34217
34218 PR target/79260
34219 * config.gcc (arm*-*-*): Add arm/arm-flags.h and arm/arm-isa.h to
34220 tm_p_file.
34221 * arm/arm-protos.h: Don't directly include arm-flags.h and arm-isa.h.
34222
34223 2017-01-30 Richard Biener <rguenther@suse.de>
34224
34225 PR tree-optimization/79276
34226 * tree-vrp.c (process_assert_insertions): Properly adjust common
34227 when removing a duplicate.
34228
34229 2017-01-30 Richard Biener <rguenther@suse.de>
34230
34231 PR tree-optimization/79256
34232 * targhooks.c (default_builtin_vector_alignment_reachable): Honor
34233 BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
34234 alignment on TYPE.
34235 * tree.c (build_aligned_type): Set TYPE_USER_ALIGN.
34236
34237 2017-01-30 Dominik Vogt <vogt@linux.vnet.ibm.com>
34238
34239 PR target/79240
34240 * config/s390/s390.md ("*r<noxa>sbg_<mode>_srl_bitmask")
34241 ("*r<noxa>sbg_<mode>_sll_bitmask")
34242 ("*extzv_<mode>_srl<clobbercc_or_nocc>")
34243 ("*extzv_<mode>_sll<clobbercc_or_nocc>"):
34244 Use contiguous_bitmask_nowrap_operand.
34245
34246 2017-01-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
34247
34248 PR target/79268
34249 * config/rs6000/altivec.h (vec_xl): Revise #define.
34250 (vec_xst): Likewise.
34251
34252 2017-01-27 Uros Bizjak <ubizjak@gmail.com>
34253
34254 * config/i386/i386.c (print_reg): Use REGNO instead of true_regnum.
34255
34256 2017-01-27 Bernd Schmidt <bschmidt@redhat.com>
34257
34258 PR rtl-optimization/79194
34259 * cprop.c (one_cprop_pass): Move deletion of code after unconditional
34260 traps before call to bypass_conditional_jumps.
34261
34262 2017-01-27 Vladimir Makarov <vmakarov@redhat.com>
34263
34264 PR tree-optimization/71374
34265 * lra-constraints.c (check_conflict_input_operands): New.
34266 (match_reload): Use it.
34267
34268 2017-01-27 Vladimir Makarov <vmakarov@redhat.com>
34269
34270 PR target/79131
34271 * lra-assigns.c (find_hard_regno_for_1): Take endianess for into
34272 account to calculate conflict_set.
34273
34274 2017-01-27 Bin Cheng <bin.cheng@arm.com>
34275
34276 PR rtl-optimization/78559
34277 * combine.c (try_combine): Discard REG_EQUAL and REG_EQUIV for
34278 other_insn in combine.
34279
34280 2017-01-27 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
34281
34282 * builtin-types.def: Use unsigned_char_type_node for BT_UINT8. Use
34283 uint16_type_node for BT_UINT16.
34284
34285 2017-01-27 David Malcolm <dmalcolm@redhat.com>
34286
34287 * doc/sourcebuild.texi (Testsuites): Add "GIMPLE Tests" and
34288 "RTL Tests" to menu.
34289 (GIMPLE Tests): New node.
34290 (RTL Tests): New node.
34291
34292 2017-01-27 Richard Biener <rguenther@suse.de>
34293
34294 PR tree-optimization/79245
34295 * tree-loop-distribution.c (distribute_loop): Apply cost
34296 modeling also to detected patterns.
34297
34298 2017-01-27 Richard Biener <rguenther@suse.de>
34299
34300 PR tree-optimization/71433
34301 * tree-vrp.c (register_new_assert_for): Revert earlier changes.
34302 (compare_assert_loc): New function.
34303 (process_assert_insertions): Sort and optimize assert locations
34304 to remove duplicates and push down identical assertions on
34305 edges to their destination block.
34306
34307 2017-01-27 Richard Biener <rguenther@suse.de>
34308
34309 PR tree-optimization/79244
34310 * tree-vrp.c (remove_range_assertions): Forcefully propagate
34311 out SSA names even if abnormal.
34312
34313 2017-01-27 Jakub Jelinek <jakub@redhat.com>
34314
34315 * realmpfr.h: Poison MPFR_RND{N,Z,U,D}.
34316 * gimple-ssa-sprintf.c (format_floating_max): Use GMP_RNDN
34317 instead of MPFR_RNDN.
34318
34319 2017-01-27 Richard Earnshaw <rearnsha@arm.com>
34320
34321 PR target/79239
34322 * arm.c (arm_option_override): Don't call build_target_option_node
34323 until after doing all option overrides.
34324 (arm_valid_target_attribute_tree): Likewise.
34325
34326 2017-01-27 Martin Liska <mliska@suse.cz>
34327
34328 * doc/invoke.texi (-fprofile-arcs): Document profiling support
34329 for {cd}tors and C++ {cd}tors.
34330
34331 2017-01-27 Dominik Vogt <vogt@linux.vnet.ibm.com>
34332
34333 * config/s390/s390.md ("*setmem_long_and")
34334 ("*setmem_long_and_31z"): Use zero_extend instead of and.
34335
34336 2017-01-26 Martin Sebor <msebor@redhat.com>
34337
34338 * gimple-ssa-sprintf.c (format_floating): Simplify the computation
34339 of precision.
34340
34341 2017-01-26 Martin Sebor <msebor@redhat.com>
34342
34343 * gimple-ssa-sprintf.c (format_floating): Test HAVE_XFmode and
34344 HAVE_DFmode before using XFmode or DFmode.
34345 (parse_directive): Avoid using the z length modifier to avoid
34346 the ISO C++98 does not support the ‘z’ gnu_printf length modifier.
34347
34348 PR middle-end/78703
34349 * gimple-ssa-sprintf.c (adjust_for_width_or_precision): Change
34350 to accept adjustment as an array.
34351 (get_int_range): New function.
34352 (struct directive): Make width and prec arrays.
34353 (directive::set_width, directive::set_precision): Call get_int_range.
34354 (format_integer, format_floating): Handle width and precision ranges.
34355 (format_string, parse_directive): Same.
34356
34357 2017-01-26 Jakub Jelinek <jakub@redhat.com>
34358
34359 PR debug/79129
34360 * dwarf2out.c (generate_skeleton_bottom_up): For children with
34361 comdat_type_p set, just clone them, but keep the children in the
34362 original DIE.
34363
34364 PR debug/78835
34365 * dwarf2out.c (prune_unused_types): Mark all functions with DIEs
34366 which have direct callers with -fvar-tracking-assignments enabled
34367 in the current TU.
34368 (resolve_addr): Avoid adding skeleton DIEs for DW_AT_call_origin
34369 inside of type units.
34370
34371 2017-01-26 Martin Sebor <msebor@redhat.com>
34372
34373 PR middle-end/78703
34374 * gimple-ssa-sprintf.c (struct result_range): Add likely and
34375 unlikely counters.
34376 (struct format_result): Replace number_chars, number_chars_min,
34377 and number_chars_max with a single member of struct result_range.
34378 Remove bounded.
34379 (format_result::operator+=): Adjust.
34380 (struct fmtresult): Remove bounded. Handle likely and unlikely
34381 counters.
34382 (fmtresult::adjust_for_width_or_precision): New function.
34383 (fmtresult:type_max_digits): New function.
34384 (bytes_remaining): Handle likely and unlikely counters.
34385 (min_bytes_remaining): Remove.
34386 (format_percent): Simplify.
34387 (format_integer, format_floating): Set likely and unlikely counters.
34388 (get_string_length, format_character, format_string): Same.
34389 (format_plain, should_warn_p): New function.
34390 (maybe_warn): Call should_warn_p. Update diagnostic messages
34391 and handle those for all directives, including plain strings.
34392 (format_directive): Handle likely and unlikely counters.
34393 Remove unnecessary quoting from diagnostics. Add an informational
34394 note.
34395 (add_bytes): Remove.
34396 (pass_sprintf_length::compute_format_length): Simplify.
34397 (try_substitute_return_value): Handle likely and unlikely counters.
34398
34399 2017-01-26 Carl Love <cel@us.ibm.com>
34400
34401 * config/rs6000/rs6000-c (altivec_overloaded_builtins): Remove
34402 bogus entries for the P8V_BUILTIN_VEC_VGBBD built-ins
34403
34404 2017-01-26 Vladimir Makarov <vmakarov@redhat.com>
34405
34406 PR target/79131
34407 * lra-assigns.c (setup_live_pseudos_and_spill_after_risky): Take
34408 endianess for subregs into account.
34409 * lra-constraints.c (lra_constraints): Do risky transformations
34410 always on the first iteration.
34411 * lra-lives.c (check_pseudos_live_through_calls): Add arg
34412 last_call_used_reg_set.
34413 (process_bb_lives): Define and use last_call_used_reg_set.
34414 * lra.c (lra): Always continue after lra_constraints on the first
34415 iteration.
34416
34417 2017-01-26 Kirill Yukhin <kirill.yukhin@gmail.com>
34418
34419 * gcc.target/i386/avx512bw-kshiftlq-2.c: Use unsigned long long
34420 constant.
34421 * gcc.target/i386/avx512bw-kshiftrq-2.c: Ditto.
34422
34423 2017-01-26 Jakub Jelinek <jakub@redhat.com>
34424
34425 * config/i386/avx512fintrin.h (_ktest_mask16_u8,
34426 _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): Move to ...
34427 * config/i386/avx512dqintrin.h (_ktest_mask16_u8,
34428 _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): ... here.
34429 * config/i386/i386-builtin.def (__builtin_ia32_ktestchi,
34430 __builtin_ia32_ktestzhi, __builtin_ia32_kaddhi): Use
34431 OPTION_MASK_ISA_AVX512DQ instead of OPTION_MASK_ISA_AVX512F.
34432 * config/i386/sse.md (SWI1248_AVX512BWDQ2): New mode iterator.
34433 (kadd<mode>, ktest<mode>): Use it instead of SWI1248_AVX512BWDQ.
34434
34435 2017-01-26 Marek Polacek <polacek@redhat.com>
34436
34437 PR c/79199
34438 * fold-const.c (operand_equal_p) [COND_EXPR]: Use OP_SAME_WITH_NULL
34439 for the third operand.
34440
34441 2017-01-26 Jakub Jelinek <jakub@redhat.com>
34442
34443 PR middle-end/79236
34444 * omp-low.c (struct omp_context): Add simt_stmt field.
34445 (scan_omp_for): Return omp_context *.
34446 (scan_omp_simd): Set simt_stmt on the non-_simt_ SIMD
34447 context to the _simt_ SIMD stmt.
34448 (lower_omp_for): For combined SIMD with sibling _simt_
34449 SIMD, make sure to use the same decls in _looptemp_
34450 clauses as in the sibling.
34451
34452 2017-01-26 David Sherwood <david.sherwood@arm.com>
34453
34454 PR middle-end/79212
34455 * gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
34456 all contexts.
34457
34458 2017-01-26 Jakub Jelinek <jakub@redhat.com>
34459
34460 PR target/70465
34461 * reg-stack.c (emit_swap_insn): Instead of fld a; fld b; fxchg %st(1);
34462 emit fld b; fld a; if possible.
34463
34464 * brig-builtins.def: Update copyright years.
34465 * config/arm/arm_acle_builtins.def: Update copyright years.
34466
34467 2017-01-25 Michael Meissner <meissner@linux.vnet.ibm.com>
34468
34469 PR target/79179
34470 * config/rs6000/vsx.md (vsx_extract_<mode>_store): Use wY
34471 constraint instead of o for the stxsd instruction.
34472
34473 2017-01-25 Carl Love <cel@us.ibm.com>
34474
34475 * config/rs6000/rs6000-c (altivec_overloaded_builtins): Fix order
34476 of entries for ALTIVEC_BUILTIN_VEC_PACKS and P8V_BUILTIN_VEC_VGBBD.
34477
34478 2017-01-25 Jonathan Wakely <jwakely@redhat.com>
34479
34480 * doc/invoke.texi (C++ Dialect Options): Fix typo.
34481
34482 2017-01-25 Richard Biener <rguenther@suse.de>
34483
34484 PR tree-optimization/69264
34485 * target.def (vector_alignment_reachable): Improve documentation.
34486 * doc/tm.texi: Regenerate.
34487 * targhooks.c (default_builtin_vector_alignment_reachable): Simplify
34488 and add a comment.
34489 * tree-vect-data-refs.c (vect_supportable_dr_alignment): Revert
34490 earlier changes with respect to TYPE_USER_ALIGN.
34491 (vector_alignment_reachable_p): Likewise. Improve dumping.
34492
34493 2016-01-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
34494
34495 PR target/79145
34496 * config/arm/arm.md (xordi3): Force constant operand into a register
34497 for TARGET_IWMMXT.
34498
34499 2016-01-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
34500
34501 * doc/invoke.texi (-fstore-merging): Correct default optimization
34502 levels at which it is enabled.
34503 (-O): Move -fstore-merging from list to...
34504 (-O2): ... Here.
34505
34506 2017-01-25 Richard Biener <rguenther@suse.de>
34507
34508 PR debug/78363
34509 * omp-expand.c: Include debug.h.
34510 (expand_omp_taskreg): Make sure to generate early debug before
34511 outlining anything from a function.
34512 (expand_omp_target): Likewise.
34513 (grid_expand_target_grid_body): Likewise.
34514
34515 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
34516
34517 PR lto/79061
34518 * asan.c (get_translation_unit_decl): New function.
34519 (asan_add_global): Extract modules file name from globals
34520 TRANSLATION_UNIT_DECL name.
34521
34522 2017-01-24 Eric Botcazou <ebotcazou@adacore.com>
34523
34524 PR target/77439
34525 * config/arm/arm.c (arm_function_ok_for_sibcall): Add back restriction
34526 for long calls with APCS frame and VFP.
34527
34528 2017-01-24 David Malcolm <dmalcolm@redhat.com>
34529
34530 * cfg.c (original_copy_tables_initialized_p): New function.
34531 * cfg.h (original_copy_tables_initialized_p): New decl.
34532 * cfgrtl.c (relink_block_chain): Guard the call to
34533 free_original_copy_tables with a call to
34534 original_copy_tables_initialized_p.
34535 * cgraph.h (symtab_node::native_rtl_p): New decl.
34536 * cgraphunit.c (symtab_node::native_rtl_p): New function.
34537 (symtab_node::needed_p): Don't assert for early assembly output
34538 for __RTL functions.
34539 (cgraph_node::finalize_function): Set "force_output" for __RTL
34540 functions.
34541 (cgraph_node::analyze): Bail out early for __RTL functions.
34542 (analyze_functions): Update assertion to support __RTL functions.
34543 (cgraph_node::expand): Bail out early for __RTL functions.
34544 * final.c (rest_of_clean_state): Don't call delete_tree_ssa for
34545 __RTL functions.
34546 * function.h (struct function): Update comment for field
34547 "pass_startwith".
34548 * gimple-expr.c: Include "tree-pass.h".
34549 (gimple_has_body_p): Return false for __RTL functions.
34550 * Makefile.in (OBJS): Add run-rtl-passes.o.
34551 * pass_manager.h (gcc::pass_manager::get_rest_of_compilation): New
34552 accessor.
34553 (gcc::pass_manager::get_clean_slate): New accessor.
34554 * passes.c: Include "insn-addr.h".
34555 (should_skip_pass_p): Add logging. Update logic for running
34556 "expand" to be compatible with both __GIMPLE and __RTL. Guard
34557 property-provider override so it is only done for gimple passes.
34558 Don't skip dfinit.
34559 (skip_pass): New function.
34560 (execute_one_pass): Call skip_pass when skipping passes.
34561 * read-md.c (md_reader::read_char): Support filtering
34562 the input to a subset of line numbers.
34563 (md_reader::md_reader): Initialize fields
34564 m_first_line and m_last_line.
34565 (md_reader::read_file_fragment): New function.
34566 * read-md.h (md_reader::read_file_fragment): New decl.
34567 (md_reader::m_first_line): New field.
34568 (md_reader::m_last_line): New field.
34569 * read-rtl-function.c (function_reader::create_function): Only
34570 create cfun if it doesn't already exist. Set PROP_rtl on cfun's
34571 curr_properties. Set DECL_INITIAL to a dummy block.
34572 (read_rtl_function_body_from_file_range): New function.
34573 * read-rtl-function.h (read_rtl_function_body_from_file_range):
34574 New decl.
34575 * run-rtl-passes.c: New file.
34576 * run-rtl-passes.h: New file.
34577
34578 2017-01-24 Jeff Law <law@redhat.com>
34579
34580 * config/microblaze/microblaze.h (ASM_FORMAT_PRIVATE_NAME): Increase
34581 buffer size.
34582
34583 2017-01-24 Bin Cheng <bin.cheng@arm.com>
34584
34585 PR tree-optimization/79159
34586 * tree-ssa-loop-niter.c (get_cst_init_from_scev): New function.
34587 (record_nonwrapping_iv): Improve boundary using above function if no
34588 value range information.
34589
34590 2017-01-24 Pekka Jääskeläinen <pekka@parmance.com>
34591 Martin Jambor <mjambor@suse.cz>
34592
34593 * brig-builtins.def: New file.
34594 * builtins.def (DEF_HSAIL_BUILTIN): New macro.
34595 (DEF_HSAIL_ATOMIC_BUILTIN): Likewise.
34596 (DEF_HSAIL_SAT_BUILTIN): Likewise.
34597 (DEF_HSAIL_INTR_BUILTIN): Likewise.
34598 (DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise.
34599 * builtin-types.def (BT_INT8): New.
34600 (BT_INT16): Likewise.
34601 (BT_UINT8): Likewise.
34602 (BT_UINT16): Likewise.
34603 (BT_FN_ULONG): Likewise.
34604 (BT_FN_UINT_INT): Likewise.
34605 (BT_FN_UINT_ULONG): Likewise.
34606 (BT_FN_UINT_LONG): Likewise.
34607 (BT_FN_UINT_PTR): Likewise.
34608 (BT_FN_ULONG_PTR): Likewise.
34609 (BT_FN_INT8_FLOAT): Likewise.
34610 (BT_FN_INT16_FLOAT): Likewise.
34611 (BT_FN_UINT32_FLOAT): Likewise.
34612 (BT_FN_UINT16_FLOAT): Likewise.
34613 (BT_FN_UINT8_FLOAT): Likewise.
34614 (BT_FN_UINT64_FLOAT): Likewise.
34615 (BT_FN_UINT16_UINT32): Likewise.
34616 (BT_FN_UINT32_UINT16): Likewise.
34617 (BT_FN_UINT16_UINT16_UINT16): Likewise.
34618 (BT_FN_INT_PTR_INT): Likewise.
34619 (BT_FN_UINT_PTR_UINT): Likewise.
34620 (BT_FN_LONG_PTR_LONG): Likewise.
34621 (BT_FN_ULONG_PTR_ULONG): Likewise.
34622 (BT_FN_VOID_UINT64_UINT64): Likewise.
34623 (BT_FN_UINT8_UINT8_UINT8): Likewise.
34624 (BT_FN_INT8_INT8_INT8): Likewise.
34625 (BT_FN_INT16_INT16_INT16): Likewise.
34626 (BT_FN_INT_INT_INT): Likewise.
34627 (BT_FN_UINT_FLOAT_UINT): Likewise.
34628 (BT_FN_FLOAT_UINT_UINT): Likewise.
34629 (BT_FN_ULONG_UINT_UINT): Likewise.
34630 (BT_FN_ULONG_UINT_PTR): Likewise.
34631 (BT_FN_ULONG_ULONG_ULONG): Likewise.
34632 (BT_FN_UINT_UINT_UINT): Likewise.
34633 (BT_FN_VOID_UINT_PTR): Likewise.
34634 (BT_FN_UINT_UINT_PTR: Likewise.
34635 (BT_FN_UINT32_UINT64_PTR): Likewise.
34636 (BT_FN_INT_INT_UINT_UINT): Likewise.
34637 (BT_FN_UINT_UINT_UINT_UINT): Likewise.
34638 (BT_FN_UINT_UINT_UINT_PTR): Likewise.
34639 (BT_FN_UINT_ULONG_ULONG_UINT): Likewise.
34640 (BT_FN_ULONG_ULONG_ULONG_ULONG): Likewise.
34641 (BT_FN_LONG_LONG_UINT_UINT): Likewise.
34642 (BT_FN_ULONG_ULONG_UINT_UINT): Likewise.
34643 (BT_FN_VOID_UINT32_UINT64_PTR): Likewise.
34644 (BT_FN_VOID_UINT32_UINT32_PTR): Likewise.
34645 (BT_FN_UINT_UINT_UINT_UINT_UINT): Likewise.
34646 (BT_FN_UINT_FLOAT_FLOAT_FLOAT_FLOAT): Likewise.
34647 (BT_FN_ULONG_ULONG_ULONG_UINT_UINT): Likewise.
34648 * doc/frontends.texi: List BRIG FE.
34649 * doc/install.texi (Testing): Add BRIG tesring requirements.
34650 * doc/invoke.texi (Overall Options): Mention BRIG.
34651 * doc/standards.texi (Standards): Doucment BRIG HSA version.
34652
34653 2017-01-24 Richard Biener <rguenther@suse.de>
34654
34655 PR translation/79208
34656 * ipa-devirt.c (odr_types_equivalent_p): Fix typo in diagnostic.
34657
34658 2017-01-24 Martin Jambor <mjambor@suse.cz>
34659
34660 PR bootstrap/79198
34661 * ipa-prop.c (ipa_free_all_node_params): Call summary destructor.
34662 * ipa-prop.c (ipa_node_params_t::insert): Initialize fields known_csts
34663 and known_contexts.
34664
34665 2017-01-24 Aldy Hernandez <aldyh@redhat.com>
34666
34667 PR middle-end/79123
34668 * gimple-ssa-warn-alloca.c (alloca_call_type): Make sure
34669 casts from signed to unsigned really don't have a range.
34670
34671 2017-01-24 Markus Trippelsdorf <markus@trippelsdorf.de>
34672
34673 * gimple-ssa-sprintf.c (format_floating): Change MPFR_RNDx to
34674 GMP_RNDx for compatiblity.
34675
34676 2017-01-24 Martin Liska <mliska@suse.cz>
34677
34678 PR bootstrap/79132
34679 * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Insert assert
34680 that would prevent us to call alloca with -1 as argument.
34681
34682 2017-01-24 Jakub Jelinek <jakub@redhat.com>
34683
34684 * dwarf2out.c (output_compilation_unit_header, output_file_names):
34685 Avoid -Wformat-security warning.
34686
34687 2017-01-23 Andrew Pinski <apinski@cavium.com>
34688
34689 * config/aarch64/aarch64.c (thunderx2t99_addrcost_table): Improve
34690 cost table.
34691
34692 2017-01-23 Martin Sebor <msebor@redhat.com>
34693
34694 PR middle-end/78703
34695 * gimple-ssa-sprintf.c (warn_level): New global.
34696 (format_integer): Use it here and throughout the rest of the file.
34697 Use the same switch to compute sign as base.
34698 (maybe_warn): New function.
34699 (format_directive): Factor out warnings into maybe_warn.
34700 Add debugging output. Use warn_level.
34701 (add_bytes): Use warn_level.
34702 (pass_sprintf_length::compute_format_length): Add debugging output.
34703 (try_substitute_return_value): Same.
34704 (pass_sprintf_length::handle_gimple_call): Set and use warn_level.
34705
34706 PR middle-end/78703
34707 * gimple-ssa-sprintf.c (struct format_result): Remove constant member.
34708 (struct fmtresult, format_integer, format_floating): Adjust.
34709 (fmtresult::fmtresult): Set max correctly in two argument ctor.
34710 (get_string_length, format_string,format_directive): Same.
34711 (pass_sprintf_length::compute_format_length): Same.
34712 (try_substitute_return_value): Simplify slightly.
34713
34714 PR middle-end/78703
34715 * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust formatting.
34716 (fmtresult::operator+=): Outlined.
34717 (struct fmtresult): Add ctors.
34718 (struct conversion_spec): Rename...
34719 (struct directive): ...to this. Add and remove data members.
34720 (directive::set_width, directive::set_precision): New functions.
34721 (format_percent): Use fmtresult ctor.
34722 (get_width_and_precision): Remove.
34723 (format_integer): Make naming changes. Avoid computing width and
34724 precision.
34725 (format_floating): Same. Adjust indentation.
34726 (format_character, format_none): New functions.
34727 (format_string): Moved character handling to format_character.
34728 (format_directive): Remove arguments, change return type.
34729 (parse_directive): New function.
34730 (pass_sprintf_length::compute_format_length): Move directive
34731 parsing to parse_directive.
34732
34733 2017-01-23 Jakub Jelinek <jakub@redhat.com>
34734
34735 * tree.h (assign_assembler_name_if_neeeded): Rename to ...
34736 (assign_assembler_name_if_needed): ... this.
34737 * tree.c (assign_assembler_name_if_neeeded): Rename to ...
34738 (assign_assembler_name_if_needed): ... this.
34739 (free_lang_data_in_cgraph): Adjust callers.
34740 * cgraphunit.c (cgraph_node::analyze): Likewise.
34741 * omp-expand.c (expand_omp_taskreg, expand_omp_target):
34742 Likewise.
34743
34744 2017-01-23 Richard Biener <rguenther@suse.de>
34745
34746 PR tree-optimization/79088
34747 PR tree-optimization/79188
34748 * tree-ssa-threadupdate.c (mark_threaded_blocks): Move code
34749 resetting loop bounds after last path deletion. Reset loop
34750 bounds of the target loop, make code match the comments.
34751 * tree-ssa-threadbackwards.c (pass_early_thread_jumps::execute):
34752 Make sure loops need no fixups.
34753
34754 2017-01-23 Kelvin Nilsen <kelvin@gcc.gnu.org>
34755
34756 * config/rs6000/rs6000-builtin.def (VSIEDPF): Add scalar insert
34757 exponent support with double type for first argument.
34758 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Changed
34759 type returned by __builtin_vec_extract_sig,
34760 __builtin_vec_extract_sig_sp, and __builtin_vec_extract_sig_dp
34761 functions from "vector int" to "vector unsigned int" or from
34762 "vector long long int" to "vector unsigned long long int".
34763 Changed type returned by __builtin_vec_extract_exp,
34764 __builtin_vec_extract_exp_sp, and __builtin_vec_extract_exp_dp
34765 functions from "vector int" to "vector unsigned int" or from
34766 "vector long long int" to "vector unsigned long long int".
34767 Changed return type of __builtin_vec_test_data_class,
34768 __builtin_vec_test_data_class_sp, and
34769 __builtin_vec_test_data_class_dp from "vector int" to
34770 "vector bool int" or from "vector long long int" to "vector bool
34771 long long int" and changed second argument type from "unsigned
34772 int" to "int". Added new overloaded function forms "vector float
34773 __builtin_vec_insert_exp (vector float, vector unsigned int)" and
34774 "vector float __builtin_vec_insert_exp_sp (vector float, vector
34775 unsigned int)" and "vector double __builtin_vec_insert_exp (vector
34776 double, vector unsigned long long int)" and "vector double
34777 __builtin_vec_insert_exp_dp (vector double, vector unsigned long
34778 long int)". Changed return type of
34779 __builtin_scalar_test_data_class and
34780 __builtin_scalar_test_data_class_sp and
34781 __builtin_scalar_test_data_class_dp from "unsigned int" to "bool
34782 int" and changed second argument from "unsigned int" to "int".
34783 Changed type returned by __builtin_scalar_test_neg,
34784 __builtin_scalar_test_neg_sp, and __builtin_scalar_test_neg_dp
34785 from "int" to "bool int". Added new overloaded function form
34786 "double __builtin_scalar_insert_exp (double, unsigned long long int)".
34787 * config/rs6000/vsx.md (xsiexpdpf): New insn for scalar insert
34788 exponent double-precision with floating point first argument.
34789 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
34790 documentation of scalar_test_data_class, scalar_test_neg,
34791 scalar_extract_sig, scalar_extract_exp, scalar_insert_exp,
34792 vector_extract_exp, vec_extract_sig, vec_insert_exp, and
34793 vec_test_data_class built-in functions to reflect refinements in
34794 their type signatures.
34795
34796 2017-01-23 Andreas Tobler <andreast@gcc.gnu.org>
34797
34798 * config/aarch64/aarch64.c (aarch64_elf_asm_constructor): Increase
34799 size of buf.
34800 (aarch64_elf_asm_destructor): Likewise.
34801
34802 2017-01-23 Bernd Schmidt <bschmidt@redhat.com>
34803
34804 PR rtl-optimization/78634
34805 * config/i386/i386.c (ix86_max_noce_ifcvt_seq_cost): New function.
34806 (TARGET_MAX_NOCE_IFCVT_SEQ_COST): Define.
34807 * ifcvt.c (noce_try_cmove): Add missing cost check.
34808
34809 PR rtl-optimization/71724
34810 * combine.c (if_then_else_cond): Look for situations where it is
34811 beneficial to undo the work of one of the recursive calls.
34812
34813 2017-01-23 Bin Cheng <bin.cheng@arm.com>
34814
34815 PR tree-optimization/70754
34816 * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
34817 (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE. Insert
34818 combined stmt before it if not NULL.
34819 (combine_chains): Process refs reversely and compute dominance point
34820 for root ref.
34821
34822 2017-01-23 Martin Liska <mliska@suse.cz>
34823
34824 PR tree-optimization/79196
34825 * tree-ssa-strlen.c (fold_strstr_to_memcmp): Rename to ...
34826 (fold_strstr_to_strncmp): ... this. Fold the pattern to strncmp
34827 instead of memcmp.
34828 (strlen_optimize_stmt): Call the renamed function.
34829
34830 2017-01-23 Michael Matz <matz@suse.de>
34831
34832 PR tree-optimization/78384
34833 * tree-ssa-loop-split.c (patch_loop_exit): Use correct edge.
34834
34835 2017-01-23 Richard Biener <rguenther@suse.de>
34836
34837 PR tree-optimization/79186
34838 * tree-vrp.c (register_new_assert_for): Make sure we've seen
34839 both incoming edges before moving an assert.
34840
34841 2017-01-23 Martin Jambor <mjambor@suse.cz>
34842
34843 * ipa-prop.c (load_from_param_1): Removed.
34844 (load_from_unmodified_param): Bits from load_from_param_1 put back
34845 here.
34846 (load_from_param): Removed.
34847 (compute_complex_assign_jump_func): Removed stmt2 and just replaced it
34848 with stmt. Reverted back to use of load_from_unmodified_param.
34849
34850 2017-01-23 Martin Jambor <mjambor@suse.cz>
34851
34852 PR ipa/79108
34853 * ipa-prop.h (ipa_param_descriptor): Anotate with with GTY(()).
34854 (ipa_node_params): Annotate with GTY((for_user)). Make descriptors
34855 field a pointer to garbage collected vector, mark lattices and
34856 ipcp_orig_node with GTY((skip)).
34857 (ipa_get_param_count): Adjust to descriptors being a pointer.
34858 (ipa_get_param): Likewise.
34859 (ipa_get_type): Likewise.
34860 (ipa_get_param_move_cost): Likewise.
34861 (ipa_set_param_used): Likewise.
34862 (ipa_get_controlled_uses): Likewise.
34863 (ipa_set_controlled_uses): Likewise.
34864 (ipa_is_param_used): Likewise.
34865 (ipa_node_params_t): Move into garbage collector. New methods insert
34866 and remove.
34867 (ipa_node_params_sum): Annotate wth GTY(()).
34868 (ipa_check_create_node_params): Adjust to ipa_node_params_sum being
34869 garbage collected.
34870 (ipa_load_from_parm_agg): Adjust declaration.
34871 * ipa-icf.c (param_used_p): Adjust to descriptors being a pointer.
34872 * ipa-profile.c (ipa_profile): Likewise.
34873 * ipa-prop.c (ipa_get_param_decl_index_1): Likewise.
34874 (ipa_populate_param_decls): Make descriptors parameter garbage
34875 collected.
34876 (ipa_dump_param): Adjust to descriptors being a pointer.
34877 (ipa_alloc_node_params): Likewise.
34878 (ipa_initialize_node_params): Likewise.
34879 (load_from_param_1): Make descriptors parameter garbage collected.
34880 (load_from_unmodified_param): Likewise.
34881 (load_from_param): Likewise.
34882 (ipa_load_from_parm_agg): Likewise.
34883 (ipa_node_params::~ipa_node_params): Removed.
34884 (ipa_free_all_node_params): Remove call to delete operator.
34885 (ipa_node_params_t::insert): New.
34886 (ipa_node_params_t::remove): Likewise.
34887 (ipa_node_params_t::duplicate): Adjust to descriptors being a pointer,
34888 copy known_csts and known_contexts vectors.
34889 (ipa_read_node_info): Adjust to descriptors being a pointer.
34890 (ipcp_modif_dom_walker): Make m_descriptors field garbage
34891 collected.
34892 (ipcp_transform_function): Make descriptors variable garbage
34893 collected.
34894
34895 2017-01-23 Andrew Senkevich <andrew.senkevich@intel.com>
34896
34897 * config/i386/avx512bwintrin.h: Add k-mask test, kortest intrinsics.
34898 * config/i386/avx512dqintrin.h: Ditto.
34899 * config/i386/avx512fintrin.h: Ditto.
34900 * config/i386/i386.c: Handle new builtins.
34901 * config/i386/i386-builtin.def: Add new builtins.
34902 * config/i386/sse.md (ktest<mode>, kortest<mode>): New.
34903 (UNSPEC_KORTEST, UNSPEC_KTEST): New.
34904
34905 2017-01-23 Jakub Jelinek <jakub@redhat.com>
34906 Martin Liska <mliska@suse.cz>
34907
34908 * asan.h: Define ASAN_USE_AFTER_SCOPE_ATTRIBUTE.
34909 * asan.c (asan_expand_poison_ifn): Support stores and use
34910 appropriate ASAN report function.
34911 * internal-fn.c (expand_ASAN_POISON_USE): New function.
34912 * internal-fn.def (ASAN_POISON_USE): Declare.
34913 * tree-into-ssa.c (maybe_add_asan_poison_write): New function.
34914 (maybe_register_def): Create ASAN_POISON_USE when sanitizing.
34915 * tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove
34916 ASAN_POISON calls w/o LHS.
34917 * tree-ssa.c (execute_update_addresses_taken): Create clobber
34918 for ASAN_MARK (UNPOISON, &x, ...) in order to prevent usage of a LHS
34919 from ASAN_MARK (POISON, &x, ...) coming to a PHI node.
34920 * gimplify.c (asan_poison_variables): Add attribute
34921 use_after_scope_memory to variables that really needs to live
34922 in memory.
34923 * tree-ssa.c (is_asan_mark_p): Do not rewrite into SSA when
34924 having the attribute.
34925
34926 2017-01-23 Martin Liska <mliska@suse.cz>
34927
34928 * asan.c (create_asan_shadow_var): New function.
34929 (asan_expand_poison_ifn): Likewise.
34930 * asan.h (asan_expand_poison_ifn): New declaration.
34931 * internal-fn.c (expand_ASAN_POISON): Likewise.
34932 * internal-fn.def (ASAN_POISON): New builtin.
34933 * sanopt.c (pass_sanopt::execute): Expand
34934 asan_expand_poison_ifn.
34935 * tree-inline.c (copy_decl_for_dup_finish): Make function
34936 external.
34937 * tree-inline.h (copy_decl_for_dup_finish): Likewise.
34938 * tree-ssa.c (is_asan_mark_p): New function.
34939 (execute_update_addresses_taken): Rewrite local variables
34940 (identified just by use-after-scope as addressable) into SSA.
34941
34942 2017-01-22 Gerald Pfeifer <gerald@pfeifer.com>
34943
34944 * doc/install.texi (Specific): opensource.apple.com uses https
34945 now. Remove trailing slash.
34946
34947 2017-01-22 Gerald Pfeifer <gerald@pfeifer.com>
34948
34949 * README.Portability: Remove note on an Irix compatibility issue.
34950
34951 2017-01-22 Dimitry Andric <dim@FreeBSD.org>
34952
34953 * gcov.c (INCLUDE_ALGORITHM): Define.
34954 (INCLUDE_VECTOR): Define.
34955 No longer include <vector> and <algorithm> directly.
34956
34957 2017-01-21 Gerald Pfeifer <gerald@pfeifer.com>
34958
34959 * doc/extend.texi (Thread-Local): Change www.akkadia.org reference
34960 to https.
34961 * doc/invoke.texi (Code Gen Options): Ditto.
34962
34963 2017-01-21 Jan Hubicka <hubicka@ucw.cz>
34964
34965 PR lto/78407
34966 * cfg.c (update_bb_profile_for_threading): Fix updating of probablity.
34967
34968 2017-01-21 Bernd Schmidt <bschmidt@redhat.com>
34969
34970 rtl-optimization/79125
34971 * cprop.c (local_cprop_pass): Handle cases where we make an
34972 unconditional trap.
34973
34974 2017-01-20 Segher Boessenkool <segher@kernel.crashing.org>
34975
34976 PR target/61729
34977 PR target/77850
34978 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
34979 read from, for big endian.
34980
34981 2017-01-20 Jiong Wang <jiong.wang@arm.com>
34982
34983 * config/aarch64/aarch64-builtins.c (aarch64_init_builtins): Register
34984 register pauth builtins for LP64 only.
34985
34986 2017-01-20 Marek Polacek <polacek@redhat.com>
34987
34988 PR c/79152
34989 * gimplify.c (should_warn_for_implicit_fallthrough): Handle consecutive
34990 non-case labels.
34991
34992 2017-01-20 Alexander Monakov <amonakov@ispras.ru>
34993
34994 * omp-expand.c (expand_omp_simd): Clear PROP_gimple_lomp_dev regardless
34995 of safelen status.
34996 * omp-offload.c (pass_omp_device_lower::gate): Use PROP_gimple_lomp_dev.
34997 * passes.c (dump_properties): Handle PROP_gimple_lomp_dev.
34998 * tree-inline.c (expand_call_inline): Propagate PROP_gimple_lomp_dev.
34999
35000 2017-01-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
35001
35002 PR target/71270
35003 * config/arm/arm.c (neon_valid_immediate): Reject vector constants
35004 in big-endian mode when they are not a single duplicated value.
35005
35006 2017-01-20 Richard Biener <rguenther@suse.de>
35007
35008 * BASE-VER: Bump to 7.0.1.
35009
35010 2017-01-20 Alexander Monakov <amonakov@ispras.ru>
35011
35012 * omp-low.c (omplow_simd_context): New struct. Use it...
35013 (lower_rec_simd_input_clauses): ...here and...
35014 (lower_rec_input_clauses): ...here to hold common data. Adjust all
35015 references to idx, lane, max_vf, is_simt.
35016
35017 2017-01-20 Graham Markall <graham.markall@embecosm.com>
35018
35019 * config/arc/arc.h (LINK_SPEC): Use arclinux_nps emulation when
35020 mcpu=nps400.
35021
35022 2017-01-20 Martin Jambor <mjambor@suse.cz>
35023
35024 * hsa.h: Renaed to hsa-common.h. Adjusted a comment.
35025 * hsa.c: Renaed to hsa-common.c. Change include of gt-hsa.h to
35026 gt-hsa-common.h.
35027 * Makefile.in (OBJS): Rename hsa.o to hsa-common.o.
35028 (GTFILES): Rename hsa.c to hsa-common.c.
35029 * hsa-brig.c: Change include of hsa.h to hsa-common.h.
35030 * hsa-dump.c: Likewise.
35031 * hsa-gen.c: Likewise.
35032 * hsa-regalloc.c: Likewise.
35033 * ipa-hsa.c: Likewise.
35034 * omp-expand.c: Likewise.
35035 * omp-low.c: Likewise.
35036 * toplev.c: Likewise.
35037
35038 2017-01-20 Marek Polacek <polacek@redhat.com>
35039
35040 PR c/64279
35041 * doc/invoke.texi: Document -Wduplicated-branches.
35042 * fold-const.c (operand_equal_p): Handle MODIFY_EXPR, INIT_EXPR,
35043 COMPOUND_EXPR, PREDECREMENT_EXPR, PREINCREMENT_EXPR,
35044 POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, CLEANUP_POINT_EXPR, EXPR_STMT,
35045 STATEMENT_LIST, and RETURN_EXPR. For non-pure non-const functions
35046 return 0 only when not OEP_LEXICOGRAPHIC.
35047 (fold_build_cleanup_point_expr): Use the expression
35048 location when building CLEANUP_POINT_EXPR.
35049 * tree-core.h (enum operand_equal_flag): Add OEP_LEXICOGRAPHIC.
35050 * tree.c (add_expr): Handle error_mark_node.
35051
35052 2017-01-20 Martin Liska <mliska@suse.cz>
35053
35054 PR lto/69188
35055 * tree-profile.c (init_ic_make_global_vars): Do not call
35056 finalize_decl.
35057 (gimple_init_gcov_profiler): Likewise.
35058
35059 2017-01-20 Martin Liska <mliska@suse.cz>
35060
35061 PR ipa/71190
35062 * cgraph.h (maybe_create_reference): Remove argument and
35063 update comment.
35064 * cgraphclones.c (cgraph_node::create_virtual_clone): Remove one
35065 argument.
35066 * ipa-cp.c (create_specialized_node): Likewise.
35067 * symtab.c (symtab_node::maybe_create_reference): Handle
35068 VAR_DECLs and ADDR_EXPRs and select ipa_ref_use type.
35069
35070 2017-01-20 Martin Liska <mliska@suse.cz>
35071
35072 * read-rtl-function.c (function_reader::create_function): Use
35073 build_decl instread of build_decl_stat.
35074
35075 2017-01-20 Andrew Senkevich <andrew.senkevich@intel.com>
35076
35077 * config/i386/avx512bwintrin.h: Add k-mask registers shift intrinsics.
35078 * config/i386/avx512dqintrin.h: Ditto.
35079 * config/i386/avx512fintrin.h: Ditto.
35080 * config/i386/i386-builtin-types.def: Add new types.
35081 * config/i386/i386.c: Handle new types.
35082 * config/i386/i386-builtin.def (__builtin_ia32_kshiftliqi)
35083 (__builtin_ia32_kshiftlihi, __builtin_ia32_kshiftlisi)
35084 (__builtin_ia32_kshiftlidi, __builtin_ia32_kshiftriqi)
35085 (__builtin_ia32_kshiftrihi, __builtin_ia32_kshiftrisi)
35086 (__builtin_ia32_kshiftridi): New.
35087 * config/i386/sse.md (k<code><mode>): Rename *k<code><mode>.
35088
35089 2017-01-19 Segher Boessenkool <segher@kernel.crashing.org>
35090
35091 PR target/78875
35092 PR target/79140
35093 * config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Unconditionally
35094 define to rs6000_init_stack_protect_guard.
35095 (rs6000_init_stack_protect_guard): New function.
35096
35097 2017-01-19 Matthew Fortune <matthew.fortune@imgtec.com>
35098 Yunqiang Su <yunqiang.su@imgtec.com>
35099
35100 * config.gcc (supported_defaults): Add madd4.
35101 (with_madd4): Add validation.
35102 (all_defaults): Add madd4.
35103 * config/mips/mips.opt (mmadd4): New option.
35104 * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
35105 mmadd4.
35106 (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
35107 __mips_no_madd4.
35108 (ISA_HAS_UNFUSED_MADD4): Gate with mips_madd4.
35109 (ISA_HAS_FUSED_MADD4): Likewise.
35110 * doc/invoke.texi (-mmadd4): Document the new option.
35111 * doc/install.texi (--with-madd4): Document the new option.
35112
35113 2017-01-19 Jiong Wang <jiong.wang@arm.com>
35114
35115 * config/aarch64/aarch64-builtins.c (enum aarch64_builtins): New
35116 entries for AARCH64_PAUTH_BUILTIN_XPACLRI,
35117 AARCH64_PAUTH_BUILTIN_PACIA1716, AARCH64_PAUTH_BUILTIN_AUTIA1716.
35118 (aarch64_init_pauth_hint_builtins): New.
35119 (aarch64_init_builtins): Call aarch64_init_pauth_hint_builtins.
35120 (aarch64_expand_builtin): Expand new builtins.
35121
35122 2017-01-19 Jiong Wang <jiong.wang@arm.com>
35123
35124 * reg-notes.def (CFA_TOGGLE_RA_MANGLE): New reg-note.
35125 * combine-stack-adj.c (no_unhandled_cfa): Handle
35126 REG_CFA_TOGGLE_RA_MANGLE.
35127 * dwarf2cfi.c (dwarf2out_frame_debug): Handle REG_CFA_TOGGLE_RA_MANGLE.
35128 * config/aarch64/aarch64.c (aarch64_expand_prologue): Generates DWARF
35129 info for return address signing.
35130 (aarch64_expand_epilogue): Likewise.
35131
35132 2017-01-19 Jiong Wang <jiong.wang@arm.com>
35133
35134 * config/aarch64/aarch64-opts.h (aarch64_function_type): New enum.
35135 * config/aarch64/aarch64-protos.h
35136 (aarch64_return_address_signing_enabled): New declaration.
35137 * config/aarch64/aarch64.c (aarch64_return_address_signing_enabled):
35138 New function.
35139 (aarch64_expand_prologue): Sign return address before it's pushed onto
35140 stack.
35141 (aarch64_expand_epilogue): Authenticate return address fetched from
35142 stack.
35143 (aarch64_override_options): Sanity check for ILP32 and ISA level.
35144 (aarch64_attributes): New function attributes for "sign-return-address".
35145 * config/aarch64/aarch64.md (UNSPEC_AUTI1716, UNSPEC_AUTISP,
35146 UNSPEC_PACI1716, UNSPEC_PACISP, UNSPEC_XPACLRI): New unspecs.
35147 ("*do_return"): Generate combined instructions according to key index.
35148 ("<pauth_mnem_prefix>sp", "<pauth_mnem_prefix1716", "xpaclri"): New.
35149 * config/aarch64/iterators.md (PAUTH_LR_SP, PAUTH_17_16): New integer
35150 iterators.
35151 (pauth_mnem_prefix, pauth_hint_num_a): New integer attributes.
35152 * config/aarch64/aarch64.opt (msign-return-address=): New.
35153 * doc/extend.texi (AArch64 Function Attributes): Documents
35154 "sign-return-address=".
35155 * doc/invoke.texi (AArch64 Options): Documents "-msign-return-address=".
35156
35157 2017-01-19 Matthew Fortune <matthew.fortune@imgtec.com>
35158
35159 * doc/invoke.texi: Add missing -mlxc1-sxc1 options to
35160 overall option summary.
35161
35162 2017-01-19 Jiong Wang <jiong.wang@arm.com>
35163
35164 * config/aarch64/aarch64-arches.def: New entry for "armv8.3-a".
35165 * config/aarch64/aarch64.h (AARCH64_FL_V8_3, AARCH64_FL_FOR_ARCH8_3,
35166 AARCH64_ISA_V8_3, TARGET_ARMV8_3): New.
35167 * doc/invoke.texi (AArch64 Options): Document "armv8.3-a".
35168
35169 2017-01-19 Michael Meissner <meissner@linux.vnet.ibm.com>
35170
35171 * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Enable
35172 -mpower9-minmax by default for -mcpu=power9.
35173 (ISA_3_MASKS_IEEE): Require -mvsx-small-integer to enable IEEE
35174 128-bit floating point.
35175
35176 2017-01-20 Alan Modra <amodra@gmail.com>
35177
35178 * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if
35179 optimizing for size.
35180
35181 2017-01-20 Alan Modra <amodra@gmail.com>
35182
35183 PR target/79144
35184 * config/rs6000/rs6000.c (expand_strn_compare): Get the asm name
35185 for strcmp and strncmp from corresponding builtin decl.
35186
35187 2017-01-19 Uros Bizjak <ubizjak@gmail.com>
35188
35189 * config.gcc (x86_64-*-rtems*): Use i386/rtemself.h
35190 instead of i386/rtems-64.h.
35191 * config/i386/rtems-64.h: Remove.
35192
35193 2017-01-19 Uros Bizjak <ubizjak@gmail.com>
35194
35195 PR target/78478
35196 Revert:
35197 2013-11-05 Uros Bizjak <ubizjak@gmail.com>
35198
35199 * config/i386/rtemself.h (LONG_DOUBLE_TYPE_SIZE): New define.
35200
35201 2017-01-19 Tamar Christina <tamar.christina@arm.com>
35202
35203 * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
35204 Change int to HOST_WIDE_INT.
35205 * config/aarch64/aarch64-protos.h
35206 (aarch64_simd_gen_const_vector_dup): Likewise.
35207 * config/aarch64/aarch64-simd.md: Add copysign<mode>3.
35208
35209 2017-01-19 David Malcolm <dmalcolm@redhat.com>
35210
35211 * langhooks-def.h (lhd_type_for_size): New decl.
35212 (LANG_HOOKS_TYPE_FOR_SIZE): Define as lhd_type_for_size.
35213 * langhooks.c (lhd_type_for_size): New function, taken from
35214 lto_type_for_size.
35215
35216 2017-01-19 Pat Haugen <pthaugen@us.ibm.com>
35217
35218 * config/rs6000/power9.md (power9-alu): Remove 'cmp' type and add
35219 define_bypass for CR latency.
35220 (power9-cracked-alu): Update bypass latency and remove power9-branch.
35221 (power9-alu2): Add define_bypass for CR latency.
35222 (power9-cmp): New.
35223 (power9-mul): Update insn latency.
35224 (power9-mul-compare): Update insn latency, bypass latency and remove
35225 power9-branch.
35226
35227 2016-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
35228
35229 * config/aarch64/aarch64-protos.h (aarch64_nopcrelative_literal_loads):
35230 Delete.
35231 * config/aarch64/aarch64.md
35232 (aarch64_reload_movcp<GPF_TF:mode><P:mode>): Delete reference to
35233 aarch64_nopcrelative_literal_loads.
35234 (aarch64_reload_movcp<VALL:mode><P:mode>): Likewise.
35235
35236 2017-01-19 Chenghua Xu <paul.hua.gm@gmail.com>
35237
35238 * config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for
35239 TARGET_LOONGSON_3A.
35240 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A.
35241
35242 2017-01-19 Doug Gilmore <doug.gilmore@imgtec.com>
35243
35244 PR target/78176
35245 * config.gcc (supported_defaults): Add lxc1-sxc1.
35246 (with_lxc1_sxc1): Add validation.
35247 (all_defaults): Add lxc1-sxc1.
35248 * config/mips/mips.opt (mlxc1-sxc1): New option.
35249 * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
35250 mlxc1-sxc1.
35251 (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
35252 __mips_no_lxc1_sxc1.
35253 (ISA_HAS_LXC1_SXC1): Gate with mips_lxc1_sxc1.
35254 * doc/invoke.texi (-mlxc1-sxc1): Document the new option.
35255 * doc/install.texi (--with-lxc1-sxc1): Document the new option.
35256
35257 2017-01-19 Richard Biener <rguenther@suse.de>
35258
35259 PR tree-optimization/72488
35260 * tree-ssa-sccvn.c (run_scc_vn): When we abort the VN make
35261 sure to restore SSA info.
35262 * tree-ssa.c (verify_ssa): Verify SSA info is not shared.
35263
35264 2017-01-19 Richard Earnshaw <rearnsha@arm.com>
35265
35266 PR rtl-optimization/79121
35267 * expr.c (expand_expr_real_2, case LSHIFT_EXPR): Look at the signedness
35268 of the inner type when shifting an extended value.
35269
35270 2017-01-17 Jan Hubicka <hubicka@ucw.cz>
35271
35272 PR lto/78407
35273 * symtab.c (symtab_node::equal_address_to): Fix comparing of
35274 interposable aliases.
35275
35276 2017-01-18 Peter Bergner <bergner@vnet.ibm.com>
35277
35278 PR target/78516
35279 * config/rs6000/spe.md (mov_si<mode>_e500_subreg0): Fix constraints.
35280 Use the evmergelohi instruction.
35281 (mov_si<mode>_e500_subreg4_2_le): Likewise.
35282 (mov_sitf_e500_subreg8_2_be): Likewise.
35283 (mov_sitf_e500_subreg12_2_le): Likewise.
35284 (mov_si<mode>_e500_subreg0_2_le): Fix constraints.
35285 (mov_si<mode>_e500_subreg4_2_be): Likewise.
35286 (mov_sitf_e500_subreg8_2_le): Likewise.
35287 (mov_sitf_e500_subreg12_2_be): Likewise.
35288
35289 2017-01-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
35290
35291 * config/rs6000/altivec.md (altivec_vbpermq): Change "type"
35292 attribute from vecsimple to vecperm.
35293 (altivec_vbpermq2): Likewise.
35294
35295 2017-01-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
35296
35297 PR target/79040
35298 * config/rs6000/altivec.h: Fix typo of vec_cntlz to vec_cnttz.
35299
35300 2017-01-18 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
35301 * config/rs6000/rs6000-protos.h (expand_strn_compare): Add arg.
35302 * config/rs6000/rs6000.c (expand_strn_compare): Add ability to expand
35303 strcmp. Fix bug where comparison didn't stop with zero byte. Fix
35304 case where N arg is SIZE_MAX.
35305 * config/rs6000/rs6000.md (cmpstrnsi): Args to expand_strn_compare.
35306 (cmpstrsi): Add pattern.
35307
35308 2017-01-18 Michael Meissner <meissner@linux.vnet.ibm.com>
35309
35310 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
35311 __builtin_vec_revb builtins.
35312 * config/rs6000/rs6000-builtins.def (P9V_BUILTIN_XXBRQ_V16QI): Add
35313 built-in functions to support generation of the ISA 3.0 XXBR<x>
35314 vector byte reverse instructions.
35315 (P9V_BUILTIN_XXBRQ_V1TI): Likewise.
35316 (P9V_BUILTIN_XXBRD_V2DI): Likewise.
35317 (P9V_BUILTIN_XXBRD_V2DF): Likewise.
35318 (P9V_BUILTIN_XXBGW_V4SI): Likewise.
35319 (P9V_BUILTIN_XXBGW_V4SF): Likewise.
35320 (P9V_BUILTIN_XXBGH_V8HI): Likewise.
35321 (P9V_BUILTIN_VEC_REVB): Likewise.
35322 * config/rs6000/vsx.md (p9_xxbrq_v1ti): New insns/expanders to
35323 generate the ISA 3.0 XXBR<x> vector byte reverse instructions.
35324 (p9_xxbrq_v16qi): Likewise.
35325 (p9_xxbrd_<mode>, VSX_D iterator): Likewise.
35326 (p9_xxbrw_<mode>, VSX_W iterator): Likewise.
35327 (p9_xxbrh_v8hi): Likewise.
35328 * config/rs6000/altivec.h (vec_revb): Define if ISA 3.0.
35329 * doc/extend.texi (RS/6000 Altivec Built-ins): Document the
35330 vec_revb built-in functions.
35331
35332 2017-01-18 Uros Bizjak <ubizjak@gmail.com>
35333
35334 PR rtl-optimization/78952
35335 * config/i386/i386.md (any_extract): New code iterator.
35336 (*insvqi_2): Use any_extract for source operand.
35337 (*insvqi_3): Use any_shiftrt for source operand.
35338
35339 2017-01-18 Wilco Dijkstra <wdijkstr@arm.com>
35340
35341 * config/aarch64/aarch64.c (aarch64_sched_adjust_priority)
35342 New function.
35343 (TARGET_SCHED_ADJUST_PRIORITY): Define target hook.
35344
35345 2017-01-18 Matthias Klose <doko@ubuntu.com>
35346
35347 * doc/install.texi: Allow default for --with-target-bdw-gc-include.
35348
35349 2016-01-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
35350
35351 * config/rs6000/altivec.h (vec_bperm): Change #define.
35352 * config/rs6000/altivec.md (UNSPEC_VBPERMD): New enum constant.
35353 (altivec_vbpermq2): New define_insn.
35354 (altivec_vbpermd): Likewise.
35355 * config/rs6000/rs6000-builtin.def (VBPERMQ2): New monomorphic
35356 function interface.
35357 (VBPERMD): Likewise.
35358 (VBPERM): New polymorphic function interface.
35359 * config/rs6000/r6000-c.c (altivec_overloaded_builtins_table):
35360 Add entries for P9V_BUILTIN_VEC_VBPERM.
35361 * doc/extend.texi: Add interfaces for vec_bperm.
35362
35363 2017-01-18 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
35364
35365 * config/s390/s390-c.c (s390_expand_overloaded_builtin): Downcase
35366 first letter of error messages.
35367 (s390_resolve_overloaded_builtin): Likewise.
35368 * config/s390/s390.c (s390_expand_builtin): Likewise.
35369 (s390_invalid_arg_for_unprototyped_fn): Likewise.
35370 (s390_valid_target_attribute_inner_p): Likewise.
35371 * config/s390/s390.md ("tabort"): Likewise.
35372
35373 2017-01-18 Toma Tabacu <toma.tabacu@imgtec.com>
35374
35375 * config/mips/mips.h (ISA_HAS_DIV3): Remove unused macro.
35376 (ISA_AVOID_DIV_HILO): New macro.
35377 (ISA_HAS_DIV): Use new ISA_AVOID_DIV_HILO macro.
35378 (ISA_HAS_DDIV): Likewise.
35379
35380 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
35381
35382 * doc/invoke.texi (fabi-version): Correct number of occurrences.
35383
35384 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
35385
35386 * doc/invoke.texi (fabi-version): Spelling fix.
35387
35388 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
35389
35390 PR c++/70182
35391 * doc/invoke.texi (fabi-version): Mention mangling fix for
35392 operator names.
35393
35394 2017-01-18 Markus Trippelsdorf <markus@trippelsdorf.de>
35395
35396 PR c++/77489
35397 * doc/invoke.texi (fabi-version): Document discriminator mangling.
35398
35399 2017-01-17 Segher Boessenkool <segher@kernel.crashing.org>
35400
35401 PR target/78875
35402 * config/rs6000/rs6000-opts.h (stack_protector_guard): New enum.
35403 * config/rs6000/rs6000.c (rs6000_option_override_internal): Handle
35404 the new options.
35405 * config/rs6000/rs6000.md (stack_protect_set): Handle the new more
35406 flexible settings.
35407 (stack_protect_test): Ditto.
35408 * config/rs6000/rs6000.opt (mstack-protector-guard=,
35409 mstack-protector-guard-reg=, mstack-protector-guard-offset=): New
35410 options.
35411 * doc/invoke.texi (Option Summary) [RS/6000 and PowerPC Options]:
35412 Add -mstack-protector-guard=, -mstack-protector-guard-reg=, and
35413 -mstack-protector-guard-offset=.
35414 (RS/6000 and PowerPC Options): Ditto.
35415
35416 2017-01-17 Uros Bizjak <ubizjak@gmail.com>
35417
35418 * config/i386/i386.h (MASK_CLASS_P): New define.
35419 * config/i386/i386.c (inline_secondary_memory_needed): Ensure that
35420 there are no registers from different register sets also when
35421 mask registers are used. Update function comment.
35422 * config/i386/i386.md (*movsi_internal): Split (*k/*krm) alternative
35423 to (*k/*r) and (*k/*km) alternatives.
35424
35425 2017-01-17 Wilco Dijkstra <wdijkstr@arm.com>
35426
35427 * config/aarch64/aarch64.md (eh_return): Remove pattern and splitter.
35428 * config/aarch64/aarch64.h (AARCH64_EH_STACKADJ_REGNUM): Remove.
35429 (EH_RETURN_HANDLER_RTX): New define.
35430 * config/aarch64/aarch64.c (aarch64_frame_pointer_required):
35431 Force frame pointer in EH return functions.
35432 (aarch64_expand_epilogue): Add barrier for eh_return.
35433 (aarch64_final_eh_return_addr): Remove.
35434 (aarch64_eh_return_handler_rtx): New function.
35435 * config/aarch64/aarch64-protos.h (aarch64_final_eh_return_addr):
35436 Remove.
35437 (aarch64_eh_return_handler_rtx): New prototype.
35438
35439 2017-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
35440
35441 * config/rs6000/altivec.h (vec_rlmi): New #define.
35442 (vec_vrlnm): Likewise.
35443 (vec_rlnm): Likewise.
35444 * config/rs6000/altivec.md (UNSPEC_VRLMI): New UNSPEC enum value.
35445 (UNSPEC_VRLNM): Likewise.
35446 (VIlong): New mode iterator.
35447 (altivec_vrl<VI_char>mi): New define_insn.
35448 (altivec_vrl<VI_char>nm): Likewise.
35449 * config/rs6000/rs6000-builtin.def (VRLWNM): New monomorphic
35450 function entry.
35451 (VRLDNM): Likewise.
35452 (RLNM): New polymorphic function entry.
35453 (VRLWMI): New monomorphic function entry.
35454 (VRLDMI): Likewise.
35455 (RLMI): New polymorphic function entry.
35456 * config/rs6000/r6000-c.c (altivec_overloaded_builtin_table): Add
35457 new entries for P9V_BUILTIN_VEC_RLMI and P9V_BUILTIN_VEC_RLNM.
35458 * doc/extend.texi: Add description of vec_rlmi, vec_rlnm, and
35459 vec_vrlnm.
35460
35461 2017-01-17 Jakub Jelinek <jakub@redhat.com>
35462
35463 PR debug/78839
35464 * dwarf2out.c (field_byte_offset): Restore the
35465 PCC_BITFIELD_TYPE_MATTERS behavior for INTEGER_CST DECL_FIELD_OFFSET
35466 and DECL_FIELD_BIT_OFFSET. Use fold_build2 instead of build2 + fold.
35467 (analyze_variants_discr, gen_variant_part): Use fold_build2 instead
35468 of build2 + fold.
35469
35470 2017-01-17 Eric Botcazou <ebotcazou@adacore.com>
35471
35472 PR ada/67205
35473 * config/aarch64/aarch64.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define
35474
35475 2017-01-17 Jakub Jelinek <jakub@redhat.com>
35476
35477 PR debug/71669
35478 * dwarf2out.c (add_data_member_location_attribute): For constant
35479 offset bitfield emit for -gdwarf-5 DW_AT_data_bit_offset attribute
35480 instead of DW_AT_data_member_location, DW_AT_bit_offset and
35481 DW_AT_byte_size attributes.
35482
35483 2017-01-17 Eric Botcazou <ebotcazou@adacore.com>
35484
35485 * config/rs6000/rs6000.c (rs6000_emit_move): Also use a TOC reference
35486 after forcing to constant memory when the code model is medium.
35487
35488 2017-01-17 Julia Koval <julia.koval@intel.com>
35489
35490 PR target/76731
35491 * config/i386/avx512fintrin.h
35492 (_mm512_i32gather_ps): Change __addr type to void const*.
35493 (_mm512_mask_i32gather_ps): Ditto.
35494 (_mm512_i32gather_pd): Ditto.
35495 (_mm512_mask_i32gather_pd): Ditto.
35496 (_mm512_i64gather_ps): Ditto.
35497 (_mm512_mask_i64gather_ps): Ditto.
35498 (_mm512_i64gather_pd): Ditto.
35499 (_mm512_mask_i64gather_pd): Ditto.
35500 (_mm512_i32gather_epi32): Ditto.
35501 (_mm512_mask_i32gather_epi32): Ditto.
35502 (_mm512_i32gather_epi64): Ditto.
35503 (_mm512_mask_i32gather_epi64): Ditto.
35504 (_mm512_i64gather_epi32): Ditto.
35505 (_mm512_mask_i64gather_epi32): Ditto.
35506 (_mm512_i64gather_epi64): Ditto.
35507 (_mm512_mask_i64gather_epi64): Ditto.
35508 (_mm512_i32scatter_ps): Change __addr type to void*.
35509 (_mm512_mask_i32scatter_ps): Ditto.
35510 (_mm512_i32scatter_pd): Ditto.
35511 (_mm512_mask_i32scatter_pd): Ditto.
35512 (_mm512_i64scatter_ps): Ditto.
35513 (_mm512_mask_i64scatter_ps): Ditto.
35514 (_mm512_i64scatter_pd): Ditto.
35515 (_mm512_mask_i64scatter_pd): Ditto.
35516 (_mm512_i32scatter_epi32): Ditto.
35517 (_mm512_mask_i32scatter_epi32): Ditto.
35518 (_mm512_i32scatter_epi64): Ditto.
35519 (_mm512_mask_i32scatter_epi64): Ditto.
35520 (_mm512_i64scatter_epi32): Ditto.
35521 (_mm512_mask_i64scatter_epi32): Ditto.
35522 (_mm512_i64scatter_epi64): Ditto.
35523 (_mm512_mask_i64scatter_epi64): Ditto.
35524 * config/i386/avx512pfintrin.h
35525 (_mm512_mask_prefetch_i32gather_pd): Change __addr type to void const*.
35526 (_mm512_mask_prefetch_i32gather_ps): Ditto.
35527 (_mm512_mask_prefetch_i64gather_pd): Ditto.
35528 (_mm512_mask_prefetch_i64gather_ps): Ditto.
35529 (_mm512_prefetch_i32scatter_pd): Change __addr type to void*.
35530 (_mm512_prefetch_i32scatter_ps): Ditto.
35531 (_mm512_mask_prefetch_i32scatter_pd): Ditto.
35532 (_mm512_mask_prefetch_i32scatter_ps): Ditto.
35533 (_mm512_prefetch_i64scatter_pd): Ditto.
35534 (_mm512_prefetch_i64scatter_ps): Ditto.
35535 (_mm512_mask_prefetch_i64scatter_pd): Ditto.
35536 (_mm512_mask_prefetch_i64scatter_ps): Ditto.
35537 * config/i386/avx512vlintrin.h
35538 (_mm256_mmask_i32gather_ps): Change __addr type to void const*.
35539 (_mm_mmask_i32gather_ps): Ditto.
35540 (_mm256_mmask_i32gather_pd): Ditto.
35541 (_mm_mmask_i32gather_pd): Ditto.
35542 (_mm256_mmask_i64gather_ps): Ditto.
35543 (_mm_mmask_i64gather_ps): Ditto.
35544 (_mm256_mmask_i64gather_pd): Ditto.
35545 (_mm_mmask_i64gather_pd): Ditto.
35546 (_mm256_mmask_i32gather_epi32): Ditto.
35547 (_mm_mmask_i32gather_epi32): Ditto.
35548 (_mm256_mmask_i32gather_epi64): Ditto.
35549 (_mm_mmask_i32gather_epi64): Ditto.
35550 (_mm256_mmask_i64gather_epi32): Ditto.
35551 (_mm_mmask_i64gather_epi32): Ditto.
35552 (_mm256_mmask_i64gather_epi64): Ditto.
35553 (_mm_mmask_i64gather_epi64): Ditto.
35554 (_mm256_i32scatter_ps): Change __addr type to void*.
35555 (_mm256_mask_i32scatter_ps): Ditto.
35556 (_mm_i32scatter_ps): Ditto.
35557 (_mm_mask_i32scatter_ps): Ditto.
35558 (_mm256_i32scatter_pd): Ditto.
35559 (_mm256_mask_i32scatter_pd): Ditto.
35560 (_mm_i32scatter_pd): Ditto.
35561 (_mm_mask_i32scatter_pd): Ditto.
35562 (_mm256_i64scatter_ps): Ditto.
35563 (_mm256_mask_i64scatter_ps): Ditto.
35564 (_mm_i64scatter_ps): Ditto.
35565 (_mm_mask_i64scatter_ps): Ditto.
35566 (_mm256_i64scatter_pd): Ditto.
35567 (_mm256_mask_i64scatter_pd): Ditto.
35568 (_mm_i64scatter_pd): Ditto.
35569 (_mm_mask_i64scatter_pd): Ditto.
35570 (_mm256_i32scatter_epi32): Ditto.
35571 (_mm256_mask_i32scatter_epi32): Ditto.
35572 (_mm_i32scatter_epi32): Ditto.
35573 (_mm_mask_i32scatter_epi32): Ditto.
35574 (_mm256_i32scatter_epi64): Ditto.
35575 (_mm256_mask_i32scatter_epi64): Ditto.
35576 (_mm_i32scatter_epi64): Ditto.
35577 (_mm_mask_i32scatter_epi64): Ditto.
35578 (_mm256_i64scatter_epi32): Ditto.
35579 (_mm256_mask_i64scatter_epi32): Ditto.
35580 (_mm_i64scatter_epi32): Ditto.
35581 (_mm_mask_i64scatter_epi32): Ditto.
35582 (_mm256_i64scatter_epi64): Ditto.
35583 (_mm256_mask_i64scatter_epi64): Ditto.
35584 (_mm_i64scatter_epi64): Ditto.
35585 (_mm_mask_i64scatter_epi64): Ditto.
35586 * config/i386/i386-builtin-types.def (V16SF_V16SF_PCFLOAT_V16SI_HI_INT)
35587 (V8DF_V8DF_PCDOUBLE_V8SI_QI_INT, V8SF_V8SF_PCFLOAT_V8DI_QI_INT)
35588 (V8DF_V8DF_PCDOUBLE_V8DI_QI_INT, V16SI_V16SI_PCINT_V16SI_HI_INT)
35589 (V8DI_V8DI_PCINT64_V8SI_QI_INT, V8SI_V8SI_PCINT_V8DI_QI_INT)
35590 (V8DI_V8DI_PCINT64_V8DI_QI_INT, V2DF_V2DF_PCDOUBLE_V4SI_QI_INT)
35591 (V4DF_V4DF_PCDOUBLE_V4SI_QI_INT, V2DF_V2DF_PCDOUBLE_V2DI_QI_INT)
35592 (V4DF_V4DF_PCDOUBLE_V4DI_QI_INT, V4SF_V4SF_PCFLOAT_V4SI_QI_INT)
35593 (V8SF_V8SF_PCFLOAT_V8SI_QI_INT, V4SF_V4SF_PCFLOAT_V2DI_QI_INT)
35594 (V4SF_V4SF_PCFLOAT_V4DI_QI_INT, V2DI_V2DI_PCINT64_V4SI_QI_INT)
35595 (V4DI_V4DI_PCINT64_V4SI_QI_INT, V2DI_V2DI_PCINT64_V2DI_QI_INT)
35596 (V4DI_V4DI_PCINT64_V4DI_QI_INT, V4SI_V4SI_PCINT_V4SI_QI_INT)
35597 (V8SI_V8SI_PCINT_V8SI_QI_INT, V4SI_V4SI_PCINT_V2DI_QI_INT)
35598 (V4SI_V4SI_PCINT_V4DI_QI_INT, VOID_PFLOAT_HI_V16SI_V16SF_INT)
35599 (VOID_PFLOAT_QI_V8SI_V8SF_INT, VOID_PFLOAT_QI_V4SI_V4SF_INT)
35600 (VOID_PDOUBLE_QI_V8SI_V8DF_INT, VOID_PDOUBLE_QI_V4SI_V4DF_INT)
35601 (VOID_PDOUBLE_QI_V4SI_V2DF_INT, VOID_PFLOAT_QI_V8DI_V8SF_INT)
35602 (VOID_PFLOAT_QI_V4DI_V4SF_INT, VOID_PFLOAT_QI_V2DI_V4SF_INT)
35603 (VOID_PDOUBLE_QI_V8DI_V8DF_INT, VOID_PDOUBLE_QI_V4DI_V4DF_INT)
35604 (VOID_PDOUBLE_QI_V2DI_V2DF_INT, VOID_PINT_HI_V16SI_V16SI_INT)
35605 (VOID_PINT_QI_V8SI_V8SI_INT, VOID_PINT_QI_V4SI_V4SI_INT)
35606 (VOID_PLONGLONG_QI_V8SI_V8DI_INT, VOID_PLONGLONG_QI_V4SI_V4DI_INT)
35607 (VOID_PLONGLONG_QI_V4SI_V2DI_INT, VOID_PINT_QI_V8DI_V8SI_INT)
35608 (VOID_PINT_QI_V4DI_V4SI_INT, VOID_PINT_QI_V2DI_V4SI_INT)
35609 (VOID_PLONGLONG_QI_V8DI_V8DI_INT, VOID_QI_V8SI_PCINT64_INT_INT)
35610 (VOID_PLONGLONG_QI_V4DI_V4DI_INT, VOID_PLONGLONG_QI_V2DI_V2DI_INT)
35611 (VOID_HI_V16SI_PCINT_INT_INT, VOID_QI_V8DI_PCINT64_INT_INT)
35612 (VOID_QI_V8DI_PCINT_INT_INT): Remove.
35613 (V16SF_V16SF_PCVOID_V16SI_HI_INT, V8DF_V8DF_PCVOID_V8SI_QI_INT)
35614 (V8SF_V8SF_PCVOID_V8DI_QI_INT, V8DF_V8DF_PCVOID_V8DI_QI_INT)
35615 (V16SI_V16SI_PCVOID_V16SI_HI_INT, V8DI_V8DI_PCVOID_V8SI_QI_INT)
35616 (V8SI_V8SI_PCVOID_V8DI_QI_INT, V8DI_V8DI_PCVOID_V8DI_QI_INT)
35617 (VOID_PVOID_HI_V16SI_V16SF_INT, VOID_PVOID_QI_V8SI_V8DF_INT)
35618 (VOID_PVOID_QI_V8DI_V8SF_INT, VOID_PVOID_QI_V8DI_V8DF_INT)
35619 (VOID_PVOID_HI_V16SI_V16SI_INT, VOID_PVOID_QI_V8SI_V8DI_INT)
35620 (VOID_PVOID_QI_V8DI_V8SI_INT, VOID_PVOID_QI_V8DI_V8DI_INT)
35621 (V2DF_V2DF_PCVOID_V4SI_QI_INT, V4DF_V4DF_PCVOID_V4SI_QI_INT)
35622 (V2DF_V2DF_PCVOID_V2DI_QI_INT, V4DF_V4DF_PCVOID_V4DI_QI_INT
35623 (V4SF_V4SF_PCVOID_V4SI_QI_INT, V8SF_V8SF_PCVOID_V8SI_QI_INT)
35624 (V4SF_V4SF_PCVOID_V2DI_QI_INT, V4SF_V4SF_PCVOID_V4DI_QI_INT)
35625 (V2DI_V2DI_PCVOID_V4SI_QI_INT, V4DI_V4DI_PCVOID_V4SI_QI_INT)
35626 (V2DI_V2DI_PCVOID_V2DI_QI_INT, V4DI_V4DI_PCVOID_V4DI_QI_INT)
35627 (V4SI_V4SI_PCVOID_V4SI_QI_INT, V8SI_V8SI_PCVOID_V8SI_QI_INT)
35628 (V4SI_V4SI_PCVOID_V2DI_QI_INT, V4SI_V4SI_PCVOID_V4DI_QI_INT)
35629 (VOID_PVOID_QI_V8SI_V8SF_INT, VOID_PVOID_QI_V4SI_V4SF_INT)
35630 (VOID_PVOID_QI_V4SI_V4DF_INT, VOID_PVOID_QI_V4SI_V2DF_INT)
35631 (VOID_PVOID_QI_V4DI_V4SF_INT, VOID_PVOID_QI_V2DI_V4SF_INT)
35632 (VOID_PVOID_QI_V4DI_V4DF_INT, VOID_PVOID_QI_V2DI_V2DF_INT)
35633 (VOID_PVOID_QI_V8SI_V8SI_INT, VOID_PVOID_QI_V4SI_V4SI_INT)
35634 (VOID_PVOID_QI_V4SI_V4DI_INT, VOID_PVOID_QI_V4SI_V2DI_INT)
35635 (VOID_PVOID_QI_V4DI_V4SI_INT, VOID_PVOID_QI_V2DI_V4SI_INT)
35636 (VOID_PVOID_QI_V4DI_V4DI_INT, VOID_PVOID_QI_V2DI_V2DI_INT)
35637 (VOID_QI_V8SI_PCVOID_INT_INT, VOID_HI_V16SI_PCVOID_INT_INT)
35638 (VOID_QI_V8DI_PCVOID_INT_INT): Add.
35639 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Adjust builtin
35640 definitions accordingly.
35641
35642 2017-01-17 Kito Cheng <kito.cheng@gmail.com>
35643 Kuan-Lin Chen <kuanlinchentw@gmail.com>
35644
35645 PR target/79079
35646 * internal-fn.c (expand_mul_overflow): Use convert_modes instead of
35647 gen_lowpart.
35648
35649 2017-01-17 Vladimir Makarov <vmakarov@redhat.com>
35650
35651 PR target/79058
35652 * ira-conflicts.c (ira_build_conflicts): Update total conflict
35653 hard regs for inner regno.
35654
35655 2017-01-17 Martin Liska <mliska@suse.cz>
35656
35657 PR ipa/71207
35658 * ipa-polymorphic-call.c (contains_type_p): Fix wrong
35659 assumption and add comment.
35660
35661 2017-01-17 Nathan Sidwell <nathan@acm.org>
35662
35663 * ipa-visibility.c (localize_node): New function, broken out of ...
35664 (function_and_variable_visibility): ... here. Call it.
35665
35666 2017-01-17 Jan Hubicka <hubicka@ucw.cz>
35667
35668 PR middle-end/77445
35669 * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges):
35670 correctly set frequency of oudgoing edge.
35671 (duplicate_thread_path): Fix profile updating.
35672
35673 2017-01-17 Jakub Jelinek <jakub@redhat.com>
35674
35675 PR other/79046
35676 * configure.ac: Add GCC_BASE_VER.
35677 * Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
35678 version from BASE-VER file.
35679 (CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
35680 (gcc.o): Depend on $(BASEVER).
35681 * common.opt (dumpfullversion): New option.
35682 * gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
35683 * doc/invoke.texi: Document -dumpfullversion.
35684 * doc/install.texi: Document --with-gcc-major-version-only.
35685 * configure: Regenerated.
35686
35687 2017-01-17 Richard Biener <rguenther@suse.de>
35688
35689 PR tree-optimization/71433
35690 * tree-vrp.c (register_new_assert_for): Merge same asserts
35691 on all incoming edges.
35692 (process_assert_insertions_for): Handle insertions at the
35693 beginning of BBs.
35694
35695 2017-01-17 Gerald Pfeifer <gerald@pfeifer.com>
35696
35697 * config/i386/cygwin.h (LIBGCJ_SONAME): Remove.
35698 * config/i386/mingw32.h (LIBGCJ_SONAME): Remove.
35699
35700 2017-01-17 Kaz Kojima <kkojima@gcc.gnu.org>
35701
35702 PR target/78633
35703 * config/sh/sh.md (cmpeqsi_t+1): Call copy_rtx to avoid invalid
35704 RTL sharing.
35705
35706 2017-01-17 Alan Modra <amodra@gmail.com>
35707
35708 PR target/79066
35709 * config/rs6000/rs6000.md (elf_high, elf_low): Disable when pic.
35710 * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Don't allow
35711 symbolic stack limit when pic.
35712
35713 2017-01-16 Martin Sebor <msebor@redhat.com>
35714
35715 PR tree-optimization/78608
35716 * gimple-ssa-sprintf.c (tree_digits): Avoid negating TYPE_MIN.
35717
35718 2017-01-16 Jeff Law <law@redhat.com>
35719
35720 Revert:
35721 2016-12-02 Tadek Kijkowski <tkijkowski@gmail.com>
35722 * Makefile.in (PREPROCESSOR_DEFINES): Add a level of indirection
35723 for several include directories that may be relative to sysroot.
35724 * config/i386/x-mingw32 (gplus_includedir): Define.
35725 (gplus_tool_includedir, gplus_backward_include_dir): Likewise.
35726 (native_system_includedir): Likewise.
35727 * config/i386/mingw32.h (STANDARD_STARTFILE_PREFIX_1): Do not
35728 override if TARGET_SYSTEM_ROOT is defined.
35729 (NATIVE_SYSTEM_HEADER_DIR): Likewise.
35730
35731 PR tree-optimization/79090
35732 PR tree-optimization/33562
35733 PR tree-optimization/61912
35734 PR tree-optimization/77485
35735 * tree-ssa-dse.c (compute_trims): Accept STMT argument. Dump STMT
35736 and computed trims into the dump file.
35737
35738 2017-01-17 Uros Bizjak <ubizjak@gmail.com>
35739
35740 * config/i386/i386.h (LIMIT_RELOAD_CLASS): Remove.
35741
35742 2017-01-16 Jakub Jelinek <jakub@redhat.com>
35743
35744 PR c/79089
35745 * gimplify.c (gimplify_init_constructor): If want_value and
35746 object == lhs, unshare lhs to avoid invalid tree sharing. Formatting
35747 fix.
35748
35749 PR target/79080
35750 * loop-doloop.c (doloop_modify): Call unshare_all_rtl_in_chain on
35751 sequence. Formatting fixes.
35752 (doloop_optimize): Formatting fixes.
35753
35754 PR driver/49726
35755 * gcc.c (debug_level_greater_than_spec_func): New function.
35756 (static_spec_functions): Add debug-level-gt spec function.
35757 (ASM_DEBUG_SPEC, cpp_options): Use %:debug-level-gt(0) instead of
35758 !g0.
35759 * config/darwin.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
35760 * config/darwin9.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
35761 * common.opt (g, gcoff, gdwarf, gdwarf-, ggdb, gno-pubnames,
35762 gpubnames, ggnu-pubnames, gno-record-gcc-switches,
35763 grecord-gcc-switches, gno-strict-dwarf, gstrict-dwarf, gstabs,
35764 gstabs+, gtoggle, gvms, gxcoff, gxcoff+): Add Driver flag.
35765
35766 2017-01-16 Uros Bizjak <ubizjak@gmail.com>
35767
35768 * config/i386/i386.h (HARD_REGNO_CALLER_SAVE_MODE): Apply HImode and
35769 QImode fixups to general and mask registers only.
35770
35771 2017-01-16 Carl Love <cel@us.ibm.com>
35772
35773 * config/rs6000/rs6000-c (altivec_overloaded_builtins): Add support
35774 for built-in functions
35775 vector signed char vec_nabs (vector signed char)
35776 vector signed short vec_nabs (vector signed short)
35777 vector signed int vec_nabs (vector signed int)
35778 vector signed long long vec_nabs (vector signed long long)
35779 vector float vec_nabs (vector float)
35780 vector double vec_nabs (vector double)
35781 * config/rs6000/rs6000-builtin.def: Add definitions for NABS functions
35782 and NABS overload.
35783 * config/rs6000/altivec.md: New define_expand nabs<mode>2 types
35784 * config/rs6000/altivec.h: New define for vec_nabs built-in function.
35785 * doc/extend.texi: Update the documentation file for the new built-in
35786 functions.
35787
35788 2017-01-16 Martin Sebor <msebor@redhat.com>
35789
35790 * gimple-ssa-sprintf.c (format_directive): Correct a typo in a warning
35791 message.
35792
35793 2017-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
35794
35795 * config/rs6000/rs6000.c (rtx_is_swappable_p): Change
35796 UNSPEC_VSX__XXSPLTD to require special splat handling.
35797
35798 2017-01-16 David Malcolm <dmalcolm@redhat.com>
35799
35800 PR bootstrap/78616
35801 * system.h: Poison strndup.
35802
35803 2017-01-16 Alan Modra <amodra@gmail.com>
35804
35805 PR target/79098
35806 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Don't
35807 use a switch.
35808
35809 2017-01-16 Georg-Johann Lay <avr@gjlay.de>
35810
35811 * config/avr/avr.h (BRANCH_COST) [reload_completed]: Increase by 4.
35812
35813 2017-01-15 Uros Bizjak <ubizjak@gmail.com>
35814
35815 * config/i386/i386.c (ix86_legitimate_combined_insn): Do not
35816 call recog here. Assert that INSN_CODE (insn) is non-negative.
35817
35818 2017-01-15 Segher Boessenkool <segher@kernel.crashing.org>
35819
35820 PR target/72749
35821 * cfgrtl.c (rtl_split_edge): Also patch jump insns that jump to the
35822 fallthrough.
35823 * haifa-sched.c (dump_insn_stream): Don't crash if there is a label
35824 in the currently scheduled RTL fragment.
35825
35826 2017-01-15 Segher Boessenkool <segher@kernel.crashing.org>
35827
35828 PR rtl-optimization/78751
35829 * ifcvt.c (find_cond_trap): If we generated a non-existing insn,
35830 give up.
35831
35832 2017-01-14 Jeff Law <law@redhat.com>
35833
35834 PR tree-optimization/79090
35835 * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject zero length and
35836 variable length stores.
35837 (compute_trims): Delete dead assignment to *trim_tail.
35838 (dse_dom_walker::dse_optimize_stmt): Optimize mem* calls with
35839 zero length.
35840
35841 2017-01-14 Bernd Schmidt <bschmidt@redhat.com>
35842
35843 PR rtl-optimization/78626
35844 PR rtl-optimization/78727
35845 * cprop.c (one_cprop_pass): Collect unconditional traps in the middle
35846 of a block, and split such blocks after everything else is finished.
35847
35848 2017-01-14 Alan Modra <amodra@gmail.com>
35849
35850 PR target/72749
35851 * combine.c (recog_for_combine_1): Set INSN_CODE before calling
35852 target legitimate_combined_insn.
35853 * config/rs6000/rs6000.c (TARGET_LEGITIMATE_COMBINED_INSN): Define.
35854 (rs6000_legitimate_combined_insn): New function.
35855 * config/rs6000/rs6000.md (UNSPEC_DOLOOP): Delete, and remove
35856 all uses.
35857 (ctr<mode>_internal3): Rename from *ctr<mode>_internal5.
35858 (ctr<mode>_internal4): Rename from *ctr<mode>_internal6.
35859 (ctr<mode>_internal1, ctr<mode>_internal2): Remove '*' from name.
35860
35861 2017-01-14 Gerald Pfeifer <gerald@pfeifer.com>
35862
35863 * doc/frontends.texi (G++ and GCC): Remove references to Java.
35864
35865 2017-01-13 Jeff Law <law@redhat.com>
35866
35867 PR tree-optimization/33562
35868 PR tree-optimization/61912
35869 PR tree-optimization/77485
35870 * tree-ssa-dse.c (delete_dead_call): Accept gsi rather than
35871 a statement.
35872 (delete_dead_assignment): Likewise.
35873 (dse_dom_walker::dse_optimize_stmt): Pass in the gsi rather than
35874 statement to delete_dead_call and delete_dead_assignment.
35875
35876 2017-01-13 David Malcolm <dmalcolm@redhat.com>
35877
35878 PR c/78304
35879 * substring-locations.c (format_warning_va): Strengthen case 1 so
35880 that both endpoints of the substring must be within the format
35881 range for just the substring to be printed.
35882
35883 2017-01-13 Uros Bizjak <ubizjak@gmail.com>
35884
35885 * config/i386/i386.opt (msgx): Use ix86_isa_flags2 variable.
35886 * config/i386/i386.c (ix86_target_string): Add missing options
35887 to isa_opts and reorder options by implied ISAs. Rename isa_opts2 to
35888 isa2_opts, ix86_flag_opts to flag2_opts, ix86_target_other to
35889 flags_other and ix86_target_other to flags2_other. Display unknown
35890 isa2 options.
35891 (ix86_valid_target_attribute_inner_p): Add missing options and
35892 reorder options by implied ISAs, as in ix86_target_string.
35893
35894 2017-01-13 Richard Sandiford <richard.sandiford@arm.com>
35895
35896 * hash-table.h (hash_table::too_empty_p): New function.
35897 (hash_table::expand): Use it.
35898 (hash_table::traverse): Likewise.
35899 (hash_table::empty_slot): Use sizeof (value_type) instead of
35900 sizeof (PTR) to convert bytes to elements. Shrink the table
35901 if the current size is excessive for the current number of
35902 elements.
35903
35904 2017-01-13 Richard Sandiford <richard.sandiford@arm.com>
35905
35906 * ira-costs.c (record_reg_classes): Break from the inner loop
35907 early once alt_fail is known to be true. Update outer loop
35908 handling accordingly.
35909
35910 2017-01-13 Jeff Law <law@redhat.com>
35911
35912 * tree-ssa-dse.c (decrement_count): New function.
35913 (increment_start_addr, maybe_trim_memstar_call): Likewise.
35914 (dse_dom_walker::optimize_stmt): Call maybe_trim_memstar_call directly
35915 when we know the partially dead statement is a mem* function.
35916
35917 PR tree-optimization/61912
35918 PR tree-optimization/77485
35919 * tree-ssa-dse.c: Include expr.h.
35920 (maybe_trim_constructor_store): New function.
35921 (maybe_trim_partially_dead_store): Call maybe_trim_constructor_store.
35922
35923 PR tree-optimization/33562
35924 PR tree-optimization/61912
35925 PR tree-optimization/77485
35926 * doc/invoke.texi: Document new dse-max-object-size param.
35927 * params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
35928 * tree-ssa-dse.c: Include params.h.
35929 (dse_store_status): New enum.
35930 (initialize_ao_ref_for_dse): New, partially extracted from
35931 dse_optimize_stmt.
35932 (valid_ao_ref_for_dse, normalize_ref): New.
35933 (setup_live_bytes_from_ref, compute_trims): Likewise.
35934 (clear_bytes_written_by, maybe_trim_complex_store): Likewise.
35935 (maybe_trim_partially_dead_store): Likewise.
35936 (maybe_trim_complex_store): Likewise.
35937 (dse_classify_store): Renamed from dse_possibly_dead_store_p.
35938 Track what bytes live from the original store. Return tri-state
35939 for dead, partially dead or live.
35940 (dse_dom_walker): Add constructor, destructor and new private members.
35941 (delete_dead_call, delete_dead_assignment): New extracted from
35942 dse_optimize_stmt.
35943 (dse_optimize_stmt): Make a member of dse_dom_walker.
35944 Use initialize_ao_ref_for_dse.
35945
35946 PR tree-optimization/33562
35947 PR tree-optimization/61912
35948 PR tree-optimization/77485
35949 * sbitmap.h (bitmap_count_bits): Prototype.
35950 (bitmap_clear_range, bitmap_set_range): Likewise.
35951 * sbitmap.c (bitmap_clear_range): New function.
35952 (bitmap_set_range, sbitmap_popcount, bitmap_count_bits): Likewise.
35953
35954 2017-01-13 Martin Liska <mliska@suse.cz>
35955
35956 PR ipa/79043
35957 * function.c (set_cfun): Add new argument force.
35958 * function.h (set_cfun): Likewise.
35959 * ipa-inline-transform.c (inline_call): Use the function when
35960 strict alising from is dropped for function we inline to.
35961
35962 2017-01-13 Richard Biener <rguenther@suse.de>
35963
35964 * tree-pretty-print.c (dump_generic_node): Fix inverted condition
35965 for dumping GIMPLE INTEGER_CSTs.
35966
35967 2017-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
35968
35969 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define __STDC_VERSION__
35970 to 201112L since C++17.
35971
35972 2017-01-13 Maxim Ostapenko <m.ostapenko@samsung.com>
35973
35974 PR sanitizer/78887
35975 * asan.c (asan_needs_odr_indicator_p): Don't emit ODR indicators
35976 if -fsanitize=kernel-address is present.
35977
35978 2017-01-13 Richard Biener <rguenther@suse.de>
35979
35980 * tree-pretty-print.c (dump_generic_node): Dump INTEGER_CSTs
35981 as _Literal ( type ) number in case usual suffixes do not
35982 preserve all information.
35983
35984 2017-01-13 Richard Biener <rguenther@suse.de>
35985
35986 PR tree-optimization/77283
35987 * gimple-ssa-split-paths.c: Include gimple-ssa.h, tree-phinodes.h
35988 and ssa-iterators.h.
35989 (is_feasible_trace): Implement a cost model based on joiner
35990 PHI node uses.
35991
35992 2017-01-12 Michael Meissner <meissner@linux.vnet.ibm.com>
35993
35994 PR target/79004
35995 * config/rs6000/rs6000.md (FP_ISA3): Do not optimize converting
35996 char or short to __float128/_Float128 directly.
35997
35998 2017-01-12 Martin Sebor <msebor@redhat.com>
35999
36000 to -Wformat-overflow.
36001 * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust.
36002 (min_bytes_remaining): Same.
36003 (get_string_length): Same.
36004 (format_string): Same.
36005 (format_directive): Same.
36006 (add_bytes): Same.
36007 (pass_sprintf_length::handle_gimple_call): Same.
36008
36009 2017-01-12 Jakub Jelinek <jakub@redhat.com>
36010
36011 * gimple-ssa-sprintf.c (try_substitute_return_value): Remove
36012 info.nowrite calls with no lhs that can't throw. Return bool
36013 whether gsi_remove has been called or not.
36014 (pass_sprintf_length::handle_gimple_call): Return bool whether
36015 try_substitute_return_value called gsi_remove. Formatting fix.
36016 (pass_sprintf_length::execute): Don't use gsi_remove if
36017 handle_gimple_call returned true.
36018
36019 PR bootstrap/79069
36020 * cfgrtl.c (rtl_tidy_fallthru_edge): For any_uncondjump_p that can't
36021 be removed due to side-effects, don't remove following barrier nor
36022 turn the successor edge into fallthru edge.
36023
36024 2017-01-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
36025
36026 PR target/79044
36027 * config/rs6000/rs6000.c (insn_is_swappable_p): Mark
36028 element-reversing loads and stores as not swappable.
36029
36030 2017-01-12 Nathan Sidwell <nathan@acm.org>
36031 Nicolai Stange <nicstange@gmail.com>
36032
36033 * combine.c (try_combine): Don't ignore result of overlap checking
36034 loop. Combine overlap & asm check into single loop.
36035
36036 2017-01-12 Richard Biener <rguenther@suse.de>
36037
36038 * tree-pretty-print.c (dump_generic_node): Provide -gimple
36039 variant for MEM_REF. Sanitize INTEGER_CST for -gimple.
36040
36041 2017-01-12 Richard Biener <rguenther@suse.de>
36042
36043 * tree.c (initialize_tree_contains_struct): Make TS_OPTIMIZATION
36044 and TS_TARGET_OPTION directly derive from TS_BASE.
36045 * tree-core.h (tree_optimization_option): Derive from tree_base.
36046 (tree_target_option): Likewise.
36047
36048 2017-01-11 Uros Bizjak <ubizjak@gmail.com>
36049
36050 * config/i386/i386.c (memory_address_length): Increase len
36051 only when rip_relative_addr_p returns false.
36052
36053 2017-01-11 Julia Koval <julia.koval@intel.com>
36054
36055 * common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
36056 (OPTION_MASK_ISA_SGX_SET): New.
36057 (ix86_handle_option): Handle OPT_msgx.
36058 * config.gcc: Added sgxintrin.h.
36059 * config/i386/driver-i386.c (host_detect_local_cpu): Detect sgx.
36060 * config/i386/i386-c.c (ix86_target_macros_internal): Define __SGX__.
36061 * config/i386/i386.c (ix86_target_string): Add -msgx.
36062 (PTA_SGX): New.
36063 (ix86_option_override_internal): Handle new options.
36064 (ix86_valid_target_attribute_inner_p): Add sgx.
36065 * config/i386/i386.h (TARGET_SGX, TARGET_SGX_P): New.
36066 * config/i386/i386.opt: Add msgx.
36067 * config/i386/sgxintrin.h: New file.
36068 * config/i386/x86intrin.h: Add sgxintrin.h.
36069
36070 2017-01-11 Jakub Jelinek <jakub@redhat.com>
36071
36072 PR c++/71537
36073 * fold-const.c (maybe_nonzero_address): Return 1 for function
36074 local objects.
36075 (tree_single_nonzero_warnv_p): Don't handle function local objects
36076 here.
36077
36078 PR c++/72813
36079 * gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps
36080 of c-header.
36081
36082 2017-01-11 David Malcolm <dmalcolm@redhat.com>
36083
36084 PR driver/78877
36085 * opts.c: Include "spellcheck.h"
36086 (struct string_fragment): New struct.
36087 (struct edit_distance_traits<const string_fragment &>): New
36088 struct.
36089 (get_closest_sanitizer_option): New function.
36090 (parse_sanitizer_options): Offer suggestions for unrecognized arguments.
36091
36092 2017-01-11 Jakub Jelinek <jakub@redhat.com>
36093
36094 * dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): For DWARF5 decrease
36095 by 12.
36096 (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Always
36097 DWARF_COMPILE_UNIT_HEADER_SIZE plus 12.
36098 (DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE): Define.
36099 (calc_base_type_die_sizes): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE
36100 for initial die_offset if dwarf_split_debug_info.
36101 (output_comp_unit): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE for
36102 initial next_die_offset if dwo_id is non-NULL. Don't emit padding
36103 fields.
36104 (output_skeleton_debug_sections): Formatting fix. Use
36105 DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE instead of
36106 DWARF_COMPILE_UNIT_HEADER_SIZE. Don't emit padding.
36107
36108 2017-01-11 Wilco Dijkstra <wdijkstr@arm.com>
36109
36110 * config/arm/cortex-a53.md: Add bypasses for
36111 cortex_a53_r2f_cvt.
36112 (cortex_a53_r2f): Only use for transfers.
36113 (cortex_a53_f2r): Likewise.
36114 (cortex_a53_r2f_cvt): Add reservation for conversions.
36115 (cortex_a53_f2r_cvt): Likewise.
36116
36117 2017-01-11 Tamar Christina <tamar.christina@arm.com>
36118
36119 * config/arm/arm_neon.h: Add __artificial__ and gnu_inline
36120 to all inlined functions, change static to extern.
36121
36122 2017-01-11 Christophe Lyon <christophe.lyon@linaro.org>
36123
36124 PR target/78253
36125 * config/arm/arm.c (legitimize_pic_address): Handle reference to
36126 weak symbol.
36127 (arm_assemble_integer): Likewise.
36128
36129 2017-01-11 Richard Earnshaw <rearnsha@arm.com>
36130
36131 * config.gcc: Use new awk script to check CPU, FPU and architecture
36132 parameters for --with-... options.
36133 * config/arm/parsecpu.awk: New file
36134 * config/arm/arm-cpus.in: New file.
36135 * config/arm/arm-opts.h: Include arm-cpu.h instead of processing .def
36136 files.
36137 * config/arm/arm.c: Include arm-cpu-data.h instead of processing .def
36138 files.
36139 * config/arm/t-arm: Update dependency rules.
36140 * common/config/arm/arm-common.c: Include arm-cpu-cdata.h instead
36141 of processing .def files.
36142 * config/arm/genopt.sh: Deleted.
36143 * config/arm/gentune.sh: Deleted.
36144 * config/arm/arm-cores.def: Deleted.
36145 * config/arm/arm-arches.def: Deleted.
36146 * config/arm/arm-fpus.def: Deleted.
36147 * config/arm/arm-tune.md: Regenerated.
36148 * config/arm/arm-tables.opt: Regenerated.
36149 * config/arm/arm-cpu.h: New generated file.
36150 * config/arm/arm-cpu-data.h: New generated file.
36151 * config/arm/arm-cpu-cdata.h: New generated file.
36152
36153 2017-01-11 Maxim Ostapenko <m.ostapenko@samsung.com>
36154
36155 PR lto/79042
36156 * lto-cgraph.c (lto_output_varpool_node): Pack dynamically_initialized
36157 bit.
36158 (input_varpool_node): Unpack dynamically_initialized bit.
36159
36160 2017-01-11 Eric Botcazou <ebotcazou@adacore.com>
36161
36162 PR rtl-optimization/79032
36163 * lra-constraints.c (simplify_operand_subreg): In the MEM case, test
36164 the alignment of the adjusted memory reference against that of MODE,
36165 instead of the alignment of the original memory reference.
36166
36167 2017-01-11 Martin Jambor <mjambor@suse.cz>
36168
36169 * hsa.c (hsa_callable_function_p): Revert addition of DECL_ARTIFICIAL
36170 test.
36171 * ipa-hsa.c (process_hsa_functions): Only duplicate non-artificial
36172 decorated functions.
36173
36174 2017-01-11 Richard Biener <rguenther@suse.de>
36175
36176 * tree-vrp.c (evrp_dom_walker::before_dom_children): Also
36177 set range/nonnull info for PHI results. Do not set it on
36178 stmts marked for removal.
36179
36180 2017-01-10 Eric Botcazou <ebotcazou@adacore.com>
36181
36182 * expr.c (store_field): In the bitfield case, fetch the return value
36183 from the registers before applying a single big-endian adjustment.
36184 Always do a final load for a BLKmode value not larger than a word.
36185
36186 2017-01-10 David Malcolm <dmalcolm@redhat.com>
36187
36188 PR c++/77949
36189 * input.c (selftest::test_accessing_ordinary_linemaps): Verify
36190 that we correctly handle column numbers greater than
36191 LINE_MAP_MAX_COLUMN_NUMBER.
36192
36193 2017-01-10 Martin Sebor <msebor@redhat.com>
36194
36195 PR middle-end/78245
36196 * gimple-ssa-sprintf.c (get_destination_size): Call
36197 {init,fini}object_sizes.
36198 * tree-object-size.c (addr_object_size): Adjust.
36199 (pass_through_call): Adjust.
36200 (pass_object_sizes::execute): Adjust.
36201 * tree-object-size.h (fini_object_sizes): Declare.
36202
36203 2017-01-10 Martin Sebor <msebor@redhat.com>
36204
36205 PR tree-optimization/78775
36206 * builtins.c (get_size_range): Move...
36207 * calls.c: ...to here.
36208 (alloc_max_size): Accept zero argument.
36209 (operand_signed_p): Remove.
36210 (maybe_warn_alloc_args_overflow): Call get_size_range.
36211 * calls.h (get_size_range): Declare.
36212
36213 2017-01-10 Joe Seymour <joe.s@somniumtech.com>
36214
36215 * config/msp430/driver-msp430.c (msp430_mcu_data): Sync with data
36216 from TI's devices.csv file as of September 2016.
36217 * config/msp430/msp430.c (msp430_mcu_data): Likewise.
36218
36219 2017-01-10 Sandra Loosemore <sandra@codesourcery.com>
36220
36221 * doc/extend.texi: Tweak formatting to fix overfull hbox warnings.
36222 * doc/invoke.texi: Likewise.
36223 * doc/md.texi: Likewise.
36224 * doc/objc.texi: Likewise.
36225
36226 2017-01-10 Joshua Conner <joshconner@google.com>
36227
36228 * config/arm/fuchsia-elf.h: New file.
36229 * config/fuchsia.h: New file.
36230 * config.gcc (*-*-fuchsia*): Set native_system_header_dir.
36231 (aarch64*-*-fuchsia*, arm*-*-fuchsia*, x86_64-*-fuchsia*): Add to
36232 targets.
36233 * config.host: (aarch64*-*-fuchsia*, arm*-*-fuchsia*): Add to hosts.
36234
36235 2016-01-10 Richard Biener <rguenther@suse.de>
36236
36237 PR tree-optimization/79034
36238 * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
36239 Propagate out degenerate PHIs in the joiner.
36240
36241 2017-01-10 Martin Liska <mliska@suse.cz>
36242
36243 * ipa-icf.c (sort_sem_items_by_decl_uid): New function.
36244 (sort_congruence_classes_by_decl_uid): Likewise.
36245 (sort_congruence_class_groups_by_decl_uid): Likewise.
36246 (sem_item_optimizer::merge_classes): Sort class, groups in these
36247 classes and members in the groups by DECL_UID of declarations.
36248 This would make merge operations stable.
36249
36250 2017-01-10 Martin Liska <mliska@suse.cz>
36251
36252 * ipa-icf.c (sem_item_optimizer::sem_item_optimizer): Remove
36253 usage of m_classes_vec.
36254 (sem_item_optimizer::~sem_item_optimizer): Likewise.
36255 (sem_item_optimizer::get_group_by_hash): Likewise.
36256 (sem_item_optimizer::subdivide_classes_by_equality): Likewise.
36257 (sem_item_optimizer::subdivide_classes_by_sensitive_refs): Likewise.
36258 (sem_item_optimizer::verify_classes): Likewise.
36259 (sem_item_optimizer::process_cong_reduction): Likewise.
36260 (sem_item_optimizer::dump_cong_classes): Likewise.
36261 (sem_item_optimizer::merge_classes): Likewise.
36262 * ipa-icf.h (congruence_class_hash): Rename from
36263 congruence_class_group_hash. Remove declaration of m_classes_vec.
36264
36265 2017-01-10 Andrew Senkevich <andrew.senkevich@intel.com>
36266
36267 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
36268 OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET): New.
36269 * config.gcc: Add avx512vpopcntdqintrin.h.
36270 * config/i386/avx512vpopcntdqintrin.h: New.
36271 * config/i386/cpuid.h (bit_AVX512VPOPCNTDQ): New.
36272 * config/i386/i386-builtin-types.def: Add new types.
36273 * config/i386/i386-builtin.def (__builtin_ia32_vpopcountd_v16si,
36274 __builtin_ia32_vpopcountd_v16si_mask, __builtin_ia32_vpopcountq_v8di,
36275 __builtin_ia32_vpopcountq_v8di_mask): New.
36276 * config/i386/i386-c.c (ix86_target_macros_internal): Define
36277 __AVX512VPOPCNTDQ__.
36278 * config/i386/i386.c (ix86_target_string): Add -mavx512vpopcntdq.
36279 (PTA_AVX512VPOPCNTDQ): Define.
36280 * config/i386/i386.h (TARGET_AVX512VPOPCNTDQ,
36281 TARGET_AVX512VPOPCNTDQ_P): Define.
36282 * config/i386/i386.opt: Add mavx512vpopcntdq.
36283 * config/i386/immintrin.h: Include avx512vpopcntdqintrin.h.
36284 * config/i386/sse.md (define_insn "vpopcount<mode><mask_name>"): New.
36285
36286 2017-01-01 Jan Hubicka <hubicka@ucw.cz>
36287
36288 PR middle-end/77484
36289 * predict.def (PRED_CALL): Set to 67.
36290
36291 2017-01-09 Eric Botcazou <ebotcazou@adacore.com>
36292
36293 * expr.c (store_field): In the bitfield case, if the value comes from
36294 a function call and is of an aggregate type returned in registers, do
36295 not modify the field mode; extract the value in all cases if the mode
36296 is BLKmode and the size is not larger than a word.
36297
36298 2017-01-09 Dominique d'Humieres <dominiq@lps.ens.fr>
36299
36300 PR target/71017
36301 * config/i386/cpuid.h: Fix undefined behavior.
36302
36303 2017-01-04 Jeff Law <law@redhat.com>
36304
36305 PR tree-optimization/79007
36306 PR tree-optimization/67955
36307 * tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
36308 conservative for pt.null when flag_non_call_exceptions is on.
36309
36310 2017-01-09 Jakub Jelinek <jakub@redhat.com>
36311
36312 PR translation/79019
36313 PR translation/79020
36314 * params.def (PARAM_INLINE_MIN_SPEEDUP,
36315 PARAM_IPA_CP_SINGLE_CALL_PENALTY,
36316 PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
36317 in descriptions.
36318 * config/avr/avr.opt (maccumulate-args): Likewise.
36319 * config/msp430/msp430.opt (mwarn-mcu): Likewise.
36320 * common.opt (freport-bug): Likewise.
36321 * cif-code.def (CIF_FINAL_ERROR): Likewise.
36322 * doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
36323 * config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
36324 translatable string.
36325 * config/i386/i386.c (function_value_32): Likewise.
36326 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
36327 * config/msp430/msp430.c (msp430_option_override, msp430_attr):
36328 Likewise.
36329 * config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
36330 * common/config/msp430/msp430-common.c (msp430_handle_option):
36331 Likewise.
36332 * symtab.c (symtab_node::verify_base): Likewise.
36333 * opts.c (set_debug_level): Likewise.
36334 * tree.c (verify_type_variant): Likewise. Fix typo in comment.
36335 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
36336 missing whitespace to translatable strings.
36337 * config/avr/avr.md (bswapsi2): Fix typo in comment.
36338 * config/sh/superh.h: Likewise.
36339 * config/i386/xopintrin.h: Likewise.
36340 * config/i386/znver1.md: Likewise.
36341 * config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
36342 * ipa-inline-analysis.c (compute_inline_parameters): Likewise.
36343 * double-int.h (struct double_int): Likewise.
36344 * double-int.c (div_and_round_double): Likewise.
36345 * wide-int.cc: Likewise.
36346 * tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
36347 * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
36348 * cfgcleanup.c (crossjumps_occured): Renamed to ...
36349 (crossjumps_occurred): ... this.
36350 (try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
36351 Adjust all uses.
36352
36353 PR tree-optimization/78899
36354 * tree-if-conv.c (version_loop_for_if_conversion): Instead of
36355 returning bool return struct loop *, NULL for failure and the new
36356 loop on success.
36357 (versionable_outer_loop_p): Don't version outer loop if it has
36358 dont_vectorized bit set.
36359 (tree_if_conversion): When versioning outer loop, ensure
36360 tree_if_conversion is performed also on the inner loop of the
36361 non-vectorizable outer loop copy.
36362 * tree-vectorizer.c (set_uid_loop_bbs): Formatting fix. Fold
36363 LOOP_VECTORIZED in inner loop of the scalar outer loop and
36364 prevent vectorization of it.
36365 (vectorize_loops): For outer + inner LOOP_VECTORIZED, ensure
36366 the outer loop vectorization of the non-scalar version is attempted
36367 before vectorization of the inner loop in scalar version. If
36368 outer LOOP_VECTORIZED guarded loop is not vectorized, prevent
36369 vectorization of its inner loop.
36370 * tree-vect-loop-manip.c (rename_variables_in_bb): If outer_loop
36371 has 2 inner loops, rename also on edges from bb whose single pred
36372 is outer_loop->header. Fix typo in function comment.
36373
36374 2017-01-09 Martin Sebor <msebor@redhat.com>
36375
36376 PR bootstrap/79033
36377 * asan.c (asan_emit_stack_protection): Increase local buffer size
36378 to avoid snprintf truncation warning.
36379
36380 2017-01-09 Andrew Pinski <apinski@cavium.com>
36381
36382 * config/aarch64/aarch64-cores.def: Add thunderx2t99. Change vulcan
36383 to reference thunderx2t99 for the tuning structure
36384 * config/aarch64/aarch64-cost-tables.h (vulcan_extra_costs):
36385 Rename to ...
36386 (thunderx2t99_extra_costs): This.
36387 * config/aarch64/aarch64-tune.md: Regenerate.
36388 * config/aarch64/aarch64.c (vulcan_addrcost_table): Rename to ...
36389 (vulcan_addrcost_table): This.
36390 (vulcan_regmove_cost): Rename to ...
36391 (thunderx2t99_regmove_cost): This.
36392 (vulcan_vector_cost): Rename to ...
36393 (thunderx2t99_vector_cost): this.
36394 (vulcan_branch_cost): Rename to ...
36395 (thunderx2t99_branch_cost): This.
36396 (vulcan_tunings): Rename to ...
36397 (thunderx2t99_tunings): This and s/vulcan/thunderx2t99 .
36398 * doc/invoke.texi (AARCH64/mtune): Add thunderx2t99.
36399
36400 2017-01-09 Martin Jambor <mjambor@suse.cz>
36401
36402 PR ipa/78365
36403 PR ipa/78599
36404 * ipa-prop.h (ipa_jump_func): Swap positions of vr_known and m_vr.
36405 * ipa-cp.c (ipa_vr_operation_and_type_effects): New function.
36406 (propagate_vr_accross_jump_function): Use the above function for all
36407 value range computations for pass-through jump functions and type
36408 converasion from explicit value range values.
36409 (ipcp_propagate_stage): Do not attempt to deduce types of formal
36410 parameters from TYPE_ARG_TYPES.
36411 * ipa-prop.c (ipa_write_jump_function): Remove trailing whitespace.
36412 (ipa_write_node_info): Stream type of the actual argument.
36413 (ipa_read_node_info): Likewise. Also remove trailing whitespace.
36414
36415 2017-01-09 Martin Liska <mliska@suse.cz>
36416
36417 PR pch/78970
36418 * gcc.c (driver_handle_option): Handle OPT_E and set have_E.
36419 (lookup_compiler): Do not show error message with have_E.
36420
36421 2017-01-09 Jakub Jelinek <jakub@redhat.com>
36422
36423 PR tree-optimization/78938
36424 * tree-vect-stmts.c (vectorizable_condition): For non-masked COND_EXPR
36425 where comp_vectype is VECTOR_BOOLEAN_TYPE_P, use
36426 BIT_{NOT,XOR,AND,IOR}_EXPR on the comparison operands instead of
36427 {EQ,NE,GE,GT,LE,LT}_EXPR directly inside of VEC_COND_EXPR. Formatting
36428 fixes.
36429
36430 2017-01-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
36431
36432 * tree-ssa-address.c (gen_addr_rtx): Don't handle index if it
36433 is const0_rtx.
36434
36435 2017-01-09 Richard Biener <rguenther@suse.de>
36436
36437 PR tree-optimization/78997
36438 * tree-vect-slp.c (vect_mask_constant_operand_p): Handle SSA
36439 name condition properly.
36440
36441 2017-01-09 Richard Biener <rguenther@suse.de>
36442
36443 PR debug/79000
36444 * dwarf2out.c (is_cxx): New overload with context.
36445 (is_naming_typedef_decl): Use it.
36446
36447 2017-01-08 Sandra Loosemore <sandra@codesourcery.com>
36448
36449 * invoke.texi (Option Summary): Correct spacing in option lists
36450 and add line breaks to fix over-long lines.
36451
36452 2017-01-08 Sandra Loosemore <sandra@codesourcery.com>
36453
36454 PR middle-end/17660
36455
36456 * extend.texi (Common Variable Attributes): Add xref to GCC
36457 Internals manual to explain mode attribute keywords.
36458
36459 2017-01-08 Sandra Loosemore <sandra@codesourcery.com>
36460
36461 PR other/16519
36462 * doc/invoke.texi (Option Summary): Move -pthread to Linker Options
36463 and Preprocessor Options.
36464 (Options for Linking): Document -pthread here....
36465 (RS/6000 and PowerPC Options): ...not here.
36466 (Solaris 2 Options): ...or here.
36467 * doc/cppopts.texi: Document -pthread.
36468
36469 2017-01-08 Martin Sebor <msebor@redhat.com>
36470
36471 PR middle-end/77708
36472 * doc/invoke.texi (Warning Options): Document -Wformat-truncation.
36473 * gimple-ssa-sprintf.c (call_info::reval_used, call_info::warnopt):
36474 New member functions.
36475 (format_directive): Used them.
36476 (add_bytes): Same.
36477 (pass_sprintf_length::handle_gimple_call): Same.
36478 * graphite-sese-to-poly.c (tree_int_to_gmp): Increase buffer size
36479 to avoid truncation for any argument.
36480 (extract_affine_mul): Same.
36481 * tree.c (get_file_function_name): Same.
36482
36483 2017-01-01 Jan Hubicka <hubicka@ucw.cz>
36484
36485 PR middle-end/77484
36486 * predict.def (PRED_INDIR_CALL): Set to 86.
36487
36488 2017-01-07 Sandra Loosemore <sandra@codesourcery.com>
36489
36490 PR preprocessor/54124
36491 * doc/cppopts.texi: Reformat -d subtable to list the full name
36492 of the options. Add cross-reference to the docs for the general
36493 compiler -d options.
36494 * doc/invoke.texi (Developer Options): Add cross-reference to the
36495 preprocessor-specific -d option documentation.
36496
36497 2017-01-07 Sandra Loosemore <sandra@codesourcery.com>
36498
36499 PR preprocessor/13498
36500 * doc/cpp.texi (Search Path): Rewrite to remove obsolete and
36501 redudant material, and reflect new command-line options.
36502 (System Headers): Likewise.
36503
36504 2017-01-07 Sandra Loosemore <sandra@codesourcery.com>
36505
36506 * doc/cppdiropts.texi: Merge documentation of -I, -iquote,
36507 -isystem, and -idirafter. Copy-edit.
36508 * doc/cppopts.texi: Copy-edit. Remove contradiction about
36509 default for -ftrack-macro-expansion. Delete obsolete and
36510 badly-formatted implementation details about -fdebug-cpp output.
36511 * doc/cppwarnopts.texi: Copy-edit.
36512
36513 2017-01-07 David Malcolm <dmalcolm@redhat.com>
36514
36515 PR c++/72803
36516 * input.c (selftest::test_accessing_ordinary_linemaps): Verify
36517 that the transition from a max line width >= 1<<10 to narrower
36518 lines works correctly.
36519
36520 2017-01-07 Alexandre Oliva <aoliva@redhat.com>
36521
36522 * doc/options.texi (PerFunction): New.
36523 * opt-functions.awk (switch_flags): Map both Optimization and
36524 PerFunction to CL_OPTIMIZATION.
36525 * opth-gen.awk: Test for PerFunction flag along with
36526 Optimization.
36527 * optc-save-gen.awk: Likewise. Introduce var_opt_hash and set
36528 it only when the latter is present. Skip those that don't in
36529 the hash function generator.
36530 * common.opt (fvar-tracking): Mark as PerFunction instead of
36531 Optimization.
36532 (fvar-tracking-assignments): Likewise.
36533 (fvar-tracking-assignments-toggle): Likewise.
36534 (fvar-tracking-uninit): Likewise.
36535
36536 2017-01-07 Jakub Jelinek <jakub@redhat.com>
36537
36538 PR translation/79018
36539 * params.def (PARAM_MAX_STORES_TO_MERGE): Add missing space between
36540 the and store.
36541
36542 2017-01-06 Mikael Pettersson <mikpelinux@gmail.com>
36543
36544 PR target/57583
36545 * config/m68k/m68k.opt (LONG_JUMP_TABLE_OFFSETS): New option.
36546 * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Handle
36547 TARGET_LONG_JUMP_TABLE_OFFSETS.
36548 * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise.
36549 * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise.
36550 * config/m68k/m68k.h (CASE_VECTOR_MODE): Likewise.
36551 (ASM_OUTPUT_ADDR_DIFF_ELF): Likewise.
36552 * config/m68k/m68k.md (tablejump expander): Likewise.
36553 (*tablejump_pcrel_hi): Renamed from unnamed insn, reject
36554 TARGET_LONG_JUMP_TABLE_OFFSETS.
36555 (*tablejump_pcrel_si): New insn, handle TARGET_LONG_JUMP_TABLE_OFFSETS.
36556 * doc/invoke.texi (M68K options): Add -mlong-jump-table-offsets.
36557
36558 2017-01-06 Edgar E. Iglesias <edgar.iglesias@xilinx.com>
36559 David Holsgrove <david.holsgrove@xilinx.com>
36560
36561 * common/config/microblaze/microblaze-common.c
36562 (TARGET_EXCEPT_UNWIND_INFO): Remove.
36563 * config/microblaze/microblaze-protos.h (microblaze_eh_return):
36564 New prototype.
36565 * config/microblaze/microblaze.c (microblaze_must_save_register)
36566 (microblaze_expand_epilogue, microblaze_return_addr): Handle
36567 calls_eh_return.
36568 (microblaze_eh_return): New function.
36569 * config/microblaze/microblaze.h (RETURN_ADDR_OFFSET)
36570 (EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM)
36571 (EH_RETURN_STACKADJ_RTX, ASM_PREFERRED_EH_DATA_FORMAT): New macros.
36572 * config/microblaze/microblaze.md (eh_return): New pattern.
36573
36574 2017-01-06 Jakub Jelinek <jakub@redhat.com>
36575
36576 * system.h (GCC_DIAGNOSTIC_PUSH_IGNORED, GCC_DIAGNOSTIC_POP,
36577 GCC_DIAGNOSTIC_STRINGIFY): Define.
36578
36579 * read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare warning.
36580
36581 2017-01-06 Andre Vieira <andre.simoesdiasvieira@arm.com>
36582
36583 * config/arm/arm.md (<mcrr>): New.
36584 (<mrrc>): New.
36585 * config/arm/arm.c (arm_arch5te): New.
36586 (arm_option_override): Set arm_arch5te.
36587 (arm_coproc_builtin_available): Add support for mcrr, mcrr2, mrrc
36588 and mrrc2.
36589 * config/arm/arm-builtins.c (MCRR_QUALIFIERS): Define to...
36590 (arm_mcrr_qualifiers): ... this. New.
36591 (MRRC_QUALIFIERS): Define to...
36592 (arm_mrrc_qualifiers): ... this. New.
36593 * config/arm/arm_acle.h (__arm_mcrr, __arm_mcrr2, __arm_mrrc,
36594 __arm_mrrc2): New.
36595 * config/arm/arm_acle_builtins.def (mcrr, mcrr2, mrrc, mrrc2): New.
36596 * config/arm/iterators.md (MCRRI, mcrr, MCRR): New.
36597 (MRRCI, mrrc, MRRC): New.
36598 * config/arm/unspecs.md (VUNSPEC_MCRR, VUNSPEC_MCRR2, VUNSPEC_MRRC,
36599 VUNSPEC_MRRC2): New.
36600
36601 2017-01-06 Andre Vieira <andre.simoesdiasvieira@arm.com>
36602
36603 * config/arm/arm.md (<mcr>): New.
36604 (<mrc>): New.
36605 * config/arm/arm.c (arm_coproc_builtin_available): Add
36606 support for mcr, mrc, mcr2 and mrc2.
36607 * config/arm/arm-builtins.c (MCR_QUALIFIERS): Define to...
36608 (arm_mcr_qualifiers): ... this. New.
36609 (MRC_QUALIFIERS): Define to ...
36610 (arm_mrc_qualifiers): ... this. New.
36611 (MCR_QUALIFIERS): Define to ...
36612 (arm_mcr_qualifiers): ... this. New.
36613 * config/arm/arm_acle.h (__arm_mcr, __arm_mrc, __arm_mcr2,
36614 __arm_mrc2): New.
36615 * config/arm/arm_acle_builtins.def (mcr, mcr2, mrc, mrc2): New.
36616 * config/arm/iterators.md (MCRI, mcr, MCR, MRCI, mrc, MRC): New.
36617 * config/arm/unspecs.md (VUNSPEC_MCR, VUNSPEC_MCR2, VUNSPEC_MRC,
36618 VUNSPEC_MRC2): New.
36619
36620 2017-01-06 Andre Vieira <andre.simoesdiasvieira@arm.com>
36621
36622 * config/arm/arm.md (*ldc): New.
36623 (*stc): New.
36624 (<ldc>): New.
36625 (<stc>): New.
36626 * config/arm/arm.c (arm_coproc_builtin_available): Add
36627 support for ldc,ldcl,stc,stcl,ldc2,ldc2l,stc2 and stc2l.
36628 (arm_coproc_ldc_stc_legitimate_address): New.
36629 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
36630 'qualifier_const_pointer'.
36631 (LDC_QUALIFIERS): Define to...
36632 (arm_ldc_qualifiers): ... this. New.
36633 (STC_QUALIFIERS): Define to...
36634 (arm_stc_qualifiers): ... this. New.
36635 * config/arm/arm-protos.h
36636 (arm_coproc_ldc_stc_legitimate_address): New.
36637 * config/arm/arm_acle.h (__arm_ldc, __arm_ldcl, __arm_stc,
36638 __arm_stcl, __arm_ldc2, __arm_ldc2l, __arm_stc2, __arm_stc2l): New.
36639 * config/arm/arm_acle_builtins.def (ldc, ldc2, ldcl, ldc2l, stc,
36640 stc2, stcl, stc2l): New.
36641 * config/arm/constraints.md (Uz): New.
36642 * config/arm/iterators.md (LDCI, STCI, ldc, stc, LDC STC): New.
36643 * config/arm/unspecs.md (VUNSPEC_LDC, VUNSPEC_LDC2, VUNSPEC_LDCL,
36644 VUNSPEC_LDC2L, VUNSPEC_STC, VUNSPEC_STC2, VUNSPEC_STCL,
36645 VUNSPEC_STC2L): New.
36646
36647 2017-01-06 Andre Vieira <andre.simoesdiasvieira@arm.com>
36648
36649 * config/arm/arm.md (<cdp>): New.
36650 * config/arm/arm.c (neon_const_bounds): Rename this ...
36651 (arm_const_bounds): ... this.
36652 (arm_coproc_builtin_available): New.
36653 * config/arm/arm-builtins.c (SIMD_MAX_BUILTIN_ARGS): Increase.
36654 (arm_type_qualifiers): Add 'qualifier_unsigned_immediate'.
36655 (CDP_QUALIFIERS): Define to...
36656 (arm_cdp_qualifiers): ... this. New.
36657 (void_UP): Define.
36658 (arm_expand_builtin_args): Add case for 6 arguments.
36659 * config/arm/arm-protos.h (neon_const_bounds): Rename this ...
36660 (arm_const_bounds): ... this.
36661 (arm_coproc_builtin_available): New.
36662 * config/arm/arm_acle.h (__arm_cdp): New.
36663 (__arm_cdp2): New.
36664 * config/arm/arm_acle_builtins.def (cdp): New.
36665 (cdp2): New.
36666 * config/arm/iterators.md (CDPI,CDP,cdp): New.
36667 * config/arm/neon.md: Rename all 'neon_const_bounds' to
36668 'arm_const_bounds'.
36669 * config/arm/types.md (coproc): New.
36670 * config/arm/unspecs.md (VUNSPEC_CDP, VUNSPEC_CDP2): New.
36671 * doc/extend.texi (ACLE): Add a mention of Coprocessor intrinsics.
36672 * doc/sourcebuild.texi (arm_coproc1_ok, arm_coproc2_ok,
36673 arm_coproc3_ok, arm_coproc4_ok): Document new effective targets.
36674
36675 2017-01-06 Andre Vieira <andre.simoesdiasvieira@arm.com>
36676
36677 * config/arm/arm-builtins.c (arm_unsigned_binop_qualifiers): New.
36678 (UBINOP_QUALIFIERS): New.
36679 (si_UP): Define.
36680 (acle_builtin_data): New. Change comment.
36681 (arm_builtins): Remove ARM_BUILTIN_CRC32B, ARM_BUILTIN_CRC32H,
36682 ARM_BUILTIN_CRC32W, ARM_BUILTIN_CRC32CB, ARM_BUILTIN_CRC32CH,
36683 ARM_BUILTIN_CRC32CW. Add ARM_BUILTIN_ACLE_BASE and include
36684 arm_acle_builtins.def.
36685 (ARM_BUILTIN_ACLE_PATTERN_START): Define.
36686 (arm_init_acle_builtins): New.
36687 (CRC32_BUILTIN): Remove.
36688 (bdesc_2arg): Remove entries for crc32b, crc32h, crc32w,
36689 crc32cb, crc32ch and crc32cw.
36690 (arm_init_crc32_builtins): Remove.
36691 (arm_init_builtins): Use arm_init_acle_builtins rather
36692 than arm_init_crc32_builtins.
36693 (arm_expand_acle_builtin): New.
36694 (arm_expand_builtin): Use 'arm_expand_acle_builtin'.
36695 * config/arm/arm_acle_builtins.def: New.
36696
36697 2017-01-06 Andre Vieira <andre.simoesdiasvieira@arm.com>
36698
36699 * config/arm/arm-builtins.c (neon_builtin_datum): Rename to ..
36700 (arm_builtin_datum): ... this.
36701 (arm_init_neon_builtin): Rename to ...
36702 (arm_init_builtin): ... this. Add a new parameters PREFIX
36703 and USE_SIG_IN_NAME.
36704 (arm_init_neon_builtins): Replace 'arm_init_neon_builtin' with
36705 'arm_init_builtin'. Replace type 'neon_builtin_datum' with
36706 'arm_builtin_datum'.
36707 (arm_init_vfp_builtins): Likewise.
36708 (builtin_arg): Rename enum's replacing 'NEON_ARG' with
36709 'ARG_BUILTIN' and add a 'ARG_BUILTIN_NEON_MEMORY.
36710 (arm_expand_neon_args): Rename to ...
36711 (arm_expand_builtin_args): ... this. Rename builtin_arg
36712 enum values and differentiate between ARG_BUILTIN_MEMORY
36713 and ARG_BUILTIN_NEON_MEMORY.
36714 (arm_expand_neon_builtin_1): Rename to ...
36715 (arm_expand_builtin_1): ... this. Rename builtin_arg enum
36716 values, arm_expand_builtin_args and add bool parameter NEON.
36717 (arm_expand_neon_builtin): Use arm_expand_builtin_1.
36718 (arm_expand_vfp_builtin): Likewise.
36719 (NEON_MAX_BUILTIN_ARGS): Remove, it was unused.
36720
36721 2017-01-01 Jan Hubicka <hubicka@ucw.cz>
36722
36723 PR middle-end/77484
36724 * predict.def (PRED_POLYMORPHIC_CALL): Set to 59.
36725 * predict.c (tree_estimate_probability_bb): Reverse direction of
36726 polymorphic call predictor.
36727
36728 2017-01-06 David Malcolm <dmalcolm@redhat.com>
36729
36730 * passes.c (execute_one_pass): Split out pass-skipping logic into...
36731 (determine_pass_name_match): ...this new function and...
36732 (should_skip_pass_p): ...this new function.
36733
36734 2017-01-06 Nathan Sidwell <nathan@acm.org>
36735
36736 * ipa-visibility.c (function_and_variable_visibility): Reformat
36737 comments and long lines. Remove extrneous if.
36738 * symtab.c (symtab_node::make_decl_local): Fix code format.
36739 (symtab_node::set_section_for_node): Fix comment typo.
36740
36741 2017-01-06 Martin Liska <mliska@suse.cz>
36742
36743 PR bootstrap/79003
36744 * lra-constraints.c: Rename invariant to lra_invariant.
36745 * predict.c (set_even_probabilities): Initialize e to NULL.
36746
36747 2017-01-05 Martin Sebor <msebor@redhat.com>
36748
36749 PR tree-optimization/78910
36750 * gimple-ssa-sprintf.c (tree_digits): Add an argument.
36751 (format_integer): Correct off-by-one error in the handling
36752 of precision with negative numbers in signed conversions..
36753
36754 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
36755
36756 * doc/invoke.texi (C Dialect Options): Adjust -fsso-struct entry.
36757
36758 2017-01-05 Jakub Jelinek <jakub@redhat.com>
36759
36760 PR tree-optimization/71016
36761 * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Pass cond_stmt to
36762 factor_out_conditional_conversion. Formatting fix.
36763 (factor_out_conditional_conversion): Add cond_stmt argument.
36764 If arg1 is INTEGER_CST, punt if new_arg0 is not any operand of
36765 cond_stmt and if arg0_def_stmt is not the only stmt in its bb.
36766 Formatting fix.
36767
36768 2017-01-05 David Malcolm <dmalcolm@redhat.com>
36769
36770 * Makefile.in (OBJS): Add read-md.o, read-rtl.o,
36771 read-rtl-function.o, and selftest-rtl.o.
36772 * config/aarch64/aarch64.c: Include selftest.h and selftest-rtl.h.
36773 (selftest::aarch64_test_loading_full_dump): New function.
36774 (selftest::aarch64_run_selftests): New function.
36775 (TARGET_RUN_TARGET_SELFTESTS): Wire it up to
36776 selftest::aarch64_run_selftests.
36777 * config/i386/i386.c
36778 (selftest::ix86_test_loading_dump_fragment_1): New function.
36779 (selftest::ix86_test_loading_call_insn): New function.
36780 (selftest::ix86_test_loading_full_dump): New function.
36781 (selftest::ix86_test_loading_unspec): New function.
36782 (selftest::ix86_run_selftests): Call the new functions.
36783 * emit-rtl.c (maybe_set_max_label_num): New function.
36784 * emit-rtl.h (maybe_set_max_label_num): New decl.
36785 * function.c (instantiate_decls): Guard call to
36786 instantiate_decls_1 with if (DECL_INITIAL (fndecl)).
36787 * function-tests.c (selftest::verify_three_block_rtl_cfg): Remove
36788 "static".
36789 * gensupport.c (gen_reader::gen_reader): Pass "false"
36790 for new "compact" param of rtx_reader.
36791 * print-rtl.c (rtx_writer::print_rtx_operand): Print "(nil)"
36792 rather than an empty string for NULL strings.
36793 * read-md.c: Potentially include config.h rather than bconfig.h.
36794 Wrap include of errors.h with #ifdef GENERATOR_FILE.
36795 (have_error): New global, copied from errors.c.
36796 (md_reader::read_name): Rename to...
36797 (md_reader::read_name_1): ...this, adding "out_loc" param,
36798 and converting "missing name or number" to returning false, rather
36799 than failing.
36800 (md_reader::read_name): Reimplement in terms of read_name_1.
36801 (md_reader::read_name_or_nil): New function.
36802 (md_reader::read_string): Handle "(nil)" by returning NULL.
36803 (md_reader::md_reader): Add new param "compact".
36804 (md_reader::read_md_files): Wrap with #ifdef GENERATOR_FILE.
36805 (md_reader::read_file): New method.
36806 * read-md.h (md_reader::md_reader): Add new param "compact".
36807 (md_reader::read_file): New method.
36808 (md_reader::is_compact): New accessor.
36809 (md_reader::read_name): Convert return type from void to file_location.
36810 (md_reader::read_name_or_nil): New decl.
36811 (md_reader::read_name_1): New decl.
36812 (md_reader::m_compact): New field.
36813 (noop_reader::noop_reader): Pass "false" for new "compact" param
36814 of rtx_reader.
36815 (rtx_reader::rtx_reader): Add new "compact" param.
36816 (rtx_reader::read_rtx_operand): Make virtual and convert return
36817 type from void to rtx.
36818 (rtx_reader::read_until): New decl.
36819 (rtx_reader::handle_any_trailing_information): New virtual function.
36820 (rtx_reader::postprocess): New virtual function.
36821 (rtx_reader::finalize_string): New virtual function.
36822 (rtx_reader::m_in_call_function_usage): New field.
36823 (rtx_reader::m_reuse_rtx_by_id): New field.
36824 * read-rtl-function.c: New file.
36825 * selftest-rtl.c (selftest::assert_rtx_ptr_eq_at): New function.
36826 * selftest-rtl.h (ASSERT_RTX_PTR_EQ): New macro.
36827 (selftest::verify_three_block_rtl_cfg): New decl.
36828 * read-rtl-function.h: New file.
36829 * read-rtl.c: Potentially include config.h rather than bconfig.h.
36830 For host, include function.h, memmodel.h, and emit-rtl.h.
36831 (one_time_initialization): New function.
36832 (struct compact_insn_name): New struct.
36833 (compact_insn_names): New array.
36834 (find_code): Handle insn codes in compact dumps.
36835 (apply_subst_iterator): Wrap with #ifdef GENERATOR_FILE.
36836 (bind_subst_iter_and_attr): Likewise.
36837 (add_condition_to_string): Likewise.
36838 (add_condition_to_rtx): Likewise.
36839 (apply_attribute_uses): Likewise.
36840 (add_current_iterators): Likewise.
36841 (apply_iterators): Likewise.
36842 (initialize_iterators): Guard usage of apply_subst_iterator with
36843 #ifdef GENERATOR_FILE.
36844 (read_conditions): Wrap with #ifdef GENERATOR_FILE.
36845 (md_reader::read_mapping): Likewise.
36846 (add_define_attr_for_define_subst): Likewise.
36847 (add_define_subst_attr): Likewise.
36848 (read_subst_mapping): Likewise.
36849 (check_code_iterator): Likewise.
36850 (rtx_reader::read_rtx): Likewise. Move one-time initialization
36851 logic to...
36852 (one_time_initialization): New function.
36853 (rtx_reader::read_until): New method.
36854 (read_flags): New function.
36855 (parse_reg_note_name): New function.
36856 (rtx_reader::read_rtx_code): Initialize "iterator" to NULL.
36857 Handle reuse_rtx ids.
36858 Wrap iterator lookup within #ifdef GENERATOR_FILE.
36859 Add parsing support for RTL dumps, mirroring the special-cases in
36860 print_rtx, by calling read_flags, reading REG_NOTE names, INSN_UID
36861 values, and calling handle_any_trailing_information.
36862 (rtx_reader::read_rtx_operand): Convert return type from void
36863 to rtx, returning return_rtx. Handle case 'e'. Call
36864 finalize_string on XSTR and XTMPL fields.
36865 (rtx_reader::read_nested_rtx): Handle dumps in which trailing
36866 "(nil)" values were omitted. Call the postprocess vfunc on the
36867 return_rtx.
36868 (rtx_reader::rtx_reader): Add new "compact" param and pass to base
36869 class ctor. Initialize m_in_call_function_usage. Call
36870 one_time_initialization.
36871 * rtl-tests.c (selftest::test_uncond_jump): Call
36872 set_new_first_and_last_insn.
36873 * rtl.h (read_rtx): Wrap decl with #ifdef GENERATOR_FILE.
36874 * selftest-rtl.c: New file.
36875 * selftest-rtl.h (class selftest::rtl_dump_test): New class.
36876 (selftest::get_insn_by_uid): New decl.
36877 * selftest-run-tests.c (selftest::run_tests): Call
36878 read_rtl_function_c_tests.
36879 * selftest.h (selftest::read_rtl_function_c_tests): New decl.
36880 * tree-dfa.c (ssa_default_def): Return NULL_TREE for rtl function
36881 dumps.
36882
36883 2017-01-05 Uros Bizjak <ubizjak@gmail.com>
36884
36885 * config/i386/i386.md (*testqi_ext_3): No need to handle memory
36886 operands in a special way. Assert that pos+len <= mode precision.
36887
36888 2017-01-05 Jakub Jelinek <jakub@redhat.com>
36889
36890 * common.opt (fvect-cost-model): Remove RejectNegative flag, use
36891 3 argument Alias with unlimited for the negative form.
36892 (fno-vect-cost-model): Removed.
36893
36894 2017-01-05 Martin Liska <mliska@suse.cz>
36895
36896 * hsa-gen.c (gen_hsa_divmod): New function.
36897 (gen_hsa_insn_for_internal_fn_call): Use the function for IFN_DIVMOD.
36898
36899 2017-01-05 Martin Liska <mliska@suse.cz>
36900
36901 PR pch/78970
36902 * gcc.c (lookup_compiler): Reject '-' filename for a precompiled
36903 header.
36904
36905 2017-01-05 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
36906
36907 * config/s390/s390.c (s390_expand_setmem): Unroll the loop for
36908 small constant length operands.
36909
36910 2017-01-05 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
36911
36912 * config/s390/s390.c (s390_expand_setmem): Avoid overlapping bytes
36913 between loop iterations.
36914
36915 2017-01-05 Martin Liska <mliska@suse.cz>
36916
36917 PR sanitizer/78815
36918 * gimplify.c (gimplify_decl_expr): Compare to
36919 asan_poisoned_variables instread of checking flags.
36920 (gimplify_target_expr): Likewise.
36921 (gimplify_expr): Likewise.
36922 (gimplify_function_tree): Conditionally initialize
36923 asan_poisoned_variables.
36924
36925 2017-01-04 Jeff Law <law@redhat.com>
36926
36927 PR tree-optimizatin/78812
36928 * rtl.h (contains_mem_rtx_p): Prototype.
36929 * ifcvt.c (containts_mem_rtx_p): Move from here to...
36930 * rtlanal.c (contains_mem_rtx_p): Here and remove static linkage.
36931 * gcse.c (prune_expressions): Use contains_mem_rtx_p to discover
36932 and prune MEMs that are not at the toplevel of a SET_SRC rtx. Look
36933 through ZERO_EXTEND and SIGN_EXTEND when trying to avoid pruning MEMs.
36934
36935 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
36936
36937 * input.c (assert_char_at_range): Default-initialize actual_range.
36938
36939 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
36940
36941 * df-scan.c (df_ref_create_structure): Make regno unsigned,
36942 to match the caller.
36943
36944 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
36945
36946 * cfgexpand.c (expand_gimple_basic_block): Disregard debug
36947 insns after final jump in test to emit dummy move.
36948
36949 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
36950
36951 * gimple-iterator.h (gsi_one_nondebug_before_end_p): New.
36952 * tree-eh.c (cleanup_empty_eh): Skip more debug stmts.
36953
36954 2017-01-04 Alexandre Oliva <aoliva@redhat.com>
36955
36956 * multiple_target.c (create_dispatcher_calls): Init e_next.
36957 * tree-ssa-loop-split.c (split_loop): Init border.
36958 * tree-vect-loop.c (vect_determine_vectorization_factor): Init
36959 scalar_type.
36960
36961 2017-01-04 Michael Meissner <meissner@linux.vnet.ibm.com>
36962
36963 PR target/71977
36964 PR target/70568
36965 PR target/78823
36966 * config/rs6000/predicates.md (sf_subreg_operand): New predicate.
36967 (altivec_register_operand): Do not return true if the operand
36968 contains a SUBREG mixing SImode and SFmode.
36969 (vsx_register_operand): Likewise.
36970 (vsx_reg_sfsubreg_ok): New predicate.
36971 (vfloat_operand): Do not return true if the operand contains a
36972 SUBREG mixing SImode and SFmode.
36973 (vint_operand): Likewise.
36974 (vlogical_operand): Likewise.
36975 (gpc_reg_operand): Likewise.
36976 (int_reg_operand): Likewise.
36977 * config/rs6000/rs6000-protos.h (valid_sf_si_move): Add declaration.
36978 * config/rs6000/rs6000.c (valid_sf_si_move): New function to
36979 determine if a MOVSI or MOVSF operation contains SUBREGs that mix
36980 SImode and SFmode.
36981 (rs6000_emit_move_si_sf_subreg): New helper function.
36982 (rs6000_emit_move): Call rs6000_emit_move_si_sf_subreg to possbily
36983 fixup SUBREGs involving SImode and SFmode.
36984 * config/rs6000/vsx.md (SFBOOL_*): New constants that are operand
36985 numbers for the new peephole2 optimization.
36986 (peephole2 for SFmode unions): New peephole2 to optimize cases in
36987 the GLIBC math library that do AND/IOR/XOR operations on single
36988 precision floating point.
36989 * config/rs6000/rs6000.h (TARGET_NO_SF_SUBREG): New internal
36990 target macros to say whether we need to avoid SUBREGs mixing
36991 SImode and SFmode.
36992 (TARGET_ALLOW_SF_SUBREG): Likewise.
36993 * config/rs6000/rs6000.md (UNSPEC_SF_FROM_SI): New unspecs.
36994 (UNSPEC_SI_FROM_SF): Likewise.
36995 (iorxor): Change spacing.
36996 (and_ior_xor): New iterator for AND, IOR, and XOR.
36997 (movsi_from_sf): New insns for SImode/SFmode SUBREG support.
36998 (movdi_from_sf_zero_ext): Likewise.
36999 (mov<mode>_hardfloat, FMOVE32 iterator): Use register_operand
37000 instead of gpc_reg_operand. Add SImode/SFmode SUBREG support.
37001 (movsf_from_si): New insn for SImode/SFmode SUBREG support.
37002 (fma<mode>4): Use gpc_reg_operand instead of register_operand.
37003 (fms<mode>4): Likewise.
37004 (fnma<mode>4): Likewise.
37005 (fnms<mode>4): Likewise.
37006 (nfma<mode>4): Likewise.
37007 (nfms<mode>4): Likewise.
37008
37009 2017-01-04 Marek Polacek <polacek@redhat.com>
37010
37011 PR c++/64767
37012 * doc/invoke.texi: Document -Wpointer-compare.
37013
37014 2017-01-04 Jakub Jelinek <jakub@redhat.com>
37015
37016 * optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without
37017 RejectNegative.
37018
37019 * dwarf2out.c (output_loc_list): Don't throw away 64K+ location
37020 descriptions for -gdwarf-5 and emit them as uleb128 instead of
37021 2-byte data.
37022
37023 2017-01-04 Kelvin Nilsen <kelvin@gcc.gnu.org>
37024
37025 PR target/78056
37026 * doc/sourcebuild.texi (PowerPC-specific attributes): Add
37027 documentation of the powerpc_popcntb_ok attribute.
37028 * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
37029 code to issue warning messages if a requested CPU configuration is
37030 not supported by the binary (assembler and loader) toolchain.
37031 (spe_init_builtins): Add two assertions to prevent ICE if attempt is
37032 made to define a built-in function that has been disabled.
37033 (paired_init_builtins): Add assertion to prevent ICE if attempt is
37034 made to define a built-in function that has been disabled.
37035 (altivec_init_builtins): Add comment explaining why definition
37036 of the DST built-in functions is not preceded by an assertion
37037 check. Add assertions to prevent ICE if attempts are made to
37038 define an altivec predicate or an abs* built-in function that has
37039 been disabled.
37040 (htm_init_builtins): Add comment explaining why definition of the
37041 htm built-in functions is not preceded by an assertion check.
37042
37043 2017-01-04 Jeff Law <law@redhat.com>
37044
37045 PR tree-optimizatin/67955
37046 * tree-ssa-alias.c (same_addr_size_stores_p): Check offsets first.
37047 Allow any SSA_VAR_P as the base objects. Use integer_zerop. Verify
37048 the points-to solution does not include pt_null. Use DECL_PT_UID
37049 unconditionally.
37050
37051 2017-01-04 Uros Bizjak <ubizjak@gmail.com>
37052
37053 * config/i386/i386.md (HI/SImode test with imm to QImode splitters):
37054 Use gen_int_mode instead of gen_lopwart for const_int operands.
37055
37056 2017-01-04 Jakub Jelinek <jakub@redhat.com>
37057
37058 PR tree-optimization/71563
37059 * match.pd: Simplify X << Y into X if Y is known to be 0 or
37060 out of range value - has low bits known to be zero.
37061
37062 2017-01-04 Alan Modra <amodra@gmail.com>
37063
37064 * Makefile.in (aclocal_deps): Update and order as per aclocal.m4.
37065 * configure: Regenerate.
37066 * config.in: Regenerate.
37067
37068 2017-01-04 Jakub Jelinek <jakub@redhat.com>
37069
37070 PR bootstrap/77569
37071 * input.c (ebcdic_execution_charset::on_error): Don't use strstr for
37072 a substring of the message, but strcmp with the whole message. Ifdef
37073 ENABLE_NLS, translate the message first using dgettext.
37074
37075 2017-01-03 Jeff Law <law@redhat.com>
37076
37077 PR tree-optimizatin/78856
37078 * tree-ssa-threadupdate.c: Include tree-vectorizer.h.
37079 (mark_threaded_blocks): Remove code to truncate thread paths that
37080 cross multiple loop headers. Instead invalidate the cached loop
37081 iteration information and handle case of a thread path walking
37082 into an irreducible region.
37083
37084 2017-01-03 Michael Meissner <meissner@linux.vnet.ibm.com>
37085
37086 PR target/78900
37087 * config/rs6000/rs6000.c (rs6000_split_signbit): Change some
37088 assertions. Add support for doing the signbit if the IEEE 128-bit
37089 floating point value is in a GPR.
37090 * config/rs6000/rs6000.md (Fsignbit): Delete.
37091 (signbit<mode>2_dm): Delete using <Fsignbit> and just use "wa".
37092 Update the length attribute if the value is in a GPR.
37093 (signbit<mode>2_dm_<su>ext): Add combiner pattern to eliminate
37094 the sign or zero extension instruction, since the value is always 0/1.
37095 (signbit<mode>2_dm2): Delete using <Fsignbit>.
37096
37097 PR target/78953
37098 * config/rs6000/vsx.md (vsx_extract_<mode>_store_p9): If we are
37099 extracting SImode to a GPR register so that we can generate a
37100 store, limit the vector to be in a traditional Altivec register
37101 for the vextuwrx instruction.
37102
37103 2017-01-03 Ian Lance Taylor <iant@google.com>
37104
37105 * godump.c (go_format_type): Treat ENUMERAL_TYPE like INTEGER_TYPE.
37106
37107 2017-01-03 Martin Sebor <msebor@redhat.com>
37108
37109 PR tree-optimization/78696
37110 * gimple-ssa-sprintf.c (format_floating): Correct handling of
37111 precision. Use MPFR for %f for greater fidelity. Correct handling
37112 of %g.
37113 (pass_sprintf_length::compute_format_length): Set width and precision
37114 specified by asrerisk to void_node for vararg functions.
37115 (try_substitute_return_value): Adjust dump output.
37116
37117 2017-01-03 David Edelsohn <dje.gcc@gmail.com>
37118
37119 * doc/invoke.texi (RS6000 options): LRA is enabled by default.
37120
37121 2017-01-03 Eric Botcazou <ebotcazou@adacore.com>
37122
37123 * doc/invoke.texi (SPARC options): Document -mlra as the default.
37124 * config/sparc/sparc.c (sparc_option_override): Force LRA unless
37125 -mlra/-mno-lra was passed to the compiler.
37126
37127 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
37128
37129 PR rtl-optimization/65618
37130 * emit-rtl.c (try_split): Move initialization of "before" and
37131 "after" to just before the call to emit_insn_after_setloc.
37132
37133 2017-01-03 Gerald Pfeifer <gerald@pfeifer.com>
37134
37135 * doc/md.texi (Standard Names): Remove reference to Java frontend.
37136
37137 2017-01-03 Pierre-Marie de Rodat <derodat@adacore.com>
37138
37139 * dwarf2out.c (gen_enumeration_type_die): When
37140 -gno-strict-dwarf, add a DW_AT_encoding attribute.
37141
37142 2017-01-03 Jakub Jelinek <jakub@redhat.com>
37143
37144 PR tree-optimization/78965
37145 * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length):
37146 Change first argument from const call_info & to call_info &. For %n
37147 set info.nowrite to false.
37148
37149 PR middle-end/78901
37150 * gimple-ssa-sprintf.c (try_substitute_return_value): Don't change
37151 possibly throwing calls.
37152
37153 * genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME
37154 and exprs_len || fns_len, emit the code for SSA_NAME next to the exprs
37155 and fns handling, rather than in a separate case SSA_NAME.
37156
37157 2017-01-02 Jeff Law <law@redhat.com>
37158
37159 * config/darwin-driver.c (darwin_driver_init): Const-correctness
37160 fixes for first_period and second_period variables.
37161
37162 2017-01-02 Uros Bizjak <ubizjak@gmail.com>
37163
37164 PR target/78967
37165 * config/i386/i386.md (UNSPEC_NOREX_MEM): New unspec.
37166 (*insvqi_1): New insn pattern.
37167 (*insvqi_1_mem_rex64): Ditto.
37168 (*insvqi_2): Ditto.
37169 (*insvqi_3): Rename from *insvqi.
37170
37171 (*extzvqi_mem_rex64): Add UNSPEC_NOREX_MEM tag.
37172
37173 2017-01-02 Gerald Pfeifer <gerald@pfeifer.com>
37174
37175 * doc/cfg.texi (Edges): Remove reference to Java.
37176 (Maintaining the CFG): Ditto.
37177
37178 2017-01-01 Jan Hubicka <hubicka@ucw.cz>
37179
37180 PR middle-end/77674
37181 * symtab.c (symtab_node::binds_to_current_def_p): Fix handling of
37182 transparent aliases.
37183
37184 2017-01-01 Jan Hubicka <hubicka@ucw.cz>
37185
37186 PR middle-end/77484
37187 * predict.def (PRED_CALL): Update hitrate.
37188 (PRED_INDIR_CALL, PRED_POLYMORPHIC_CALL): New predictors.
37189 * predict.c (tree_estimate_probability_bb): Split CALL predictor
37190 into direct/indirect/polymorphic variants.
37191
37192 2017-01-01 Jakub Jelinek <jakub@redhat.com>
37193
37194 Update copyright years.
37195
37196 * gcc.c (process_command): Update copyright notice dates.
37197 * gcov-dump.c (print_version): Ditto.
37198 * gcov.c (print_version): Ditto.
37199 * gcov-tool.c (print_version): Ditto.
37200 * gengtype.c (create_file): Ditto.
37201 * doc/cpp.texi: Bump @copying's copyright year.
37202 * doc/cppinternals.texi: Ditto.
37203 * doc/gcc.texi: Ditto.
37204 * doc/gccint.texi: Ditto.
37205 * doc/gcov.texi: Ditto.
37206 * doc/install.texi: Ditto.
37207 * doc/invoke.texi: Ditto.
37208 \f
37209 Copyright (C) 2017 Free Software Foundation, Inc.
37210
37211 Copying and distribution of this file, with or without modification,
37212 are permitted in any medium without royalty provided the copyright
37213 notice and this notice are preserved.