]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ChangeLog
[RS6000] inline plt call sequences
[thirdparty/gcc.git] / gcc / ChangeLog
1 2018-11-29 Alan Modra <amodra@gmail.com>
2
3 * config.in (HAVE_AS_PLTSEQ): Add.
4 * config/rs6000/predicates.md (indirect_call_operand): New.
5 * config/rs6000/rs6000-protos.h (rs6000_pltseq_template),
6 (rs6000_sibcall_sysv): Declare.
7 * config/rs6000/rs6000.c (init_cumulative_args): Set cookie
8 CALL_LONG for -fno-plt.
9 (print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ.
10 (rs6000_indirect_call_template_1): Emit .reloc directives for
11 UNSPEC_PLTSEQ calls.
12 (rs6000_pltseq_template): New function.
13 (rs6000_longcall_ref): Add arg parameter. Use PLT16 insns if
14 relocs supported by assembler. Move SYMBOL_REF test to callers.
15 (rs6000_call_aix): Adjust rs6000_longcall_ref call. Package
16 insns in UNSPEC_PLTSEQ, preserving original func_desc.
17 (rs6000_call_sysv): Likewise.
18 (rs6000_sibcall_sysv): New function.
19 * config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default.
20 * config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA,
21 UNSPEC_PLT16_LO): New.
22 (pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New.
23 (call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero
24 cookie in constraints. Test explicitly for flags in length attr.
25 Handle unspec operand 1.
26 (call_value_indirect_nonlocal_sysv): Likewise.
27 (call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1.
28 (call_indirect_elfv2, call_value_indirect_elfv2): Likewise.
29 (sibcall, sibcall_value): Use rs6000_sibcall_sysv.
30 (sibcall_indirect_nonlocal_sysv): New pattern.
31 (sibcall_value_indirect_nonlocal_sysv): Likewise.
32 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect
33 call alternatives.
34 * configure.ac: Check for gas plt sequence marker support.
35 * configure: Regenerate.
36
37 2018-11-29 Alan Modra <amodra@gmail.com>
38
39 * config/rs6000/predicates.md (unspec_tls): New.
40 * config/rs6000/rs6000-protos.h (rs6000_call_template),
41 (rs6000_sibcall_template): Update prototype.
42 (rs6000_longcall_ref): Delete.
43 (rs6000_call_sysv): Declare.
44 * config/rs6000/rs6000.c (edit_tls_call_insn): New function.
45 (global_tlsarg): New variable.
46 (rs6000_legitimize_tls_address): Rewrite __tls_get_addr call
47 handling.
48 (print_operand): Extract UNSPEC_TLSGD address operand.
49 (rs6000_call_template, rs6000_sibcall_template): Remove arg
50 parameter, extract from second call operand instead.
51 (rs6000_longcall_ref): Make static, localize vars.
52 (rs6000_call_aix): Rename parameter to reflect new usage. Take
53 tlsarg from global_tlsarg. Don't create unused rtl or nop insns.
54 (rs6000_sibcall_aix): Rename parameter to reflect new usage. Take
55 tlsarg from global_tlsarg.
56 (rs6000_call_sysv): New function.
57 * config/rs6000/rs6000.md: Adjust rs6000_call_template and
58 rs6000_sibcall_template throughout.
59 (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix, tls_gd_call_sysv): Delete.
60 (tls_ld_aix, tls_ld_sysv, tls_ld_call_aix, tls_ld_call_sysv): Delete.
61 (tls_gdld_nomark): New insn.
62 (tls_gd): Swap operand order. Simplify mode selection.
63 (tls_gd_high, tls_gd_low): Swap operand order.
64 (tls_ld): Remove const_int 0 vector element from UNSPEC_TLSLD.
65 Simplify mode selection.
66 (tls_ld_high, tls_ld_low): Similarly adjust UNSPEC_TLSLD.
67 (call, call_value): Don't assert for second call operand.
68 Use rs6000_call_sysv.
69
70 2018-11-29 Alan Modra <amodra@gmail.com>
71
72 * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64),
73 (call_nonlocal_darwin64, call_value_indirect_nonlocal_darwin64),
74 (call_value_nonlocal_darwin64): Remove constraints from second call
75 arg, the rounded_stack_size_rtx arg.
76 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix),
77 (tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv, tls_ld_call_aix),
78 (tls_ld_call_sysv, call_local32, call_local64, call_value_local32),
79 (call_value_local64, call_indirect_nonlocal_sysv),
80 (call_nonlocal_sysv, call_nonlocal_sysv_secure),
81 (call_value_indirect_nonlocal_sysv, call_value_nonlocal_sysv),
82 (call_value_nonlocal_sysv_secure, call_local_aix),
83 (call_value_local_aix, call_nonlocal_aix, call_value_nonlocal_aix),
84 (call_indirect_aix, call_value_indirect_aix, call_indirect_elfv2),
85 (call_value_indirect_elfv2, sibcall_local32, sibcall_local64),
86 (sibcall_value_local32, sibcall_value_local64, sibcall_aix),
87 (sibcall_value_aix): Likewise.
88
89 2018-11-29 Alan Modra <amodra@gmail.com>
90
91 * config/rs6000/rs6000.md (TLSmode): Delete mode iterator. Replace
92 with P throughout except for call mems which should use SI.
93 (tls_abi_suffix, tls_sysv_suffix, tls_insn_suffix): Delete mode
94 attributes. Replace with bits, mode and ptrload respectively.
95
96 2018-11-29 Alan Modra <amodra@gmail.com>
97
98 * config/rs6000/rs6000-protos.h (rs6000_indirect_call_template),
99 (rs6000_indirect_sibcall_template): Declare.
100 * config/rs6000/rs6000.c (rs6000_indirect_call_template_1),
101 (rs6000_indirect_call_template, rs6000_indirect_sibcall_template):
102 New functions.
103 * config/rs6000/rs6000.md (call_indirect_nonlocal_sysv),
104 (call_value_indirect_nonlocal_sysv, sibcall_nonlocal_sysv),
105 (call_indirect_aix, call_value_indirect_aix): Use
106 rs6000_indirect_call_template and rs6000_indirect_sibcall_template.
107 call_indirect_elfv2, call_value_indirect_elfv2): Likewise, and
108 handle both speculation and non-speculation cases.
109 (call_indirect_aix_nospec, call_value_indirect_aix_nospec): Delete.
110 (call_indirect_elfv2_nospec, call_value_indirect_elfv2_nospec): Delete.
111
112 2018-11-29 Alan Modra <amodra@gmail.com>
113
114 * config/rs6000/rs6000-protos.h (rs6000_call_template): Declare.
115 (rs6000_sibcall_template): Declare.
116 (macho_call_template): Rename from output_call.
117 * config/rs6000/rs6000.c (rs6000_call_template_1): New function.
118 (rs6000_call_template, rs6000_sibcall_template): Likewise.
119 (macho_call_template): Rename from output_call.
120 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv),
121 (tls_gd_call_aix, tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv),
122 (tls_ld_call_aix, tls_ld_call_sysv, call_nonlocal_sysv),
123 (call_nonlocal_sysv_secure, call_value_nonlocal_sysv),
124 (call_value_nonlocal_sysv_secure, call_nonlocal_aix),
125 (call_value_nonlocal_aix): Use rs6000_call_template and update
126 occurrences of output_call to macho_call_template.
127 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv, sibcall_aix),
128 (sibcall_value_aix): Use rs6000_sibcall_template.
129
130 2018-11-28 Aaron Sawdey <acsawdey@linux.ibm.com>
131
132 * config/rs6000/rs6000-string.c (expand_block_clear): Change how
133 we determine if unaligned vsx is ok.
134
135 2018-11-28 Jan Hubicka <jh@suse.cz>
136
137 * predict.c (determine_unlikely_bbs): Forward declare; also determine
138 edges that are always known to be taken because it is only likely
139 edge out of given BB.
140 (tree_estimate_probability): Call before profile guessing to get bit
141 of extra precision.
142
143 2018-11-28 Jan Hubicka <jh@suse.cz>
144
145 * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Handle
146 profile_probability::always better.
147
148 2018-11-28 Jan Hubicka <jh@suse.cz>
149
150 * profile-count.h (profile_count::split): Give better result when
151 splitting profile_probability::always.
152
153 2018-11-28 Vladimir Makarov <vmakarov@redhat.com>
154
155 PR target/88207
156 * ira-costs.c (scan_one_insn): Process subregs when updating costs
157 for pseudos and allocnos from insn.
158
159 2018-11-28 David Edelsohn <dje.gcc@gmail.com>
160
161 * config/rs6000/aix72.h: Update to match aix71.h changes.
162
163 2018-11-28 Jeff Law <law@redhat.com>
164
165 * config/h8300/constraints.md: Add "C" constraint for call insns.
166 * config/h8300/h8300.md (call, call_value): Turn into a define_expand
167 and define_insn pair. Move invalid call targets into a register in
168 the expander and fix constraints in the matching pattern.
169 * config/h8300/predicates.md (call_expander_operand): Renamed from
170 call_insn_operand. Reject things we shouldn't be trying to handle.
171 (call_insn_operand): New predicate for use by the call/call_value
172 insns.
173 (small_call_insn_operand): Update appropriately.
174
175 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
176
177 * config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
178 calls to strtok with strtok_r.
179
180 2018-11-28 Richard Biener <rguenther@suse.de>
181
182 PR tree-optimization/88223
183 * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
184 over a stored-same value may-alias store make sure to consider
185 partial overlaps which are valid when TBAA reasonings do not
186 apply and byte-granular overlaps are possible at all.
187
188 2018-11-28 Richard Biener <rguenther@suse.de>
189
190 PR tree-optimization/88217
191 * vr-values.c (vr_values::extract_range_from_phi_node): Make
192 sure to handle results > +INF and < -INF correctly when
193 trying to drop down to +INF - 1 or -INF + 1.
194
195 2018-11-28 Alan Modra <amodra@gmail.com>
196
197 * xcoffout.c (do_block): Signed/unsigned warning fix.
198
199 2018-11-28 Richard Biener <rguenther@suse.de>
200
201 PR tree-optimization/79351
202 * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
203 empty CONSTRUCTORs ensure the store is at a constant position.
204
205 2018-11-28 Richard Biener <rguenther@suse.de>
206
207 PR tree-optimization/88229
208 * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
209 is an INTEGER_CST before accessing it so.
210
211 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
212
213 * doc/invoke.texi (-mtune=): Remove obsolete CPU names.
214
215 2018-11-28 Jakub Jelinek <jakub@redhat.com>
216
217 PR target/88189
218 * config/i386/i386.c (ix86_expand_sse_movcc): Handle DFmode and
219 SFmode using sse4_1_blendvs[sd] with TARGET_SSE4_1. Formatting fixes.
220 * config/i386/sse.md (sse4_1_blendv<ssemodesuffix>): New pattern.
221
222 2018-11-27 Martin Liska <mliska@suse.cz>
223
224 * gcov.c (generate_results): Append current_working_directory
225 only when exists.
226
227 2018-11-27 Mike Gulick <mgulick@mathworks.com>
228
229 PR preprocessor/83173
230 * input.c (dump_location_info): Dump reason and included_from
231 fields from line_map_ordinary struct. Fix indentation when
232 location > 5 digits.
233 * diagnostic-show-locus.c (num_digits, num_digits): Move to
234 diagnostic.c to allow it to be utilized by input.c.
235 * diagnostic.c (num_digits, selftest::test_num_digits): Moved
236 here.
237 (selftest::diagnostic_c_tests): Run selftest::test_num_digits.
238 * diagnostic.h (num_digits): Add extern definition.
239
240 2018-11-27 Fredrik Noring <noring@nocrew.org>
241
242 * config/mips/mips.c (mips_reorg_process_insns)
243 (mips_option_override): Handle `-mfix-r5900'.
244 * config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and
245 `mno-fix-r5900'.
246 * config/mips/mips.opt (mfix-r5900): New option.
247 * doc/invoke.texi: Document the `r5900' processor name, and
248 `-mfix-r5900' and `-mno-fix-r5900' options.
249
250 2018-11-27 Jakub Jelinek <jakub@redhat.com>
251
252 PR target/88188
253 * config/rs6000/rs6000.c (print_operand) <case 'D'>: Use
254 output_operand_lossage instead of gcc_assert.
255 <case 't'>: Likewise.
256 <case 'z'>: Likewise.
257 <case 'V'>: Use output_operand_lossage instead of gcc_unreachable.
258
259 2018-11-27 Jeff Law <law@redhat.com>
260
261 * config/riscv/riscv (riscv_block_mvoe_straight): Use RETURN_BEGIN
262 in call to move_by_pieces.
263
264 * config/sh/sh-mem.c (expand_block_move): Use RETURN_BEGIN in call
265 to move_by_pieces.
266
267 * config/lm32/lm32.c (lm32_block_move_inline): Use RETURN_BEGIN in
268 call to move_by_pieces.
269
270 * config/mips/mips.c (mips_block_move_straight): Use RETURN_BEGIN
271 in call to move_by_pieces.
272
273 * config/microblaze/microblaze.c (microblaze_block_move_straight): Use
274 RETURN_BEGIN in call to move_by_pieces.
275 (microblaze_expand_block_move): Likewise.
276
277 2018-11-27 Tamar Christina <tamar.christina@arm.com>
278
279 * doc/md.texi (xorsign): Document it.
280
281 2018-11-27 Martin Liska <mliska@suse.cz>
282
283 * config/gnu-user.h (TARGET_F951_OPTIONS): New.
284 * gcc.c (find_fortran_preinclude_file): New function
285 to handle Fortran pre-include.
286
287 2018-11-27 Martin Liska <mliska@suse.cz>
288
289 * asan.c (asan_emit_stack_protection): Use new enum values
290 instead of int constants.
291 * builtins.c (expand_builtin_memory_copy_args): Replace int
292 type with memop_ret enum type.
293 (expand_builtin_mempcpy_args): Likewise.
294 (expand_builtin_memcpy): Use new enum values
295 instead of int constants. Likewise.
296 (expand_builtin_mempcpy): Likewise.
297 (expand_movstr): Likewise.
298 (expand_builtin_strcpy_args): Likewise.
299 (expand_builtin_stpcpy_1): Likewise.
300 (expand_builtin_strncpy): Likewise.
301 (expand_builtin_memset_args): Likewise.
302 * expr.c (move_by_pieces_d::finish_endp): Rename to ...
303 (move_by_pieces_d::finish_retmode): ... this.
304 (move_by_pieces): Change last argument type to memop_ret.
305 (store_by_pieces): Use new enum values
306 instead of int constants.
307 (emit_block_move_hints): Likewise.
308 (emit_push_insn): Likewise.
309 (store_expr): Likewise.
310 * expr.h (store_by_pieces): Change int to newly added enum
311 type.
312 * rtl.h (enum memop_ret): Define.
313 (move_by_pieces): Use the enum type.
314
315 2018-11-27 Alan Modra <amodra@gmail.com>
316
317 * config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
318 cpu here.
319 (ASM_CPU_SPEC): Do so here. Rewrite using if .. else if .. specs
320 form. Error on missing -mcpu case.
321 * config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
322 (asm_names <!_AIX>): Add missing cpus. Update NULL case. Apply
323 PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
324 * config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
325 else if .. specs form. Error on missing -mcpu case. Don't output
326 duplicate -maltivec. Apply PR63177 fix for -mcpu=powerpc64le.
327
328 2018-11-26 David Malcolm <dmalcolm@redhat.com>
329
330 * dump-context.h (dump_context::dump_loc): Convert 1st param from
331 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
332 const dump_location_t & to const dump_user_location_t &.
333 (dump_context::dump_loc_immediate): Convert 2nd param from
334 const dump_location_t & to const dump_user_location_t &.
335 (dump_context::dump_gimple_stmt): Convert 1st param from
336 dump_flags_t to const dump_metadata_t &.
337 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
338 2nd param from const dump_location_t & to
339 const dump_user_location_t &.
340 (dump_context::dump_gimple_expr): Convert 1st param from
341 dump_flags_t to const dump_metadata_t &.
342 (dump_context::dump_gimple_expr_loc): Likewise; convert
343 2nd param from const dump_location_t & to
344 const dump_user_location_t &.
345 (dump_context::dump_generic_expr): Convert 1st param from
346 dump_flags_t to const dump_metadata_t &.
347 (dump_context::dump_generic_expr_loc): Likewise; convert
348 2nd param from const dump_location_t & to
349 const dump_user_location_t &.
350 (dump_context::dump_printf_va): Convert 1st param from
351 dump_flags_t to const dump_metadata_t &.
352 (dump_context::dump_printf_loc_va): Likewise; convert
353 2nd param from const dump_location_t & to
354 const dump_user_location_t &.
355 (dump_context::dump_dec): Convert 1st param from
356 dump_flags_t to const dump_metadata_t &.
357 (dump_context::dump_symtab_node): Likewise.
358 (dump_context::begin_scope): Split out 2nd param into
359 user and impl locations.
360 (dump_context::ensure_pending_optinfo): Add metadata param.
361 (dump_context::begin_next_optinfo): Replace dump_location_t param
362 with metadata and user location.
363 * dumpfile.c (dump_context::dump_loc): Convert 1st param from
364 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
365 const dump_location_t & to const dump_user_location_t &.
366 (dump_context::dump_loc_immediate): Convert 2nd param from
367 const dump_location_t & to const dump_user_location_t &.
368 (dump_context::dump_gimple_stmt): Convert 1st param from
369 dump_flags_t to const dump_metadata_t &.
370 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
371 2nd param from const dump_location_t & to
372 const dump_user_location_t &.
373 (dump_context::dump_gimple_expr): Convert 1st param from
374 dump_flags_t to const dump_metadata_t &.
375 (dump_context::dump_gimple_expr_loc): Likewise; convert
376 2nd param from const dump_location_t & to
377 const dump_user_location_t &.
378 (dump_context::dump_generic_expr): Convert 1st param from
379 dump_flags_t to const dump_metadata_t &.
380 (dump_context::dump_generic_expr_loc): Likewise; convert
381 2nd param from const dump_location_t & to
382 const dump_user_location_t &.
383 (dump_context::dump_printf_va): Convert 1st param from
384 dump_flags_t to const dump_metadata_t &.
385 (dump_context::dump_printf_loc_va): Likewise; convert
386 2nd param from const dump_location_t & to
387 const dump_user_location_t &.
388 (dump_context::dump_dec): Convert 1st param from
389 dump_flags_t to const dump_metadata_t &.
390 (dump_context::dump_symtab_node): Likewise.
391 (dump_context::begin_scope): Split out 2nd param into
392 user and impl locations.
393 (dump_context::ensure_pending_optinfo): Add metadata param.
394 (dump_context::begin_next_optinfo): Replace dump_location_t param
395 with metadata and user location.
396 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
397 const dump_metadata_t &.
398 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
399 const dump_location_t & to const dump_user_location_t &.
400 (dump_gimple_expr): Convert 1st param from dump_flags_t to
401 const dump_metadata_t &.
402 (dump_gimple_expr_loc): Likewise; convert 2nd param from
403 const dump_location_t & to const dump_user_location_t &.
404 (dump_generic_expr): Convert 1st param from dump_flags_t to
405 const dump_metadata_t &.
406 (dump_generic_expr_loc): Likewise; convert 2nd param from
407 const dump_location_t & to const dump_user_location_t &.
408 (dump_printf): Convert 1st param from dump_flags_t to
409 const dump_metadata_t &.
410 (dump_printf_loc): Likewise; convert 2nd param from
411 const dump_location_t & to const dump_user_location_t &.
412 (dump_dec): Convert 1st param from dump_flags_t to
413 const dump_metadata_t &.
414 (dump_symtab_node): Likewise.
415 (dump_begin_scope): Split out 2nd param into user and impl
416 locations.
417 (selftest::assert_impl_location_eq): New function.
418 (ASSERT_IMPL_LOCATION_EQ): New macro.
419 (selftest::test_impl_location): Update to use
420 ASSERT_IMPL_LOCATION_EQ.
421 (selftest::test_capture_of_dump_calls): Convert "loc" to
422 dump_user_location_t. Add ASSERT_IMPL_LOCATION_EQ throughout,
423 verifying line numbers of dump emissions.
424 * dumpfile.h (class dump_metadata_t): New class.
425 (dump_printf): Convert 1st param from dump_flags_t to
426 const dump_metadata_t &.
427 (dump_printf_loc): Likewise; convert 2nd param from
428 const dump_location_t & to const dump_user_location_t &.
429 (dump_generic_expr_loc): Likewise.
430 (dump_generic_expr): Convert 1st param from dump_flags_t to
431 const dump_metadata_t &.
432 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
433 const dump_location_t & to const dump_user_location_t &.
434 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
435 const dump_metadata_t &.
436 (dump_gimple_expr_loc): Likewise; convert 2nd param from
437 const dump_location_t & to const dump_user_location_t &.
438 (dump_gimple_expr): Convert 1st param from dump_flags_t to
439 const dump_metadata_t &.
440 (dump_symtab_node): Likewise.
441 (dump_dec): Likewise.
442 (dump_begin_scope): Split out 2nd param into user and impl
443 locations.
444 (auto_dump_scope::auto_dump_scope): Split "loc" param into a user
445 location and impl_location, and capture the impl_location.
446 (AUTO_DUMP_SCOPE): Rename param from LOC to USER_LOC.
447 * loop-unroll.c (report_unroll): Update for changes to
448 dump_printf_loc and dump_printf.
449 * opt-problem.cc (opt_problem::opt_problem): Update for change to
450 dump_loc.
451 * optinfo-emit-json.cc
452 (selftest::test_building_json_from_dump_calls): Convert "loc" from
453 dump_location_t to dump_user_location_t.
454 * optinfo.cc (optinfo::emit_for_opt_problem): Update for change in
455 dump_loc_immediate.
456 * profile.c (compute_branch_probabilities): Update for change to
457 dump_printf_loc.
458 * selftest.h (ASSERT_STR_CONTAINS_AT): New macro.
459 * tree-vect-slp.c (vect_print_slp_tree): Update for change to
460 dump_printf_loc.
461
462 2018-11-27 Jozef Lawrynowicz <jozef.l@mittosystems.com>
463
464 * doc/sourcebuild.texi: Document check_effective_target_int_eq_float
465 and check_effective_target_ptr_eq_long.
466
467 2018-11-27 Alan Modra <amodra@gmail.com>
468
469 * config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
470 (powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
471 (powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
472 (powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
473 (powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
474 * config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
475 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
476 (ASM_APP_ON, ASM_APP_OFF): Don't define.
477 * config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
478 * config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
479 * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
480 * config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
481 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
482 * config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
483 * config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
484 (GNU_USER_TARGET_CRTN): Redefine.
485 (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
486 (LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
487 (CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
488 (STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
489 (ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
490 (UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
491 (LINK_EH_SPEC): Don't define.
492
493 2018-11-26 Martin Sebor <msebor@redhat.com>
494
495 PR 87756
496 * expr.c (string_constant): Handle top-level decls of all character
497 types and subobjects of narrow character type.
498
499 2018-11-27 Alan Modra <amodra@gmail.com>
500
501 * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
502 * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
503 GNU_USER_TARGET_OS_CPP_BUILTINS.
504 (RS6000_ABI_NAME): Define.
505 * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
506 GNU_USER_TARGET_OS_CPP_BUILTINS.
507 (MUSL_DYNAMIC_LINKER32): Undef before defining.
508 (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
509 (CHOOSE_DYNAMIC_LINKER): Don't define.
510 (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
511 * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
512 (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
513 not already defined.
514 (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
515 TARGET_OS_CPP_BUILTINS.
516
517 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
518
519 * doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
520
521 2018-11-26 Jakub Jelinek <jakub@redhat.com>
522
523 PR target/88195
524 * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
525 and !TARGET_64BIT, return NULL_TREE.
526
527 PR c++/86900
528 * dwarf2out.c (secname_for_decl): For functions with
529 DECL_SECTION_NAME if in_cold_section_p, try to return
530 current_function_section's name if it is a named section.
531
532 2018-11-26 Maya Rashish <coypu@sdf.org>
533
534 PR target/58397
535 * config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
536 * config/x-netbsd: New file.
537 * config/host-netbsd: New file.
538
539 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
540
541 * doc/sourcebuild.texi: Document check_effective_target_size20plus.
542 Clarify documentation for check_effective_target_size32plus.
543
544 2018-11-26 Aaron Sawdey <acsawdey@linux.ibm.com>
545
546 * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
547 and modify expand_strncmp_vec_sequence.
548 (emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
549 (generate_6432_conversion): New function.
550 (expand_block_compare): Add support for vsx.
551 (expand_block_compare_gpr): New function.
552 * config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
553 default limit to 63 because of more compact vsx code.
554
555 2018-11-26 Uros Bizjak <ubizjak@gmail.com>
556
557 PR target/88178
558 * config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
559 for registers for which no debug information can be generated.
560 Use INVALID_REGNUM for non-existent registers.
561 (dbx64_register_map): Ditto.
562 (svr4_dbx_register_map): Ditto.
563
564 2018-11-26 Sandra Loosemore <sandra@codesourcery.com>
565
566 PR c/57182
567 * doc/invoke.texi (Optimize Options): Document that
568 -freorder-functions also uses "hot" and "cold" attributes.
569
570 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
571
572 * config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
573
574 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
575
576 * config/arm/types.md (mul64): Rename to...
577 (widen_mul64): ... This.
578 * config/arm/arm-generic.md: Rename mul64 to widen_mul64.
579 * config/arm/cortex-a15.md: Likewise.
580 * config/arm/cortex-a5.md: Likewise.
581 * config/arm/cortex-a53.md: Likewise.
582 * config/arm/cortex-a57.md: Likewise.
583 * config/arm/cortex-a7.md: Likewise.
584 * config/arm/cortex-m4.md: Likewise.
585 * config/arm/exynos-m1.md: Likewise.
586 * config/arm/marvell-pj4.md: Likewise.
587 * config/arm/xgene1.md: Likewise.
588
589 2018-11-26 Richard Biener <rguenther@suse.de>
590
591 PR tree-optimization/88182
592 * tree-vect-loop.c (vectorizable_reduction): Pick up single
593 correct reduc_def_info.
594 * tree-vect-slp.c (vect_analyze_slp_instance): Set
595 STMT_VINFO_REDUC_DEF of the first stmt.
596
597 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
598
599 * doc/invoke.texi: Document z14/arch12 -march option.
600
601 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
602
603 PR c/57166
604 * doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
605 (Warning Options): Likewise.
606
607 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
608
609 PR web/79738
610 * doc/extend.texi (Common Function Attributes): Clarify that
611 functions with "const" attribute can read const global variables.
612
613 2018-11-26 Alan Modra <amodra@gmail.com>
614
615 * config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
616
617 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
618
619 PR other/54265
620 * doc/extend.texi (Common Variable Attributes): Use preferred
621 placement of type attributes in examples, plus whitespace fixes.
622 (Type Attributes): Clarify why placement of attributes
623 immediately after struct/union/enum keyword is preferred.
624 (Common Type Attributes): Use preferred placement of type
625 attributes in examples, plus more whitespace fixes.
626
627 2018-11-25 Paul Koning <ni1d@arrl.net>
628
629 * config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
630
631 2018-11-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
632
633 * doc/sourcebuild.texi (Effective-Target Keywords, Environment
634 attributes): Document d_runtime.
635
636 2018-11-25 Vladimir Makarov <vmakarov@redhat.com>
637
638 PR bootstrap/88157
639 * ira-costs.c (record_operand_costs): Initiate register move cost
640 for mode.
641
642 2018-11-23 Jeff Law <law@redhat.com>
643
644 PR rtl-optimization/87468
645 * tree-ssa-threadupdate.c (create_block_for_threading): Clear
646 EDGE_IGNORE on all outgoing edges of the duplicate block.
647
648 2018-11-23 Vladimir Makarov <vmakarov@redhat.com>
649
650 PR bootstrap/88157
651 * ira-costs.c (record_operand_costs): Use bigger hard reg class if
652 its mode does not fit to the original class.
653
654 2018-11-23 Martin Sebor <msebor@redhat.com>
655
656 PR tree-optimization/87756
657 * expr.c (string_constant): Synthesize a string literal from
658 the address of a constant character.
659 * tree.c (build_string_literal): Add an argument.
660 * tree.h (build_string_literal): Same.
661
662 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
663
664 * config/aarch64/aarch64-cores.def: Define emag.
665 * config/aarch64/aarch64-tune.md: Regenerated with emag.
666 * config/aarch64/aarch64.c (emag_tunings): New struct.
667 * doc/invoke.texi: Document mtune value.
668
669 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
670 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
671
672 * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
673 for GCC 9.
674 * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
675 prefetch tunings.
676 * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
677 costs.
678 * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
679 for XGene1.
680
681 2018-11-23 Richard Biener <rguenther@suse.de>
682
683 PR tree-optimization/88149
684 * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
685 the case where there are two different def types for the
686 same operand at different operand position in the same stmt.
687
688 2018-23-11 Mihail Ionescu <mihail.ionescu@arm.com>
689
690 * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
691 gen_atomic_compare_swap_1.
692 (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
693 (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
694 (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
695 (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
696 (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
697 checks.
698 * config/arm/arm.md (neon_vext<mode>),
699 (neon_vrev64<mode>, neon_vrev32<mode>),
700 (neon_vrev16<mode>, neon_vtrn<mode>_internal),
701 (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
702 before the pattern name.
703 * config/arm/sync.md:
704 (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
705 (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
706
707 2018-11-23 Jakub Jelinek <jakub@redhat.com>
708
709 PR tree-optimization/86614
710 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
711 if TREE_NO_WARNING is set on ref.ref.
712
713 2018-11-22 Sandra Loosemore <sandra@codesourcery.com>
714 Alan Coopersmith <alan.coopersmith@oracle.com>
715
716 PR c/53608
717 * doc/extend.texi (Designated Inits): Clarify handling of multiple
718 initializers for unions.
719
720 2018-11-22 Jan Hubicka <jh@suse.cz>
721
722 PR lto/88142
723 * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
724 parameters; do not warn here.
725 (odr_subtypes_equivalent_p): Likewise.
726 (warn_odr): Fix typo.
727 (warn_types_mismatch): Do not output confused warnings on integer types.
728 (odr_types_equivalent_p): Update.
729
730 2018-11-22 Jakub Jelinek <jakub@redhat.com>
731
732 * config/i386/i386.c (ix86_option_override_internal,
733 ix86_can_inline_p, classify_argument, construct_container,
734 ix86_expand_prologue, ix86_expand_split_stack_prologue,
735 ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
736 expand_setmem_epilogue_via_loop, promote_duplicated_reg,
737 ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
738 Formatting fixes.
739
740 * config/i386/i386.c (ix86_option_override_internal): For
741 stack_protector_guard related options, use opts_set->x_ instead
742 of global_options_set. and prefix options with opts->x_ . Move
743 defaults for offset and reg into else block.
744
745 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
746
747 * config/i386/i386.c (ix86_check_avx_upper_register):
748 Return true for all SSE registers with mode bitsize > 128.
749
750 2018-11-22 Vladimir Makarov <vmakarov@redhat.com>
751
752 PR rtl-optimization/87718
753 * ira-costs.c: Remove trailing white-spaces.
754 (record_operand_costs): Add a special treatment for moves
755 involving a hard register.
756
757 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
758
759 * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
760 (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
761
762 2018-11-22 Martin Liska <mliska@suse.cz>
763
764 * common/config/i386/i386-common.c (processor_names): Add
765 static assert and add missing "znver2".
766 (ix86_get_valid_option_values): Add checking assert for null
767 values and add "native" value if feasible.
768 * config/i386/i386.h: Do not declare size of processor_names.
769 * common/config/i386/i386-common.c:
770 * config/i386/i386.c: Add static assert for size
771 of processor_cost_table.
772
773 2018-11-22 Thomas Preud'homme <thomas.preudhomme@linaro.org>
774
775 * target-insns.def (stack_protect_combined_set): Define new standard
776 pattern name.
777 (stack_protect_combined_test): Likewise.
778 * cfgexpand.c (stack_protect_prologue): Try new
779 stack_protect_combined_set pattern first.
780 * function.c (stack_protect_epilogue): Try new
781 stack_protect_combined_test pattern first.
782 * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
783 parameters to control which register to use as PIC register and force
784 reloading PIC register respectively. Insert in the stream of insns if
785 possible.
786 (legitimize_pic_address): Expose above new parameters in prototype and
787 adapt recursive calls accordingly. Use pic_reg if non null instead of
788 cached one.
789 (arm_load_pic_register): Add pic_reg parameter and use it if non null.
790 (arm_legitimize_address): Adapt to new legitimize_pic_address
791 prototype.
792 (thumb_legitimize_address): Likewise.
793 (arm_emit_call_insn): Adapt to require_pic_register prototype change.
794 (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
795 (thumb1_expand_prologue): Likewise.
796 * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
797 change.
798 (arm_load_pic_register): Likewise.
799 * config/arm/predicated.md (guard_addr_operand): New predicate.
800 (guard_operand): New predicate.
801 * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
802 prototype change.
803 (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
804 prototype change.
805 (stack_protect_combined_set): New expander..
806 (stack_protect_combined_set_insn): New insn_and_split pattern.
807 (stack_protect_set_insn): New insn pattern.
808 (stack_protect_combined_test): New expander.
809 (stack_protect_combined_test_insn): New insn_and_split pattern.
810 (arm_stack_protect_test_insn): New insn pattern.
811 * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
812 * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
813 (UNSPEC_SP_TEST): Likewise.
814 * doc/md.texi (stack_protect_combined_set): Document new standard
815 pattern name.
816 (stack_protect_set): Clarify that the operand for guard's address is
817 legal.
818 (stack_protect_combined_test): Document new standard pattern name.
819 (stack_protect_test): Clarify that the operand for guard's address is
820 legal.
821
822 2018-11-22 Richard Biener <rguenther@suse.de>
823
824 PR tree-optimization/88148
825 * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
826 valueization callback parameter and handle it.
827 * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
828 * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
829
830 2018-11-22 Richard Biener <rguenther@suse.de>
831
832 PR lto/87229
833 PR lto/88112
834 * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
835 which can appear in size expressions.
836 * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
837 CALL_EXPR_BY_DESCRIPTOR.
838 (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
839 * tree-streamer-out.c (pack_ts_base_value_fields): Stream
840 CALL_EXPR_BY_DESCRIPTOR.
841 (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
842
843 Revert
844 PR lto/87229
845 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
846 sizepos values.
847
848 2018-11-22 Richard Biener <rguenther@suse.de>
849
850 PR tree-optimization/88069
851 * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
852 apply to default defs.
853
854 2018-11-22 Jakub Jelinek <jakub@redhat.com>
855
856 PR target/85644
857 PR target/86832
858 * config/i386/i386.c (ix86_option_override_internal): Default
859 ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
860 is defined.
861 * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
862 stack_protect_test, stack_protect_test_<mode>): Use empty condition
863 instead of TARGET_SSP_TLS_GUARD.
864
865 2018-11-22 Martin Liska <mliska@suse.cz>
866
867 PR sanitizer/88017
868 * config/i386/i386.c (ix86_option_override_internal): Error
869 about usage -mabi=ms and -fsanitize=thread.
870
871 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
872
873 Revert the revert:
874 2013-10-26 Vladimir Makarov <vmakarov@redhat.com>
875
876 Revert:
877 2013-10-25 Vladimir Makarov <vmakarov@redhat.com>
878
879 * lra-spills.c (lra_final_code_change): Remove useless move insns.
880
881 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
882
883 PR middle-end/88129
884 * function.c (expand_function_end): Do not emit extra blockage insn.
885
886 2018-11-21 Lokesh Janghel <lokeshjanghel91@gmail.com>
887
888 PR target/85667
889 * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
890 of FIRST_SSE_REG for 4 or 8 byte modes.
891
892 2018-11-21 Jan Hubicka <jh@suse.cz>
893
894 PR lto/87957
895 * tree.c (fld_decl_context): Break out from ...
896 (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
897 DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
898 (fld_incomplete_type_of): Build copy of TYP_DECL.
899 * ipa-devirt.c (free_enum_values): Rename to ...
900 (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
901 and TREE_TYPEs of TYPE_DECLs.
902 (get_odr_type): Initialize odr_vtable_hash if needed.
903
904 2018-11-21 Alexandre Oliva <oliva@adacore.com>
905
906 * final.c (compute_discriminator): Declare. Renamed from...
907 (maybe_set_discriminator): ... this. Set and return a local.
908 (override_discriminator): New.
909 (final_scan_insn_1): Set it.
910 (notice_source_line): Adjust. Always set discriminator.
911
912 2018-11-21 Jakub Jelinek <jakub@redhat.com>
913
914 PR target/87839
915 * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
916 rIJ constraint for aarch64_plus_operand rather than rn.
917
918 2018-11-21 Renlin Li <renlin.li@arm.com>
919
920 PR middle-end/84877
921 * explow.h (get_dynamic_stack_size): Declare it as external.
922 * explow.c (record_new_stack_level): Remove function static attribute.
923 * function.c (assign_stack_local_1): Dynamically align the stack slot
924 addr for parameter copy on the stack.
925
926 2018-11-21 Richard Biener <rguenther@suse.de>
927
928 PR bootstrap/88133
929 * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
930 * Makefile.in (bitmap.o-warn): Remove again.
931
932 2018-11-20 Jeff Law <law@redhat.com>
933
934 PR tree-optimization/88069
935 * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
936 degenerate virtual PHIs.
937
938 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
939
940 PR target/87317
941 * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
942 nonimmediate_operand with register_operand.
943 (avx2_<code>v8qiv8si2<mask_name>): Likewise.
944 (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
945 (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
946 (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
947 (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
948 (avx2_<code>v4qiv4di2<mask_name>): Likewise.
949 (avx2_<code>v4hiv4di2<mask_name>): Likewise.
950 (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
951 (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
952 (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
953 (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
954 (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
955 (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
956 (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
957 (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
958 (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
959 (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
960 (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
961 (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
962 (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
963 (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
964 (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
965 (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
966 (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
967 (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
968 (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
969 (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
970
971 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
972
973 * read-rtl.c (apply_subst_iterator): Handle define_split and
974 define_insn_and_split.
975
976 2018-11-21 Jakub Jelinek <jakub@redhat.com>
977
978 PR rtl-optimization/87817
979 * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
980 *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
981 in the pattern to avoid triggering UB when operands[2] is zero.
982 (tbm_bextri_<mode>): New expander. Renamed the old define_insn to ...
983 (*tbm_bextri_<mode>): ... this.
984
985 2018-11-21 Tom de Vries <tdevries@suse.de>
986
987 PR driver/79855
988 * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
989 period.
990
991 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com>
992
993 * configure.ac: Add check for Binutils to determine whether vector
994 load/store alignments hints are being supported.
995 * config.in: Regenerate.
996 * configure: Regenerate.
997 * config/s390/s390.c (print_operand): Support new output
998 modifier A.
999 * config/s390/s390.md ("movti"): Append alignment hint output
1000 using the new output modifier 'A'.
1001 * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
1002 ("*vec_ti_to_v1ti"): Likewise.
1003
1004 2018-11-20 Martin Sebor <msebor@redhat.com>
1005
1006 * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
1007
1008 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1009
1010 PR lto/84044
1011 * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
1012 compare ENUM values.
1013
1014 2018-11-20 Jakub Jelinek <jakub@redhat.com>
1015
1016 PR tree-optimization/87895
1017 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
1018 or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
1019 (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
1020 redirects edges to EXIT to edges to incr_bb, iterate while EXIT
1021 has any preds and always use EDGE_PRED (, 0).
1022
1023 2018-11-20 Uros Bizjak <ubizjak@gmail.com>
1024
1025 PR target/88070
1026 * mode-switching.c (create_pre_exit): After reload, always split the
1027 fallthrough edge to the exit block.
1028
1029 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1030
1031 * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
1032 * tree.c (build_array_type_1): Forward declare.
1033 (fld_type_variant_equal_p): Add INNER_TYPE parameter.
1034 (fld_type_variant): Likewise.
1035 (fld_simplified_types): New hash.
1036 (fld_process_array_type): New function.
1037 (fld_incomplete_type_of): Handle array and enumeration types.
1038 (fld_simplified_type): Handle simplification of arrays.
1039 (free_lang_data): Allocate and free simplified types hash.
1040
1041 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1042
1043 PR lto/87957
1044 * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
1045 when sybtype already violates ODR.
1046 (get_odr_type): Do not ICE when insert is false and type duplicate
1047 is not registered yet.
1048 (register_odr_type): Be sure to register subtypes first.
1049
1050 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
1051
1052 * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
1053 DImode parts of the target operand.
1054
1055 2018-11-20 Nathan Sidwell <nathan@acm.org>
1056
1057 PR 87926
1058 * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
1059
1060 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1061
1062 PR lto/87997
1063 * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
1064 type checking to...
1065 (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
1066
1067 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1068
1069 PR ipa/87706
1070 * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
1071 * ipa.c (possible_inline_candidate_p): Break out from ..
1072 (process_references): ... here ; drop before_inlining_p;
1073 cleanup handling of alises.
1074 (walk_polymorphic_call_targets): Likewise.
1075 (symbol_table::remove_unreachable_nodes): Likewise.
1076 * passes.c (pass_data_ipa_remove_symbols): New structure.
1077 (pass_ipa_remove_symbols): New pass.
1078 (make_pass_ipa_remove_symbols): New function.
1079 * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
1080 * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
1081
1082 2018-11-20 Richard Biener <rguenther@suse.de>
1083
1084 * tree-vect-stmts.c (vectorizable_condition): Do not get
1085 at else_clause vect def for EXTRACT_LAST_REDUCTION. Remove
1086 pointless vect_is_simple_use calls.
1087
1088 2018-11-20 Richard Biener <rguenther@suse.de>
1089
1090 PR tree-optimization/88074
1091 * tree-ssa-dom.c (pass_dominator::execute): Do not walk
1092 backedges.
1093
1094 2018-11-20 Richard Biener <rguenther@suse.de>
1095
1096 PR tree-optimization/88069
1097 * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
1098 virtual PHI arguments.
1099
1100 2018-11-20 Ilya Leoshkevich <iii@linux.ibm.com>
1101
1102 PR target/88083
1103 * config/s390/s390.md: Skip LT(G) peephole when literal pool is
1104 involved.
1105 * rtl.h (contains_constant_pool_address_p): New function.
1106 * rtlanal.c (contains_constant_pool_address_p): Likewise.
1107
1108 2018-11-20 Richard Biener <rguenther@suse.de>
1109
1110 PR middle-end/83215
1111 * alias.c (component_uses_parent_alias_set_from): Remove
1112 alias-set zero and TYPE_TYPELESS_STORAGE case both already
1113 handled in other ways.
1114
1115 2018-11-20 Richard Biener <rguenther@suse.de>
1116
1117 PR tree-optimization/88087
1118 * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
1119 call fntype.
1120 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
1121 call fntype.
1122
1123 2018-11-20 Richard Biener <rguenther@suse.de>
1124
1125 PR middle-end/88089
1126 * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
1127
1128 2018-11-19 Jan Hubicka <hubicka@ucw.cz>
1129
1130 PR lto/87957
1131 * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
1132
1133 2018-11-19 Sandra Loosemore <sandra@codesourcery.com>
1134
1135 PR driver/50250
1136 * doc/invoke.texi (Link Options): Mention shared libraries
1137 in documentation for the -l option. Simplify discussion and
1138 point to the system linker documentation for details.
1139
1140 2018-11-19 Peter Bergner <bergner@linux.ibm.com>
1141
1142 PR rtl-optimization/88033
1143 * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
1144 to itself. Use HARD_REGISTER_NUM_P.
1145
1146 2018-11-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1147
1148 * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
1149 of the loop if vf is non-constant.
1150
1151 2018-11-19 David Malcolm <dmalcolm@redhat.com>
1152
1153 PR tree-optimization/87025
1154 * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
1155 immediately after creating the scope optinfo.
1156 (selftest::test_pr87025): New function.
1157 (selftest::dumpfile_c_tests): Call it.
1158 * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
1159 that we're not popping the top-level records array.
1160 * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
1161 not changing the kind of a "scope" optinfo.
1162
1163 2018-11-19 David Malcolm <dmalcolm@redhat.com>
1164
1165 PR tree-optimization/87025
1166 * dump-context.h: Include "optinfo.h".
1167 (class optrecord_json_writer): New forward decl.
1168 (dump_context::forcibly_enable_optinfo_p): Delete.
1169 (dump_context::optinfo_enabled_p): New member function.
1170 (dump_context::optimization_records_enabled_p): New member
1171 function.
1172 (dump_context::set_json_writer): New member function.
1173 (dump_context::emit_optinfo): New member function.
1174 (dump_context::m_forcibly_enable_optinfo): Delete.
1175 (dump_context::m_json_writer): New member data.
1176 * dumpfile.c (dump_context::set_json_writer): New member function.
1177 (dump_context::finish_any_json_writer): New member function.
1178 (dump_context::end_scope): Replace call to
1179 optimization_records_maybe_pop_dump_scope with call to
1180 m_json_writer->pop_scope.
1181 (dump_context::optinfo_enabled_p): New member function.
1182 (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
1183 to dump_context::emit_optinfo.
1184 (dump_context::emit_optinfo): New member function.
1185 (temp_dump_context::temp_dump_context): Replace
1186 m_forcibly_enable_optinfo with call to set_json_writer.
1187 (temp_dump_context::~temp_dump_context): Clean up any json writer.
1188 * optinfo-emit-json.cc (class optrecord_json_writer): Move to
1189 optinfo-emit-json.h
1190 (the_json_writer): Delete.
1191 (optimization_records_start): Delete.
1192 (optimization_records_finish): Delete.
1193 (optimization_records_enabled_p): Delete, in favor of
1194 dump_context::optimization_records_enabled_p.
1195 (optimization_records_maybe_record_optinfo): Delete.
1196 (optimization_records_maybe_pop_dump_scope): Delete.
1197 * optinfo-emit-json.h: Include "json.h". Delete forward
1198 decl of opt_pass.
1199 (optimization_records_start): Delete.
1200 (optimization_records_finish): Delete.
1201 (optimization_records_enabled_p): Delete.
1202 (optimization_records_maybe_record_optinfo): Delete.
1203 (optimization_records_maybe_pop_dump_scope): Delete.
1204 (class optrecord_json_writer): Move here from
1205 optinfo-emit-json.cc.
1206 * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
1207 to optinfo::emit with call to dump_context::emit_optinfo.
1208 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
1209 (optinfo_enabled_p): Delete, in favor of
1210 dump_context::optinfo_enabled_p.
1211 (optinfo_wants_inlining_info_p): Update for conversion o
1212 optimization_records_enabled_p to a member function of
1213 dump_context.
1214 * optinfo.h (optinfo_enabled_p): Delete, in favor of
1215 dump_context::optinfo_enabled_p.
1216 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
1217 * toplev.c: Include "dump-context.h".
1218 (compile_file): Replace call to optimization_records_finish with
1219 dump_context::finish_any_json_writer.
1220 (do_compile): Replace call to optimization_records_start with
1221 conditionally creating a optrecord_json_writer for the
1222 dump_context.
1223
1224 2018-11-19 Jakub Jelinek <jakub@redhat.com>
1225
1226 PR tree-optimization/88071
1227 * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
1228 of false as last argument to gsi_remove.
1229 * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
1230 false as last argument to gsi_replace.
1231
1232 PR debug/87039
1233 * omp-expand.c: Don't include debug.h.
1234 (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
1235 from innermost outer parallel, task, teams or target that has a
1236 child_fn set, or, if there is no such outer region, use
1237 current_function_decl. Do the DECL_CONTEXT adjustment regardless of
1238 whether a suitable BLOCK is found or not.
1239 (expand_parallel_call, expand_teams_call): Don't call
1240 adjust_context_and_scope here.
1241 (grid_expand_target_grid_body): Revert 2017-01-25 changes.
1242 (expand_omp_taskreg, expand_omp_target): Likewise. Call
1243 adjust_context_and_scope.
1244 * dwarf2out.c (dwarf2out_early_global_decl): For
1245 decl_function_context recurse instead of calling dwarf2out_decl.
1246
1247 2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
1248
1249 PR rtl-optimization/85925
1250 * rtl.h (word_register_operation_p): New predicate.
1251 * combine.c (record_dead_and_set_regs_1): Only apply specific handling
1252 for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
1253 * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
1254 (num_sign_bit_copies1): Likewise.
1255
1256 2018-11-19 Richard Biener <rguenther@suse.de>
1257
1258 PR lto/87229
1259 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
1260 sizepos values.
1261
1262 2018-11-19 Eric Botcazou <ebotcazou@adacore.com>
1263
1264 * compare-elim.c (struct comparison): Add not_in_a field.
1265 (is_not): New static function.
1266 (strip_not): Likewise.
1267 (conforming_compare): Handle a NOT in the first operand.
1268 (can_eliminate_compare): Likewise.
1269 (find_comparison_dom_walker::before_dom_children): Likewise.
1270 (try_eliminate_compare): Likewise.
1271 * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
1272 (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
1273
1274 2018-11-19 Jonathan Wakely <jwakely@redhat.com>
1275
1276 * doc/extend.texi (Common Type Attributes): Fix typos.
1277
1278 2018-11-19 Martin Liska <mliska@suse.cz>
1279
1280 PR gcov-profile/88045
1281 * coverage.c (coverage_begin_function): Add assert.
1282
1283 2018-11-18 Sandra Loosemore <sandra@codesourcery.com>
1284
1285 PR other/40498
1286 * doc/extend.texi (Common Function Attributes): Document that
1287 no_instrument_function applies to -p and -pg, too.
1288 * doc/invoke.texi (Instrumentation Options): Add cross-references
1289 to docs for -p, -pg, and -finstrument-functions.
1290
1291 2018-11-18 Alan Modra <amodra@gmail.com>
1292
1293 * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
1294 (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
1295 (GNU_USER_TARGET_CRTN): Define.
1296 (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
1297 (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
1298
1299 2018-11-18 Alan Modra <amodra@gmail.com>
1300
1301 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
1302 !HAVE_LD_PIE variant.
1303 (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
1304
1305 2018-11-17 Nick Clifton <nickc@redhat.com>
1306 Sandra Loosemore <sandra@codesourcery.com>
1307
1308 PR driver/31357
1309 * doc/invoke.texi (Overall Options): Document that --help and
1310 --help=<value> options cannot be combined.
1311
1312 2018-11-17 Jim Wilson <jimw@sifive.com>
1313
1314 * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
1315 (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
1316 epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
1317 (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset. Set it
1318 to step2 if frame_pointer_needed and step1 is 0.
1319
1320 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
1321
1322 PR c++/4225
1323 * doc/cpp.texi (System Headers): Add note about implicit
1324 extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
1325
1326 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
1327
1328 PR c++/4025
1329 * doc/invoke.texi (C++ Dialect Options): Clarify usage of
1330 -fno-implicit-templates.
1331
1332 2018-11-17 Jakub Jelinek <jakub@redhat.com>
1333
1334 PR tree-optimization/87546
1335 * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
1336 min_precision variable, initially set it to orig_precision, only does
1337 something if op_type's precision is <= min_precision and update
1338 min_precision whenever calling set_op.
1339
1340 2018-11-16 Jan Hubicka <hubicka@ucw.cz>
1341
1342 PR ipa/87957
1343 * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
1344
1345 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
1346
1347 * doc/invoke.texi (Option Summary): Fix whitespace and line
1348 breaks in @gccoptlist environments.
1349 (Warning Options): Likewise.
1350 (Optimize Options): Likewise.
1351 (PowerPC SPE Options): Likewise.
1352 (RS/6000 and PowerPC Options): Likewise.
1353
1354 2018-11-16 Jeff Law <law@redhat.com>
1355
1356 * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
1357 gcc_assert.
1358
1359 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
1360
1361 PR middle-end/23197
1362 * doc/invoke.texi (Optimize Options): Update options enabled by
1363 fprofile-generate, -fprofile-use, and -fauto-profile.
1364
1365 2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1366
1367 PR target/87927
1368 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
1369 Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
1370 * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
1371 the byte_op hook.
1372 * target.h: Add psi, pdi, pti to struct asm_int_op definition.
1373 * targhooks.c (default_print_patchable_function_entry): Assert
1374 asm_int_op does not return a NULL string.
1375 * varasm.c (integer_asm_op): Return the op for a partial int type
1376 when the requested size does not correspond to an integer type.
1377 * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
1378 * doc/tm.texi: Regenerate.
1379
1380 2018-11-12 Jason Merrill <jason@redhat.com>
1381
1382 * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
1383
1384 2018-11-16 Michael Meissner <meissner@linux.ibm.com>
1385
1386 * config/rs6000/constraints.md (wF constraint): Remove power9
1387 fusion documentation. Just document wF's use for power8 fusion.
1388 * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
1389 (fusion_gpr_addis): Delete power9 fusion support. Change power8
1390 fusion support to require the upper 12 bits to be all 0's or all
1391 1's.
1392 (fusion_gpr_mem_load): Add comment.
1393 (fusion_addis_mem_combo_load): Remove power9 fusion support.
1394 (fusion_addis_mem_combo_store): Delete.
1395 (fusion_offsettable_mem_operand): Delete.
1396 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
1397 power8 fusion here.
1398 (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
1399 (POWERPC_MASKS): Delete power9 fusion.
1400 * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
1401 (fusion_p9_p): Delete.
1402 (expand_fusion_p9_load): Delete.
1403 (expand_fusion_p9_store): Delete.
1404 (emit_fusion_p9_load): Delete.
1405 (emit_fusion_p9_store): Delete.
1406 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
1407 fusion support.
1408 (rs6000_option_override_internal): Set power8 fusion based on
1409 whether we are tuning for power8. Delete power9 fusion support.
1410 (rs6000_opt_masks): Delete -mpower9-fusion switch.
1411 (emit_fusion_load): Rename emit_fusion_load_store to
1412 emit_fusion_load, and drop fusion store support. Update callers.
1413 (emit_fusion_load_store): Likewise.
1414 (emit_fusion_gpr_load): Likewise.
1415 (fusion_p9_p): Delete.
1416 (expand_fusion_p9_load): Delete.
1417 (expand_fusion_p9_store): Delete.
1418 (emit_fusion_p9_load): Delete.
1419 (emit_fusion_p9_store): Delete.
1420 * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
1421 (GPR_FUSION): Delete.
1422 (FPR_FUSION): Delete.
1423 (power9 fusion peephole2s): Delete.
1424 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
1425 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
1426 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
1427 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
1428 (fusion_p9_<mode>_constant): Delete.
1429 * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
1430 power9 fusion switch.
1431 * doc/md.texi (PowerPC constraints): Update wF constraint
1432 documentation for power8 fusion only.
1433
1434 2018-11-16 Jakub Jelinek <jakub@redhat.com>
1435
1436 PR rtl-optimization/87475
1437 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
1438 CROSSING_JUMP_P insns.
1439 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
1440
1441 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
1442
1443 PR target/88051
1444 * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
1445 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
1446 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
1447
1448 2018-11-16 Jakub Jelinek <jakub@redhat.com>
1449
1450 PR middle-end/88032
1451 * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
1452 is VOIDmode, in which case use int_mode. Similarly for op1_mode.
1453
1454 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
1455
1456 * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
1457 location_t parameter.
1458 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
1459 (switch_decision_tree::do_jump_if_equal): Likewise.
1460 * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
1461 of switch statement to emit_case_nodes.
1462 (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
1463 set it on the newly built GIMPLE comparison statement.
1464 (switch_decision_tree::do_jump_if_equal): Likewise.
1465 (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
1466 in calls to do_jump_if_equal as well as recursive calls.
1467
1468 2018-11-16 Andi Kleen <ak@linux.intel.com>
1469
1470 * config/i386/i386.md: Allow memory operands to ptwrite.
1471
1472 2018-11-16 Michael Matz <matz@suse.de>
1473
1474 * system.h (PRsa): New macro.
1475 (SIZE_AMOUNT): Cast number to uint64_t.
1476 * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
1477 (pool_usage::dump_footer): Likewise and also use PRIu64.
1478 * bitmap.h (bitmap_usage::dump): Likewise.
1479 * ggc-common.c (ggc_usage::dump): Likewise.
1480 * ggc-page.c (ggc_print_statistics): Likewise.
1481 * input.c (dump_line_table_statistics): Likewise.
1482 * mem-stats.h (mem_usage::dump): Likewise.
1483 (mem_usage::dump_footer): Likewise.
1484 * rtl.c (dump_rtx_statistics): Likewise.
1485 * tree-cfg.c (dump_cfg_stats): Likewise.
1486 * tree-dfa.c (dump_dfa_stats): Likewise.
1487 * tree-phinodes.c (phinodes_print_statistics): Likewise.
1488 * tree-ssanames (ssanames_print_statistics): Likewise.
1489 * vec.c (vec_usage::dump): Likewise.
1490 (vec_usage::dump_footer): Likewise.
1491
1492 2018-11-16 Richard Biener <rguenther@suse.de>
1493
1494 PR tree-optimization/88011
1495 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
1496 replacing set_value_range_to_undefined and
1497 set_value_range_to_varying with method calls.
1498
1499 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
1500
1501 * config/s390/s390.md
1502 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
1503 assembler.
1504 (*r<noxa>sbg_<mode>_sll): Likewise.
1505 (*r<noxa>sbg_<mode>_srl): Likewise.
1506 (*r<noxa>sbg_sidi_srl): New pattern.
1507
1508 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
1509
1510 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
1511 Default to TARGET_VXWORKS_RTP.
1512 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
1513 of TARGET_VXWORKS_RTP.
1514 * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
1515 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
1516 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
1517
1518 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
1519
1520 PR c++/25759
1521 * doc/extend.texi (Common Type Attributes): Make it explicit
1522 that attribute "packed" can apply to C++ classes.
1523
1524 2018-11-15 Martin Sebor <msebor@redhat.com>
1525
1526 PR c++/87541
1527 PR c++/87542
1528 * tree.c (type_argument_type): New function.
1529 * tree.h (type_argument_type): Declare it.
1530 * gcc/doc/extend.texi (alloc_align): Update and clarify.
1531 (alloc_size, nonnull, sentinel): Same.
1532
1533 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
1534 Kwok Cheung Yeung <kcy@codesourcery.com>
1535
1536 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
1537 int_mode_for_size fails.
1538 (vectorizable_load): Likewise.
1539
1540 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1541
1542 * doc/ux.texi (Group logically-related diagnostics): Move
1543 discussion of auto_diagnostic_group into this new subsection.
1544 Give an example of where this grouping is used.
1545
1546 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1547
1548 PR other/19165
1549 * Makefile.in (OBJS): Move json.o to...
1550 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
1551 * common.opt (fdiagnostics-format=): New option.
1552 (diagnostics_output_format): New enum.
1553 * diagnostic-format-json.cc: New file.
1554 * diagnostic.c (default_diagnostic_final_cb): New function, taken
1555 from start of diagnostic_finish.
1556 (diagnostic_initialize): Initialize final_cb to
1557 default_diagnostic_final_cb.
1558 (diagnostic_finish): Move "being treated as errors" messages to
1559 default_diagnostic_final_cb. Call any final_cb.
1560 (default_diagnostic_finalizer): Add diagnostic_t param.
1561 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
1562 diagnostic_finalizer callback.
1563 * diagnostic.h (enum diagnostics_output_format): New enum.
1564 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
1565 (struct diagnostic_context): Add "final_cb".
1566 (default_diagnostic_finalizer): Add diagnostic_t param.
1567 (diagnostic_output_format_init): New decl.
1568 * doc/invoke.texi (-fdiagnostics-format): New option.
1569 * dwarf2out.c (gen_producer_string): Ignore
1570 OPT_fdiagnostics_format_.
1571 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
1572 * lto-wrapper.c (append_diag_options): Ignore it.
1573 * opts.c (common_handle_option): Handle it.
1574
1575 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1576
1577 PR tree-optimization/88015
1578 * graphite-isl-ast-to-gimple.c
1579 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
1580 for dump_enabled_p.
1581 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
1582
1583 2018-11-15 Richard Biener <rguenther@suse.de>
1584
1585 PR middle-end/88029
1586 * gimple.c (gimple_call_flags): Union flags from decl, type
1587 and call fntype.
1588 * trans-mem.c (is_tm_pure_call): Simplify.
1589
1590 2018-11-15 Richard Biener <rguenther@suse.de>
1591
1592 PR tree-optimization/88031
1593 * tree-vect-loop.c (vectorizable_reduction): Move check
1594 for multiple types earlier so we get the expected dump.
1595 Simplify calls to vectorizable_condition.
1596 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
1597 * tree-vect-stmts.c (vectorizable_condition): Instead of
1598 reduc_def and reduc_index take just a flag. Simplify
1599 code-generation now that we can rely on the defs being set up.
1600 (vectorizable_comparison): Remove unused argument.
1601
1602 2018-11-15 Richard Biener <rguenther@suse.de>
1603
1604 PR tree-optimization/88030
1605 * tree-complex.c (need_eh_cleanup): New global.
1606 (update_complex_assignment): Mark blocks that need EH update.
1607 (expand_complex_comparison): Likewise.
1608 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
1609 perform EH cleanup and schedule CFG cleanup if that did anything.
1610
1611 2018-11-15 Jakub Jelinek <jakub@redhat.com>
1612
1613 PR rtl-optimization/88018
1614 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
1615 on the presence of fallthru edge, rather than if it is a USE or not.
1616
1617 2018-11-15 Richard Biener <rguenther@suse.de>
1618
1619 PR middle-end/87917
1620 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
1621 analyze_subscript_affine_affine properly.
1622
1623 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
1624
1625 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
1626 (GLIBC_DYNAMIC_LINKER): Define.
1627 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
1628
1629 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
1630
1631 PR tree-optimization/84648
1632 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
1633 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
1634 by calling adjust_cond_for_loop_until_wrap.
1635
1636 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
1637
1638 PR other/56334
1639 * doc/extend.texi (Common Function Attributes): Clarify linker
1640 restrictions on "aligned" attribute.
1641 (Common Variable Attributes): Likewise. Mention that linker
1642 restrictions don't apply to stack-allocated variables.
1643
1644 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
1645
1646 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
1647 as an lvalue.
1648
1649 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
1650
1651 PR lto/55102
1652 PR lto/56700
1653 * doc/invoke.texi (Optimize Options): Remove bad example about
1654 interaction between -flto and -O. Replace it with a note that
1655 you need to compile with -O and not just link. Copy-edit -flto
1656 discussion to reduce verbiage and improve flow.
1657
1658 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
1659
1660 PR middle-end/59658
1661 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
1662 also suppress many optimizations. Alphabetize option lists for
1663 -O1, -O2, and -Os. Add list of options disabled with -Og, and
1664 correct documentation for those options to say that.
1665 * opts.c (default_options_table): Sort table by level and option
1666 name, to make it easier to correlate to the manual.
1667
1668 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
1669
1670 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
1671 printing of the names of segment registers.
1672
1673 2018-11-14 Nathan Sidwell <nathan@acm.org>
1674
1675 PR debug/88006
1676 PR debug/87462
1677 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
1678 type list.
1679
1680 2018-11-14 David Malcolm <dmalcolm@redhat.com>
1681
1682 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
1683
1684 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1685
1686 P1236R1 - Signed integers are two's complement
1687 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
1688
1689 PR bootstrap/86739
1690 * hash-map.h (hash_map::iterator::reference_pair): New class.
1691 (hash_map::iterator::operator*): Return it rather than std::pair.
1692
1693 2018-11-14 Jeff Law <law@redhat.com>
1694
1695 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
1696 iff the operand is a constant.
1697
1698 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
1699
1700 * gimple-ssa-evrp-analyze.c
1701 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
1702 ignore_equivs_equal_p to equal_p.
1703 * ipa-cp.c (meet_with_1): Use equal_p instead of
1704 ignore_equivs_equal_p.
1705 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
1706 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
1707 (value_range::operator==): Remove.
1708 (value_range::operator!=): Remove.
1709 (vrp_prop::visit_stmt): Use equal_p.
1710 * tree-vrp.h (value_range): Remove operator==, operator!=,
1711 ignore_equivs_equal_p.
1712 * vr-values.c (update_value_range): Use equal_p.
1713
1714 2018-11-14 Michael Matz <matz@suse.de>
1715
1716 PR middle-end/86575
1717 * gimplify.c (collect_fallthrough_labels): Add new argument,
1718 return location via that, don't modify statements.
1719 (warn_implicit_fallthrough_r): Adjust call, don't use
1720 statement location directly.
1721
1722 2018-11-14 Richard Biener <rguenther@suse.de>
1723
1724 PR middle-end/87985
1725 * tree-data-ref.c (split_constant_offset): Add wrapper
1726 allocating a cache hash-map.
1727 (split_constant_offset_1): Cache results of expanding
1728 expressions from SSA def stmts.
1729
1730 2018-11-14 Richard Biener <rguenther@suse.de>
1731
1732 PR middle-end/88021
1733 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
1734 to lambda_int.
1735 (lambda_vector_mult_const): Likewise.
1736 (lambda_matrix_right_hermite): Use lambda_int temporaries.
1737
1738 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
1739 Jackson Woodruff <jackson.woodruff@arm.com>
1740
1741 PR 71026/tree-optimization
1742 * match.pd: Simplify floating point comparisons.
1743
1744 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1745
1746 PR rtl-optimization/87817
1747 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
1748 last argument has low 8 bits clear, fold to 0.
1749
1750 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
1751
1752 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
1753 MAX_OFILE_ALIGNMENT as needed.
1754
1755 2018-11-14 Richard Biener <rguenther@suse.de>
1756
1757 PR tree-optimization/88019
1758 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
1759 COND_EXPR arguments to non-trapping overflow.
1760
1761 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
1762
1763 * config/arc/arc.h (reg_class): Reorder registers classes, remove
1764 unused register classes.
1765 (REG_CLASS_NAMES): Likewise.
1766 (REG_CLASS_CONTENTS): Likewise.
1767 (FIXED_REGISTERS): Make lp_count fixed.
1768 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
1769 (PROGRAM_COUNTER_REGNO): Remove.
1770 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
1771 register classes, use constants for register numbers, remove
1772 reg_class_contents references.
1773 (arc_process_double_reg_moves): Add asserts.
1774 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
1775 lra_in_progress predicate.
1776 (arc_init_reg_tables): Remove unused register classes.
1777 (arc_register_move_cost): Likewise.
1778 (arc_preferred_reload_class): Likewise.
1779 (hwloop_optimize): Update rtx patterns involving lp_count register.
1780 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
1781 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
1782 CHEAP_CORE_REGS. Former one will be used for LRA.
1783 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
1784 one will be used for LRA.
1785 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
1786 one will be used for LRA.
1787 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
1788 Former one will be used for LRA.
1789 ("f"): Delete constraint.
1790 ("k"): Likewise.
1791 ("e"): Likewise.
1792 ("l"): Change it from register constraint to constraint.
1793 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
1794 (movhi_insn): Likewise.
1795 (movsi_insn): Update pattern.
1796 (arc_lp): Likewise.
1797 (dbnz): Likewise.
1798 (stack_tie): Remove 'b' constraint letter.
1799 (R4_REG): Define.
1800 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
1801 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
1802 (R57_REG, R59_REG, PCL_REG): Likewise.
1803 (ILINK1_REGNUM): Renamed to ILINK1_REG.
1804 (ILINK2_REGNUM): Renamed to ILINK2_REG.
1805 (Rgp): Remove.
1806 (SP_REGS): Likewise.
1807 (Rcw): Remove unused reg classes.
1808 * config/arc/predicates.md (dest_reg_operand): Just default on
1809 register_operand predicate.
1810 (mpy_dest_reg_operand): Likewise.
1811 (move_dest_operand): Use macros instead of constants.
1812 * config/arc/arc.opt (mlra): Switch to lra as default.
1813
1814 2018-11-14 Richard Biener <rguenther@suse.de>
1815
1816 PR tree-optimization/87974
1817 * tree-vect-loop.c (vectorizable_reduction): When computing
1818 the vectorized reduction PHI vector type ignore constant
1819 and external defs.
1820
1821 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1822
1823 PR tree-optimization/87977
1824 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
1825 stmt, build a new one and replace the old one with it. Formatting fix.
1826 Call release_ssa_name (x) if !has_other_use and !delete_div.
1827 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
1828 verify lhs of stmt is still def.
1829
1830 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
1831
1832 PR rtl-optimization/87507
1833 * lower-subreg.c (operand_for_swap_move_operator): New function.
1834 (simple_move): Strip simple operators.
1835 (find_pseudo_copy): Likewise.
1836 (resolve_operand_for_swap_move_operator): New function.
1837 (resolve_simple_move): Strip simple operators and swap operands.
1838
1839 2018-11-13 Jakub Jelinek <jakub@redhat.com>
1840
1841 PR tree-optimization/87898
1842 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
1843 (ipa_simd_modify_function_body): Remove debug stmts where the first
1844 argument was changed into a non-decl.
1845
1846 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
1847
1848 PR rtl-optimization/87899
1849 * lra-lives.c (start_living): Update white space in comment.
1850 (enum point_type): New.
1851 (sparseset_contains_pseudos_p): New function.
1852 (update_pseudo_point): Likewise.
1853 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
1854 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
1855 handling. Move early exit after adding conflicts.
1856 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
1857 if regno is already live. Remove all handling of program points.
1858 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
1859 after adding conflicts. Remove all handling of program points and
1860 ignore_reg_for_conflicts.
1861 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
1862 and do not guard call to mark_pseudo_live.
1863 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
1864 and do not guard call to mark_pseudo_dead.
1865 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
1866 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
1867 Use new function update_pseudo_point. Handle register copies by
1868 removing the source register from the live set. Handle INOUT operands.
1869 Update to the next program point using the unused_set, dead_set and
1870 start_dying sets.
1871 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
1872
1873 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1874
1875 * builtins.c: Replace "source_location" with "location_t".
1876 * diagnostic-show-locus.c: Likewise.
1877 * diagnostic.c: Likewise.
1878 * dumpfile.c: Likewise.
1879 * gcc-rich-location.h: Likewise.
1880 * genmatch.c: Likewise.
1881 * gimple.h: Likewise.
1882 * gimplify.c: Likewise.
1883 * input.c: Likewise.
1884 * input.h: Likewise. Eliminate the typedef.
1885 * omp-expand.c: Likewise.
1886 * selftest.h: Likewise.
1887 * substring-locations.h (get_source_location_for_substring):
1888 Rename to...
1889 (get_location_within_string): ...this.
1890 * tree-cfg.c: Replace "source_location" with "location_t".
1891 * tree-cfgcleanup.c: Likewise.
1892 * tree-diagnostic.c: Likewise.
1893 * tree-into-ssa.c: Likewise.
1894 * tree-outof-ssa.c: Likewise.
1895 * tree-parloops.c: Likewise.
1896 * tree-phinodes.c: Likewise.
1897 * tree-phinodes.h: Likewise.
1898 * tree-ssa-loop-ivopts.c: Likewise.
1899 * tree-ssa-loop-manip.c: Likewise.
1900 * tree-ssa-phiopt.c: Likewise.
1901 * tree-ssa-phiprop.c: Likewise.
1902 * tree-ssa-threadupdate.c: Likewise.
1903 * tree-ssa.c: Likewise.
1904 * tree-ssa.h: Likewise.
1905 * tree-vect-loop-manip.c: Likewise.
1906
1907 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1908
1909 * doc/extend.texi: Fix typo in the weakref description.
1910
1911 2018-11-13 Richard Biener <rguenther@suse.de>
1912
1913 PR tree-optimization/86991
1914 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
1915 group building until we have successfully detected the SLP
1916 reduction.
1917 (vect_is_simple_reduction): Remove fixup code here.
1918
1919 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1920
1921 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
1922 (dump_gimple_stmt): Use it.
1923 (dump_gimple_stmt_loc): Likewise.
1924 (dump_gimple_expr): Likewise.
1925 (dump_gimple_expr_loc): Likewise.
1926 (dump_generic_expr): Likewise.
1927 (dump_generic_expr_loc): Likewise.
1928 (dump_printf): Likewise.
1929 (dump_printf_loc): Likewise.
1930 (dump_dec): Likewise.
1931 (dump_dec): Likewise.
1932 (dump_hex): Likewise.
1933 (dump_symtab_node): Likewise.
1934 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
1935 Guard dump call with dump_enabled_p.
1936 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
1937 * graphite-optimize-isl.c (optimize_isl): Likewise.
1938 * graphite.c (graphite_transform_loops): Likewise.
1939 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
1940 * tree-parloops.c (parallelize_loops): Likewise.
1941 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
1942 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
1943 (vect_prune_runtime_alias_test_list): Likewise.
1944 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
1945 (vect_estimate_min_profitable_iters): Likewise.
1946 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
1947 (vect_build_slp_tree_2): Likewise.
1948 (vect_supported_load_permutation_p): Likewise.
1949 (vect_slp_analyze_operations): Likewise.
1950 (vect_slp_analyze_bb_1): Likewise.
1951 (vect_slp_bb): Likewise.
1952 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
1953 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
1954 (pass_slp_vectorize::execute): Likewise.
1955 (increase_alignment): Likewise.
1956
1957 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1958
1959 PR ipa/87955
1960 * ipa-inline.c (report_inline_failed_reason): Guard calls to
1961 cl_target_option_print_diff and cl_optimization_print_diff with
1962 if (dump_file).
1963
1964 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1965
1966 * doc/invoke.texi (-fsave-optimization-record): Note that the
1967 output is compressed.
1968 * optinfo-emit-json.cc: Include <zlib.h>.
1969 (optrecord_json_writer::write): Compress the output.
1970
1971 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
1972
1973 * tree-vrp.c (value_range_base::dump): Dump type.
1974 Do not use INF nomenclature for 1-bit types.
1975 (dump_value_range): Group all variants to common dumping code.
1976 (debug): New overloaded functions for value_ranges.
1977 (value_range_base::dump): Remove no argument version.
1978 (value_range::dump): Same.
1979
1980 2018-11-13 Richard Biener <rguenther@suse.de>
1981
1982 PR tree-optimization/87931
1983 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
1984 nested cycles we support to latch computations vectorizable_reduction
1985 handles.
1986
1987 2018-11-13 Martin Liska <mliska@suse.cz>
1988
1989 PR tree-optimization/87885
1990 * cfghooks.c (account_profile_record): Rename
1991 to ...
1992 (profile_record_check_consistency): ... this.
1993 Calculate missing num_mismatched_freq_in.
1994 (profile_record_account_profile): New function
1995 that calculates time and size of a function.
1996 * cfghooks.h (struct profile_record): Remove
1997 all tuples.
1998 (struct cfg_hooks): Remove after_pass flag.
1999 (account_profile_record): Rename to ...
2000 (profile_record_check_consistency): ... this.
2001 (profile_record_account_profile): New.
2002 * cfgrtl.c (rtl_account_profile_record): Remove
2003 after_pass flag.
2004 * passes.c (check_profile_consistency): Do only
2005 checking.
2006 (account_profile): Calculate size and time of
2007 function only.
2008 (pass_manager::dump_profile_report): Reformat
2009 output.
2010 (execute_one_ipa_transform_pass): Call
2011 consistency check before clean upand call account_profile
2012 after a clean up is done.
2013 (execute_one_pass): Call check_profile_consistency and
2014 account_profile instead of using after_pass flag..
2015 * tree-cfg.c (gimple_account_profile_record): Likewise.
2016
2017 2018-11-13 Martin Liska <mliska@suse.cz>
2018
2019 PR sanitizer/87930
2020 * config/i386/i386.c (ix86_option_override_internal): Error
2021 about usage -mabi=ms and -fsanitize={,kernel-}address.
2022
2023 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
2024
2025 * config/aarch64/aarch64.c
2026 (aarch64_vectorize_preferred_vector_alignment): Change return type to
2027 poly_uint64.
2028 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
2029 alignment being a poly int.
2030 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
2031 return type to poly_uint64.
2032 * target.def (default_preferred_vector_alignment): Likewise.
2033 * targhooks.c (default_preferred_vector_alignment): Likewise.
2034 * targhooks.h (default_preferred_vector_alignment): Likewise.
2035 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
2036 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
2037 poly int.
2038 (vect_update_misalignment_for_peel): Likewise.
2039 (vect_enhance_data_refs_alignment): Likewise.
2040 (vect_find_same_alignment_drs): Likewise.
2041 (vect_duplicate_ssa_name_ptr_info): Likewise.
2042 (vect_setup_realignment): Likewise.
2043 (vect_can_force_dr_alignment_p): Change alignment parameter type to
2044 poly_uint64.
2045 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
2046 mask with a compile time variable vector alignment.
2047 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
2048 int.
2049 (vect_do_peeling): Exit early if vector alignment is not constant.
2050 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
2051 a poly int.
2052 (vectorizable_store): Likewise.
2053 (vectorizable_load): Likweise.
2054 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
2055 poly_uint64.
2056 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
2057 poly int.
2058 (vect_can_force_dr_alignment_p): Change alignment parameter type to
2059 poly_uint64.
2060
2061 2018-11-13 Richard Biener <rguenther@suse.de>
2062
2063 PR tree-optimization/87962
2064 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
2065 detect outer reduction for disqualifying in-loop uses.
2066
2067 2018-11-13 Richard Biener <rguenther@suse.de>
2068
2069 PR tree-optimization/87967
2070 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
2071 for constants for the scalar loop.
2072
2073 2018-11-13 Alan Modra <amodra@gmail.com>
2074
2075 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
2076 integer constants when -mcmodel=medium.
2077
2078 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2079
2080 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
2081 * config/arc/elf.h (PROFILE_HOOK): Define.
2082 * config/arc/linux.h (PROFILE_HOOK): Likewise.
2083
2084 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2085
2086 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
2087 jump table data in the text section.
2088
2089 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2090
2091 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
2092 to fit the eh_return pattern.
2093 * config/arc/arc.md (eh_return): Define.
2094 (VUNSPEC_ARC_EH_RETURN): Likewise.
2095 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
2096 new implementation.
2097 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
2098
2099
2100 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2101
2102 * common/config/arc/arc-common.c (arc_option_optimization_table):
2103 Millicode optimization is default on for size optimizations.
2104 * config/arc/arc-protos.h (arc_check_multi): New function.
2105 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
2106 (ENTER_LEAVE_START_REG): Define.
2107 (ENTER_LEAVE_END_REG): Likewise.
2108 (arc_override_options): Disable millicode when long calls option
2109 is on.
2110 (arc_frame_info): Change it from int to bool.
2111 (arc_compute_frame_size): Clean up.
2112 (arc_save_restore): Remove.
2113 (frame_save_reg): New function.
2114 (frame_restore_reg): Likewise.
2115 (arc_enter_leave_p): Likewise.
2116 (arc_save_callee_saves): Likewise.
2117 (arc_restore_callee_saves): Likewise.
2118 (arc_save_callee_enter): Likewise.
2119 (arc_restore_callee_leave): Likewise.
2120 (arc_save_callee_milli): Likewise.
2121 (arc_restore_callee_milli): Likewise.
2122 (arc_expand_prologue): Reimplement to emit enter/leave
2123 instructions.
2124 (arc_expand_epilogue): Likewise.
2125 (arc_check_multi): New function.
2126 * config/arc/arc.md (push_multi_fp): New pattern.
2127 (push_multi_fp_blink): Likewise.
2128 (pop_multi_fp): Likewise.
2129 (pop_multi_fp_blink): Likewise.
2130 (pop_multi_fp_ret): Likewise.
2131 (pop_multi_fp_blink_ret): Likewise.
2132 * config/arc/arc.opt (mmillicode): Update option.
2133 (mcode-density-frame): New option.
2134 * config/arc/predicates.md (push_multi_operand): New predicate.
2135 (pop_multi_operand): Likewise.
2136 * doc/invoke.texi (ARC): Update ARC options information.
2137
2138
2139 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2140
2141 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
2142 * config/arc/arc.c (operands_ok_ldd_std): New function.
2143 (mem_ok_for_ldd_std): Likewise.
2144 (gen_operands_ldd_std): Likewise.
2145 * config/arc/arc.md: Add peephole2 rules for std/ldd.
2146
2147 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
2148
2149 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
2150 test on stack_usage_file.
2151 (lang_dependent_init): Do not open the .su file if generating LTO.
2152
2153 2018-11-13 Jakub Jelinek <jakub@redhat.com>
2154
2155 PR rtl-optimization/87918
2156 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
2157 simplify_gen_relational rather than simplify_gen_binary.
2158
2159 2018-11-13 Richard Biener <rguenther@suse.de>
2160
2161 * tree-ssanames.h (set_range_info): Use value_range_base.
2162 (get_range_info): Likewise.
2163 * tree-ssanames.c (set_range_info): Likewise.
2164 (get_range_info): Likewise.
2165 * tree-vrp.c (value_range_base::union_helper): Split
2166 out common parts of value_range[_base]::union_.
2167 (value_range_base::union_): Update.
2168 (value_range::union_): Likewise.
2169 (determine_value_range_1): Use value_range_base.
2170 (determine_value_range): Likewise.
2171 * tree-vrp.h (value_range_base::union_helper): Move ...
2172 (value_range::union_helper): ... from here.
2173
2174 2018-11-13 Alan Modra <amodra@gmail.com>
2175
2176 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
2177 offset for PRE_DEC.
2178 (rs6000_secondary_reload_gpr): Don't call find_replacement.
2179
2180 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
2181
2182 PR middle-end/59634
2183 * doc/invoke.texi (Optimize Options): Clarify that the
2184 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
2185 apply to data cache size.
2186
2187 2018-11-13 Alan Modra <amodra@gmail.com>
2188
2189 * config/rs6000/predicates.md (logical_const_operand),
2190 (logical_operand): Correct comment.
2191 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
2192
2193 2018-11-13 Alan Modra <amodra@gmail.com>
2194
2195 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
2196
2197 2018-11-13 Alan Modra <amodra@gmail.com>
2198
2199 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
2200 description.
2201 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
2202 covered by alternative.
2203 (movcc_internal1): Ignore h for register preference.
2204 (mov<mode>_hardfloat64): Likewise.
2205 (mov<mode>_softfloat): Ignore c, l, h for register preference.
2206
2207 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
2208
2209 PR preprocessor/47823
2210 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
2211 documentation to...
2212 (Pragmas): ...here.
2213 * doc/extend.texi (Pragmas): Note additional pragmas documented
2214 in the CPP manual.
2215
2216 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2217
2218 PR middle-end/86677
2219 PR middle-end/87528
2220 * tree-scalar-evolution.c (expression_expensive_p): Make
2221 BUILTIN POPCOUNT as expensive when backend does not define it.
2222
2223 2018-11-12 Fredrik Noring <noring@nocrew.org>
2224
2225 * config.gcc: Update with-llsc defaults for MIPS r5900.
2226
2227 2018-11-12 Martin Liska <mliska@suse.cz>
2228
2229 PR gcov-profile/87442
2230 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
2231 options.
2232 * doc/invoke.texi: Document them.
2233 * tree-profile.c (parse_profile_filter): New.
2234 (parse_profile_file_filtering): Likewise.
2235 (release_profile_file_filtering): Likewise.
2236 (include_source_file_for_profile): Likewise.
2237 (tree_profiling): Filter source files based on the
2238 newly added options.
2239
2240 2018-11-12 Martin Liska <mliska@suse.cz>
2241
2242 PR target/87903
2243 * doc/extend.texi: Add missing values for __builtin_cpu_is and
2244 __builtin_cpu_supports for x86 target.
2245
2246 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
2247
2248 PR middle-end/21110
2249 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
2250 have to be Pmode.
2251 (Arithmetic): Likewise for "lo_sum".
2252
2253 2018-11-12 Renlin Li <renlin.li@arm.com>
2254
2255 PR target/87815
2256 * dse.c (get_stored_val): Add check for compile-time constantness
2257 of gap.
2258
2259 2018-11-12 Sudakshina Das <sudi.das@arm.com>
2260
2261 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
2262 (ARMv8_5a): New fgroup.
2263 (armv8.5-a): New arch.
2264 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
2265 sb and predres.
2266 * config/arm/arm-tables.opt: Regenerate.
2267 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
2268 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
2269 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
2270 Add matching rules for -march=armv8.5-a and extensions.
2271 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
2272 Add sb and predres to all armv8-a except armv8.5-a.
2273
2274 2018-11-12 Richard Biener <rguenther@suse.de>
2275
2276 * tree-vrp.h (value_range[_base]::set): Make public. Provide
2277 overload for single value.
2278 (value_range[_base]::set_nonnull): New.
2279 (value_range[_base]::set_null): Likewise.
2280 (value_range): Document bitmap copying behavior, mark
2281 copy constructor and assignment operator deleted.
2282 (value_range::move): New.
2283 (value_range::set_and_canonicalize): Default bitmap to zero.
2284 (set_value_range_to_nonnull): Remove.
2285 (set_value_range_to_null): Likewise.
2286 (set_value_range): Likewise.
2287 (set_value_range_to_value): Likewise.
2288 (extract_range_from_unary_expr): Work on value_range_base.
2289 (extract_range_from_binary_expr_1): Likewise. Rename to...
2290 (extract_range_from_binary_expr): ... this.
2291 * tree-vrp.c (value_range::update): Clear equiv bitmap
2292 if required.
2293 (value_range::move): New, move equiv bitmap.
2294 (value_range_base::set_undefined): Avoid assignment.
2295 (value_range::set_undefined): Likewise.
2296 (value_range_base::set_varying): Likewise.
2297 (value_range::set_varying): Likewise.
2298 (set_value_range): Remove.
2299 (value_range_base::set): New overload for value.
2300 (value_range::set): Likewise.
2301 (set_value_range_to_nonnull): Remove.
2302 (value_range_base::set_nonnull): New.
2303 (value_range::set_nonnull): Likewise.
2304 (set_value_range_to_null): Remove.
2305 (value_range_base::set_null): New.
2306 (value_range::set_null): Likewise.
2307 (range_is_null): Work on value_range_base.
2308 (range_is_nonnull): Likewise.
2309 (ranges_from_anti_range): Likewise.
2310 (extract_range_into_wide_ints): Likewise.
2311 (extract_range_from_multiplicative_op): Likewise.
2312 (extract_range_from_binary_expr): Likewise. Update for API changes.
2313 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
2314 handling.
2315 (value_range::intersect_helper): Avoid copy and assignment.
2316 (value_range::union_helper): Likewise.
2317 (determine_value_range_1): Adjust.
2318 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
2319 Avoid assignment by using move.
2320 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
2321 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2322 Likewise.
2323 * tree-ssanames.c (get_range_info): Likewise.
2324 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
2325 * vr-values.c (vr_values::get_value_range): Adjust.
2326 (vr_values::update_value_range): Likewise.
2327 (symbolic_range_based_on_p): Work on value_range_base.
2328 (vr_values::extract_range_from_binary_expr): Use value_range_base.
2329 (vr_values::extract_range_from_unary_expr): Likewise.
2330 (vr_values::extract_range_from_cond_expr): Avoid assignment.
2331 (vr_values::extract_range_from_comparison): Adjust.
2332 (vr_values::check_for_binary_op_overflow): Use value_range_base.
2333 (vr_values::extract_range_basic): Adjust.
2334 (vr_values::adjust_range_with_scev): Likewise.
2335 (vr_values::vrp_visit_assignment_or_call): Likewise.
2336 (vr_values::get_vr_for_comparison): Change API to avoid
2337 assignment and copy construction.
2338 (vr_values::compare_name_with_value): Adjust accordingly.
2339 (vr_values::compare_names): Likewise.
2340 (vr_values::extract_range_from_phi_node): Avoid assignment and
2341 bogus in-place modify of equiv bitmap.
2342 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
2343 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
2344 for extract_range_from_unary_expr API change.
2345 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
2346
2347 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
2348
2349 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
2350
2351 2018-11-12 Richard Biener <rguenther@suse.de>
2352
2353 * tree-vrp.h (value_range_base::symbolic_p,
2354 value_range_base::constant_p, value_range_base::zero_p,
2355 value_range_base::singleton_p): Move from value_range.
2356 (value_range::dump): Add.
2357 * gimple-ssa-evrp-analyze.c
2358 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
2359 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
2360 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2361 Use set_varying.
2362 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
2363 (value_range::constant_p): Likewise.
2364 (value_range::singleton_p): Likewise.
2365 (value_range_base::dump): Add.
2366 (set_value_range_to_undefined): Remove.
2367 (set_value_range_to_varying): Likewise.
2368 (range_int_cst_p): Take value_range_base argument.
2369 (range_int_cst_singleton_p): Likewise.
2370 (value_range_constant_singleton): Likewise.
2371 (vrp_set_zero_nonzero_bits): Likewise.
2372 (extract_range_from_multiplicative_op): Use set_varying.
2373 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
2374 (extract_range_from_unary_expr): Likewise.
2375 (dump_value_range_base): Change to overload of dump_value_range.
2376 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
2377 (vrp_prop::visit_stmt): Likewise.
2378 (value_range::intersect_helper): Likewise.
2379 (value_range::union_helper): Likewise.
2380 (determine_value_range_1): Likewise.
2381
2382 2018-11-12 Richard Biener <rguenther@suse.de>
2383
2384 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
2385 (set_value_range_to_null): Likewise.
2386 * vr-values.c (vr_values::extract_range_from_comparison):
2387 Clear equiv for constant singleton ranges.
2388
2389 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
2390
2391 * config/i386/sse.md: Combine VFIXUPIMM* patterns
2392 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2393 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2394 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
2395 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2396 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2397 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
2398
2399 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
2400
2401 PR c/69502
2402 * doc/extend.texi (Common Type Attributes): For the align type
2403 attribute, copy language about decreasing alignment from the
2404 corresponding variable attribute.
2405
2406 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
2407
2408 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
2409 -frounding-math.
2410
2411 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
2412
2413 PR c++/43105
2414 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
2415 -frtti and -fno-rtti code.
2416
2417 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
2418
2419 PR c/26366
2420 * doc/extend.texi (Other Builtins): Document probability associated
2421 with __builtin_expect.
2422
2423 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
2424
2425 PR target/87928
2426 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
2427 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
2428 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
2429 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
2430
2431 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
2432
2433 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
2434
2435 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
2436
2437 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
2438
2439 2018-11-11 Richard Biener <rguenther@suse.de>
2440
2441 * tree-vrp.h (class value_range_base): New base class for
2442 value_range containing all but the m_equiv member.
2443 (dump_value_range_base): Add.
2444 (range_includes_zero_p): Work on value_range_base.
2445 * tree-vrp.c (value_range_base::set): Split out base handling
2446 from...
2447 (value_range::set): this.
2448 (value_range::set_equiv): New.
2449 (value_range_base::value_range_base): New constructors.
2450 (value_range_base::check): Split out base handling from...
2451 (value_range::check): this.
2452 (value_range::equal_p): Refactor in terms of
2453 ignore_equivs_equal_p which is now member of the base.
2454 (value_range_base::set_undefined): New.
2455 (value_range_base::set_varying): Likewise.
2456 (value_range_base::dump):Split out base handling from...
2457 (value_range::dump): this.
2458 (value_range_base::set_and_canonicalize): Split out base handling
2459 from...
2460 (value_range::set_and_canonicalize): this.
2461 (value_range_base::union_): New.
2462 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
2463 for m_vr.
2464 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
2465 instead of value_range everywhere.
2466 (ipcp_vr_lattice::print): Use dump_value_range_base.
2467 (ipcp_vr_lattice::meet_with): Adjust.
2468 (ipcp_vr_lattice::meet_with_1): Likewise.
2469 (ipa_vr_operation_and_type_effects): Likewise.
2470 (propagate_vr_across_jump_function): Likewise.
2471 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
2472 (ipa_get_value_range): Likewise.
2473 (ipa_set_jfunc_vr): Likewise.
2474 (ipa_compute_jump_functions_for_edge): Likewise.
2475
2476 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
2477
2478 PR middle-end/65703
2479 * doc/invoke.texi (Optimize Options): Add @opindex entries
2480 for the positive forms of -fno-xxx and -mno-xxx options
2481 that were lacking them.
2482
2483 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
2484
2485 * combine.c (make_more_copies): Only make an intermediate copy if the
2486 dest of a move is a pseudo.
2487
2488 2018-11-09 Maya Rashish <coypu@sdf.org>
2489
2490 PR target/87221
2491 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
2492 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
2493
2494 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
2495
2496 PR driver/41179
2497 PR middle-end/65703
2498 * doc/invoke.texi (Optimize Options): Clarify default behavior
2499 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
2500
2501 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
2502
2503 PR tree-optimization/87940
2504 * expr.c (string_constant): Don't strip NOPS in subexpressions.
2505 Fold PLUS_EXPR correctly.
2506
2507 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
2508
2509 PR target/87762
2510 * config/s390/s390.c (s390_safe_relative_long_p): New function.
2511 (annotate_constant_pool_refs): Skip insns which support
2512 relative addressing.
2513 (annotate_constant_pool_refs_1): New helper function.
2514 (find_constant_pool_ref): Skip insns which support relative
2515 addression.
2516 (find_constant_pool_ref_1): New helper function.
2517 (replace_constant_pool_ref): Skip insns which support
2518 relative addressing.
2519 (replace_constant_pool_ref_1): New helper function.
2520 (s390_mainpool_start): Adapt to the new signature.
2521 (s390_mainpool_finish): Likewise.
2522 (s390_chunkify_start): Likewise.
2523 (s390_chunkify_finish): Likewise.
2524 (pass_s390_early_mach::execute): Likewise.
2525 (s390_prologue_plus_offset): Likewise.
2526 (s390_emit_prologue): Likewise.
2527 (s390_emit_epilogue): Likewise.
2528
2529 2018-11-09 Jakub Jelinek <jakub@redhat.com>
2530
2531 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
2532 but unsupported lastprivate with conditional modifier.
2533
2534 2018-11-09 Jeff Law <law@redhat.com>
2535
2536 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
2537 unused argument better. Add gcc_unreachable to silence warning.
2538
2539 2018-11-09 Martin Sebor <msebor@redhat.com>
2540
2541 PR middle-end/81824
2542 * attribs.c (has_attribute): New helper function.
2543 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
2544 * attribs.h (decls_mismatched_attributes): Declare.
2545 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
2546 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
2547 * common.opt (-Wattribute-alias): Take an argument.
2548 (-Wno-attribute-alias): New option.
2549 * doc/extend.texi (Common Function Attributes): Document copy.
2550 (Common Variable Attributes): Same.
2551 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
2552 (-Wattribute-alias): Document new option argument.
2553
2554 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
2555
2556 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
2557 matching criteria. Remove unused array initializer.
2558
2559 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
2560 Jinsong Ji <jji@us.ibm.com>
2561
2562 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
2563 constraints by introducing a new temporary.
2564 (_mm_cvtss_si64): Likewise.
2565
2566 2018-11-09 Martin Liska <mliska@suse.cz>
2567
2568 * common.opt: Add -fipa-stack-alignment flag.
2569 * doc/invoke.texi: Document it.
2570 * final.c (rest_of_clean_state): Guard stack
2571 shrinking with flag.
2572
2573 2018-11-09 Martin Liska <mliska@suse.cz>
2574
2575 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
2576 to ...
2577 (ipa_discover_variable_flags): ... this.
2578 * common.opt: Come up with new flag -fipa-reference-addressable.
2579 * doc/invoke.texi: Document it.
2580 * ipa-reference.c (propagate): Call the renamed fn.
2581 * ipa-visibility.c (whole_program_function_and_variable_visibility):
2582 Likewise.
2583 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
2584 ...
2585 (ipa_discover_variable_flags): ... this. Discover
2586 non-addressable variables only with the newly added flag.
2587 * opts.c: Enable the newly added flag with -O1 and higher
2588 optimization level.
2589
2590 2018-11-09 David Malcolm <dmalcolm@redhat.com>
2591
2592 * json.cc (selftest::test_writing_literals): Fix comment.
2593
2594 2018-11-09 Martin Liska <mliska@suse.cz>
2595
2596 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
2597 string to a stack buffer.
2598 (aarch64_parse_cpu): Likewise.
2599 (aarch64_parse_tune): Likewise.
2600
2601 2018-11-09 Richard Biener <rguenther@suse.de>
2602
2603 PR tree-optimization/87953
2604 * tree-vect-loop.c (vectorizable_reduction): For analysis
2605 always pass ops[0] to vectorizable_condition.
2606
2607 2018-11-09 Stafford Horne <shorne@gmail.com>
2608 Richard Henderson <rth@twiddle.net>
2609 Joel Sherrill <joel@rtems.org>
2610
2611 * common/config/or1k/or1k-common.c: New file.
2612 * config/or1k/*: New.
2613 * config.gcc (or1k*-*-*): New.
2614 * configure.ac (or1k*-*-*): New test for openrisc tls.
2615 * configure: Regenerated.
2616 * doc/install.texi: Document OpenRISC triplets.
2617 * doc/invoke.texi: Document OpenRISC arguments.
2618 * doc/md.texi: Document OpenRISC.
2619
2620 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
2621
2622 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
2623 (arm7tdmi-s): Delete CPU.
2624 (arm710t): Add aliases for arm720t and arm740t.
2625 (arm720t, arm740t): Delete CPUs.
2626 (arm920t): Add aliases for arm920, arm922t and arm940t.
2627 (arm920, arm922t, arm940t): Delete CPUs.
2628 (arm10tdmi): Add alias for arm1020t.
2629 (arm1020t): Delete CPU.
2630 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
2631 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
2632 (arm10e): Add aliases for arm1020e and arm1022e.
2633 (arm1020e, arm1022e): Delete CPU.
2634 * config/arm/arm.md (generic_sched): Remove entries that are now
2635 handled by aliases.
2636 (generic_vfp): Likewise.
2637 * config/arm/arm1020e.md: Simplify tuning selection based on alias
2638 changes.
2639 * config/arm/arm-tune.md: Regenerated.
2640 * config/arm/arm-tables.opt: Regenerated.
2641
2642 2018-11-09 Richard Biener <rguenther@suse.de>
2643
2644 PR tree-optimization/87621
2645 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
2646 op with only phi inputs.
2647 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
2648 (ch_base::copy_headers): Run CSE on copied loop headers.
2649 (pass_ch_vect::process_loop_p): Simplify.
2650
2651 2018-11-09 Alexandre Oliva <oliva@adacore.com>
2652
2653 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
2654 for non-w64 x86_64 biarch.
2655
2656 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
2657
2658 PR rtl-optimization/86438
2659 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
2660 of in_b for the compare if in_b is SET_DEST.
2661
2662 PR target/87793
2663 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
2664 non-toplevel UNSPEC.
2665
2666 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
2667
2668 * tree-vrp.c (value_range::check): Do not access internals
2669 directly.
2670 (value_range::singleton_p): Same.
2671 (value_range::type): Same.
2672 (vrp_finalize): Use value_range API.
2673
2674 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
2675
2676 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
2677
2678 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
2679
2680 * vr-values.c (vr_values::get_value_range): Use value_range API
2681 instead of piecing together ranges.
2682 (vr_values::update_value_range): Same.
2683
2684 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
2685
2686 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
2687 of performing ad-hoc calculations.
2688 * tree-ssanames.c (set_range_info): New overloaded function
2689 accepting value_range &.
2690 (get_range_info): Same.
2691 * tree-ssanames.h (set_range_info_raw): Remove.
2692 (set_range_info): New prototype.
2693 (get_range_info): Same.
2694 * tree-vrp.h (value_range::null_p): Rename to zero_p.
2695 * tree-vrp.c (value_range::null_p): Same.
2696
2697 2018-11-09 Jan Hubicka <jh@suse.cz>
2698
2699 * tree.c (fld_type_variant_equal_p): Test user align flag.
2700 (flt_type_variant): Copy user align flag.
2701 (fld_incomplete_type_of): Clear it.
2702
2703 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2704
2705 * config/arm/neon.md (div<mode>3): New pattern.
2706
2707 2018-11-08 Andi Kleen <ak@linux.intel.com>
2708
2709 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
2710 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
2711 (ix86_handle_option): Handle OPT_mptwrite.
2712 * config/i386/cpuid.h (bit_PTWRITE): Add.
2713 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
2714 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
2715 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
2716 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
2717 (ix86_option_override_internal): Handle PTA_PTWRITE.
2718 (ix86_valid_target_attribute_inner_p): Define ptwrite.
2719 (def_builtin2): Force UINT64 to be 64bit only.
2720 * config/i386/i386.h (TARGET_PTWRITE): Add.
2721 (TARGET_PTWRITE_P): Add.
2722 (PTA_PTWRITE): Add.
2723 * config/i386/i386.md: Define ptwrite.
2724 * config/i386/i386.opt: Add -mptwrite.
2725 * config/i386/immintrin.h (_ptwrite64): Add.
2726 (_ptwrite32): Add
2727 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
2728 * doc/invoke.texi: Document -mptwrite.
2729
2730 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
2731
2732 PR rtl-optimization/87600
2733 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
2734 * lra-constraints.c (process_alt_operands): Skip illegal hard
2735 register usage. Prefer reloading non hard register operands.
2736
2737 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
2738
2739 PR other/36572
2740 * doc/invoke.texi (Optimize Options): Clarify default behavior
2741 for -fno-sched-interblock and -fno-sched-spec.
2742
2743 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
2744
2745 * collect2.c (linker_select): Add USE_LLD_LD.
2746 (ld_suffixes): Add ld.lld.
2747 (main): Handle -fuse-ld=lld.
2748 * common.opt (-fuse-ld=lld): New option.
2749 * doc/invoke.texi (-fuse-ld=lld): Document.
2750 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
2751
2752 2018-11-08 Paul Koning <ni1d@arrl.net>
2753
2754 * config/pdp11/constraints.md: Add "Z" series constraints for use
2755 with pre-dec and post-inc addressing.
2756 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
2757 (pdp11_expand_operands): Add int argument (word count).
2758 (pdp11_sp_frame_offset): Delete.
2759 (pdp11_cmp_length): New function.
2760 (pushpop_regeq): New function.
2761 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
2762 Add hook.
2763 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
2764 frame layout.
2765 (pdp11_initial_elimination_offset): Ditto.
2766 (pdp11_expand_operands): Add word count argument. Bugfixes.
2767 (output_move_multiple): Change how pointer adjustment is done.
2768 (pdp11_gen_int_label): Correct format.
2769 (output_ascii): Ditto.
2770 (pdp11_asm_output_var): Add code for DEC assembler case.
2771 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
2772 value.
2773 (legitimate_const_double_p): Ditto.
2774 (pdp11_register_move_cost): Adjust for new register classes.
2775 (pdp11_regno_reg_class): Ditto.
2776 (expand_block_move): Delete.
2777 (pushpop_regeq): New function.
2778 (pdp11_legitimate_address_p): Bugfix in check for constant
2779 offset.
2780 (pdp11_sp_frame_offset): Delete.
2781 (pdp11_reg_save_size): New helper function for new frame layout.
2782 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
2783 (pdp11_expand_shift): Bugfix in check for constant shift count.
2784 (pdp11_shift_length): Ditto.
2785 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
2786 (pdp11_cmp_length): New function.
2787 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
2788 some compile options.
2789 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
2790 (CALL_USED_REGISTERS): Ditto.
2791 (ELIMINABLE_REGS): Ditto.
2792 (REGISTER_NAMES): Ditto.
2793 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
2794 constraints.
2795 (REG_CLASS_NAMES): Ditto.
2796 (REG_CLASS_CONTENTS): Ditto. Also remove
2797 HARD_FRAME_POINTER_REGNUM.
2798 (CPU_REG_CLASS): New macro.
2799 (CLASS_MAX_NREGS): Adjust for new register classes.
2800 (FUNCTION_PROFILER): Make no-op.
2801 (may_call_alloca): Remove unused declaration.
2802 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
2803 (ASM_OUTPUT_SKIP): Fix format.
2804 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
2805 (HARD_FRAME_POINTER_REGNUM): Remove.
2806 (return): Delete.
2807 (*rts): Rename. Remove epilogue related checks.
2808 (cmpsi, cmpdi): New insn.
2809 (cbranch<mode>4): Change to apply to SI and DI modes as well.
2810 (mov<mode>): Change constraints to enforce that push/pop
2811 destination cannot use the same register as source.
2812 (*mov<mode><cc_cc>): Ditto.
2813 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
2814 at assembly output rather than as RTL expander.
2815 (zero_extendqihi2): Bugfix in check for same registers.
2816 (adddi3_nocc): Bugfix in check for constant operand.
2817 (addsi3_nocc): Ditto.
2818 (subdi3_nocc): Ditto.
2819 (subsi3_nocc): Ditto.
2820 (negdi2_nocc): Copy input to pdp11_expand_operands.
2821 (negsi2_nocc): Ditto.
2822 (bswap2_nocc): Ditto.
2823 * config/pdp11/pdp11.opt (mlra): Fix documentation.
2824 * config/pdp11/t-pdp11: Use -Os.
2825
2826 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
2827
2828 * config/arm/parsecpu.awk (/alias/): New parsing rule.
2829 (/begin cpu/): Check that the cpu name hasn't been previously defined.
2830 (gen_comm_data): Print out CPU alias tables.
2831 (check_cpu): Match aliases when checking the CPU name.
2832 * config/arm/arm-protos.h (cpu_alias): New structure.
2833 (cpu_option): Add entry for aliases.
2834 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
2835 strongarm1100 and strongarm1110.
2836 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
2837 (config/arm/arm-generic.md): Remove redundant references to
2838 strongarm110, strongarm1100 and strongarm1110.
2839 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
2840 Scan aliases for additional hints.
2841 (arm_parse_cpu_option_name): Also match a cpu name against the list
2842 of aliases.
2843 * config/arm/arm-tables.opt: Regenerated.
2844 * config/arm/arm-tune.md: Regenerated.
2845
2846 2018-11-08 Jakub Jelinek <jakub@redhat.com>
2847
2848 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
2849 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
2850 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2851 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
2852 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2853 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
2854 * gengtype.c (open_base_files): Add omp-general.h.
2855 * gimple.c (gimple_build_omp_critical):
2856 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
2857 gimple_omp_taskgroup_set_clauses.
2858 (gimple_build_omp_atomic_load): Add mo argument, call
2859 gimple_omp_atomic_set_memory_order.
2860 (gimple_build_omp_atomic_store): Likewise.
2861 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
2862 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
2863 instead of GSS_OMP.
2864 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
2865 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
2866 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
2867 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
2868 different value for GF_OMP_ATOMIC_NEED_VALUE.
2869 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
2870 comments.
2871 (struct gimple_statement_omp_single_layout): And remove here.
2872 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
2873 than gimple_statement_omp_single_layout.
2874 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
2875 GIMPLE_OMP_TEAMS.
2876 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
2877 (gimple_omp_subcode): Formatting fix.
2878 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
2879 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
2880 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
2881 gimple_omp_teams_host, gimple_omp_teams_set_host,
2882 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
2883 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
2884 gimple_omp_taskgroup_set_clauses): New inline functions.
2885 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
2886 (gimple_build_omp_atomic_store): Likewise.
2887 (gimple_omp_atomic_seq_cst_p): Remove.
2888 (gimple_omp_atomic_memory_order): New function.
2889 (gimple_omp_atomic_set_seq_cst): Remove.
2890 (gimple_omp_atomic_set_memory_order): New function.
2891 (gimple_build_omp_taskgroup): Add clauses argument.
2892 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
2893 (dump_gimple_omp_task): Print taskwait with depend clauses.
2894 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
2895 dump_omp_atomic_memory_order.
2896 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
2897 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
2898 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
2899 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
2900 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
2901 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
2902 ORT_UNTIED_TASKLOOP enumerators.
2903 (enum gimplify_defaultmap_kind): New.
2904 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
2905 target_map_pointers_as_0len_arrays members, add defaultmap.
2906 (new_omp_context): Initialize defaultmap member.
2907 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
2908 (maybe_fold_stmt): Don't fold even in host teams regions.
2909 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
2910 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
2911 ctx->omp_firstprivatize_variable.
2912 (omp_add_variable): Don't add private/firstprivate for VLAs in
2913 ORT_TASKGROUP.
2914 (omp_default_clause): Print "taskloop" rather than "task" if
2915 ORT_*TASKLOOP.
2916 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
2917 Handle new defaultmap clause kinds.
2918 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
2919 iterator to be lastprivate or private. Fix up diagnostics if linear
2920 is used on collapse>1 simd iterator.
2921 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
2922 (gimplify_omp_depend): New function.
2923 (gimplify_scan_omp_clauses): Add shared clause on parallel for
2924 combined parallel master taskloop{, simd} if taskloop has
2925 firstprivate, lastprivate or reduction clause. Handle
2926 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
2927 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
2928 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
2929 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
2930 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
2931 lastprivate.
2932 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
2933 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
2934 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
2935 OMP_CLAUSE_{TASK,IN}_REDUCTION.
2936 (gimplify_omp_task): Handle taskwait with depend clauses.
2937 (gimplify_omp_for): Add shared clause on parallel for combined
2938 parallel master taskloop{, simd} if taskloop has firstprivate,
2939 lastprivate or reduction clause. Use ORT_TASKLOOP or
2940 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
2941 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
2942 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
2943 __for_end and __for_range temporaries on OMP_PARALLEL for
2944 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
2945 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
2946 sandwiched in between two taskloops.
2947 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
2948 instead of ctx->omp_firstprivatize_variable.
2949 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
2950 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
2951 host teams, use gimplify_and_return_first etc. for body like
2952 for target or target data constructs, and at the end call
2953 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
2954 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
2955 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
2956 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
2957 gimple_omp_atomic_set_seq_cst calls.
2958 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
2959 case, handle taskgroup clauses.
2960 * lto-streamer-out.c (hash_tree): Handle
2961 OMP_CLAUSE_{TASK,IN}_REDUCTION.
2962 * Makefile.in (GTFILES): Add omp-general.h.
2963 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
2964 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
2965 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
2966 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
2967 BUILT_IN_GOMP_LOOP_DOACROSS_START,
2968 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
2969 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
2970 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
2971 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
2972 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
2973 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
2974 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
2975 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
2976 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
2977 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
2978 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
2979 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
2980 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
2981 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
2982 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
2983 * omp-expand.c (workshare_safe_to_combine_p): Return false for
2984 non-worksharing loops.
2985 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
2986 (determine_parallel_type): Don't combine parallel with worksharing
2987 which has _reductemp_ clause.
2988 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
2989 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
2990 if there is nonmonotonic modifier or if there is no modifier and no
2991 ordered clause. For dynamic and guided schedule without monotonic
2992 and nonmonotonic modifier, default to nonmonotonic.
2993 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
2994 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
2995 task reductions.
2996 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
2997 there are any reduction clauses.
2998 (expand_taskwait_call): New function.
2999 (expand_teams_call): New function.
3000 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
3001 expand_teams_call for it. Formatting fix. Handle taskwait with
3002 depend clauses.
3003 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
3004 of worksharing loops with task reductions.
3005 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
3006 expansion of worksharing loops with task reductions.
3007 (expand_omp_sections): Handle expansion of sections with task
3008 reductions.
3009 (expand_omp_synch): For host teams call expand_omp_taskreg.
3010 (omp_memory_order_to_memmodel): New function.
3011 (expand_omp_atomic_load, expand_omp_atomic_store,
3012 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
3013 instead of gimple_omp_atomic_seq_cst_p.
3014 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
3015 depend clauses as a standalone directive.
3016 * omp-general.c (enum omp_requires): New variable.
3017 (omp_extract_for_data): Initialize have_reductemp member. Allow
3018 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
3019 GT_EXPR loops depending on incr sign. Formatting fixes.
3020 * omp-general.h (struct omp_for_data): Add have_reductemp member.
3021 (enum omp_requires): New enum.
3022 (omp_requires_mask): Declare.
3023 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
3024 Fix comment typos.
3025 * omp-low.c (struct omp_context): Add task_reductions and
3026 task_reduction_map fields.
3027 (is_host_teams_ctx): New function.
3028 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
3029 (use_pointer_for_field): Use is_global_var instead of
3030 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
3031 in outer contexts.
3032 (build_outer_var_ref): Ignore taskgroup outer contexts.
3033 (delete_omp_context): Release task_reductions and task_reduction_map.
3034 (scan_sharing_clauses): Don't add any fields for reduction clause on
3035 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
3036 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
3037 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
3038 Handle OMP_CLAUSE_NONTEMPORAL.
3039 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
3040 needed.
3041 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
3042 clauses with task modifier.
3043 (scan_omp_task): Handle taskwait with depend clauses.
3044 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
3045 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
3046 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
3047 (scan_omp_for): Fix comment formatting.
3048 (scan_omp_teams): Handle host teams constructs.
3049 (check_omp_nesting_restrictions): Allow teams with no outer
3050 OpenMP context. Adjust diagnostics for teams strictly nested into
3051 some explicit OpenMP construct other than target. Allow OpenMP atomics
3052 inside of simd regions.
3053 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
3054 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
3055 taskreg_nesting_level while scanning host teams construct.
3056 (task_reduction_read): New function.
3057 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
3058 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
3059 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
3060 second argument create_tmp_var if it is NULL. Don't ignore shared
3061 clauses in is_host_teams_ctx contexts. Handle
3062 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
3063 clauses.
3064 (lower_reduction_clauses): Ignore reduction clauses with task
3065 modifier. Remove second argument create_tmp_var if it is NULL.
3066 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
3067 (lower_send_clauses): Ignore reduction clauses with task modifier.
3068 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
3069 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
3070 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
3071 rely that it is the last stmt in body so far. Ignore outer taskgroup
3072 contexts.
3073 (omp_task_reductions_find_first, omp_task_reduction_iterate,
3074 lower_omp_task_reductions): New functions.
3075 (lower_omp_sections): Handle reduction clauses with taskgroup
3076 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
3077 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
3078 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
3079 modifiers.
3080 (lower_omp_taskgroup): Handle taskgroup reductions.
3081 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
3082 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
3083 (lower_depend_clauses): If there are any
3084 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
3085 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
3086 seen, assume lowering is done already and return early. Set kind
3087 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
3088 (lower_omp_taskreg): Handle reduction clauses with task modifier on
3089 parallel construct. Handle reduction clause on taskloop construct.
3090 Handle taskwait with depend clauses.
3091 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
3092 for host teams constructs.
3093 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
3094 nontemporal and _reductemp_ clause entries.
3095 (omp_clause_code_name): Likewise.
3096 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
3097 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
3098 * tree-core.h (enum omp_clause_code): Add
3099 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
3100 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
3101 (struct tree_base): Add omp_atomic_memory_order field into union.
3102 Remove OMP_ATOMIC_SEQ_CST comment.
3103 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
3104 and OMP_CLAUSE_DEPEND_DEPOBJ.
3105 (struct tree_omp_clause): Add subcode.defaultmap_kind.
3106 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
3107 OpenMP constructs with body and clauses operands.
3108 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
3109 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
3110 (OMP_TASKGROUP_CLAUSES): Define.
3111 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
3112 OMP_CLAUSE__LOOPTEMP_.
3113 (OMP_ATOMIC_SEQ_CST): Remove.
3114 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
3115 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
3116 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
3117 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
3118 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
3119 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
3120 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
3121 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
3122 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
3123 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
3124 Define.
3125 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
3126 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3127 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
3128 (convert_local_omp_clauses): Likewise. Remove useless test.
3129 * tree-parloops.c (create_call_for_reduction_1): Pass
3130 OMP_MEMORY_ORDER_RELAXED as new argument to
3131 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
3132 * tree-pretty-print.c (dump_omp_iterators): New function.
3133 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
3134 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
3135 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
3136 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
3137 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
3138 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
3139 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
3140 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3141 (dump_omp_atomic_memory_order): New function.
3142 (dump_generic_node): Use it. Print taskgroup clauses. Print
3143 taskwait with depend clauses.
3144 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
3145 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
3146 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
3147 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
3148 write_ts_omp_clause_tree_pointers): Likewise.
3149
3150 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3151
3152 PR ipa/86395
3153 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
3154 "-missed", "-note", and "-all" sub-options.
3155 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
3156 API.
3157 (can_early_inline_edge_p): Likewise.
3158 (want_early_inline_function_p): Likewise.
3159 (want_inline_self_recursive_call_p): Likewise.
3160 (recursive_inlining): Likewise.
3161 (inline_small_functions): Likewise.
3162 (flatten_function): Likewise.
3163 (ipa_inline): Likewise.
3164 (inline_always_inline_functions): Likewise.
3165 (early_inline_small_functions): Likewise.
3166 (early_inliner): Likewise.
3167 * tree-inline.c (expand_call_inline): Likewise.
3168
3169 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3170
3171 * pretty-print.c (pp_format): Handle %f.
3172 (selftest::test_pp_format): Add test of %f.
3173 * pretty-print.h (pp_double): New macro.
3174
3175 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3176
3177 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
3178 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
3179 (dump_pretty_printer::decode_format): Implement "%C" for
3180 cgraph_node *.
3181 (selftest::test_capture_of_dump_calls): Rename "where" to
3182 "stmt_loc". Convert test_decl to a function decl and set its
3183 location. Add a symbol_table_test RAII instance and a
3184 cgraph_node, using it to test "%C" and dump_symtab_node.
3185
3186 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
3187
3188 PR middle-end/87916
3189 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
3190
3191 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3192
3193 * cgraph.c: Include "selftest.h".
3194 (saved_symtab): New variable.
3195 (selftest::symbol_table_test::symbol_table_test): New ctor.
3196 (selftest::symbol_table_test::~symbol_table_test): New dtor.
3197 (selftest::test_symbol_table_test): New test.
3198 (selftest::cgraph_c_tests): New.
3199 * cgraph.h (saved_symtab): New decl.
3200 (selftest::symbol_table_test): New class.
3201 * selftest-run-tests.c (selftest::run_tests): Call
3202 selftest::cgraph_c_tests.
3203 * selftest.h (selftest::cgraph_c_tests): New decl.
3204
3205 2018-11-08 Richard Biener <rguenther@suse.de>
3206
3207 * tree-data-ref.h (lambda_int): New typedef.
3208 (lambda_vector_gcd): Adjust.
3209 (lambda_vector_new): Likewise.
3210 (lambda_matrix_new): Likewise.
3211 * tree-data-ref.c (print_lambda_vector): Adjust.
3212
3213 2018-11-08 Richard Biener <rguenther@suse.de>
3214
3215 PR tree-optimization/87929
3216 * tree-complex.c (expand_complex_comparison): Clean EH.
3217
3218 2018-11-08 Martin Liska <mliska@suse.cz>
3219
3220 * doc/extend.texi: Reword.
3221 * predict.c (expr_expected_value_1): Likewise.
3222
3223 2018-11-08 Richard Biener <rguenther@suse.de>
3224
3225 PR tree-optimization/87913
3226 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
3227 of extreme values to ordered comparisons.
3228
3229 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
3230
3231 PR middle-end/42726
3232 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
3233
3234 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
3235
3236 * doc/invoke.texi: Remove leading dash from @opindex entries
3237 throughout the file.
3238
3239 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
3240
3241 PR driver/80828
3242 * doc/invoke.texi (Option Summary): Add -e and --entry.
3243 (Link Options): Likewise.
3244
3245 2018-11-07 Nathan Sidwell <nathan@acm.org>
3246
3247 PR 87926
3248 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
3249 --disable-checking bootstrap.
3250
3251 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
3252
3253 * configure: Regenerated.
3254
3255 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3256
3257 PR c/87691
3258 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
3259 to the mode of the widest field iff the widest field has mode class
3260 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
3261 reference.
3262
3263 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
3264
3265 * common.opt: Add -Wattribute-warning.
3266 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
3267 * expr.c (expand_expr_real_1): Add new attribute to warning_at
3268 call to allow user configure behavior of "warning" attribute.
3269
3270 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
3271
3272 * target.def: Put @: after every vs., e.g., and i.e. where it is
3273 followed by whitespace.
3274 * doc/extend.texi: Ditto.
3275 * doc/fragments.texi: Ditto.
3276 * doc/gimple.texi: Ditto.
3277 * doc/implement-c.texi: Ditto.
3278 * doc/install.texi: Ditto.
3279 * doc/invoke.texi: Ditto.
3280 * doc/md.texi: Ditto.
3281 * doc/plugins.texi: Ditto.
3282 * doc/rtl.texi: Ditto.
3283 * doc/sourcebuild.texi: Ditto.
3284 * doc/tm.texi.in: Ditto.
3285 * doc/ux.texi: Ditto.
3286 * doc/tm.texi: Regenerate.
3287
3288 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3289
3290 * config/arm/arm-cpus.in (ares): New entry.
3291 * config/arm/arm-tables.opt: Regenerate.
3292 * config/arm/arm-tune.md: Likewise.
3293 * doc/invoke.texi (ARM Options): Document ares.
3294
3295 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3296
3297 * config/aarch64/aarch64-cores.def (ares): Define.
3298 * config/aarch64/aarch64-tune.md: Regenerate.
3299 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
3300
3301 2018-11-07 Jan Hubicka <jh@suse.cz>
3302
3303 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
3304 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
3305 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
3306 TYPE_DECL.
3307
3308 2018-11-07 Richard Biener <rguenther@suse.de>
3309
3310 PR tree-optimization/87914
3311 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
3312 of nested cycles.
3313 (vectorizable_reduction): Handle shifts and rotates by dispatching
3314 to vectorizable_shift.
3315 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
3316 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
3317 def cases.
3318 (vectorizable_shift): Export and handle being called as
3319 vect_nested_cycle.
3320 (vect_analyze_stmt): Call vectorizable_shift after
3321 vectorizable_reduction.
3322 * tree-vectorizer.h (vectorizable_shift): Declare.
3323
3324 2018-11-07 Jan Hubicka <jh@suse.cz>
3325
3326 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
3327 than const decls in TREE_VALUE of enum.
3328 (dump_type_inheritance_graph): Improve duplicate dumping.
3329 (free_enum_values): New.
3330 (build_type_inheritance_graph): Use it.
3331 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
3332 which are not main variants or not ODR types.
3333 (verify_type_variant): Expect variants to have no TYPE_VALUES.
3334
3335 2018-11-07 Richard Biener <rguenther@suse.de>
3336
3337 * ipa-inline.c (want_inline_small_function_p): Compute
3338 big_speedup_p lazily and last.
3339
3340 2018-11-07 Jan Hubicka <jh@suse.cz>
3341
3342 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
3343 building incomplete variant of complete type.
3344 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
3345 variant of complete type.
3346
3347 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3348
3349 * config/mips/mips.c: Fix typo in documentation of
3350 mips_loongson_ext2_prefetch_cookie.
3351 (mips_option_override): fix brain twister logical.
3352 * config/mips/mips.h: Fix typo in documentation of
3353 ISA_HAS_CTZ_CTO and define pattern.
3354 * config/mips/mips.md (prefetch): Hoist EXT2 above
3355 the 2EF/EXT block.
3356 (prefetch_indexed): Hoist EXT2 above the EXT block.
3357
3358 2018-11-07 Jan Hubicka <jh@suse.cz>
3359
3360 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
3361 return and parameter types of function and method types.
3362 (free_lang_data_in_cgraph): Update.
3363
3364 2018-11-07 Martin Liska <mliska@suse.cz>
3365
3366 PR rtl-optimization/87868
3367 * postreload-gcse.c (eliminate_partially_redundant_load): Set
3368 threshold to max_count if we would overflow.
3369 * profile-count.h: Make max_count a public constant.
3370
3371 2018-11-07 Martin Liska <mliska@suse.cz>
3372
3373 * mem-stats.h: Fix GNU coding style.
3374
3375 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3376
3377 * config/mips/gs264e.md: New.
3378 * config/mips/mips-cpus.def: Define gs264e.
3379 * config/mips/mips-tables.opt: Regenerate.
3380 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
3381 gs264e.
3382 (mips_issue_rate): Add support for gs264e.
3383 (mips_multipass_dfa_lookahead): Likewise.
3384 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
3385 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
3386 (MIPS_ASE_MSA_SPEC): New.
3387 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
3388 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
3389 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
3390 * config/mips/mips.md: Include gs264e.md.
3391 (processor): Add gs264e.
3392 * config/mips/mips.opt (MSA): Use Mask instead of Var.
3393 * doc/invoke.texi: Add gs264e to supported architectures.
3394
3395 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3396
3397 * config/mips/gs464e.md: New.
3398 * config/mips/mips-cpus.def: Define gs464e.
3399 * config/mips/mips-tables.opt: Regenerate.
3400 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
3401 gs464e.
3402 (mips_issue_rate): Add support for gs464e.
3403 (mips_multipass_dfa_lookahead): Likewise.
3404 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
3405 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
3406 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
3407 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
3408 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
3409 * config/mips/mips.md: Include gs464e.md.
3410 (processor): Add gs464e.
3411 * doc/invoke.texi: Add gs464e to supported architectures.
3412
3413 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3414
3415 * config/mips/loongson3a.md: Rename to ...
3416 * config/mips/gs464.md: ... here.
3417 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
3418 as an alias of gs464 processor.
3419 * config/mips/mips-tables.opt: Regenerate.
3420 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
3421 instead of PROCESSOR_LOONGSON_3A.
3422 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
3423 TUNE_LOONGSON_3A.
3424 (mips_option_override): Enable MMI and EXT for gs464.
3425 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
3426 Rename TUNE_LOONGSON_3A to TUNE_GS464.
3427 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
3428 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
3429 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
3430 TARGET_LOONGSON_3A.
3431 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
3432 (processor): Add gs464;
3433 * doc/invoke.texi: Add gs464 to supported architectures.
3434
3435 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3436
3437 * config/mips/mips-protos.h
3438 (mips_loongson_ext2_prefetch_cookie): New prototype.
3439 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
3440 (mips_option_override): Enable TARGET_LOONGSON_EXT when
3441 TARGET_LOONGSON_EXT2 is true.
3442 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
3443 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
3444 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
3445 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
3446 TARGET_LOONGSON_EXT2.
3447 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
3448 (define_insn "ctz<mode>2"): New insn pattern.
3449 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
3450 (define_insn "prefetch_indexed_<mode>"): Include
3451 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
3452 * config/mips/mips.opt (-mloongson-ext2): Add option.
3453 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
3454
3455 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3456
3457 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
3458 __mips_loongson_ext.
3459 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
3460 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
3461 -mloongson-ext.
3462 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
3463 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
3464 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
3465 instead of TARGET_LOONGSON_3A.
3466 * config/mips/mips.opt (-mloongson-ext): Add option.
3467 * gcc/doc/invoke.texi (-mloongson-ext): Document.
3468
3469 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3470
3471 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
3472 * config/mips/loongson.md: Move to ...
3473 * config/mips/loongson-mmi.md: here; Adjustment.
3474 * config/mips/loongson.h: Move to ...
3475 State as deprecated. Include loongson-mmiintrin.h for back
3476 compatibility and warning.
3477 * config/mips/loongson-mmiintrin.h: ... here.
3478 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
3479 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
3480 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
3481 (mips_option_override): Make sure MMI use hard float;
3482 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
3483 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
3484 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
3485 TARGET_LOONGSON_VECTORS.
3486 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
3487 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
3488 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
3489 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
3490 -mloongson-mmi.
3491 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
3492 TARGET_LOONGSON_VECTORS.
3493 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
3494 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
3495 (Loongson MMI patterns): Include loongson-mmi.md instead of
3496 loongson.md.
3497 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
3498 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
3499
3500 2018-11-07 Richard Biener <rguenther@suse.de>
3501
3502 PR lto/87906
3503 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
3504 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
3505
3506 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
3507
3508 PR rtl-optimization/87874
3509 * lra.c (lra_substitute_pseudo): Do not create a subreg for
3510 const wide ints.
3511
3512 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
3513
3514 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
3515 if not in indexed or indirect form.
3516 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
3517 (bswap<mode>2_store): Ditto.
3518
3519 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
3520
3521 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
3522 the UNSPEC.
3523
3524 2018-11-06 Richard Biener <rguenther@suse.de>
3525
3526 PR tree-optimization/86850
3527 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
3528 instead of src.m_vec.
3529
3530 2018-11-06 Jan Hubicka <jh@suse.cz>
3531
3532 * tree.c (fld_simplified_type_name): Break out form ...
3533 (free_lang_data_in_type): ... here.
3534 (fld_type_variant_equal_p): Use it.
3535
3536 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3537
3538 * config/default-d.c: Include memmodel.h.
3539
3540 * config/sol2-d.c: New file.
3541 * config/t-sol2 (sol2-d.o): New rule.
3542 * config.gcc <*-*-solaris2*>: Set d_target_objs,
3543 target_has_targetdm.
3544
3545 2018-11-06 Jan Hubicka <jh@suse.cz>
3546
3547 * tree.c (fld_type_variant): Also copy alignment; be sure that
3548 new variant is equal.
3549
3550 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
3551
3552 PR target/87762
3553 * config/s390/s390.md: Add relative_long attribute.
3554
3555 2018-11-06 Jan Hubicka <jh@suse.cz>
3556
3557 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
3558 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
3559 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
3560 stream TYPE_NEEDS_CONSTRUCTING.
3561 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
3562 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
3563
3564 2018-11-06 Richard Biener <rguenther@suse.de>
3565
3566 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
3567 dump-scope ...
3568 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
3569
3570 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3571
3572 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
3573 REG_CLASS_CONTENTS[GEN_REGS].
3574 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
3575
3576 2018-11-06 Jan Hubicka <jh@suse.cz>
3577
3578 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
3579
3580 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3581
3582 PR sanitizer/80953
3583 * config/sol2.h (ASAN_CC1_SPEC): Define.
3584 (LD_WHOLE_ARCHIVE_OPTION): Define.
3585 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
3586 (ASAN_REJECT_SPEC): Provide default.
3587 (LIBASAN_EARLY_SPEC): Define.
3588 (LIBTSAN_EARLY_SPEC): Define.
3589 (LIBLSAN_EARLY_SPEC): Define.
3590 * config/i386/sol2.h (CC1_SPEC): Redefine.
3591 (ASAN_REJECT_SPEC): Define.
3592
3593 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
3594 (TARGET_ASAN_SHADOW_OFFSET): Define.
3595 (sparc_asan_shadow_offset): New function.
3596 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
3597 (ASAN_REJECT_SPEC): Define.
3598
3599 2018-11-06 Jan Hubicka <jh@suse.cz>
3600
3601 * tree.c (fld_type_variant): Copy canonical type.
3602 (fld_incomplete_type_of): Check that canonical types looks sane;
3603 copy canonical type.
3604 (verify_type): Accept when incomplete type has complete canonical type.
3605
3606 2018-11-06 Jan Hubicka <jh@suse.cz>
3607
3608 * tree.c (free_lang_data): Reset overwite_assembler_name,
3609 print_xnode, print_decl, print_type and print_identifier of
3610 langhooks.
3611
3612 2018-11-06 Richard Biener <rguenther@suse.de>
3613
3614 PR tree-optimization/87889
3615 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
3616 Do nothing if old and new arg are the same
3617
3618 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
3619
3620 PR target/87723
3621 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
3622 attributes for operands 3 and 4.
3623
3624 2018-11-06 Richard Biener <rguenther@suse.de>
3625
3626 PR middle-end/18041
3627 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
3628 matching bitfield insertion.
3629
3630 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
3631
3632 * auto-inc-dec.c: Include valtrack.h. Improve comments.
3633 (reg_next_debug_use): New.
3634 (attempt_change): Propagate adjusted expression into affected
3635 debug insns.
3636 (merge_in_block): Track uses in debug insns.
3637 (pass_inc_dec::execute): Allocate and release
3638 reg_next_debug_use.
3639
3640 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
3641
3642 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
3643 (_mm512_fixupimm_round_pd): Update parameters and builtin.
3644 (_mm512_maskz_fixupimm_round_pd): Ditto.
3645 (_mm512_fixupimm_round_ps): Ditto.
3646 (_mm512_maskz_fixupimm_round_ps): Ditto.
3647 (_mm_fixupimm_round_sd): Ditto.
3648 (_mm_maskz_fixupimm_round_sd): Ditto.
3649 (_mm_fixupimm_round_ss): Ditto.
3650 (_mm_maskz_fixupimm_round_ss): Ditto.
3651 (_mm512_fixupimm_pd): Ditto.
3652 (_mm512_maskz_fixupimm_pd): Ditto.
3653 (_mm512_fixupimm_ps): Ditto.
3654 (_mm512_maskz_fixupimm_ps): Ditto.
3655 (_mm_fixupimm_sd): Ditto.
3656 (_mm_maskz_fixupimm_sd): Ditto.
3657 (_mm_fixupimm_ss): Ditto.
3658 (_mm_maskz_fixupimm_ss): Ditto.
3659 (_mm512_mask_fixupimm_round_pd): Update builtin.
3660 (_mm512_mask_fixupimm_round_ps): Ditto.
3661 (_mm_mask_fixupimm_round_sd): Ditto.
3662 (_mm_mask_fixupimm_round_ss): Ditto.
3663 (_mm512_mask_fixupimm_pd): Ditto.
3664 (_mm512_mask_fixupimm_ps): Ditto.
3665 (_mm_mask_fixupimm_sd): Ditto.
3666 (_mm_mask_fixupimm_ss): Ditto.
3667 * config/i386/avx512vlintrin.h:
3668 (_mm256_fixupimm_pd): Update parameters and builtin.
3669 (_mm256_maskz_fixupimm_pd): Ditto.
3670 (_mm256_fixupimm_ps): Ditto.
3671 (_mm256_maskz_fixupimm_ps): Ditto.
3672 (_mm_fixupimm_pd): Ditto.
3673 (_mm_maskz_fixupimm_pd): Ditto.
3674 (_mm_fixupimm_ps): Ditto.
3675 (_mm_maskz_fixupimm_ps): Ditto.
3676 (_mm256_mask_fixupimm_pd): Update builtin.
3677 (_mm256_mask_fixupimm_ps): Ditto.
3678 (_mm_mask_fixupimm_pd): Ditto.
3679 (_mm_mask_fixupimm_ps): Ditto.
3680 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
3681 * config/i386/i386-builtin.def: Update builtin definitions.
3682 * config/i386/i386.c: Handle new builtin types and remove useless ones.
3683 * config/i386/sse.md: Update VFIXUPIMM* patterns.
3684 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3685 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3686 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
3687 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3688 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3689 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
3690 * config/i386/subst.md:
3691 (round_saeonly_sd_mask_operand4): Add new subst_attr.
3692 (round_saeonly_sd_mask_op4): Ditto.
3693 (round_saeonly_expand_operand5): Ditto.
3694 (round_saeonly_expand): Update.
3695
3696 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
3697
3698 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
3699
3700 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
3701
3702 PR rtl-optimization/87871
3703 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
3704
3705 2018-11-05 Paul Koning <ni1d@arrl.net>
3706
3707 * doc/sourcebuild.texi (target attributes): Document new "inf"
3708 effective target keyword.
3709
3710 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
3711
3712 * config/s390/s390.c (s390_register_move_cost): Increase costs for
3713 moves involving the CC reg.
3714
3715 2018-11-05 Richard Biener <rguenther@suse.de>
3716
3717 PR tree-optimization/87873
3718 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
3719 argument.
3720 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
3721 * tree-vect-loop.c (vect_transform_loop): When splitting the
3722 loop exit also create forwarder PHIs for constants.
3723 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
3724 Handle constant to_arg, add extra checking we match up the correct
3725 PHIs.
3726
3727 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
3728
3729 * config/s390/s390.md: QImode and HImode for load on condition.
3730
3731 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
3732
3733 * config/s390/predicates.md: Fix typo.
3734 * config/s390/s390.md: Allow immediates for load on condition.
3735
3736 2018-11-05 Martin Liska <mliska@suse.cz>
3737
3738 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
3739 * bitmap.h (struct bitmap_usage): Likewise.
3740 * ggc-common.c (SCALE): Remove.
3741 (LABEL): Likewise.
3742 (struct ggc_usage): Use SIZE_AMOUNT. And update
3743 compare method.
3744 * ggc-page.c (SCALE): Remove.
3745 (STAT_LABEL): Remove.
3746 (ggc_print_statistics): Use SIZE_AMOUNT.
3747 * gimple.h (SCALE): Remove.
3748 (LABEL): Likewise.
3749 * input.c (ONE_K): Remove.
3750 (ONE_M): Likewise.
3751 (SCALE): Likewise.
3752 (STAT_LABEL): Likewise.
3753 (FORMAT_AMOUNT): Likewise.
3754 (dump_line_table_statistics): Use SIZE_AMOUNT.
3755 * mem-stats.h (struct mem_usage): Likewise.
3756 * rtl.c (dump_rtx_statistics): Likewise.
3757 (rtx_alloc_counts): Change type to size_t.
3758 (rtx_alloc_sizes): Likewise.
3759 (rtx_count_cmp): New.
3760 (dump_rtx_statistics): Sort first based on counts.
3761 * tree.c (tree_nodes_cmp): New.
3762 (tree_codes_cmp): New.
3763 (dump_tree_statistics): Sort first based on counts.
3764 * system.h (ONE_K): New.
3765 (ONE_M): Likewise.
3766 (SIZE_SCALE): Likewise.
3767 (SIZE_LABEL): Likewise.
3768 (SIZE_AMOUNT): Likewise.
3769 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
3770 * tree-dfa.c (dump_dfa_stats): Likewise.
3771 * tree-phinodes.c (phinodes_print_statistics): Likewise.
3772 * tree-ssanames.c (ssanames_print_statistics): Likewise.
3773 * tree.c (dump_tree_statistics): Likewise.
3774 * vec.c (struct vec_usage): Likewise.
3775 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
3776 trigger a -Werror=format-overflow with
3777 --enable-gather-detailed-stats.
3778
3779 2018-11-05 Martin Liska <mliska@suse.cz>
3780
3781 * mem-stats.h (mem_alloc_description::release_instance_overhead):
3782 Return T *.
3783 * vec.c (struct vec_usage): Register m_element_size.
3784 (vec_prefix::register_overhead): New arguments: elements and
3785 element_size.
3786 (vec_prefix::release_overhead): Subtract elements.
3787 * vec.h (struct vec_prefix): Change signature.
3788 (va_heap::reserve): Pass proper arguments.
3789 (va_heap::release): Likewise.
3790
3791 2018-11-05 Martin Liska <mliska@suse.cz>
3792
3793 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
3794 style.
3795 * vec.c: Likewise.
3796
3797 2018-11-05 Richard Biener <rguenther@suse.de>
3798
3799 * tree-scalar-evolution.h (final_value_replacement_loop): Update
3800 prototype.
3801 * tree-scalar-evolution.c (final_value_replacement_loop): Return
3802 whether anything was done.
3803 (scev_const_prop): Remove constant propagation part, fold
3804 remains into ...
3805 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
3806 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
3807 conditionally.
3808
3809 2018-11-05 Jakub Jelinek <jakub@redhat.com>
3810
3811 PR tree-optimization/87859
3812 * gimple-ssa-store-merging.c (struct merged_store_group): Add
3813 only_constants and first_nonmergeable_order members.
3814 (merged_store_group::merged_store_group): Initialize them.
3815 (merged_store_group::do_merge): Clear only_constants member if
3816 adding something other than INTEGER_CST store.
3817 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
3818 stores with order >= first_nonmergeable_order. Use
3819 merged_store->only_constants instead of always recomputing it.
3820 Set merged_store->first_nonmergeable_order if we've skipped any
3821 stores. Attempt to merge overlapping INTEGER_CST stores that
3822 we would otherwise skip.
3823
3824 PR sanitizer/87837
3825 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
3826
3827 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
3828
3829 PR target/87853
3830 * config/i386/emmintrin.h (__v16qs): New to cope with option
3831 -funsigned-char.
3832 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
3833 (_mm_cmplt_epi8): Likewise.
3834 (_mm_cmpgt_epi8): Likewise.
3835
3836 2018-11-05 Richard Biener <rguenther@suse.de>
3837
3838 PR rtl-optimization/87852
3839 * fwprop.c (use_killed_between): Only consider single-defs of the
3840 use whose definition statement dominates the use.
3841
3842 2018-11-05 Martin Liska <mliska@suse.cz>
3843
3844 PR web/87829
3845 * doc/invoke.texi: Remove options that are
3846 not disabled with -Os.
3847
3848 2018-11-05 Martin Liska <mliska@suse.cz>
3849
3850 PR c/87811
3851 * doc/extend.texi: Update constrain about the last argument
3852 of __builtin_expect_with_probability.
3853
3854 2018-11-05 Martin Liska <mliska@suse.cz>
3855
3856 PR c/87811
3857 * predict.c (expr_expected_value_1): Verify
3858 that last argument is a real constants and emit
3859 error.
3860
3861 2018-11-05 Martin Liska <mliska@suse.cz>
3862
3863 PR gcov-profile/77698
3864 * ipa-profile.c (ipa_profile): Adjust hotness threshold
3865 only in LTO mode.
3866
3867 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
3868
3869 PR tree-optimization/86572
3870 * builtins.c (c_strlen): Handle negative offsets in a safe way.
3871
3872 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
3873
3874 PR tree-optimization/87672
3875 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
3876 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
3877
3878 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
3879
3880 PR middle-end/58372
3881 * cfgexpand.c (pass_expand::execute): Move the call to
3882 finish_eh_generation in front of the call to expand_stack_alignment.
3883
3884 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
3885
3886 * common/config/i386/i386-common.c (processor_alias_table): Add
3887 znver2 entry.
3888 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
3889 (case ${target}): Add znver2.
3890 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
3891 -march=native recognize znver2 processors.
3892 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
3893 * config/i386/i386.c (m_znver2): New definition.
3894 (m_ZNVER): New definition.
3895 (m_AMD_MULTIPLE): Includes m_znver2.
3896 (processor_cost_table): Add znver2 entry.
3897 (processor_target_table): Add znver2 entry.
3898 (get_builtin_code_for_version): Set priority for
3899 PROCESSOR_ZNVER2.
3900 (processor_model): Add M_AMDFAM17H_ZNVER2.
3901 (arch_names_table): Ditto.
3902 (ix86_reassociation_width): Include znver2.
3903 * config/i386/i386.h (TARGET_znver2): New definition.
3904 (struct ix86_size_cost): Add TARGET_ZNVER2.
3905 (enum processor_type): Add PROCESSOR_ZNVER2.
3906 * config/i386/i386.md (define_attr "cpu"): Add znver2.
3907 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
3908 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
3909 (ix86_adjust_cost): Add znver2.
3910 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
3911 * gcc/doc/extend.texi: Add details about znver2.
3912 * gcc/doc/invoke.texi: Add details about znver2.
3913
3914 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
3915
3916 PR target/87079
3917
3918 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
3919 pattern.
3920
3921 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3922
3923 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
3924 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
3925
3926 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
3927
3928 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
3929 shrink-wrapping when -mtrack-speculation.
3930
3931 2018-11-02 Richard Biener <rguenther@suse.de>
3932
3933 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
3934 (pop_cost_one_pair): Do not free pair.
3935 (pop_best_coalesce): Likewise.
3936 (create_coalesce_list): Initialize obstack.
3937 (delete_coalesce_list): Free obstack.
3938 (find_coalesce_pair): Obstack-allocate coalesce pairs.
3939 (add_cost_one_coalesce): Likewise.
3940 (struct live_track): Remove bitmap pointer indirections.
3941 (new_live_track): Adjust.
3942 (delete_live_track): Likewise.
3943 (live_track_remove_partition): Likewise.
3944 (live_track_add_partition): Likewise.
3945 (live_track_live_p): Likewise.
3946 (live_track_process_def): Likewise.
3947 (live_track_clear_base_vars): Likewise.
3948
3949 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3950
3951 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
3952 * configure: Regenerate.
3953 * config.in: Regenerate.
3954 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
3955 HAVE_AS_REGISTER_PSEUDO_OP guard.
3956 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
3957 !HAVE_AS_REGISTER_PSEUDO_OP support.
3958 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
3959 guard.
3960
3961 2018-11-02 Richard Biener <rguenther@suse.de>
3962
3963 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
3964 with is_type_die.
3965
3966 2018-11-02 Richard Biener <rguenther@suse.de>
3967
3968 PR tree-optimization/87776
3969 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
3970 executable when iterating but running into rpo-vn-max-loop-depth
3971 and not eliding the iteration.
3972
3973 2018-11-30 Jan Hubicka <jh@suse.cz>
3974
3975 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
3976 TYPE_DECL.
3977
3978 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
3979
3980 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
3981 prototype.
3982 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
3983 Combine with rs6000_address_for_fpconvert.
3984 (rs6000_address_for_fpconvert): Combine with
3985 rs6000_force_indexed_or_indirect_mem.
3986 (rs6000_expand_vector_init): Change function call from
3987 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
3988 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
3989 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
3990 (floatsi<mode>2_lfiwax_mem): Ditto.
3991 (floatunssi<mode>2_lfiwzx): Ditto.
3992 (floatunssi<mode>2_lfiwzx_mem): Ditto.
3993 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
3994 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
3995 (fix_trunc<mode>si2_stfiwx): Ditto.
3996 (fixuns_trunc<mode>si2_stfiwx): Ditto.
3997 (float_<mode>si2_hw): Ditto.
3998 (floatuns_<mode>si2_hw): Ditto.
3999 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
4000 (vsx_splat_<mode>): Ditto.
4001
4002 2018-11-01 Joseph Myers <joseph@codesourcery.com>
4003
4004 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
4005 at end of assembler input text.
4006 * configure: Regenerate.
4007
4008 2018-11-01 Jakub Jelinek <jakub@redhat.com>
4009
4010 PR tree-optimization/87826
4011 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
4012 negative or larger or equal to type's precision.
4013
4014 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
4015
4016 * opts.c (default_options_table): Do not enable
4017 OPT_fdelayed_branch at -Og.
4018 * doc/invoke.texi (-fdelayed-branch): Document it.
4019
4020 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
4021
4022 * optabs-libfuncs.c (build_libfunc_function_visibility):
4023 New, split out from...
4024 (build_libfunc_function): ... here.
4025 (init_one_libfunc_visibility): New, split out from ...
4026 (init_one_libfunc): ... here.
4027
4028 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
4029 scratch register need not be early-clobber. Document the reason
4030 why we cannot use ST<OP>.
4031
4032 2018-10-31 Joseph Myers <joseph@codesourcery.com>
4033
4034 PR bootstrap/82856
4035 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
4036 line for second argument of AC_DEFINE_UNQUOTED.
4037 * doc/install.texi (Tools/packages necessary for modifying GCC):
4038 Update to autoconf 2.69 and automake 1.15.1.
4039 * aclocal.m4, config.in, configure: Regenerate.
4040
4041 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
4042
4043 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
4044 initialization.
4045
4046 2018-10-31 Martin Liska <mliska@suse.cz>
4047
4048 PR driver/83193
4049 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
4050 Add new argument invalid_extension.
4051 (aarch64_get_all_extension_candidates): New function.
4052 (aarch64_rewrite_selected_cpu): Add NULL to function call.
4053 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
4054 new argument.
4055 (aarch64_get_all_extension_candidates): New function.
4056 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
4057 argument invalid_extension.
4058 (aarch64_parse_cpu): Likewise.
4059 (aarch64_print_hint_for_extensions): New function.
4060 (aarch64_validate_mcpu): Provide hint about invalid extension.
4061 (aarch64_validate_march): Likewise.
4062 (aarch64_handle_attr_arch): Pass new argument.
4063 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
4064 (aarch64_handle_attr_isa_flags): Likewise.
4065
4066 2018-10-31 Richard Biener <rguenther@suse.de>
4067
4068 PR middle-end/70359
4069 PR middle-end/86270
4070 * tree-outof-ssa.c (insert_backedge_copies): Restrict
4071 copy generation to useful cases. Place the copy before
4072 the definition of the backedge value when possible.
4073
4074 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
4075
4076 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
4077 * config/arc/arc.c (arc_active_insn): New function.
4078 (check_store_cacheline_hazard): Likewise.
4079 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
4080 (arc_override_options): Disable delay slot scheduler for older
4081 A7.
4082 (arc_store_addr_hazard_p): New implementation, old one renamed to
4083 ...
4084 (arc_store_addr_hazard_internal_p): Renamed.
4085 (arc_reorg): Don't combine into brcc instructions which are part
4086 of hardware hazard solution.
4087 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
4088 (tune_arc700): Likewise.
4089 * config/arc/arc.opt (arc7xx): New tune value.
4090 * config/arc/arc700.md: Improve A7 scheduler.
4091
4092 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
4093
4094 * config/arc/arc.c (arc_override_options): Remove
4095 TARGET_COMPACT_CASESI.
4096 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
4097 (CASE_VECTOR_MODE): Likewise.
4098 (CASE_VECTOR_PC_RELATIVE): Likewise.
4099 (CASE_VECTOR_SHORTEN_MODE): Likewise.
4100 (CASE_VECTOR_SHORTEN_MODE1): Delete.
4101 (ADDR_VEC_ALIGN): Update.
4102 (ASM_OUTPUT_CASE_LABEL): Undefine.
4103 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
4104 (TARGET_BI_BIH): Define.
4105 (DEFAULT_BRANCH_INDEX): Likewise.
4106 * config/arc/arc.md (casesi): Rework to accept BI/BIH
4107 instructions, remove compact_casesi use case.
4108 (casesi_compact_jump): Remove.
4109 (casesi_dispatch): New pattern.
4110 * config/arc/arc.opt: Add mbranch-index option. Deprecate
4111 compact_casesi option.
4112 * doc/invoke.texi: Document mbranch-index option.
4113
4114 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
4115
4116 * config/arc/arc.c (arc_get_tp): Remove function.
4117 (arc_emit_call_tls_get_addr): Likewise.
4118 (arc_call_tls_get_addr): New function.
4119 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
4120 * config/arc/arc.md (tls_load_tp_soft): Remove.
4121 (tls_gd_get_addr): Likewise.
4122
4123 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
4124
4125 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
4126 (mulsi3_600_lib): Remove pattern.
4127 (umulsi3_highpart_600_lib_le): Likewise.
4128 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
4129 (umulsidi3): Remove call to umulsidi3_600_lib.
4130 (umulsidi3_600_lib): Remove pattern.
4131 (peephole2): Remove peephole using the above deprecated patterns.
4132
4133 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
4134
4135 PR target/87374
4136 * config/arm/arm.c (arm_option_check_internal): Disable the combined
4137 use of -mslow-flash-data and -mword-relocations.
4138 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
4139 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
4140 flag_pic.
4141 * doc/invoke.texi (-mword-relocations): Mention conflict with
4142 -mslow-flash-data.
4143 (-mslow-flash-data): Reciprocally.
4144
4145 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
4146
4147 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
4148 16-byte modes held in GP registers to use an even regno.
4149
4150 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
4151 (aarch64_atomic_ldop_supported_p): Remove.
4152 (aarch64_gen_atomic_ldop): Remove.
4153 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
4154 Fully expand LSE operations here.
4155 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
4156 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
4157 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
4158 and use ATOMIC_LDOP instead; use register_operand for the input;
4159 drop the split and emit insns directly.
4160 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
4161 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
4162 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
4163
4164 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
4165 (aarch64_gen_atomic_ldop): Don't call it.
4166 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
4167 Use aarch64_reg_or_zero.
4168 (aarch64_atomic_exchange<ALLI>): Likewise.
4169 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
4170 operand 0; use aarch64_reg_or_zero for input; merge ...
4171 (@aarch64_atomic_swp<ALLI>): ... this and remove.
4172
4173 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
4174 (aarch64_split_compare_and_swap): Use it.
4175 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
4176 test oldval against the proper predicate.
4177 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
4178 Use nonmemory_operand for expected.
4179 (cas_short_expected_pred): New.
4180 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
4181 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
4182 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
4183 (aarch64_plushi_operand): New.
4184
4185 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
4186 Force oldval into the rval register for TARGET_LSE; emit the compare
4187 during initial expansion so that it may be deleted if unused.
4188 (aarch64_gen_atomic_cas): Remove.
4189 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
4190 Change =&r to +r for operand 0; use match_dup for operand 2;
4191 remove is_weak and mod_f operands as unused. Drop the split
4192 and merge with...
4193 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
4194 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
4195 (@aarch64_atomic_cas<GPI>): Similarly.
4196
4197 2018-10-31 Richard Biener <rguenther@suse.de>
4198
4199 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
4200 using ABSU_EXPR.
4201
4202 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4203
4204 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
4205 * config/aarch64/aarch64.md: Include saphira.md
4206 * config/aarch64/saphira.md: New file for pipeline description.
4207
4208 2018-10-30 Martin Sebor <msebor@redhat.com>
4209
4210 PR middle-end/87041
4211 * gimple-ssa-sprintf.c (format_directive): Use %G to include
4212 inlining context.
4213 (sprintf_dom_walker::compute_format_length):
4214 Avoid setting POSUNDER4K here.
4215 (get_destination_size): Handle null argument values.
4216 (get_user_idx_format): New function.
4217 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
4218 functions, including user-defined with attribute format printf.
4219 Use %G to include inlining context.
4220 Set POSUNDER4K here.
4221
4222 2018-10-30 Jan Hubicka <jh@suse.cz>
4223
4224 * params.def (lto-partitions): Bump from 32 to 128.
4225
4226 2018-10-30 Jan Hubicka <jh@suse.cz>
4227
4228 * tree.c
4229 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
4230 head in file.
4231 (free_lang_data_in_type): Forward declare.
4232 (fld_type_variant_equal_p): New function.
4233 (fld_type_variant): New function
4234 (fld_incomplete_types): New hash.
4235 (fld_incomplete_type_of): New function
4236 (fld_simplfied-type): New function.
4237 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
4238 (free_lang_data): Allocate and free fld_incomplete_type; update call
4239 of free_lang_data_in_decl.
4240
4241 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
4242
4243 * gcov.c (output_lines): Remove duplicate line.
4244
4245 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
4246
4247 * config/rs6000/rs6000.md (bswapdi2): Force address into register
4248 if not in indexed or indirect form.
4249 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
4250 (bswapdi2_store): Ditto.
4251 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
4252 helper function.
4253 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
4254 Prototype for helper function.
4255
4256 2018-10-30 Martin Sebor <msebor@redhat.com>
4257
4258 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
4259 (target, pragma GCC optimize, pragma GCC target): Ditto.
4260
4261 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
4262
4263 * doc/extend.texi: Fix prototype and description of
4264 __builtin_expect_with_probability.
4265
4266 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
4267
4268 * cgraph.h (clone_function_name_1): Replaced by new
4269 clone_function_name_numbered that takes name as string; for
4270 privatize_symbol_name_1 use only.
4271 (clone_function_name): Renamed to
4272 clone_function_name_numbered to be explicit about numbering.
4273 (clone_function_name): New two-argument function that does
4274 not number its output.
4275 (clone_function_name): New three-argument function that
4276 takes a number to append to its output.
4277 * cgraphclones.c (duplicate_thunk_for_node):
4278 (clone_function_name_1): Renamed.
4279 (clone_function_name_numbered): Two new functions.
4280 (clone_function_name): Improved documentation.
4281 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
4282 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
4283 * final.c (final_scan_insn_1): Use the new clone_function_name
4284 without numbering.
4285 * multiple_target.c (create_dispatcher_calls): Ditto.
4286 (create_target_clone): Ditto.
4287 * omp-expand.c (grid_expand_target_grid_body): Ditto.
4288 * omp-low.c (create_omp_child_function_name): Ditto.
4289 * omp-simd-clone.c (simd_clone_create): Ditto.
4290 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
4291 new clone_function_name without numbering.
4292
4293 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
4294
4295 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
4296 Assert that the allocation size is not zero.
4297
4298 2018-10-30 Richard Biener <rguenther@suse.de>
4299
4300 PR tree-optimization/87800
4301 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
4302 non-induction or reduction PHIs.
4303
4304 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
4305
4306 * config/aarch64/falkor-tag-collision-avoidance.c
4307 (execute_tag_collision_avoidance): Call df_note_add_problem.
4308
4309 2018-10-30 Martin Liska <mliska@suse.cz>
4310
4311 * doc/extend.texi: Fix typo in documentation
4312 of __builtin_expect_with_probability.
4313
4314 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4315
4316 PR c++/87721
4317 * input.c (get_substring_ranges_for_loc): Detect if
4318 linemap_resolve_location gives us a NULL map, and reject
4319 this case.
4320
4321 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
4322
4323 * config.gcc (xstormy16-*-elf): Set tm_d_file.
4324
4325 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4326 Martin Sebor <msebor@redhat.com>
4327 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4328
4329 * doc/ux.texi (Quoting): New subsection, adapted from material at
4330 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
4331 MartinSebor and ManuelLopezIbanez.
4332 (Fix-it hints): Note that fix-it hints shouldn't be marked for
4333 translation.
4334
4335 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
4336
4337 PR middle-end/87469
4338 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
4339 max value.
4340
4341 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
4342
4343 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
4344
4345 2018-10-29 Paul Koning <ni1d@arrl.net>
4346
4347 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
4348
4349 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
4350
4351 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
4352 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
4353 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
4354 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
4355 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
4356 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
4357 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
4358 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
4359 Change 'vector' to '__vector'.
4360 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
4361 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
4362 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
4363 _mm_avg_pu16): Likewise. And, whitespace corrections.
4364
4365 2018-10-29 Richard Biener <rguenther@suse.de>
4366
4367 PR tree-optimization/87785
4368 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
4369 internal defs.
4370
4371 2018-10-29 Olivier Hainque <hainque@adacore.com>
4372
4373 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
4374
4375 2018-10-29 Olivier Hainque <hainque@adacore.com>
4376
4377 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
4378 ports configuration macro, defaults to "gnu".
4379 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
4380 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
4381
4382 2018-10-29 Olivier Hainque <hainque@adacore.com>
4383
4384 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
4385
4386 2018-10-29 Richard Biener <rguenther@suse.de>
4387
4388 PR tree-optimization/87790
4389 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
4390 (vect_make_slp_decision): Adjust.
4391 (vect_slp_analyze_bb_1): Likewise.
4392 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
4393 edges.
4394
4395 2018-10-29 Richard Biener <rguenther@suse.de>
4396
4397 PR tree-optimization/87785
4398 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
4399 and processing.
4400 (vect_build_slp_tree): Likewise.
4401 (vect_gather_slp_loads): New function.
4402 (vect_analyze_slp_instance): Gather loads separately from the
4403 SLP tree build.
4404
4405 2018-10-29 Martin Liska <mliska@suse.cz>
4406
4407 * Makefile.in: Make dependency to json.o.
4408 * doc/gcov.texi: Document new JSON format, remove
4409 old intermediate format documentation.
4410 * gcov.c (struct function_info): Come up with m_name and
4411 m_demangled_name.
4412 (function_info::function_info): Initialize it.
4413 (function_info::~function_info): Release it.
4414 (main): Rename flag_intermediate_format to flag_json_format.
4415 (print_usage): Describe --json-format.
4416 (process_args): Set flag_json_format.
4417 (output_intermediate_line): Remove.
4418 (output_intermediate_json_line): Likewise.
4419 (get_gcov_intermediate_filename): Return new extension
4420 ".gcov.json.gz".
4421 (output_intermediate_file): Implement JSON emission.
4422 (output_json_intermediate_file): Implement JSON emission.
4423 (generate_results): Use ::get_name for function name.
4424 Handle JSON output file.
4425 (read_graph_file): Use ::get_name instead of cplus_demangle.
4426 (read_count_file): Likewise.
4427 (solve_flow_graph): Likewise.
4428 (add_line_counts): Likewise.
4429 (accumulate_line_counts): Use new flag_json_format.
4430 (output_function_details): Use ::get_name instead of cplus_demangle.
4431 (output_lines): Likewise.
4432 * json.cc (test_writing_literals): Add new tests.
4433 * json.h (class literal): Add new boolean constructor.
4434
4435 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
4436
4437 PR rtl-optimization/87701
4438 PR rtl-optimization/87780
4439 * combine.c (make_more_copies): Rewrite.
4440
4441 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
4442
4443 * doc/generic.texi (ABSU_EXPR): Document.
4444 * match.pd (absu(x)*absu(x) -> x*x): Handle.
4445 (absu(absu(X)) -> absu(X)): Likewise.
4446 (absu(-X) -> absu(X)): Likewise.
4447 (absu(X) where X is nonnegative -> X): Likewise.
4448
4449 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
4450
4451 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
4452 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
4453 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
4454 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
4455 (s-tm-texi): Also check timestamp on d-target.def.
4456 (generated_files): Add TM_D_H and d-target-hooks-def.h.
4457 (build/genhooks.o): Also depend on D_TARGET_DEF.
4458 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
4459 variables.
4460 * config/aarch64/aarch64-d.c: New file.
4461 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
4462 Define.
4463 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
4464 prototype.
4465 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
4466 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
4467 * config/arm/arm-d.c: New file.
4468 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
4469 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
4470 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
4471 * config/arm/t-arm (arm-d.o): New rule.
4472 * config/default-d.c: New file.
4473 * config/glibc-d.c: New file.
4474 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4475 * config/i386/i386-d.c: New file.
4476 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
4477 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
4478 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
4479 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
4480 * config/i386/t-i386 (i386-d.o): New rule.
4481 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4482 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4483 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
4484 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4485 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
4486 * config/mips/mips-d.c: New file.
4487 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
4488 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
4489 * config/mips/t-mips (mips-d.o): New rule.
4490 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4491 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4492 * config/powerpcspe/powerpcspe-d.c: New file.
4493 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
4494 New prototype.
4495 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
4496 Support GNU D by using 0 as the language type.
4497 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
4498 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
4499 * config/riscv/riscv-d.c: New file.
4500 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
4501 prototype.
4502 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
4503 * config/riscv/t-riscv (riscv-d.o): New rule.
4504 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4505 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4506 * config/rs6000/rs6000-d.c: New file.
4507 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
4508 prototype.
4509 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
4510 Support GNU D by using 0 as the language type.
4511 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
4512 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
4513 * config/s390/s390-d.c: New file.
4514 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
4515 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
4516 * config/s390/t-s390 (s390-d.o): New rule.
4517 * config/sparc/sparc-d.c: New file.
4518 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
4519 prototype.
4520 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
4521 * config/sparc/t-sparc (sparc-d.o): New rule.
4522 * config/t-glibc (glibc-d.o): New rule.
4523 * configure: Regenerated.
4524 * configure.ac (tm_d_file): New variable.
4525 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
4526 * doc/contrib.texi (Contributors): Add self for the D frontend.
4527 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
4528 * doc/install.texi (Configuration): Mention libphobos as an option for
4529 --enable-shared. Mention d as an option for --enable-languages.
4530 (Testing): Mention check-d as a target.
4531 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
4532 name suffixes. Mention d as a -x option.
4533 * doc/sourcebuild.texi (Top Level): Mention libphobos.
4534 * doc/standards.texi (Standards): Add section on D language.
4535 * doc/tm.texi: Regenerated.
4536 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
4537 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
4538 * dwarf2out.c (is_dlang): New function.
4539 (gen_compile_unit_die): Use DW_LANG_D for D.
4540 (declare_in_namespace): Return module die for D, instead of adding
4541 extra declarations into the namespace.
4542 (gen_namespace_die): Generate DW_TAG_module for D.
4543 (gen_decl_die): Handle CONST_DECLSs for D.
4544 (dwarf2out_decl): Likewise.
4545 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
4546 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
4547 kinds of aggregates.
4548 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
4549 * genhooks.c: Include d/d-target.def.
4550
4551 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
4552
4553 PR target/85669
4554 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
4555 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
4556 (STACK_DYNAMIC_OFFSET): Likewise.
4557
4558 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
4559
4560 PR target/80024
4561 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
4562 error message.
4563
4564 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
4565
4566 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
4567 return type and other typos.
4568
4569 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
4570
4571 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
4572 a shorter sequence with fewer branches.
4573 (emit_final_str_compare_gpr): Ditto.
4574
4575 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
4576
4577 * config/rs6000/tmmintrin.h: New file.
4578 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
4579
4580 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
4581
4582 * config/rs6000/mmintrin.h: Enable 32bit compilation.
4583 * config/rs6000/xmmintrin.h: Likewise.
4584
4585 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
4586
4587 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
4588
4589 2018-10-26 Richard Biener <rguenther@suse.de>
4590
4591 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
4592 and wrapper.
4593 (vect_mark_slp_stmts_relevant): Likewise.
4594 (vect_detect_hybrid_slp_stmts): Likewise.
4595 (vect_bb_slp_scalar_cost): Likewise.
4596 (vect_remove_slp_scalar_calls): Likewise.
4597
4598 2018-10-26 Jan Hubicka <jh@suse.cz>
4599
4600 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
4601 (warn_types_mismatch): Fix walk of DECL_NAME.
4602 (odr_types_equivalent_p): Fix overactive assert.
4603
4604 2018-10-26 Richard Biener <rguenther@suse.de>
4605
4606 PR tree-optimization/87105
4607 * tree-vectorizer.h (_slp_tree::refcnt): New member.
4608 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
4609 refcnt.
4610 (vect_create_new_slp_node): Initialize refcnt to one.
4611 (bst_traits): Move.
4612 (scalar_stmts_set_t, bst_fail): Remove.
4613 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
4614 (vect_build_slp_tree): Add bst_map argument and lookup
4615 already created SLP nodes.
4616 (vect_print_slp_tree): Handle a SLP graph, print SLP node
4617 addresses.
4618 (vect_slp_rearrange_stmts): Handle a SLP graph.
4619 (vect_analyze_slp_instance): Adjust and free SLP nodes from
4620 the CSE map. Fix indenting.
4621 (vect_schedule_slp_instance): Add short-cut.
4622
4623 2018-10-26 Martin Liska <mliska@suse.cz>
4624
4625 PR testsuite/86158
4626 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
4627 addr_expr and not with pointers.
4628
4629 2018-10-26 Jan Hubicka <jh@suse.cz>
4630
4631 * tree.c (free_lang_data_in_type): Only check main variants.
4632 * ipa-devirt.c (warn_odr): Make static.
4633 (types_same_for_odr): Drop strict variant.
4634 (types_odr_comparable): Likewise.
4635 (odr_or_derived_type_p): Look for main variants.
4636 (odr_name_hasher::equal): Cleanup comment.
4637 (odr_subtypes_equivalent): Add warn and warned arguments; check main
4638 variants.
4639 (type_variants_equivalent_p): break out from ...
4640 (odr_types_equivalent): ... here; go for main variants where needed.
4641 (warn_odr): ... here; turn static.
4642 (warn_types_mismatch): Compare mangled names of main variants.
4643 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
4644 (type_with_linkage_p): Sanity check that we look at main variant.
4645 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
4646 * tree.h (types_same_for_odr): Drop strict argument.
4647
4648 2018-10-26 Richard Biener <rguenther@suse.de>
4649
4650 PR tree-optimization/87746
4651 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
4652 Simplify and fix WRT strided store groups with size not
4653 equal to step in element count.
4654 (vect_analyze_group_access_1): Dump the whole group.
4655
4656 2018-10-25 Carl Love <cel@us.ibm.com>
4657
4658 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
4659 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
4660 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
4661 precicion entry for each overloaded builtin.
4662 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
4663 VSCEDPUO): Rename overloaded name.
4664 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
4665 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
4666 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
4667 define_expand for xscmpexqp instruction.
4668 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
4669
4670 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
4671 Jinsong Ji <jji@us.ibm.com>
4672
4673 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
4674 function with vec_sl.
4675 (_mm_slli_epi32): Likewise.
4676 (_mm_slli_epi64): Likewise.
4677 (_mm_srai_epi16): Replace deprecated function with vec_sra.
4678 (_mm_srai_epi32): Likewise.
4679 (_mm_srli_epi16): Replace deprecated function with vec_sr.
4680 (_mm_srli_epi32): Likewise.
4681 (_mm_srli_epi64): Likewise.
4682 (_mm_sll_epi16): Replace deprecated function with vec_sl.
4683 (_mm_sll_epi32): Likewise.
4684 (_mm_sll_epi64): Likewise.
4685 (_mm_sra_epi16): Replace deprecated function with vec_sra.
4686 (_mm_sra_epi32): Likewise.
4687 (_mm_srl_epi16): Replace deprecated function with vec_sr.
4688 (_mm_srl_epi32): Likewise.
4689 (_mm_srl_epi64): Likewise.
4690
4691 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
4692 Jinsong Ji <jji@us.ibm.com>
4693
4694 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
4695 comparison operators with vec_cmp* for compatibility due to
4696 unfortunate history; clean up formatting and use types more
4697 appropriately.
4698 (_mm_sll_epi32): Likewise.
4699 (_mm_sll_epi64): Likewise.
4700 (_mm_srl_epi16): Likewise.
4701 (_mm_srl_epi32): Likewise.
4702 (_mm_srl_epi64): Likewise.
4703
4704 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
4705 Jinsong Ji <jji@us.ibm.com>
4706
4707 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
4708 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
4709 __vector __bool int. Use vec_cmpgt in preference to deprecated
4710 function vec_vcmpgtfp.
4711 (_mm_max_ps): Likewise.
4712
4713 2018-10-25 Jeff Law <law@redhat.com>
4714
4715 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
4716 if returning false.
4717
4718 2018-10-25 Martin Sebor <msebor@redhat.com>
4719
4720 * doc/extend.texi (aligned): Expand attribute description.
4721 (Alignment): Rename section. Discuss function arguments.
4722
4723 2018-10-25 Jan Hubicka <jh@suse.cz>
4724
4725 * ipa-devirt.c (main_odr_variant): Remove.
4726 (hash_odr_name, types_same_for_odr, types_odr_comparable,
4727 odr_name_hasher::equal, odr_subtypes_equivalent_p):
4728 Drop use of main_odr_variant.
4729 (add_type_duplicate): Silence confused warnings on integer types.
4730 (get_odr_type): Always look for main variant.
4731 (register_odr_type): Simplify.
4732
4733 2018-10-25 Richard Biener <rguenther@suse.de>
4734
4735 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
4736 Initialize ng to silence error with release checking bootstrap.
4737
4738 2018-10-25 Richard Biener <rguenther@suse.de>
4739
4740 * tree-if-conv.c: Include tree-ssa-sccvn.h.
4741 (tree_if_conversion): Run CSE on the if-converted loop body.
4742
4743 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
4744
4745 * config/s390/constraints.md (ZL): New constraint.
4746 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
4747 operands.
4748 * config/s390/s390.md (movdi_larl): Remove.
4749 (movdi_64): Add the LARL alternative.
4750
4751 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
4752
4753 PR bootstrap/87747
4754 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
4755 (RTX_CODE_HWINT_P): New macro.
4756 (rtx_code_size): Use RTX_CODE_HWINT_P ().
4757
4758 2018-10-25 Jan Hubicka <jh@suse.cz>
4759
4760 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
4761 is anonymous.
4762
4763 2018-10-25 Richard Biener <rguenther@suse.de>
4764
4765 PR tree-optimization/87665
4766 PR tree-optimization/87745
4767 * tree-vectorizer.h (get_earlier_stmt): Remove.
4768 (get_later_stmt): Pick up UID from the original non-pattern stmt.
4769
4770 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
4771
4772 * options.texi (Deprecated): Move list to Var section.
4773
4774 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
4775 Jinsong Ji <jji@us.ibm.com>
4776
4777 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
4778 __vector long to __vector long long.
4779 (_mm_cvtpd_ps): Likewise.
4780 (_mm_cvttpd_epi32): Likewise.
4781 (_mm_cvtpi32_pd): Likewise.
4782 (_mm_unpackhi_epi64): Likewise.
4783 (_mm_unpacklo_epi64): Likewise.
4784
4785 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
4786
4787 PR rtl-optimization/87720
4788 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
4789
4790 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
4791
4792 * gimple-ssa-isolate-paths.c
4793 (find_implicit_erroneous_behavior): Do not change code if the
4794 pass is running for warnings only.
4795 (find_explicit_erroneous_behavior): Likewise.
4796
4797 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
4798
4799 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
4800 Define as rs6000_mangle_decl_assembler_name.
4801 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
4802 long double to IEEE long double, switch the names of the long
4803 double built-in functions to be <func>f128 instead of <func>l.
4804
4805 2018-10-24 Martin Sebor <msebor@redhat.com>
4806
4807 * doc/extend.texi (nonnull): List no-argument form. Reference
4808 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
4809
4810 2018-10-24 Richard Biener <rguenther@suse.de>
4811
4812 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
4813
4814 2018-10-24 Martin Liska <mliska@suse.cz>
4815
4816 PR tree-optimization/84436
4817 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
4818 Remove.
4819 (switch_conversion::contains_linear_function_p): New.
4820 (switch_conversion::build_one_array): Support linear
4821 transformation on input.
4822 * tree-switch-conversion.h (struct switch_conversion): Add
4823 contains_linear_function_p declaration.
4824
4825 2018-10-24 Richard Biener <rguenther@suse.de>
4826
4827 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
4828 if its argument is CONSTANT_CLASS_P.
4829
4830 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
4831
4832 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
4833 it is wrong for forward declarations.
4834
4835 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
4836
4837 * config/s390/s390.c (s390_check_qrst_address): Add the missing
4838 SYMBOL_REF_P () check.
4839
4840 2018-10-24 Richard Biener <rguenther@suse.de>
4841
4842 PR tree-optimization/87105
4843 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
4844 dump classification.
4845 (vect_analyze_data_ref_accesses): Handle duplicate loads and
4846 stores by splitting the affected group after the fact.
4847 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
4848 fail the SLP build because of size constraints.
4849
4850 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4851
4852 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
4853 * configure: Regenerate.
4854 * config.in: Regenerate.
4855 * varasm.c (mergeable_string_section): Use readonly_data_section
4856 if linker doesn't support SHF_MERGE with alignment > 8.
4857 (mergeable_constant_section): Likewise.
4858
4859 2018-10-24 Richard Biener <rguenther@suse.de>
4860
4861 PR tree-optimization/84013
4862 * tree-ssa-structalias.c (struct msdi_data): New struct for
4863 marshalling data to walk_stmt_load_store_ops.
4864 (maybe_set_dependence_info): Refactor as callback for
4865 walk_stmt_load_store_ops.
4866 (compute_dependence_clique): Set restrict info on all stmt kinds.
4867
4868 2018-10-24 Martin Liska <mliska@suse.cz>
4869
4870 * cgraph.c (cgraph_node::dump):
4871 Remove reduntant dumps and make tp_first_run dump more compact.
4872
4873 2018-10-24 Richard Biener <rguenther@suse.de>
4874
4875 PR tree-optimization/87665
4876 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
4877 to reflect reality.
4878
4879 2018-10-12 Jeff Law <law@redhat.com>
4880
4881 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
4882 for H8/S.
4883
4884 2018-10-23 Richard Biener <rguenther@suse.de>
4885
4886 * tree-vrp.c (add_assert_info): Guard dump_printf with
4887 dump_enabled_p.
4888 * gimple-ssa-evrp-analyze.c
4889 (evrp_range_analyzer::record_ranges_from_incoming_edge):
4890 Use value_range::ignore_equivs_equal_p.
4891
4892 2018-10-23 Richard Biener <rguenther@suse.de>
4893
4894 PR tree-optimization/87105
4895 PR tree-optimization/87608
4896 * passes.def (pass_all_early_optimizations): Add early phi-opt
4897 after dce.
4898 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
4899 addition to debug stmts.
4900 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
4901 and abs replacement early.
4902 * tree-cfg.c (gimple_empty_block_p): Likewise.
4903
4904 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
4905
4906 PR target/86383
4907 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
4908 specified to configure.
4909 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
4910
4911 2018-10-23 Richard Biener <rguenther@suse.de>
4912
4913 PR tree-optimization/87700
4914 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
4915
4916 2018-10-23 Jakub Jelinek <jakub@redhat.com>
4917
4918 PR target/87674
4919 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
4920 second argument from __mmask16 to __mmask8.
4921 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
4922 _mm_mask_packs_epi32): Likewise.
4923 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
4924 Likewise.
4925 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
4926
4927 2018-10-23 Richard Biener <rguenther@suse.de>
4928
4929 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
4930
4931 2018-10-23 Richard Biener <rguenther@suse.de>
4932
4933 PR tree-optimization/86144
4934 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
4935 over simd attribute.
4936
4937 2018-10-23 Richard Biener <rguenther@suse.de>
4938
4939 PR tree-optimization/87693
4940 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
4941 the case we do not find the taken edge.
4942
4943 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
4944 Jinsong Ji <jji@us.ibm.com>
4945
4946 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
4947 (_mm_store_pd): Use unaligned vector type for pointer cast.
4948 (_mm_maskmoveu_si128): Likewise.
4949 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
4950 (_mm_store_ps): Use unaligned vector type for pointer cast.
4951
4952 2018-10-22 Paul Koning <ni1d@arrl.net>
4953
4954 * symtab.c (symtab_node::increase_alignment): Correct max
4955 alignment check.
4956
4957 2018-10-22 Yury Gribov <tetra2005@gmail.com>
4958
4959 PR tree-optimization/87633
4960 * match.pd: Do not generate unordered integer comparisons.
4961
4962 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
4963
4964 PR rtl-optimization/87600
4965 * combine.c: Add include of expr.h.
4966 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
4967 register to a pseudo.
4968 (make_more_copies): New function, add a copy to a new pseudo after
4969 the moves from hard registers into pseudos.
4970 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
4971 later. Call make_more_copies.
4972
4973 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
4974
4975 * lra-constraints.c (process_alt_operands): New local array,
4976 matching_early_clobber. Check matching_early_clobber before
4977 decrementing reject, and set matching_early_clobber after.
4978
4979 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
4980
4981 PR target/87598
4982 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
4983 call output_addr_const and hope for the best.
4984
4985 2018-10-22 Richard Biener <rguenther@suse.de>
4986
4987 * gimple-ssa-evrp-analyze.c
4988 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
4989 smarter about what ranges to use.
4990 * tree-vrp.c (add_assert_info): Dump here.
4991 (register_edge_assert_for_2): Instead of here at multiple but
4992 not all places.
4993
4994 * gcc.dg/tree-ssa/evrp12.c: New testcase.
4995 * gcc.dg/predict-6.c: Adjust.
4996 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
4997 * gcc.dg/tree-ssa/vrp02.c: Likewise.
4998 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
4999
5000 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
5001 Richard Biener <rguenther@suse.de>
5002
5003 * bitmap.h: Update data structure documentation, including a
5004 description of bitmap views as either linked-lists or splay trees.
5005 (struct bitmap_element_def): Update comments for splay tree bitmaps.
5006 (struct bitmap_head_def): Likewise.
5007 (bitmap_list_view, bitmap_tree_view): New prototypes.
5008 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
5009 tree_form fields.
5010 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
5011 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
5012 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
5013 released bitmap element here.
5014 (bitmap_element_free): Remove.
5015 (bitmap_elt_clear_from): Work on splay tree bitmaps.
5016 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
5017 this function similar ones such that linked-list bitmap implementation
5018 functions are grouped.
5019 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
5020 and moved for grouping.
5021 (bitmap_list_insert_element_after): Renamed from
5022 bitmap_elt_insert_after, and moved for grouping.
5023 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
5024 (bitmap_tree_link_left, bitmap_tree_link_right,
5025 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
5026 bitmap_tree_link_element, bitmap_tree_unlink_element,
5027 bitmap_tree_find_element): New functions for splay-tree bitmap
5028 implementation.
5029 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
5030 Renamed and moved, see above entries.
5031 (bitmap_tree_listify_from): New function to convert part of a splay
5032 tree bitmap to a linked-list bitmap.
5033 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
5034 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
5035 (bitmap_find_bit): Remove.
5036 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
5037 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
5038 Handle splay tree bitmaps.
5039 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
5040 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
5041 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
5042 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
5043 bitmap_intersect_compl_p, bitmap_ior_and_compl,
5044 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
5045 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
5046 corresponding changes to use linked-list specific bitmap_element
5047 manipulation functions as applicable for efficiency.
5048 (bitmap_tree_to_vec): New function.
5049 (debug_bitmap_elt_file): New function split out from ...
5050 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
5051 (bitmap_print): Likewise.
5052
5053 PR tree-optimization/63155
5054 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
5055 SSA edge worklists.
5056 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
5057 in tree-view.
5058
5059 2018-10-22 Martin Liska <mliska@suse.cz>
5060
5061 PR tree-optimization/87686
5062 Revert
5063 2018-08-29 Martin Liska <mliska@suse.cz>
5064
5065 * tree-switch-conversion.c (switch_conversion::expand):
5066 Strenghten assumption about gswitch statements.
5067
5068 2018-10-22 Martin Liska <mliska@suse.cz>
5069
5070 * ipa-icf.c (sem_item::compare_attributes): Remove.
5071 (sem_item::compare_referenced_symbol_properties): Use
5072 attribute_list_equal instead.
5073 (sem_function::equals_wpa): Likewise.
5074 * ipa-icf.h: Remove compare_attributes.
5075
5076 2018-10-22 Richard Biener <rguenther@suse.de>
5077
5078 PR middle-end/87682
5079 * mem-stats.h (mem_usage::operator==): Fix pasto.
5080
5081 2018-10-22 Richard Biener <rguenther@suse.de>
5082
5083 PR tree-optimization/87640
5084 * tree-vrp.c (set_value_range_with_overflow): Decompose
5085 incomplete result.
5086 (extract_range_from_binary_expr_1): Adjust.
5087
5088 2018-10-22 Martin Jambor <mjambor@suse.cz>
5089
5090 * tree-eh.h (stmt_could_throw_p): Add function parameter.
5091 (stmt_can_throw_external): Likewise.
5092 (stmt_can_throw_internal): Likewise.
5093 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
5094 (lower_eh_constructs_2): Likewise.
5095 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
5096 (stmt_can_throw_external): Likewise.
5097 (stmt_can_throw_internal): Likewise.
5098 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
5099 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
5100 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
5101 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
5102 (pass_lower_eh_dispatch::execute): Pass cfun to
5103 stmt_can_throw_external.
5104 (cleanup_empty_eh): Likewise.
5105 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
5106 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
5107 stmt_can_throw_external instead of pushing it to cfun.
5108 (symbol_table::create_edge): Likewise.
5109 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
5110 stmt_can_throw_internal.
5111 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
5112 to stmt_could_throw_p.
5113 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
5114 stmt_can_throw_internal.
5115 (pass_store_merging::execute): Likewise.
5116 * gimple-ssa-strength-reduction.c
5117 (find_candidates_dom_walker::before_dom_children): Pass cfun to
5118 stmt_could_throw_p.
5119 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
5120 stmt_can_throw_internal.
5121 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
5122 to stmt_can_throw_external.
5123 (check_stmt): Pass cfun to stmt_could_throw_p.
5124 (check_stmt): Pass cfun to stmt_can_throw_external.
5125 (pass_nothrow::execute): Likewise.
5126 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
5127 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
5128 stmt_can_throw_internal.
5129 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
5130 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
5131 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
5132 * tree-complex.c (expand_complex_libcall): Pass cfun to
5133 stmt_could_throw_p and to stmt_can_throw_internal.
5134 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
5135 * tree-inline.c (copy_edges_for_bb): Likewise.
5136 (maybe_move_debug_stmts_to_successors): Likewise.
5137 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
5138 stmt_could_throw_p.
5139 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
5140 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
5141 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
5142 stmt_can_throw_internal.
5143 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
5144 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
5145 stmt_could_throw_p.
5146 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
5147 stmt_can_throw_internal.
5148 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
5149 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
5150 stmt_could_throw_p.
5151 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
5152 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
5153 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5154 (convert_mult_to_fma_1): Likewise.
5155 (convert_to_divmod): Likewise.
5156 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
5157 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
5158 * tree-ssa-propagate.c
5159 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
5160 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
5161 (maybe_optimize_range_tests): Likewise.
5162 (linearize_expr_tree): Likewise.
5163 (reassociate_bb): Likewise.
5164 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5165 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
5166 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
5167 (handle_char_store): Likewise.
5168 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
5169 stmt_can_throw_internal.
5170 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
5171 stmt_could_throw_p.
5172 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5173 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
5174 (vectorizable_simd_clone_call): Likewise.
5175 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
5176 (gimple_stringop_fixed_value): Likewise.
5177
5178 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
5179
5180 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
5181 literal pool references.
5182 (s390_check_qrst_address): Adapt to the new behavior of
5183 s390_loadrelative_operand_p ().
5184
5185 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
5186
5187 PR target/72782
5188 * config/i386/sse.md (*andnot<mode>3_bcst): New.
5189
5190 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
5191
5192 PR target/72782
5193 * config/i386/sse.md (*<code><mode>3_bcst): New.
5194
5195 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
5196
5197 PR target/72782
5198 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
5199 V4DI, V16SI and V8DI.
5200 (*sub<mode>3<mask_name>_bcst): New.
5201 (*add<mode>3<mask_name>_bcst): Likewise.
5202
5203 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
5204 Jinsong Ji <jji@us.ibm.com>
5205
5206 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
5207 __m64 with __vector unsigned long long for compatibility.
5208 (_mm_movemask_epi8): Likewise.
5209 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
5210 (_mm_cvttps_pi32): Likewise.
5211 (_mm_cvtpi32_ps): Likewise.
5212 (_mm_cvtps_pi16): Likewise.
5213 (_mm_loadh_pi): Likewise.
5214 (_mm_storeh_pi): Likewise.
5215 (_mm_movehl_ps): Likewise.
5216 (_mm_movelh_ps): Likewise.
5217 (_mm_loadl_pi): Likewise.
5218 (_mm_storel_pi): Likewise.
5219 (_mm_movemask_ps): Likewise.
5220 (_mm_shuffle_pi16): Likewise.
5221
5222 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5223
5224 PR target/72782
5225 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
5226 __builtin_ia32_vfnmsubpd512_mask.
5227 (_mm512_mask_fnmsub_round_pd): Likewise.
5228 (_mm512_fnmsub_pd): Likewise.
5229 (_mm512_mask_fnmsub_pd): Likewise.
5230 (_mm512_maskz_fnmsub_round_pd): Use
5231 __builtin_ia32_vfnmsubpd512_maskz.
5232 (_mm512_maskz_fnmsub_pd): Likewise.
5233 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
5234 (_mm512_mask_fnmsub_round_ps): Likewise.
5235 (_mm512_fnmsub_ps): Likewise.
5236 (_mm512_mask_fnmsub_ps): Likewise.
5237 (_mm512_maskz_fnmsub_round_ps): Use
5238 __builtin_ia32_vfnmsubps512_maskz.
5239 (_mm512_maskz_fnmsub_ps): Likewise.
5240 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
5241 __builtin_ia32_vfnmsubpd256_mask.
5242 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
5243 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
5244 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
5245 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
5246 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
5247 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
5248 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
5249 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
5250 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
5251 __builtin_ia32_vfnmsubpd.
5252 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
5253 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
5254 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
5255 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
5256 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
5257 * config/i386/i386-builtin.def: Add
5258 __builtin_ia32_vfnmsubpd256_mask,
5259 __builtin_ia32_vfnmsubpd256_maskz,
5260 __builtin_ia32_vfnmsubpd128_mask,
5261 __builtin_ia32_vfnmsubpd128_maskz,
5262 __builtin_ia32_vfnmsubps256_mask,
5263 __builtin_ia32_vfnmsubps256_maskz,
5264 __builtin_ia32_vfnmsubps128_mask,
5265 __builtin_ia32_vfnmsubps128_maskz,
5266 __builtin_ia32_vfnmsubpd512_mask,
5267 __builtin_ia32_vfnmsubpd512_maskz,
5268 __builtin_ia32_vfnmsubps512_mask,
5269 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
5270 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
5271 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
5272 __builtin_ia32_vfnmsubpd256.
5273 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
5274 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
5275 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
5276 Likewise.
5277 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
5278 Likewise.
5279 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
5280 Likewise.
5281 (fmai_vmfnmsub_<mode><round_name>): Likewise.
5282
5283 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5284
5285 PR target/72782
5286 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
5287 __builtin_ia32_vfnmaddpd512_mask.
5288 (_mm512_mask_fnmadd_round_pd): Likewise.
5289 (_mm512_fnmadd_pd): Likewise.
5290 (_mm512_mask_fnmadd_pd): Likewise.
5291 (_mm512_maskz_fnmadd_round_pd): Use
5292 __builtin_ia32_vfnmaddpd512_maskz.
5293 (_mm512_maskz_fnmadd_pd): Likewise.
5294 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
5295 (_mm512_mask_fnmadd_round_ps): Likewise.
5296 (_mm512_fnmadd_ps): Likewise.
5297 (_mm512_mask_fnmadd_ps): Likewise.
5298 (_mm512_maskz_fnmadd_round_ps): Use
5299 __builtin_ia32_vfnmaddps512_maskz.
5300 (_mm512_maskz_fnmadd_ps): Likewise.
5301 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
5302 __builtin_ia32_vfnmaddpd256_mask.
5303 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
5304 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
5305 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
5306 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
5307 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
5308 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
5309 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
5310 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
5311 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
5312 __builtin_ia32_vfnmaddpd.
5313 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
5314 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
5315 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
5316 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
5317 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
5318 * config/i386/i386-builtin.def: Add
5319 __builtin_ia32_vfnmaddpd256_mask,
5320 __builtin_ia32_vfnmaddpd256_maskz,
5321 __builtin_ia32_vfnmaddpd128_mask,
5322 __builtin_ia32_vfnmaddpd128_maskz,
5323 __builtin_ia32_vfnmaddps256_mask,
5324 __builtin_ia32_vfnmaddps256_maskz,
5325 __builtin_ia32_vfnmaddps128_mask,
5326 __builtin_ia32_vfnmaddps128_maskz,
5327 __builtin_ia32_vfnmaddpd512_mask,
5328 __builtin_ia32_vfnmaddpd512_maskz,
5329 __builtin_ia32_vfnmaddps512_mask,
5330 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
5331 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
5332 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
5333 __builtin_ia32_vfnmaddpd256.
5334 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
5335 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
5336 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
5337 Likewise.
5338 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
5339 Likewise.
5340 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
5341 Likewise.
5342 (fmai_vmfnmadd_<mode><round_name>): Likewise.
5343
5344 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5345
5346 PR target/72782
5347 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
5348 __builtin_ia32_vfmsubpd512_mask.
5349 (_mm512_mask_fmsub_round_pd): Likewise.
5350 (_mm512_fmsub_pd): Likewise.
5351 (_mm512_mask_fmsub_pd): Likewise.
5352 (_mm512_maskz_fmsub_round_pd): Use
5353 __builtin_ia32_vfmsubpd512_maskz.
5354 (_mm512_maskz_fmsub_pd): Likewise.
5355 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
5356 (_mm512_mask_fmsub_round_ps): Likewise.
5357 (_mm512_fmsub_ps): Likewise.
5358 (_mm512_mask_fmsub_ps): Likewise.
5359 (_mm512_maskz_fmsub_round_ps): Use
5360 __builtin_ia32_vfmsubps512_maskz.
5361 (_mm512_maskz_fmsub_ps): Likewise.
5362 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
5363 __builtin_ia32_vfmsubpd256_mask.
5364 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
5365 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
5366 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
5367 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
5368 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
5369 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
5370 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
5371 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
5372 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
5373 __builtin_ia32_vfmsubpd.
5374 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
5375 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
5376 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
5377 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
5378 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
5379 * config/i386/i386-builtin.def: Add
5380 __builtin_ia32_vfmsubpd256_mask,
5381 __builtin_ia32_vfmsubpd256_maskz,
5382 __builtin_ia32_vfmsubpd128_mask,
5383 __builtin_ia32_vfmsubpd128_maskz,
5384 __builtin_ia32_vfmsubps256_mask,
5385 __builtin_ia32_vfmsubps256_maskz,
5386 __builtin_ia32_vfmsubps128_mask,
5387 __builtin_ia32_vfmsubps128_maskz,
5388 __builtin_ia32_vfmsubpd512_mask,
5389 __builtin_ia32_vfmsubpd512_maskz,
5390 __builtin_ia32_vfmsubps512_mask,
5391 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
5392 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
5393 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
5394 __builtin_ia32_vfmsubpd256.
5395 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
5396 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
5397 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
5398 Likewise.
5399 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
5400 Likewise.
5401 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
5402 Likewise.
5403 (fmai_vmfmsub_<mode><round_name>): Likewise.
5404
5405 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5406
5407 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
5408 Remove plus. Renamed to ...
5409 (*sub<mode>3<mask_name>_bcst): This.
5410 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
5411 (*add<mode>3<mask_name>_bcst): This.
5412
5413 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5414
5415 PR target/72782
5416 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
5417
5418 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5419
5420 PR target/87662
5421 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
5422 (_mm_or_epi32): Likewise.
5423 (_mm256_xor_epi32): Likewise.
5424 (_mm_xor_epi32): Likewise.
5425 (_mm256_or_epi64): Likewise.
5426 (_mm_or_epi64): Likewise.
5427 (_mm256_xor_epi64): Likewise.
5428 (_mm_xor_epi64): Likewise.
5429
5430 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
5431
5432 PR target/72782
5433 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
5434
5435 2018-10-20 Jakub Jelinek <jakub@redhat.com>
5436
5437 PR middle-end/87647
5438 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
5439
5440 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
5441
5442 * doc/ux.texi: Move @section directly after @node.
5443
5444 2018-10-19 Jakub Jelinek <jakub@redhat.com>
5445
5446 PR middle-end/85488
5447 PR middle-end/87649
5448 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
5449 depend closely nested inside of loop with ordered clause with
5450 a parameter.
5451
5452 2018-10-19 David Malcolm <dmalcolm@redhat.com>
5453
5454 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
5455 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
5456 * doc/ux.texi: New file.
5457
5458 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
5459
5460 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
5461 be the first CR field allocated.
5462
5463 2018-10-19 Richard Biener <rguenther@suse.de>
5464
5465 PR target/87657
5466 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
5467 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
5468
5469 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
5470
5471 PR target/72782
5472 * config/i386/sse.md
5473 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
5474 (*add<mode>3<mask_name>_bcst_2): Likewise.
5475
5476 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
5477
5478 * config/i386/sse.md
5479 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
5480 Replace nonimmediate_operand with register_operand.
5481 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
5482 Likewise.
5483 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
5484 Likewise.
5485
5486 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
5487
5488 PR rtl-optimization/87596
5489 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
5490 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
5491 for instructions in FROM..TO range.
5492
5493 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
5494
5495 * cfgexpand.c (expand_one_var): Use specific wording in error message
5496 for non-local frame variables.
5497 * stor-layout.c (layout_decl): Do not issue a warning for them.
5498
5499 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
5500
5501 * haifa-sched.c (priority): Add force_recompute parameter.
5502 (apply_replacement): Call priority () with force_recompute = true.
5503 (restore_pattern): Likewise.
5504
5505 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
5506
5507 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
5508 HOST_BITS_PER_WIDE_INT.
5509 (test_vector_ops_duplicate): Likewise.
5510
5511 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
5512
5513 PR target/72782
5514 * config/i386/sse.md (VF_AVX512): New.
5515 (avx512bcst): Likewise.
5516 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
5517 Likewise.
5518 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
5519 Likewise.
5520 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
5521 Likewise.
5522
5523 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
5524
5525 * doc/invoke.texi (-dumpversion): Improve grammar.
5526 (-dumpfullversion): Make more consistent with -dumpversion.
5527
5528 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
5529
5530 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
5531 Set JUMP_LABEL to the jump insn.
5532 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
5533 Predict emitted jump and add label to jump insn.
5534
5535 2018-10-18 David Malcolm <dmalcolm@redhat.com>
5536
5537 PR tree-optimization/87562
5538 * input.c (get_substring_ranges_for_loc): Use
5539 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
5540 getting the linemap for the endpoint. Verify that it's either
5541 in the same linemap as the start point's spelling location, or
5542 at least in the same file.
5543
5544 2018-10-18 Richard Biener <rguenther@suse.de>
5545
5546 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
5547 feed width-specific load/store costs through ix86_vec_cost.
5548 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
5549 (k8_cost): Likewise.
5550 (bdver_cost): Likewise.
5551 (znver1_cost): Likewise.
5552 (btver1_cost): Likewise.
5553 (btver2_cost): Likewise.
5554
5555 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
5556
5557 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
5558 to simplify subreg of vec_merge.
5559
5560 2018-10-18 Richard Biener <rguenther@suse.de>
5561
5562 * config/i386/i386.c: Fix costing of vector FMA.
5563
5564 2018-10-18 Richard Biener <rguenther@suse.de>
5565
5566 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
5567 and argument.
5568 (ix86_builtin_vectorization_cost): For vec_construct properly
5569 cost insertion into SSE regs.
5570 (...): Adjust calls to ix86_vec_cost.
5571
5572 2018-10-18 Richard Biener <rguenther@suse.de>
5573
5574 PR middle-end/87087
5575 Revert
5576 2018-02-07 Richard Biener <rguenther@suse.de>
5577
5578 PR tree-optimization/84204
5579 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
5580 this place.
5581
5582 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
5583
5584 PR target/87537
5585 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
5586 of vec_duplicate.
5587 (test_vector_ops_duplicate): Add test for a scalar subreg of a
5588 VEC_MERGE of a VEC_DUPLICATE.
5589
5590 2018-10-17 Joseph Myers <joseph@codesourcery.com>
5591
5592 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
5593 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
5594 * doc/standards.texi (C Language): Document C2X.
5595 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
5596 (rl78_option_override): Handle "GNU C2X" language name.
5597
5598 2018-10-17 Joseph Myers <joseph@codesourcery.com>
5599
5600 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
5601 Document C17 as published in 2018.
5602
5603 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
5604
5605 PR middle-end/87623
5606 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
5607 bail out if both sides do not have the same storage order.
5608
5609 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
5610
5611 * bitmap.c (bitmap_head::dump): New.
5612 * bitmap.h (bitmap_head): Add dump().
5613 * gimple-ssa-evrp-analyze.c
5614 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
5615 (evrp_range_analyzer::set_ssa_range_info): Same.
5616 (evrp_range_analyzer::record_ranges_from_phis): Same.
5617 (evrp_range_analyzer::record_ranges_from_stmt): Same.
5618 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
5619 * gimple-ssa-sprintf.c (get_int_range): Same.
5620 (format_integer): Same.
5621 (sprintf_dom_walker::handle_gimple_call): Same.
5622 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
5623 (ipcp_vr_lattice::top_p): Same.
5624 (ipcp_vr_lattice::bottom_p): Same.
5625 (ipcp_vr_lattice::set_to_bottom): Same.
5626 (ipa_vr_operation_and_type_effects): Same.
5627 (propagate_vr_across_jump_function): Same.
5628 (ipcp_store_vr_results): Same.
5629 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
5630 (ipa_print_node_jump_functions_for_edge): Same.
5631 (ipa_get_value_range): Same.
5632 (ipa_compute_jump_functions_for_edge): Same.
5633 (ipa_write_jump_function): Same.
5634 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
5635 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
5636 Same.
5637 * vr-values.c (set_value_range_to_nonnegative): Same.
5638 (set_value_range_to_truthvalue): Same.
5639 (vr_values::get_value_range): Same.
5640 (vr_values::set_defs_to_varying): Same.
5641 (vr_values::update_value_range): Same.
5642 (symbolic_range_based_on_p): Same.
5643 (vr_values::op_with_boolean_value_range_p): Same.
5644 (vr_values::extract_range_for_var_from_comparison_expr): Same.
5645 (vr_values::extract_range_from_ssa_name): Same.
5646 (vr_values::extract_range_from_binary_expr): Same.
5647 (vr_values::extract_range_from_unary_expr): Same.
5648 (vr_values::extract_range_from_cond_expr): Same.
5649 (vr_values::extract_range_from_comparison): Same.
5650 (vr_values::check_for_binary_op_overflow): Same.
5651 (vr_values::extract_range_basic): Same.
5652 (vr_values::extract_range_from_assignment): Same.
5653 (compare_ranges): Same.
5654 (compare_range_with_value): Same.
5655 (vr_values::adjust_range_with_scev): Same.
5656 (vrp_valueize): Same.
5657 (vrp_valueize_1): Same.
5658 (vr_values::get_vr_for_comparison): Same.
5659 (vr_values::compare_name_with_value): Same.
5660 (vr_values::compare_names): Same.
5661 (vr_values::vrp_evaluate_conditional): Same.
5662 (find_case_label_ranges): Same.
5663 (vr_values::vrp_visit_switch_stmt): Same.
5664 (vr_values::extract_range_from_phi_node): Same.
5665 (vr_values::simplify_div_or_mod_using_ranges): Same.
5666 (vr_values::simplify_bit_ops_using_ranges): Same.
5667 (test_for_singularity): Same.
5668 (range_fits_type_p): Same.
5669 (vr_values::simplify_cond_using_ranges_1): Same.
5670 (vr_values::simplify_switch_using_ranges): Same.
5671 (vr_values::simplify_float_conversion_using_ranges): Same.
5672 (vr_values::two_valued_val_range_p): Same.
5673 (vr_values::add_equivalence): Move to value_range::equiv_add.
5674 * vr-values.h (vr_values::add_equivalence): Remove.
5675 (VR_INITIALIZER): Remove.
5676 * tree-vrp.c (value_range::set): New.
5677 (value_range::equiv_add): New.
5678 (value_range::value_range): New.
5679 (value_range::deep_copy): New.
5680 (value_range::check): New.
5681 (value_range::equal_p): New.
5682 (value_range::ignore_equivs_equal_p): New.
5683 (value_range::operator==): New.
5684 (value_range::operator!=): New.
5685 (value_range::symbolic_p): New.
5686 (value_range::numeric_p): New.
5687 (value_range::set_undefined): New.
5688 (value_range::set_varying): New.
5689 (value_range::may_contain_p): New.
5690 (value_range::equiv_clear): New.
5691 (value_range::singleton_p): New.
5692 (value_range::intersect): New.
5693 (value_range::dump): New.
5694 (value_range::set_and_canonicalize): New.
5695 (set_value_range): Adjust for value_range API.
5696 (set_value_range_to_undefined): Same.
5697 (set_value_range_to_varying): Same.
5698 (set_and_canonicalize_value_range): Same.
5699 (set_value_range_to_nonnull): Same.
5700 (set_value_range_to_null): Same.
5701 (range_is_null): Same.
5702 (range_is_nonnull): Same.
5703 (range_int_cst_p): Same.
5704 (range_int_cst_singleton_p): Same.
5705 (symbolic_range_p): Same.
5706 (range_includes_zero_p): Same.
5707 (value_range_constant_singleton): Same.
5708 (vrp_set_zero_nonzero_bits): Same.
5709 (ranges_from_anti_range): Same.
5710 (extract_range_into_wide_ints): Same.
5711 (extract_range_from_multiplicative_op): Same.
5712 (set_value_range_with_overflow): Same.
5713 (extract_range_from_binary_expr_1): Same.
5714 (extract_range_from_unary_expr): Same.
5715 (dump_value_range): Same.
5716 (debug_value_range): Same.
5717 (vrp_prop::check_array_ref): Same.
5718 (vrp_prop::check_mem_ref): Same.
5719 (vrp_prop::vrp_initialize): Same.
5720 (vrp_prop::visit_stmt): Same.
5721 (intersect_ranges): Same.
5722 (vrp_prop::visit_phi): Same.
5723 (vrp_prop::vrp_finalize): Same.
5724 (determine_value_range_1): Same.
5725 (determine_value_range): Same.
5726 (vrp_intersect_ranges_1): Rename to...
5727 (vrp_intersect_1): this.
5728 (vrp_intersect_ranges): Rename to...
5729 (value_range::intersect_helper): ...this.
5730 (vrp_meet_1): Rename to...
5731 (value_range::union_helper): ...this.
5732 (vrp_meet): Rename to...
5733 (value_range::union_): ...this.
5734 (copy_value_range): Remove.
5735 * tree-vrp.h (struct value_range): Rewrite into a proper class.
5736 (value_range::vrtype): New.
5737 (value_range::type): New.
5738 (value_range::equiv): New.
5739 (value_range::min): New.
5740 (value_range::max): New.
5741 (value_range::varying_p): New.
5742 (value_range::undefined_p): New.
5743 (value_range::null_p): New.
5744 (value_range::equiv_add): New.
5745 (copy_value_range): Remove.
5746
5747 2018-10-17 David Malcolm <dmalcolm@redhat.com>
5748
5749 * Makefile.in (SELFTEST_TARGETS): New.
5750 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
5751 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
5752 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
5753 c/Make-lang.in.
5754 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
5755 (selftest-c++-gdb, selftest-c++-valgrind): Move to
5756 cp/Make-lang.in.
5757 * configure: Regenerate.
5758 * configure.ac (selftest_languages): New.
5759
5760 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
5761
5762 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
5763 overflow wraps argument.
5764 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
5765 wide_int_range_multiplicative_op.
5766 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
5767 overflow wraps argument.
5768 (wide_int_range_multiplicative_op): Same.
5769 (wide_int_range_lshift): Same.
5770 (wide_int_range_div): Same.
5771 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
5772 (wide_int_range_lshift): Same.
5773 (wide_int_range_div): Same.
5774
5775 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
5776
5777 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
5778 use sign as argument.
5779 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
5780 wide_int_range_shift_undefined_p.
5781
5782 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5783
5784 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
5785 Rename to...
5786 (@despeculate_copy<ALLI_TI:mode>): ... This.
5787 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
5788 switch statement.
5789
5790 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5791
5792 * config.gcc: Obsolete *-*-solaris2.10*.
5793 * doc/install.texi (Specific, *-*-solaris2*): Document it.
5794
5795 2018-10-12 Jeff Law <law@redhat.com>
5796
5797 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
5798 reg + sym +- const_int addressing modes.
5799
5800 2018-10-15 David Malcolm <dmalcolm@redhat.com>
5801
5802 * common.opt (fdiagnostics-minimum-margin-width=): New option.
5803 * diagnostic-show-locus.c (layout::layout): Apply the minimum
5804 margin width.
5805 (layout::start_annotation_line): Only print up to 3 of the
5806 margin character, to avoid touching the left-hand side.
5807 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
5808 minimum margin width, as set by test_diagnostic_context's ctor.
5809 (selftest::test_fixit_insert_containing_newline): Likewise.
5810 (selftest::test_fixit_insert_containing_newline_2): Likewise.
5811 (selftest::test_line_numbers_multiline_range): Clear
5812 dc.min_margin_width.
5813 * diagnostic.c (diagnostic_initialize): Initialize
5814 min_margin_width.
5815 * diagnostic.h (struct diagnostic_context): Add field
5816 "min_margin_width".
5817 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
5818 * opts.c (common_handle_option): Handle
5819 OPT_fdiagnostics_minimum_margin_width_.
5820 * selftest-diagnostic.c
5821 (selftest::test_diagnostic_context::test_diagnostic_context):
5822 Initialize min_margin_width to 6.
5823 * toplev.c (general_init): Initialize global_dc->min_margin_width.
5824
5825 2018-10-15 David Malcolm <dmalcolm@redhat.com>
5826
5827 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
5828 Fix usage of "error_at_rich_loc" in the comment.
5829
5830 2018-10-15 Renlin Li <renlin.li@arm.com>
5831
5832 PR target/87563
5833 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
5834 if-conversioned loop when it contains ifn with types not
5835 supported by backend.
5836 * internal-fn.c (expand_direct_optab_fn): Add an assert.
5837 (direct_internal_fn_supported_p): New helper function.
5838 * internal-fn.h (direct_internal_fn_supported_p): Declare.
5839
5840 2018-10-15 Jakub Jelinek <jakub@redhat.com>
5841
5842 PR target/87572
5843 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
5844 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
5845 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
5846
5847 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
5848
5849 PR tree-optimization/87022
5850 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
5851 bits in dist vector rather than the first one.
5852
5853 2018-10-15 Richard Biener <rguenther@suse.de>
5854
5855 PR middle-end/87610
5856 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
5857 (visit_loadstore): When a used restrict tag escaped verify that
5858 the points-to solution of "other" pointers do not include
5859 escaped.
5860 (compute_dependence_clique): If a used restrict tag escaped
5861 communicated that down to visit_loadstore.
5862
5863 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
5864
5865 * config/s390/s390.c (s390_expand_vec_init): Force vector element
5866 into reg if it isn't a general operand.
5867
5868 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
5869
5870 PR target/87599
5871 * config/i386/sse.md (*vec_dupv2di): Add register source to
5872 movddup.
5873
5874 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
5875
5876 PR target/87572
5877 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
5878 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
5879 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
5880 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
5881
5882 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
5883
5884 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
5885 (notice_args_size): Set it in the current trace if no insn that can
5886 throw internally has been seen yet.
5887 (connect_traces): When connecting args_size between traces, allow the
5888 incoming values not to match if there is an insn setting it before the
5889 first insn that can throw internally; in that case, force the creation
5890 of a CFI note on this latter insn.
5891
5892 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
5893
5894 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
5895 the base class, because using the injected-class-name was not clearly
5896 specified until DR 176.
5897
5898 2018-10-12 Paul Koning <ni1d@arrl.net>
5899
5900 * config/pdp11/pdp11.md (doloop_end): New expander.
5901 (doloop_end_insn): renamed from "doloop_end".
5902 (addqi3): New pattern.
5903 (subqi3): New pattern.
5904 * config/pdp11/predicates.md (incdec_operand): New predicate.
5905
5906 2018-10-12 Yury Gribov <tetra2005@gmail.com>
5907
5908 PR middle-end/81376
5909 * real.c (format_helper::can_represent_integral_type_p): New function
5910 * real.h (format_helper::can_represent_integral_type_p): Ditto.
5911 * match.pd: New pattern.
5912
5913 2018-10-12 Alexandre Oliva <oliva@adacore.com>
5914
5915 * configure.ac: Introduce --enable-large-address-aware
5916 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
5917 * doc/install.texi: Document it.
5918 * configure, config.in: Rebuilt.
5919 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
5920 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
5921 (LINK_SPEC): Insert it.
5922 * config/i386/mingw-w64.h: Likewise.
5923
5924 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
5925
5926 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
5927
5928 PR rtl-optimization/87600
5929 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
5930
5931 2018-10-12 Paul Koning <ni1d@arrl.net>
5932
5933 * doc/md.texi (doloop_end): Document that the pattern code may
5934 need to check operand mode.
5935
5936 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
5937
5938 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
5939 to zero-extend between int and floating-point registers.
5940 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
5941 ldp into floating-point registers. Add type and arch attributes.
5942 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
5943 Use f_loads for type attribute.
5944
5945 2018-10-11 Martin Sebor <msebor@redhat.com>
5946
5947 * doc/extend.texi (attribute packed): Correct typos.
5948
5949 2018-10-11 Martin Sebor <msebor@redhat.com>
5950
5951 * doc/extend.texi (attribute flatten): Mention interaction with
5952 noinline.
5953
5954 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
5955
5956 PR target/87156
5957 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
5958 Set new_decl virtual flag to zero.
5959
5960 2018-10-11 Martin Sebor <msebor@redhat.com>
5961
5962 PR middle-end/87593
5963 * doc/extend.texi (attribute format_arg): Discuss using multiple
5964 attributes on a single function.
5965
5966 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
5967
5968 PR tree-optimization/86829
5969 * match.pd (sin (atan (x))): New simplification rules.
5970 (cos (atan (x))): Likewise.
5971 * real.c (build_sinatan_real): New function.
5972 * real.h (build_sinatan_real): Prototype.
5973
5974 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
5975
5976 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
5977 function.
5978 (fold_mergeeo_helper): New helper function.
5979 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
5980 intrinsics. Correct some whitespace indentation issues.
5981
5982 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
5983
5984 PR target/87511
5985 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
5986 Use HOST_WIDE_INT_1U for shift.
5987
5988 2018-10-11 Doug Rupp <rupp@adacore.com>
5989 Olivier Hainque <hainque@adacore.com>
5990
5991 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
5992 Pass --relax to the linker for RTPs.
5993 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
5994
5995 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
5996 Jan Hubicka <jh@suse.cz>
5997 Martin Jambor <mjambor@suse.cz>
5998
5999 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
6000 the same elements are repeated rather than printing all of them.
6001 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
6002 "repeated" elements.
6003 * read-rtl-function.c (test_loading_repeat): New function.
6004 (read_rtl_function_c_tests): Call test_loading_repeat.
6005 * rtl-tests.c (test_dumping_repeat): New function.
6006 (rtl_tests_c_tests): Call test_dumping_repeat.
6007
6008 2018-10-11 Richard Biener <rguenther@suse.de>
6009
6010 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
6011 bdver?_cost): Unify to ...
6012 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
6013 * config/i386/i386.c (processor_cost_table): Adjust.
6014
6015 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
6016
6017 PR middle-end/87574
6018 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
6019 the thunk when expanding to GIMPLE.
6020
6021 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
6022
6023 * varasm.c (mergeable_string_section): Don't try to move zero-length
6024 strings to the merge section.
6025
6026 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
6027
6028 PR target/87573
6029 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
6030
6031 2018-10-10 Jakub Jelinek <jakub@redhat.com>
6032
6033 PR target/87550
6034 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
6035 to special_args set.
6036
6037 2018-10-10 Richard Biener <rguenther@suse.de>
6038
6039 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
6040 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
6041 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
6042 and recursing and pattern terminating the recursion on SSE
6043 vector width using ix86_expand_reduc.
6044 (reduc_sminmax_scal_<mode>): Split into part reducing to half
6045 width and recursing and SSE2 vector variant doing the final
6046 reduction with ix86_expand_reduc.
6047 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
6048 with terminating the recursion at AVX level, splitting that
6049 to SSE there.
6050
6051 2018-10-09 David Malcolm <dmalcolm@redhat.com>
6052
6053 * genmatch.c (error_cb): Rename to...
6054 (diagnostic_cb): ...this, converting int params to enums.
6055 (fatal_at): Update for renaming.
6056 (warning_at): Likewise.
6057 (main): Likewise.
6058 * input.c (selftest::ebcdic_execution_charset::apply):
6059 Update for renaming of...
6060 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
6061 to...
6062 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
6063 converting level and reason to enums.
6064 (class selftest::lexer_error_sink): Rename to...
6065 (class selftest::lexer_test_options): ...this, renaming field
6066 "m_errors" to "m_diagnostics".
6067 (selftest::lexer_test_options::apply): Update for renaming of...
6068 (selftest::lexer_test_options::on_error): ...this, renaming to...
6069 (selftest::lexer_test_options::on_diagnostic): ...this
6070 converting level and reason to enums.
6071 (selftest::test_lexer_string_locations_raw_string_unterminated):
6072 Update for renamings.
6073 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
6074 "reason".
6075
6076 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
6077
6078 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
6079 * config/rs6000/pmmintrin.h: New file.
6080
6081 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
6082
6083 PR tree-optimization/86659
6084 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
6085
6086 2018-10-09 Richard Biener <rguenther@suse.de>
6087
6088 PR tree-optimization/63155
6089 * tree-ssa-structalias.c: Include tree-ssa.h.
6090 (get_constraint_for_ssa_var): For undefs return nothing_id.
6091 (find_func_aliases): Cleanup PHI handling.
6092
6093 2018-10-09 Richard Biener <rguenther@suse.de>
6094
6095 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
6096 replacements.
6097
6098 2018-10-09 Martin Liska <mliska@suse.cz>
6099
6100 * asan.c (asan_emit_stack_protection): If a stack variable
6101 is located in a same file as current function, then emit
6102 line info into variable definition string.
6103
6104 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
6105
6106 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
6107 information.
6108
6109 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
6110
6111 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
6112 on the thunk.
6113
6114 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
6115
6116 PR tree-optimization/86659
6117 * gimple-match.h (struct gimple_match_op): Add reverse field.
6118 (gimple_match_op::set_op): New overloaded method.
6119 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
6120 the REF_REVERSE_STORAGE_ORDER flag on the value.
6121 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
6122 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
6123
6124 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
6125
6126 PR middle-end/63155
6127 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
6128 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
6129
6130 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
6131
6132 PR target/87517
6133 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
6134 Defined with __builtin_ia32_vfmaddsubpd512_mask.
6135
6136 2018-10-08 Richard Biener <rguenther@suse.de>
6137
6138 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
6139 cost the same as AVX128 ones.
6140
6141 2018-10-08 Paul Koning <ni1d@arrl.net>
6142
6143 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
6144 (expand_block_move): New function.
6145 * config/pdp11/pdp11.c (output_block_move): Remove.
6146 (expand_block_move): New function.
6147 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
6148 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
6149 (*movmemhi1): Remove.
6150
6151 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
6152
6153 * config/s390/2827.md: Increase latencies for some FP instructions.
6154
6155 2018-10-08 Richard Biener <rguenther@suse.de>
6156
6157 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
6158 Open a dump scope.
6159 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
6160 * tree-vectorizer.h (dump_stmt_cost): Adjust.
6161 (add_stmt_cost): Dump return value of the hook.
6162
6163 2018-10-08 Richard Biener <rguenther@suse.de>
6164
6165 PR tree-optimization/63155
6166 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
6167 (ssa_propagation_engine::ssa_propagate): Remove redundant
6168 bitmap bit clearing.
6169
6170 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
6171
6172 PR rtl-optimization/86939
6173 PR rtl-optimization/87479
6174 * ira.h (non_conflicting_reg_copy_p): New prototype.
6175 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
6176 (make_hard_regno_dead): Don't add conflicts for register
6177 ignore_reg_for_conflicts.
6178 (make_object_dead): Likewise.
6179 (non_conflicting_reg_copy_p): New function.
6180 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
6181 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
6182 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
6183 (make_hard_regno_dead): Don't add conflicts for register
6184 ignore_reg_for_conflicts. Remove special conflict handling of
6185 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
6186 check_pic_pseudo_p and update callers.
6187 (mark_pseudo_dead): Don't add conflicts for register
6188 ignore_reg_for_conflicts.
6189 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
6190
6191 2018-10-05 Andrew Waterman <andrew@sifive.com>
6192 Jim Wilson <jimw@sifive.com>
6193
6194 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
6195 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
6196 new pattern using HONOR_SNANS that emits one extra instruction.
6197
6198 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
6199
6200 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
6201 patterns): Merge SI and DI patterns to a GPR pattern.
6202 (unnamed define_insn and define_split for record form of that): Merge
6203 to a single define_insn_and_split pattern.
6204
6205 2018-10-05 David Malcolm <dmalcolm@redhat.com>
6206
6207 PR c++/56856
6208 * input.c (expand_location_to_spelling_point): Add param "aspect"
6209 and use rather than hardcoding LOCATION_ASPECT_CARET.
6210 (get_substring_ranges_for_loc): Handle the case of a single token
6211 within a macro expansion.
6212 * input.h (expand_location_to_spelling_point): Add "aspect" param,
6213 defaulting to LOCATION_ASPECT_CARET.
6214
6215 2018-10-05 Paul Koning <ni1d@arrl.net>
6216
6217 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
6218 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
6219 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
6220 (pdp11_guard_type): New function.
6221
6222 2018-10-05 Paul Koning <ni1d@arrl.net>
6223
6224 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
6225 * config/pdp11/pdp11.opt (mfloat32): Remove.
6226 (mfloat64): Remove.
6227 * doc/invoke.texi (pdp11 -mfloat32): Remove:
6228 (pdp11 -mfloat64): Remove.
6229
6230 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
6231
6232 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
6233 (*cmp<mode>_cc_i387): Ditto.
6234 (*cmpu<mode>_cc_i387): Ditto.
6235 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
6236 * config/i386/i386.c (ix86_expand_fp_compare): Remove
6237 "scratch" argument.
6238 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
6239 Emit x86_sahf_1 pattern.
6240 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
6241 (ix86_expand_carry_flag_compare): Ditto.
6242
6243 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
6244
6245 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
6246 to reg_or_0_operand. Add "C" constraint.
6247 (*cmpxf_cc_i387): Ditto.
6248 (*cmp<mode>_i387): Change operand 2 predicate
6249 to nonimm_or_0_operand. Add "C" constraint.
6250 (*cmp<mode>_cc_i387): Ditto.
6251 (*cmp<mode>_0_i387): Remove insn pattern.
6252 (*cmp<mode>_0_cc_i387): Ditto.
6253
6254 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
6255
6256 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
6257 * config/i386/predicates.md (nonimm_or_0_operand): Rename
6258 from vector_move_operand. Update all uses.
6259
6260 2018-10-05 Martin Sebor <msebor@redhat.com>
6261
6262 PR tree-optimization/87490
6263 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
6264 consistently.
6265
6266 2018-10-05 Richard Biener <rguenther@suse.de>
6267
6268 PR tree-optimization/63155
6269 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
6270 vertical space in dumpfiles.
6271 * tree-ssa-propagate.h
6272 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
6273 * tree-ssa-propagate.c (cfg_blocks_back): New global.
6274 (ssa_edge_worklist_back): Likewise.
6275 (curr_order): Likewise.
6276 (cfg_blocks_get): Remove abstraction.
6277 (cfg_blocks_add): Likewise.
6278 (cfg_blocks_empty_p): Likewise.
6279 (add_ssa_edge): Add to current or next worklist based on
6280 RPO index.
6281 (add_control_edge): Likewise.
6282 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
6283 into ...
6284 (ssa_propagation_engine::ssa_propagate): ... here. Unify
6285 iteration from CFG and SSA edge worklist so we process
6286 everything in RPO order, prioritizing forward progress
6287 over iteration.
6288 (ssa_prop_init): Allocate new worklists, do not dump
6289 immediate uses.
6290 (ssa_prop_fini): Free new worklists.
6291
6292 2018-10-05 Richard Biener <rguenther@suse.de>
6293
6294 * tree-core.h (tree_block::abstract_flag): Remove.
6295 (tree_block::block_num): Make full 32bits.
6296 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
6297 * tree.h (BLOCK_ABSTRACT): Remove.
6298 * dwarf2out.c (gen_lexical_block_die): Remove dead code
6299 resulting from BLOCK_ABSTRACT being always false.
6300 (gen_inlined_subroutine_die): Likewise.
6301 (gen_block_die): Likewise.
6302 * tree.c (block_ultimate_origin): Likewise.
6303 * tree-pretty-print.c (dump_block_node): Remove code dealing
6304 with BLOCK_ABSTRACT.
6305 * tree-ssa-live.c (dump_scope_block): Likewise.
6306 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
6307 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
6308
6309 2018-10-05 Richard Biener <rguenther@suse.de>
6310
6311 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
6312 is asked for initialize mode to the component mode of the
6313 vector type.
6314
6315 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
6316
6317 PR target/87522
6318 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
6319 assembler for -mavx.
6320 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
6321
6322 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
6323
6324 PR target/87509
6325 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
6326 RS6000_BTM_DFP.
6327 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
6328 to be DImode. When using mffscrn, force the operand to a register.
6329
6330 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
6331
6332 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
6333 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
6334 X87MODEF mode iterator.
6335 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
6336 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
6337 X87MODEF mode iterator.
6338
6339 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
6340
6341 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
6342 -Wno-prio-ctor-dtor.
6343
6344 2018-10-04 David Malcolm <dmalcolm@redhat.com>
6345
6346 * Makefile.in (OBJS): Add opt-problem.o.
6347 * dump-context.h: Include "selftest.h.
6348 (selftest::temp_dump_context): New forward decl.
6349 (class dump_context): Make friend of class
6350 selftest::temp_dump_context.
6351 (dump_context::dump_loc_immediate): New decl.
6352 (class dump_pretty_printer): Move here from dumpfile.c.
6353 (class temp_dump_context): Move to namespace selftest.
6354 (temp_dump_context::temp_dump_context): Add param
6355 "forcibly_enable_dumping".
6356 (selftest::verify_dumped_text):
6357 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
6358 (selftest::verify_item):
6359 (ASSERT_IS_TEXT): Move here from dumpfile.c.
6360 (ASSERT_IS_TREE): Likewise.
6361 (ASSERT_IS_GIMPLE): Likewise.
6362 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
6363 to...
6364 (dump_context::dump_loc_immediate): ...this new function.
6365 (class dump_pretty_printer): Move to dump-context.h.
6366 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
6367 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
6368 (temp_dump_context::temp_dump_context): Move to "selftest"
6369 namespace. Add param "forcibly_enable_dumping", and use it to
6370 conditionalize the use of m_pp;
6371 (selftest::verify_dumped_text): Make non-static.
6372 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
6373 (selftest::verify_item): Make non-static.
6374 (ASSERT_IS_TEXT): Move to dump-context.h.
6375 (ASSERT_IS_TREE): Likewise.
6376 (ASSERT_IS_GIMPLE): Likewise.
6377 (selftest::test_capture_of_dump_calls): Pass "true" for new
6378 param of temp_dump_context.
6379 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
6380 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
6381 TDF_COMPARE_DEBUG.
6382 * opt-problem.cc: New file.
6383 * opt-problem.h: New file.
6384 * optinfo-emit-json.cc
6385 (selftest::test_building_json_from_dump_calls): Pass "true" for
6386 new param of temp_dump_context.
6387 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
6388 (optinfo::emit_for_opt_problem): New function.
6389 (optinfo::emit): Clarity which emit_item is used.
6390 * optinfo.h (optinfo::get_dump_location): New accessor.
6391 (optinfo::emit_for_opt_problem): New decl.
6392 (optinfo::emit): Make const.
6393 * selftest-run-tests.c (selftest::run_tests): Call
6394 selftest::opt_problem_cc_tests.
6395 * selftest.h (selftest::opt_problem_cc_tests): New decl.
6396 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
6397 bool to opt_result, converting fprintf messages to
6398 opt_result::failure_at calls. Add "stmt" param for use by the
6399 failure_at calls.
6400 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
6401 (runtime_alias_check_p): Convert return type from bool to
6402 opt_result, converting dump_printf calls to
6403 opt_result::failure_at, using the statement DDR_A for their
6404 location.
6405 (find_data_references_in_stmt): Convert return type from bool to
6406 opt_result, converting "return false" to opt_result::failure_at
6407 with a new message.
6408 * tree-data-ref.h: Include "opt-problem.h".
6409 (dr_analyze_innermost): Convert return type from bool to opt_result,
6410 and add a const gimple * param.
6411 (find_data_references_in_stmt): Convert return type from bool to
6412 opt_result.
6413 (runtime_alias_check_p): Likewise.
6414 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
6415 dr_analyze_innermost.
6416 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
6417 Convert return type from bool to opt_result, adding a message for
6418 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
6419 (vect_analyze_data_ref_dependence): Convert return type from bool
6420 to opt_result. Change sense of return type from "false"
6421 effectively meaning "no problems" to "false" meaning a problem,
6422 so that "return false" becomes "return opt_result::success".
6423 Convert "return true" calls to opt_result::failure_at, using
6424 the location of statement A rather than vect_location.
6425 (vect_analyze_data_ref_dependences): Convert return type from bool
6426 to opt_result.
6427 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
6428 calls to opt_result::failure_at, using the stmt location rather
6429 than vect_location.
6430 (vect_verify_datarefs_alignment): Convert return type from bool
6431 to opt_result.
6432 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
6433 into multiple more-tightly-scoped copies.
6434 (vect_analyze_data_refs_alignment): Convert return type from bool
6435 to opt_result.
6436 (vect_analyze_data_ref_accesses): Likewise, converting a
6437 "return false" to a "return opt_result::failure_at", adding a
6438 new message.
6439 (vect_prune_runtime_alias_test_list): Convert return type from
6440 bool to opt_result, converting dump_printf_loc to
6441 opt_result::failure_at. Add a %G to show the pertinent statement,
6442 and use the stmt's location rather than vect_location.
6443 (vect_find_stmt_data_reference): Convert return type from
6444 bool to opt_result, converting dump_printf_loc to
6445 opt_result::failure_at, using stmt's location.
6446 (vect_analyze_data_refs): Convert return type from bool to
6447 opt_result. Convert "return false" to "return
6448 opt_result::failure_at", adding messages as needed.
6449 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
6450 type from bool to opt_result.
6451 (vect_determine_vf_for_stmt): Likewise.
6452 (vect_determine_vectorization_factor): Likewise, converting
6453 dump_printf_loc to opt_result::failure_at, using location of phi
6454 rather than vect_location.
6455 (vect_analyze_loop_form_1): Convert return type from bool to
6456 opt_result, converting dump_printf_loc calls, retaining the use of
6457 vect_location.
6458 (vect_analyze_loop_form): Convert return type from loop_vec_info
6459 to opt_loop_vec_info.
6460 (vect_analyze_loop_operations): Convert return type from bool to
6461 opt_result, converting dump_printf_loc calls, using the location
6462 of phi/stmt rather than vect_location where available. Convert
6463 various "return false" to "return opt_result::failure_at" with
6464 "unsupported phi" messages.
6465 (vect_get_datarefs_in_loop): Convert return type from bool to
6466 opt_result. Add a message for the
6467 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
6468 (vect_analyze_loop_2): Convert return type from bool to
6469 opt_result. Ensure "ok" is set to a opt_result::failure_at before
6470 each "goto again;", adding new messages where needed.
6471 Add "unsupported grouped {store|load}" messages.
6472 (vect_analyze_loop): Convert return type from loop_vec_info to
6473 opt_loop_vec_info.
6474 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
6475 bool to opt_result.
6476 * tree-vect-stmts.c (process_use): Likewise, converting
6477 dump_printf_loc call and using stmt location, rather than
6478 vect_location.
6479 (vect_mark_stmts_to_be_vectorized): Likeise.
6480 (vect_analyze_stmt): Likewise, adding a %G.
6481 (vect_get_vector_types_for_stmt): Convert return type from bool to
6482 opt_result, converting dump_printf_loc calls and using stmt
6483 location, rather than vect_location.
6484 (vect_get_mask_type_for_stmt): Convert return type from tree to
6485 opt_tree, converting dump_printf_loc calls and using stmt location.
6486 * tree-vectorizer.c: Include "opt-problem.h.
6487 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
6488 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
6489 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
6490 enabled, use it to report at the top level "couldn't vectorize
6491 loop" followed by the problem.
6492 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
6493 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
6494 to opt_result.
6495 (vect_analyze_stmt): Likewise.
6496 (vect_get_vector_types_for_stmt): Likewise.
6497 (tree vect_get_mask_type_for_stmt): Likewise.
6498 (vect_analyze_data_ref_dependences): Likewise.
6499 (vect_enhance_data_refs_alignment): Likewise.
6500 (vect_analyze_data_refs_alignment): Likewise.
6501 (vect_verify_datarefs_alignment): Likewise.
6502 (vect_analyze_data_ref_accesses): Likewise.
6503 (vect_prune_runtime_alias_test_list): Likewise.
6504 (vect_find_stmt_data_reference): Likewise.
6505 (vect_analyze_data_refs): Likewise.
6506 (vect_analyze_loop): Convert return type from loop_vec_info to
6507 opt_loop_vec_info.
6508 (vect_analyze_loop_form): Likewise.
6509 (vect_analyze_slp): Convert return type from bool to opt_result.
6510
6511 2018-10-04 David Malcolm <dmalcolm@redhat.com>
6512
6513 * doc/invoke.texi (-fopt-info): Document new "internals"
6514 sub-option.
6515 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
6516 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
6517 MSG_ALL_KINDS.
6518 (optinfo_verbosity_options): Add "internals".
6519 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
6520 (dump_context::apply_dump_filter_p): New member function.
6521 (dump_context::dump_loc): Use apply_dump_filter_p rather than
6522 explicitly masking the dump_kind.
6523 (dump_context::begin_scope): Increment the scope depth first. Use
6524 apply_dump_filter_p rather than explicitly masking the dump_kind.
6525 (dump_context::emit_item): Use apply_dump_filter_p rather than
6526 explicitly masking the dump_kind.
6527 (dump_dec): Likewise.
6528 (dump_hex): Likewise.
6529 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
6530 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
6531 (opt_info_switch_p): Update handling of default
6532 MSG_OPTIMIZED_LOCATIONS to cope with default of
6533 MSG_PRIORITY_USER_FACING.
6534 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
6535 masking the dump_kind.
6536 (selftest::test_capture_of_dump_calls): Update test_dump_context
6537 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
6538 than MSG_ALL. Generalize scope test to be run at all four
6539 combinations of with/without MSG_PRIORITY_USER_FACING and
6540 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
6541 for each of the two values.
6542 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
6543 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
6544 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
6545 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
6546 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
6547 with MSG_PRIORITY_*.
6548 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
6549 dump messages as MSG_PRIORITY_USER_FACING.
6550 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
6551 about the interaction with MSG_PRIORITY_*.
6552
6553 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
6554
6555 * varasm.c (output_constant): Add new parameter merge_strings.
6556 Make strings properly zero terminated in merge string sections.
6557 (mergeable_string_section): Don't fail if the last char is non-zero.
6558 (assemble_variable_contents): Handle merge string sections.
6559 (assemble_variable): Likewise.
6560 (assemble_constant_contents): Likewise.
6561 (output_constant_def_contents): Likewise.
6562 (output_constructor_array_range,
6563 output_constructor_regular_field): Adjust call to output_constant.
6564 (output_object_block): Adjust call to assemble_constant_contents
6565 and assemble_variable_contents.
6566
6567 2018-10-04 Martin Liska <mliska@suse.cz>
6568
6569 PR c/87483
6570 * cgraphunit.c (process_function_and_variable_attributes):
6571 Warn about a function with alias attribute and a body.
6572
6573 2018-10-04 Martin Liska <mliska@suse.cz>
6574
6575 PR ipa/82625
6576 * multiple_target.c (redirect_to_specific_clone): New function.
6577 (ipa_target_clone): Use it.
6578 * tree-inline.c: Fix comment.
6579
6580 2018-10-04 David Malcolm <dmalcolm@redhat.com>
6581
6582 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
6583 fields.
6584 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
6585 (gcc::dump_manager::register_pass): New member function, adapted
6586 from loop body in gcc::pass_manager::register_pass, adding a
6587 call to update_dfi_for_opt_info.
6588 (gcc::dump_manager::opt_info_enable_passes): Store the
6589 -fopt-info options into the new fields. Move the loop
6590 bodies into...
6591 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
6592 function.
6593 * dumpfile.h (struct opt_pass): New forward decl.
6594 (gcc::dump_manager::register_pass): New decl.
6595 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
6596 (class gcc::dump_manager): Add fields "m_optgroup_flags",
6597 "m_optinfo_flags", and "m_optinfo_filename".
6598 * passes.c (gcc::pass_manager::register_pass): Move all of the
6599 dump-handling code to gcc::dump_manager::register_pass.
6600
6601 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
6602
6603 PR rtl-optimization/87466
6604 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
6605 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
6606 * doc/tm.texi: Regenerate.
6607 * ira-lives.c (process_bb_node_lives): Use the new target hook.
6608 * lra-lives.c (process_bb_lives): Likewise.
6609 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
6610 Define.
6611
6612 2018-10-04 Tamar Christina <tamar.christina@arm.com>
6613
6614 * params.c (add_params): Fix initialization.
6615
6616 2018-10-04 Martin Liska <mliska@suse.cz>
6617
6618 PR gcov-profile/84107
6619 * tree-profile.c (init_ic_make_global_vars):
6620 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
6621 Come up with new ic_tuple* variables. Emit
6622 __gcov_indirect_call{,_topn} variables.
6623 (gimple_gen_ic_profiler): Access the variable
6624 and emit gimple.
6625 (gimple_gen_ic_func_profiler): Access
6626 __gcov_indirect_call.callee field.
6627 (gimple_init_gcov_profiler): Use ptr_type_node.
6628 * value-prof.c (gimple_ic): Use ptr_type_node.
6629
6630 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6631
6632 PR tree-optimization/85787
6633 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
6634 malloc_candidate_p into this function and add support for
6635 detecting multiple phis.
6636 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
6637
6638 2018-10-04 Martin Liska <mliska@suse.cz>
6639
6640 PR ipa/87491
6641 * ipa-inline.c (inline_to_all_callers_1):
6642 Call ultimate_alias_target for node being inlined.
6643
6644 2018-10-03 Jeff Law <law@redhat.com>
6645
6646 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
6647 target's wchar_t.
6648 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
6649 * tree.h (get_typenode_from_name): Prototype.
6650
6651 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
6652
6653 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
6654 Change operand 2 predicate to nonimmediate_operand.
6655 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
6656
6657 2018-10-03 Martin Sebor <msebor@redhat.com>
6658 Jeff Law <law@redhat.com>
6659
6660 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
6661 initialize it.
6662 (get_string_length): Detect unterminated arrays.
6663 (format_string): Same.
6664 (format_directive): Warn about unterminated arrays.
6665 (handle_gimple_call): Mark statements with no_warning as needed.
6666
6667 2018-10-03 Jim Wilson <jimw@sifive.com>
6668
6669 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
6670 also define __riscv_abi_rve. Delete trailing white space.
6671
6672 2018-10-03 Paul Koning <ni1d@arrl.net>
6673
6674 Enable LRA register allocator for PDP11.
6675 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
6676 (R): Likewise.
6677 (D): Likewise.
6678 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
6679 * config/pdp11/pdp11.opt (-mlra): New option.
6680 * doc/invoke.texi (PDP-11 Options): Document -mlra.
6681
6682 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
6683
6684 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
6685 (*<absneg:code>extend<mode>xf2): Ditto.
6686
6687 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
6688
6689 PR tree-optimization/87415
6690 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
6691 precision fields.
6692
6693 2018-10-02 Jeff Law <law@redhat.com>
6694
6695 * gimple-fold.c (get_range_strlen): Only set *nonstr when
6696 an unterminated string is discovered. Bubble up range
6697 even for unterminated strings.
6698 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
6699 indicates the string was not terminated via NONSTR.
6700
6701 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
6702
6703 * tree-vrp.c (extract_range_from_unary_expr): Special case all
6704 pointer conversions.
6705 Do not do anything special for anti-ranges.
6706
6707 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
6708
6709 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
6710 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
6711
6712 2018-10-03 Martin Liska <mliska@suse.cz>
6713
6714 PR gcov-profile/86109
6715 * coverage.c (coverage_begin_function): Do not
6716 mark lambdas as artificial.
6717 * tree-core.h (struct GTY): Remove tm_clone_flag
6718 and introduce new lambda_function.
6719 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
6720
6721 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
6722
6723 PR target/87474
6724 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
6725 P8_VECTOR and VSX are enabled.
6726
6727 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
6728
6729 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
6730 0x3907 as CPU model number.
6731
6732 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
6733
6734 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
6735 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
6736 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
6737 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
6738 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
6739 * config/s390/s390.md: Likewise. Rename also the cpu attribute
6740 value from arch12 to z14.
6741
6742 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
6743
6744 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
6745 (isinfxf2): Ditto.
6746 (isinf<mode>2): Ditto.
6747
6748 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
6749
6750 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
6751 before emitting fxam. Perform calculations in XFmode.
6752
6753 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
6754
6755 * match.pd (((X /[ex] A) +- B) * A): New transformation.
6756
6757 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
6758
6759 PR middle-end/87319
6760 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
6761 * tree.c (signed_or_unsigned_type_for): Handle complex.
6762
6763 2018-10-02 Jeff Law <law@redhat.com>
6764
6765 * gimple-fold.c (get_range_strlen): Remove dead code.
6766
6767 2018-10-02 Martin Sebor <msebor@redhat.com>
6768 Jeff Law <law@redhat.com>
6769
6770 * builtins.c (unterminated_array): Add new arguments.
6771 If argument is not terminated, bubble up size and exact
6772 state to callers.
6773 (expand_builtin_strnlen): Detect, avoid expanding
6774 and diagnose unterminated arrays.
6775 (c_strlen): Fill in offset of start of unterminated strings.
6776 * builtins.h (unterminated_array): Update prototype.
6777
6778 2018-10-02 Richard Biener <rguenther@suse.de>
6779
6780 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
6781 of haddv4df, first reduce to SSE width and exploit the fact
6782 that we only need element zero with the reduction result.
6783 (reduc_plus_scal_v2df): Likewise.
6784
6785 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
6786
6787 * dojump.h (do_jump): Delete.
6788 (do_jump_1): Likewise.
6789 (split_comparison): Move around.
6790 * dojump.c (do_jump): Make static.
6791 (do_jump_1): Likewise.
6792 (jumpifnot): Move around.
6793 (jumpifnot_1): Likewise.
6794 (jumpif): Likewise.
6795 (jumpif_1): Likewise.
6796 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
6797
6798 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
6799
6800 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
6801 insns in the delay slot and add_insn_after for the jump insn.
6802
6803 2018-10-02 Richard Biener <rguenther@suse.de>
6804
6805 * tree-inline.c (expand_call_inline): Use the location of
6806 the callee declaration for the inline-entry marker.
6807 * final.c (notice_source_line): Remove special-casing of
6808 NOTE_INSN_INLINE_ENTRY.
6809
6810 2018-10-01 Carl Love <cel@us.ibm.com>
6811
6812 PR 69431
6813 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
6814 (__builtin_mtfsb0): New.
6815 (__builtin_mtfsb1): New.
6816 ( __builtin_set_fpscr_rn): New.
6817 (__builtin_set_fpscr_drn): New.
6818 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
6819 (rs6000_expand_set_fpscr_rn_builtin): Add.
6820 (rs6000_expand_set_fpscr_drn_builtin): Add.
6821 (rs6000_expand_builtin): Add case statement entries for
6822 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
6823 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
6824 RS6000_BUILTIN_MFFSL.
6825 (rs6000_init_builtins): Add ftype initialization and def_builtin
6826 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
6827 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
6828 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
6829 rs6000_mffscdrn): Add define_insn.
6830 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
6831 * doc/extend.texi: Add documentation for the builtins.
6832
6833 2018-10-01 Richard Biener <rguenther@suse.de>
6834
6835 PR tree-optimization/87465
6836 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
6837 causing branch miscounts.
6838
6839 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6840
6841 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
6842 aarch64_option_default_param): New.
6843 (params.h): Include.
6844 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
6845 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
6846 stack-clash protection validation code.
6847
6848 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6849
6850 * params.c (validate_param): New.
6851 (add_params): Use it.
6852 (set_param_value): Refactor param validation into validate_param.
6853 (diagnostic.h): Include.
6854 * diagnostic.h (diagnostic_ready_p): New.
6855
6856 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6857
6858 * params.c (set_param_value):
6859 Add index of parameter being validated.
6860 * common/common-target.def (option_validate_param): New.
6861 * common/common-targhooks.h (default_option_validate_param): New.
6862 * common/common-targhooks.c (default_option_validate_param): New.
6863 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
6864 * doc/tm.texi: Regenerate.
6865
6866 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6867
6868 PR target/86486
6869 * config/aarch64/aarch64.c (aarch64_override_options_internal):
6870 Add validation for stack-clash parameters and set defaults.
6871
6872 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6873
6874 PR target/86486
6875 * configure.ac: Add stack-clash-protection-guard-size.
6876 * doc/install.texi: Document it.
6877 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
6878 * params.def: Update comment for guard-size.
6879 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
6880 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
6881 * configure: Regenerate.
6882
6883 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6884
6885 PR target/86486
6886 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
6887 STACK_DYNAMIC_OFFSET): New.
6888 * config/aarch64/aarch64.c (aarch64_layout_frame):
6889 Update outgoing args size.
6890 (aarch64_stack_clash_protection_alloca_probe_range,
6891 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
6892
6893 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6894
6895 PR target/86486
6896 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
6897 probe ranges.
6898 * target.def (stack_clash_protection_alloca_probe_range): New.
6899 (stack_clash_protection_final_dynamic_probe): Remove.
6900 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
6901 (default_stack_clash_protection_final_dynamic_probe): Remove.
6902 * targhooks.c: Likewise.
6903 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
6904 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
6905 * doc/tm.texi: Regenerate.
6906
6907 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6908
6909 PR target/86486
6910 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
6911 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
6912 aarch64_clamp_to_uimm12_shift): New.
6913 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
6914 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
6915
6916 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6917
6918 PR target/86486
6919 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
6920
6921 2018-10-01 Jeff Law <law@redhat.com>
6922 Richard Sandiford <richard.sandiford@linaro.org>
6923 Tamar Christina <tamar.christina@arm.com>
6924
6925 PR target/86486
6926 * config/aarch64/aarch64.md
6927 (probe_stack_range): Add k (SP) constraint.
6928 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
6929 STACK_CLASH_MAX_UNROLL_PAGES): New.
6930 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
6931 stack probes for stack clash.
6932 (aarch64_allocate_and_probe_stack_space): New.
6933 (aarch64_expand_prologue): Use it.
6934 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
6935 (aarch64_sub_sp): Add emit_move_imm optional param.
6936
6937 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
6938
6939 PR tree-optimization/87261
6940 * match.pd: Remove trailing whitespace.
6941 Add (x & y) | ~(x | y) -> ~(x ^ y),
6942 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
6943
6944 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
6945
6946 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
6947 constraints.
6948 (ashlsi3_insn): Update instruction constraints.
6949 (ashrsi3_insn): Likewise.
6950 (rotrsi3): Likewise.
6951 (add_shift): Likewise.
6952 * config/arc/constraints.md (Csz): New 32 bit constraint. It
6953 avoids placing in the limm field small constants which, otherwise,
6954 could end into a small instruction.
6955
6956 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
6957
6958 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
6959 destination register is not odd-even.
6960 (umaddsidi4_split): Likewise.
6961
6962 2018-10-01 Richard Biener <rguenther@suse.de>
6963
6964 * tree-inline.c (expand_call_inline): Store origin of fn
6965 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
6966 * tree.c (block_ultimate_origin): Simplify and do some
6967 checking.
6968
6969 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
6970
6971 * config/i386/mmx.md (EMMS): New int iterator.
6972 (emms): New int attribute.
6973 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
6974 EMMS int iterator. Explicitly declare clobbers.
6975 (mmx_emms): Remove expander.
6976 (mmx_femms): Ditto.
6977 * config/i386/predicates.md (emms_operation): Remove predicate.
6978 (vzeroall_pattern): New predicate.
6979 (vzeroupper_pattern): Rename from vzeroupper_operation.
6980 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
6981 vzeroupper_pattern and vzeroall_pattern predicates.
6982
6983 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
6984
6985 PR rtl-optimization/86939
6986 * ira-lives.c (make_hard_regno_born): Rename from this...
6987 (make_hard_regno_live): ... to this. Remove update to conflict
6988 information. Update function comment.
6989 (make_hard_regno_dead): Add conflict information update. Update
6990 function comment.
6991 (make_object_born): Rename from this...
6992 (make_object_live): ... to this. Remove update to conflict information.
6993 Update function comment.
6994 (make_object_dead): Add conflict information update. Update function
6995 comment.
6996 (mark_pseudo_regno_live): Call make_object_live.
6997 (mark_pseudo_regno_subword_live): Likewise.
6998 (mark_hard_reg_dead): Update function comment.
6999 (mark_hard_reg_live): Call make_hard_regno_live.
7000 (process_bb_node_lives): Likewise.
7001 * lra-lives.c (make_hard_regno_born): Rename from this...
7002 (make_hard_regno_live): ... to this. Remove update to conflict
7003 information. Remove now uneeded check_pic_pseudo_p argument.
7004 Update function comment.
7005 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
7006 to conflict information. Update function comment.
7007 (mark_pseudo_live): Remove update to conflict information. Update
7008 function comment.
7009 (mark_pseudo_dead): Add conflict information update.
7010 (mark_regno_live): Call make_hard_regno_live.
7011 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
7012 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
7013
7014 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
7015
7016 PR target/87370
7017 * config/i386/i386.c (construct_container): Use TImode for
7018 BLKmode values in 2 integer registers.
7019
7020 2018-09-29 Jeff Law <law@redhat.com>
7021
7022 * builtins.c (unterminated_array): Pass in c_strlen_data * to
7023 c_strlen rather than just a tree *.
7024 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
7025 Update recursive calls appropriately. If caller did not provide a
7026 suitable data pointer, create a local one. When a non-terminated
7027 string is discovered, bubble up information about the string via the
7028 c_strlen_data object.
7029 * builtins.h (c_strlen): Update prototype.
7030 (c_strlen_data): New structure.
7031 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
7032 For a type 2 call, if c_strlen indicates a non-terminated string
7033 use the length of the non-terminated string.
7034 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
7035
7036 2018-09-29 Jakub Jelinek <jakub@redhat.com>
7037
7038 PR target/87467
7039 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
7040 __m512d type for __A argument rather than __m512.
7041
7042 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
7043
7044 * match.pd (simple_comparison): Don't optimize if either operand is
7045 a function pointer when target needs function pointer canonicalization.
7046
7047 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
7048
7049 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
7050 power5 .. power9 to remove indirection.
7051 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
7052 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
7053 ASM_CPU_476_SPEC): Delete.
7054 (ASM_CPU_SPEC): Adjust.
7055 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
7056 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
7057
7058 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
7059
7060 * config.in: Delete HAVE_AS_DCI.
7061 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
7062 * config/rs6000/rs6000.h: Ditto.
7063 * configure.ac: Delete HAVE_AS_DCI.
7064 * configure: Regenerate.
7065
7066 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
7067
7068 * config.in (HAVE_AS_LWSYNC): Delete.
7069 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7070 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
7071 do it as a .long .
7072 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7073 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
7074 as a .long .
7075 * configure.ac: Delete HAVE_AS_LWSYNC.
7076 * configure: Regenerate.
7077
7078 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
7079 Pierre-Marie de Rodat <derodat@adacore.com>
7080
7081 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
7082 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
7083 (cgraph_node::create_thunk): Add indirect_offset parameter.
7084 (thunk_adjust): Likewise.
7085 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
7086 and initialize the corresponding field with it.
7087 (cgraph_node::dump): Dump indirect_offset field.
7088 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
7089 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
7090 (thunk_adjust): Add indirect_offset parameter and deal with it.
7091 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
7092 pass it to thunk_adjust. Do not call the target hook if it's non-zero
7093 or if the thunk is external or local. Fix formatting. Do not chain
7094 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
7095 if any, in the GIMPLE representation.
7096 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
7097 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
7098 (input_node): Read indirect_offset field.
7099 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
7100 call to thunk_adjust.
7101 * tree-nested.c (struct nesting_info): Add thunk_p field.
7102 (create_nesting_tree): Set it.
7103 (convert_all_function_calls): Copy static chain from targets to thunks.
7104 (finalize_nesting_tree_1): Return early for thunks.
7105 (unnest_nesting_tree_1): Do not finalize thunks.
7106 (gimplify_all_functions): Do not gimplify thunks.
7107
7108 2018-09-28 David Malcolm <dmalcolm@redhat.com>
7109
7110 * opt-suggestions.c (option_proposer::build_option_suggestions):
7111 Release "option_values".
7112
7113 2018-09-28 David Malcolm <dmalcolm@redhat.com>
7114
7115 * coverage.c (get_coverage_counts): Convert problem-reporting dump
7116 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
7117 * dumpfile.c (kind_as_string): New function.
7118 (dump_loc): Rather than a hardcoded prefix of "note: ", use
7119 kind_as_string to vary the prefix based on dump_kind.
7120 (selftest::test_capture_of_dump_calls): Update for above.
7121
7122 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
7123
7124 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
7125 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
7126
7127 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
7128
7129 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
7130 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
7131 INVALID_REGNUM instead of FPSR_REG.
7132 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
7133 * config/i386/i386.md: Update comment of FP compares.
7134 (fldenv): Do not clobber FPSR_REG.
7135
7136 2018-09-28 Richard Biener <rguenther@suse.de>
7137
7138 * tree.h (BLOCK_ORIGIN): New.
7139 * omp-expand.c (grid_expand_target_grid_body): Assign
7140 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
7141 * tree-inline.c (remap_block): Likewise.
7142 * auto-profile.c (get_function_decl_from_block): Simplify
7143 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
7144 * langhooks.c (lhd_print_error_function): Likewise.
7145 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
7146 Likewise.
7147 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7148 * tree.c (block_nonartificial_location): Likewise.
7149 (block_ultimate_origin): Likewise.
7150 * tree-pretty-print.c (percent_K_format): Likewise. Remove
7151 no longer needed LTO case.
7152
7153 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
7154 Jan Hubicka <jh@suse.cz>
7155 Martin Jambor <mjambor@suse.cz>
7156
7157 * simplify-rtx.c (simplify_merge_mask): New function.
7158 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
7159 same masks are used in op1 or op2.
7160 (test_vec_merge): New function.
7161 (test_vector_ops): Call test_vec_merge.
7162
7163 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
7164
7165 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
7166 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
7167 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
7168 (cypress_costs): Set it.
7169 (supersparc_costs): Likewise.
7170 (hypersparc_costs): Likewise.
7171 (leon_cost): Likewise.
7172 (leon3_costs): Likewise.
7173 (sparclet_costs): Likewise.
7174 (ultrasparc_costs): Likewise.
7175 (ultrasparc_costs): Likewise.
7176 (niagara_costs): Likewise.
7177 (niagara2_costs): Likewise.
7178 (niagara3_costs): Likewise.
7179 (niagara4_costs): Likewise.
7180 (niagara7_costs): Likewise.
7181 (m8_costs): Likewise.
7182 (TARGET_CAN_FOLLOW_JUMP): Define.
7183 (pass_work_around_errata::gate): Minor tweak.
7184 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
7185 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
7186 Automaitcally clear MASK_FSMULD mask for V7 processors.
7187 (sparc_can_follow_jump): New static function.
7188 (output_ubranch): Deal with CROSSING_JUMP_P.
7189 (sparc_use_sched_lookahead): Rewrite using switch statement.
7190 (sparc_issue_rate): Reorder.
7191 (sparc_branch_cost): New function.
7192
7193 2018-09-27 Martin Sebor <msebor@redhat.com>
7194
7195 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
7196 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
7197 (int_fits_type_p): Same.
7198
7199 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
7200
7201 * config/i386/i386.md (FPCR_REG): Remove.
7202 (UNSPEC_FLDCW): Remove.
7203 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
7204 (x86_fldcw_1): Remove insn pattern.
7205 (fnstenv): Do not clobber FPCR_REG.
7206 (fldenv): Ditto.
7207 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
7208 (CALL_USED_REGISTERS): Ditto.
7209 (REG_ALLOC_ORDER): Ditto.
7210 (REG_CLASS_CONTENTS): Ditto.
7211 (HI_REGISTER_NAMES): Ditto.
7212 (ADDITIONAL_REGISTER_NAMES): Use defines instead
7213 of numerical constants.
7214 * config/i386/i386.c (regclass_map): Remove fpsr register.
7215 (dbx_register_map): Ditto.
7216 (dbx64_register_map): Ditto.
7217 (svr4_dbx_register_map): Ditto.
7218 (print_reg): Do not handle FPCR_REG.
7219
7220 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
7221
7222 PR target/87149
7223 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
7224 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
7225 Delete, always treat as true.
7226 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
7227 Ditto. Simplify remaining code.
7228 * config/powerpcspe/powerpcspe.h: Ditto.
7229 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
7230 Simplify remaining code.
7231 (rs6000_expand_builtin): Ditto.
7232 * config/rs6000/rs6000.h: Ditto.
7233 * configure.ac: Ditto.
7234 * configure: Regenerate.
7235
7236 2018-09-27 Martin Liska <mliska@suse.cz>
7237
7238 * coverage.c (get_coverage_counts): Revert the formatting
7239 of missing profile opt info.
7240
7241 2018-09-27 Richard Biener <rguenther@suse.de>
7242
7243 PR debug/37801
7244 PR debug/87440
7245 * dwarf2out.c (set_block_origin_self): Do not mark outermost
7246 block as we do not output that.
7247 (gen_inlined_subroutine_die): Elide the originally outermost
7248 block, matching what we do for concrete instances.
7249 (decls_for_scope): Add parameter specifying whether to recurse
7250 to subblocks.
7251
7252 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
7253 Tom de Vries <tom@codesourcery.com>
7254
7255 PR 82089
7256
7257 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
7258 STORE_FLAG_VALUE == 1.
7259
7260 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
7261
7262 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
7263 constant definitions.
7264 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
7265 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
7266 ("speculation_barrier"): New expander definition.
7267
7268 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
7269
7270 PR gcov-profile/86957
7271 * common.opt: New warning option -Wmissing-profile.
7272 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
7273 * doc/invoke.texi: Document -Wmissing-profile.
7274
7275 2018-09-26 Jim Wilson <jimw@sifive.com>
7276
7277 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
7278 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
7279
7280 2018-09-26 Martin Sebor <msebor@redhat.com>
7281
7282 * tree.c (zerop): Change return type to bool.
7283 (integer_zerop, integer_onep, integer_each_onep): Same.
7284 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
7285 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
7286 (real_onep, real_minus_onep, chain_index): Same.
7287 (print_type_hash_statistics, type_list_equal): Same.
7288 * tree.h (zerop): Same.
7289 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
7290 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
7291 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
7292 (real_onep, real_minus_onep, chain_index): Same.
7293 (print_type_hash_statistics, type_list_equal): Same.
7294
7295 2018-09-26 Jim Wilson <jimw@sifive.com>
7296
7297 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
7298
7299 2018-09-26 Jakub Jelinek <jakub@redhat.com>
7300
7301 PR target/87414
7302 * config/i386/i386.c: Include debug.h and dwarf2out.h.
7303 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
7304 call.
7305
7306 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
7307
7308 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
7309
7310 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
7311
7312 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
7313 and FP_SECOND_SSE_REGS.
7314 (REG_CLASS_NAMES): Ditto.
7315 (REG_CLASS_CONTENTS): Ditto.
7316 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
7317 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
7318 (ix86_preferred_output_reload_class): Ditto.
7319 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
7320 clobber constraint to "=&f".
7321 (fix_truncdi_i387): Ditto.
7322 (lrintxfdi2): Ditto.
7323 (fistdi2_<rounding>): Ditto.
7324 (fpremxf4_i387): Change "=u" constraint to "=f".
7325 (fprem1xf4_i387): Ditto.
7326 (sincosxf3): Ditto.
7327 (fptanxf4_i387): Ditto.
7328 (fxtractxf3_i387): Ditto.
7329 (fscalexf4_i387): Ditto.
7330 (atan2xf3): Change "u" constraint to "f".
7331 (fyl2xxf3_i387): Ditto.
7332 (fyl2xp1xf3_i387): Ditto.
7333
7334 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
7335
7336 PR target/87439
7337 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
7338 for removed I387_MASK_PM entity.
7339
7340
7341 2018-09-26 Jeff Law <law@redhat.com>
7342 Revert
7343 2018-09-26 Alexey Neyman <stilor@att.net>
7344
7345 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
7346 headers are no longer pulled in by <isl/val.h>.
7347
7348 2018-09-26 Richard Biener <rguenther@suse.de>
7349
7350 PR debug/87443
7351 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
7352 or concrete instance DIE to the tree. Create abstract origin
7353 attributes also for concrete instances.
7354
7355 2018-09-26 Alexey Neyman <stilor@att.net>
7356
7357 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
7358 headers are no longer pulled in by <isl/val.h>.
7359
7360 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
7361
7362 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
7363 Use new helper functions.
7364 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
7365 Use new helper functions.
7366 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
7367 aarch_mm_needs_release): New declarations.
7368 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
7369 aarch_mm_needs_release): New.
7370
7371 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
7372
7373 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
7374 (arm32_output_mi_thunk): Deal with long calls.
7375
7376 2018-09-26 Richard Biener <rguenther@suse.de>
7377
7378 PR debug/87428
7379 PR debug/87362
7380 * tree-inline.c (expand_call_inline): When the location
7381 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
7382 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
7383 the inserted BLOCK to make inlined_function_outer_scope_p
7384 recognize it.
7385 * dwarf2out.c (add_call_src_coords_attributes): Do not add
7386 coords for reserved locations.
7387
7388 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
7389
7390 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
7391 (*call_indirect_nonlocal_sysv<mode>): Ditto.
7392 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
7393 (*sibcall_nonlocal_sysv<mode>): Ditto.
7394 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
7395 (<bd>_<mode>): Ditto.
7396 (<bd>tf_<mode>): Ditto.
7397
7398 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
7399
7400 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
7401 control string as a list of templates instead of as C code.
7402 (*altivec_movti): Ditto.
7403 * config/rs6000/darwin.md (movdf_low_di): Ditto.
7404
7405 2018-09-25 Jim Wilson <jimw@sifive.com>
7406
7407 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
7408 when target symbol is weak.
7409
7410 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
7411
7412 PR c/87387
7413 * builtins.c (unterminated_array): Simplify.
7414 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
7415 where pointer arithmetic is safe.
7416
7417 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
7418
7419 PR target/86987
7420 * config/rs6000/altivec.md (altivec_vspltb): Use
7421 const_0_to_15_operand instead of u5bit_cint_operand.
7422 (*altivec_vspltb_internal): Ditto.
7423 (altivec_vspltb_direct): Ditto.
7424 (altivec_vsplth): Use const_0_to_7_operand instead of
7425 u5bit_cint_operand.
7426 (*altivec_vsplth_internal): Ditto.
7427 (altivec_vsplth_direct): Ditto.
7428 (altivec_vspltw): Use const_0_to_3_operand instead of
7429 u5bit_cint_operand.
7430 (*altivec_vspltw_internal): Ditto.
7431 (altivec_vspltw_direct): Ditto.
7432 (altivec_vspltsf): Ditto.
7433 (*altivec_vspltsf_internal): Ditto.
7434 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
7435 various splats with the proper size immediate. Reorder the various
7436 cases by ascending size of immediate, and put all such together.
7437
7438 2018-09-25 Richard Biener <rguenther@suse.de>
7439
7440 PR debug/83941
7441 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
7442 GC-ification.
7443 (maybe_create_die_with_external_ref): Do not create
7444 DW_TAG_imported_unit here.
7445 (add_abstract_origin_attribute): Handle external BLOCK refs.
7446 (dwarf2out_abstract_function): Simplify LTO case.
7447 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
7448 rather than using maybe_create_die_with_external_ref.
7449
7450 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
7451
7452 PR target/71278
7453 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
7454 (frndintxf2_mask_pm_i387): Ditto.
7455 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
7456 Enable for !flag_trapping_math.
7457 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
7458 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
7459 Change operand 1 predicate to nonimmediate_operand.
7460 (attr "i387_cw"): Remove mask_pm.
7461 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
7462 (enum ix86_entity): Remove I387_MASK_PM.
7463 * config/i386/i386.c (ix86_i387_mode_needed): Do not
7464 handle I387_MASK_PM.
7465 (ix86_mode_needed): Ditto.
7466 (ix86_mode_after): Ditto.
7467 (ix86_mode_entry): Ditto.
7468 (ix86_mode_exit): Ditto.
7469 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
7470
7471 2018-09-25 Jakub Jelinek <jakub@redhat.com>
7472
7473 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
7474 to_update_switch_stmts to vNULL instead of calling create on them
7475 immediately.
7476
7477 2018-09-25 Richard Biener <rguenther@suse.de>
7478
7479 PR tree-optimization/87402
7480 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
7481 (visit_phi): Re-instantiate handling of supposed to be VARYING
7482 but non-VARYING backedge value.
7483
7484 2018-09-25 Richard Biener <rguenther@suse.de>
7485
7486 PR debug/83941
7487 * dwarf2out.c (struct sym_off_pair): New.
7488 (external_die_map): New global.
7489 (lookup_decl_die): When in LTO create DIEs lazily from the
7490 external_die_map.
7491 (lookup_block_die): New function, create DIEs lazily in LTO.
7492 (equate_block_to_die): New function.
7493 (dwarf2out_die_ref_for_decl): During WPA get the association
7494 from the external DIE map.
7495 (dwarf2out_register_external_die): Record mapping into the
7496 external DIE map.
7497 (maybe_create_die_with_external_ref): New function split out from
7498 DIE generation part of old dwarf2out_register_external_die.
7499 (add_abstract_origin_attribute): Do not return the DIE. When
7500 in LTO reference externals directly.
7501 (dwarf2out_abstract_function): When in LTO ignore calls for
7502 decls with external DIEs (already present abstract instances).
7503 (gen_call_site_die): Adjust.
7504 (add_high_low_attributes): Likewise.
7505 (gen_lexical_block_die): Likewise.
7506 (gen_inlined_subroutine_die): Likewie.
7507 (gen_block_die): Likewise.
7508 (dwarf2out_inline_entry): Likewise.
7509 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
7510 DIEs.
7511
7512 2018-09-25 Martin Liska <mliska@suse.cz>
7513
7514 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
7515 integers and not by a float value.
7516
7517 2018-09-25 Martin Liska <mliska@suse.cz>
7518
7519 PR fortran/87394
7520 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
7521 instead of NULL.
7522 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
7523 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
7524 * godump.c (go_format_type): Remove extra parenthesis.
7525
7526 2018-09-25 Martin Liska <mliska@suse.cz>
7527
7528 * alias.c (set_dest_equal_p): Remove unused function.
7529 * config/i386/i386.c (def_builtin_pure2): Likewise.
7530 * diagnostic-show-locus.c (class layout): Remove
7531 unused field.
7532 (layout::layout): Likewise here.
7533 * dump-context.h (class temp_dump_context): Likewise.
7534 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
7535 (add_AT_loclistsptr): Likewise.
7536 (add_AT_offset): Likewise.
7537 (get_AT_hi_pc): Likewise.
7538 (is_comdat_die): Likewise.
7539 (type_is_enum): Likewise.
7540 (ceiling): Likewise.
7541 (add_AT_vms_delta): Likewise.
7542 (is_class_die): Likewise.
7543 * edit-context.c (class line_event): Remove unused field.
7544 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
7545 unused function.
7546 * ipa-cp.c (ipa_get_vr_lat): Likewise.
7547 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
7548 (ok_for_base_p_nonstrict): Likewise.
7549 * tree-chrec.c (is_not_constant_evolution): Likewise.
7550 (chrec_fold_poly_cst): Likewise.
7551 * tree-if-conv.c (has_pred_critical_p): Likewise.
7552 * tree-ssa-coalesce.c (print_exprs): Likewise.
7553 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
7554 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
7555 * tree-vrp.c (value_ranges_intersect_p): Likewise.
7556 (value_range_nonnegative_p): Likewise.
7557
7558 2018-09-25 Martin Liska <mliska@suse.cz>
7559
7560 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
7561 Do not handle "GNU Pascal".
7562 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
7563 Likewise.
7564 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
7565 from documentation. Likewise.
7566 * dbxout.c (dbxout_range_type): Likewise.
7567 * doc/cpp.texi: Likewise.
7568 * doc/extend.texi: Likewise.
7569 * doc/frontends.texi: Likewise.
7570 * doc/invoke.texi: Remove Pascal entry.
7571 * tree.def (CLEANUP_POINT_EXPR): Likewise.
7572 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
7573
7574 2018-09-25 Martin Liska <mliska@suse.cz>
7575
7576 PR middle-end/86078
7577 * doc/invoke.texi: Document all parameters and remove default
7578 of the parameters.
7579
7580 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
7581
7582 PR bootstrap/87417
7583 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
7584 contains HOST_WIDE_INTs when computing its size.
7585
7586 2018-09-24 Jim Wilson <jimw@sifive.com>
7587
7588 PR target/87391
7589 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
7590 not TARGET_RVE.
7591 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
7592
7593 2018-09-24 Andrew Pinski <apinski@marvell.com>
7594
7595 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
7596 access prev before checking it for NULLness in the
7597 AARCH64_FUSE_CMP_BRANCH case.
7598
7599 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
7600
7601 PR target/82699
7602 * config/i386/i386.c (rest_of_insert_endbranch): Set
7603 endbr_queued_at_entrance to true and don't insert ENDBR if
7604 x86_function_profiler will be called.
7605 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
7606 is true.
7607 * config/i386/i386.h (machine_function): Add
7608 endbr_queued_at_entrance.
7609
7610 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
7611
7612 * genattrtab.c (mk_attr_alt): Use alternative_mask.
7613 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
7614 types.
7615 (check_attr_test): Use alternative_mask.
7616 (get_attr_value): Likewise.
7617 (compute_alternative_mask): Use alternative_mask and XWINT.
7618 (make_alternative_compare): Use alternative_mask.
7619 (attr_alt_subset_p): Use XWINT.
7620 (attr_alt_subset_of_compl_p): Likewise.
7621 (attr_alt_intersection): Use alternative_mask and XWINT.
7622 (attr_alt_union): Likewise.
7623 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
7624 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
7625 (simplify_test_exp): Use alternative_mask and XWINT.
7626 (write_test_expr): Use alternative_mask and XWINT, adjust bit
7627 number calculation to support 64 bits. Generate code that
7628 checks 64-bit masks.
7629 (main): Use alternative_mask.
7630 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
7631
7632 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
7633
7634 PR target/80080
7635 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
7636 RETURN+USE when returning via %r14.
7637
7638 2018-09-24 Martin Liska <mliska@suse.cz>
7639
7640 * gcov.c (output_lines): Print colorization legend
7641 for both flag_use_colors and flag_use_hotness_colors.
7642 Reword the help.
7643
7644 2018-09-24 Martin Liska <mliska@suse.cz>
7645
7646 * coverage.c (get_coverage_counts): Use warning_at
7647 with current_function_decl location. Use %qD in warning
7648 message.
7649
7650 2018-09-24 Martin Liska <mliska@suse.cz>
7651
7652 * memory-block.h (memory_block_pool::release): Annotate with
7653 valgrind that the memory is not accessible.
7654
7655 2018-09-24 Martin Liska <mliska@suse.cz>
7656
7657 PR sanitizer/85774
7658 * asan.c: Make asan_handled_variables extern.
7659 * asan.h: Likewise.
7660 * cfgexpand.c (expand_stack_vars): Make sure
7661 a representative is unpoison if another
7662 variable in the partition is handled by
7663 use-after-scope sanitization.
7664
7665 2018-09-24 Richard Biener <rguenther@suse.de>
7666
7667 PR tree-optimization/63155
7668 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
7669 the worklist when the edge of the respective argument isn't
7670 executable.
7671
7672 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
7673
7674 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
7675 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
7676 (MASK_CLASS_P): Update for rename.
7677 (MAYBE_MASK_CLASS_P): Ditto.
7678 (REG_CLASS_NAMES): Update.
7679 (REG_CLASS_CONTENT): Update.
7680 * config/i386/i386.c (regclass_map): Update for MASK_REG
7681 and ALL_MASK_REGS rename.
7682 * config/i386/constraints.md (Yk): Update for rename.
7683 (k): Ditto.
7684
7685 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
7686
7687 * config/i386/i386.h (enum reg_class): Remove
7688 EVEX_SSE_REGS and MOD4_SSE_REGS.
7689 (REG_CLASS_NAMES): Update.
7690 (REG_CLASS_CONTENT): Update.
7691 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
7692 registers as ALL_SSE_REGS.
7693 (ix86_additional_allocno_class_p): Remove.
7694 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
7695 (ix86_register_priority): Lower priority of EVEX SSE registers.
7696 Use IN_RANGE macro where appropriate.
7697 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
7698 AVX-5124VNNIW checks.
7699 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
7700 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
7701 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
7702 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
7703 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
7704 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
7705 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
7706 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
7707 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
7708 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
7709 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
7710 * config/i386/constraints.md (Yh): Remove.
7711
7712 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
7713
7714 * config/i386/i386.c (regclass_map): Declare integer REX registers
7715 as GENERAL_REGS.
7716
7717 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
7718
7719 * doc/service.texi (Service): Switch the fsf.org link to https.
7720
7721 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
7722
7723 PR target/86798
7724 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7725 Define to speculation_safe_value_not_needed.
7726
7727 2018-09-21 Florian Weimer <fweimer@redhat.com>
7728
7729 PR middle-end/81035
7730 * doc/extend.texi (Common Function Attributes): Mention that
7731 noreturn suppresses tail call optimization.
7732
7733 2018-09-21 Jeff Law <law@redhat.com>
7734
7735 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
7736 vr_values::cleanup_edges_and_switches.
7737 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
7738 vr_values class.
7739 (identify_jump_threads): Remove EDGE_IGNORE handling.
7740 (execute_vrp): Move handling of to_remove_edges and
7741 to_update_switch_stmts into vr_values class member functions.
7742 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
7743 (to_update_switch_stmts): Likewise.
7744 * vr-values.c: Include cfghooks.h.
7745 (vr_values::vr_values): Initialize to_remove_edges and
7746 to_update_switch_stmts.
7747 (vr_values::~vr_values): Verify to_remove_edges and
7748 to_update_switch_stmts are empty.
7749 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
7750 (vr_values::cleanup_edges_and_switches): New member function.
7751 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
7752 function. Add new data members.
7753
7754 2018-09-21 David Malcolm <dmalcolm@redhat.com>
7755
7756 PR tree-optimization/87309
7757 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
7758 calls with pflags and alt_flags.
7759 (selftest::test_capture_of_dump_calls): Add test of interaction of
7760 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
7761
7762 2018-09-21 Olivier Hainque <hainque@adacore.com>
7763
7764 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
7765
7766 2018-09-21 Olivier Hainque <hainque@adacore.com>
7767
7768 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
7769
7770 2018-09-21 Olivier Hainque <hainque@adacore.com>
7771
7772 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
7773 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
7774 (VXWORKS_LIBS_RTP): Minor reordering.
7775
7776 2018-09-21 Olivier Hainque <hainque@adacore.com>
7777
7778 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
7779 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
7780
7781 2018-09-21 Olivier Hainque <hainque@adacore.com>
7782
7783 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
7784 (PTRDIFF_TYPE): Likewise.
7785
7786 2018-09-21 Olivier Hainque <hainque@adacore.com>
7787
7788 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
7789 triplet, similar to support for VxWorks7.
7790 * config/vxworks-dummy.h: Provide a default definition
7791 of TARGET_VXWORKS64 to 0.
7792
7793 2018-09-21 Olivier Hainque <hainque@adacore.com>
7794
7795 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
7796 * config/vxworks-dummy.h: here.
7797
7798 2018-09-21 Olivier Hainque <hainque@adacore.com>
7799
7800 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
7801
7802 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
7803 Bo Zhou <zbo.zhou@hisilicon.com>
7804
7805 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
7806 * config/aarch64/aarch64-tune.md: Regenerated.
7807 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
7808 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
7809 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
7810
7811 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
7812 Julian Brown <julian@codesourcery.com>
7813
7814 * builtins.c (get_builtin_sync_mem): Handle address spaces.
7815
7816 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
7817
7818 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
7819 if the call takes a static chain.
7820
7821 2018-09-21 Martin Liska <mliska@suse.cz>
7822
7823 * auto-profile.c (autofdo_source_profile::read): Do not
7824 set sum_all.
7825 (read_profile): Do not add working sets.
7826 (read_autofdo_file): Remove sum_all.
7827 (afdo_callsite_hot_enough_for_early_inline): Remove const
7828 qualifier.
7829 * coverage.c (struct counts_entry): Remove gcov_summary.
7830 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
7831 do not support GCOV_TAG_PROGRAM_SUMMARY.
7832 (get_coverage_counts): Remove summary and expected
7833 arguments.
7834 * coverage.h (get_coverage_counts): Likewise.
7835 * doc/gcov-dump.texi: Remove -w option.
7836 * gcov-dump.c (dump_working_sets): Remove.
7837 (main): Do not support '-w' option.
7838 (print_usage): Likewise.
7839 (tag_summary): Likewise.
7840 * gcov-io.c (gcov_write_summary): Do not dump
7841 histogram.
7842 (gcov_read_summary): Likewise.
7843 (gcov_histo_index): Remove.
7844 (gcov_histogram_merge): Likewise.
7845 (compute_working_sets): Likewise.
7846 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
7847 it not obsolete.
7848 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
7849 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
7850 (GCOV_HISTOGRAM_SIZE): Remove.
7851 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
7852 (struct gcov_summary): Simplify rapidly just
7853 to runs and sum_max fields.
7854 (gcov_histo_index): Remove.
7855 (NUM_GCOV_WORKING_SETS): Likewise.
7856 (compute_working_sets): Likewise.
7857 * gcov-tool.c (print_overlap_usage_message): Remove
7858 trailing empty line.
7859 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
7860 (output_lines): Remove program related line.
7861 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
7862 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
7863 histogram.
7864 (input_profile_summary): Do not read it.
7865 (merge_profile_summaries): And do not merge it.
7866 (input_symtab): Do not call removed function.
7867 * modulo-sched.c (sms_schedule): Do not print sum_max.
7868 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
7869 removed when histogram method was invented.
7870 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
7871 mode.
7872 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
7873 GCOV coding style.
7874 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
7875 and dump selected value.
7876 * profile.c (add_working_set): Remove.
7877 (get_working_sets): Likewise.
7878 (find_working_set): Likewise.
7879 (get_exec_counts): Do not work with working sets.
7880 (read_profile_edge_counts): Do not inform as sum_max is removed.
7881 (compute_branch_probabilities): Likewise.
7882 (compute_value_histograms): Remove argument for call of
7883 get_coverage_counts.
7884 * profile.h: Do not make gcov_summary const.
7885
7886 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
7887
7888 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
7889
7890 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
7891
7892 PR tree-optimization/86990
7893 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
7894 Check that the entire merged store group is made of constants only for
7895 overlapping stores.
7896
7897 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
7898
7899 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
7900 (VTABLE_VERIFICATION_SPEC): Likewise.
7901 (SANITIZER_EARLY_SPEC): Likewise.
7902 (SANITIZER_SPEC): Likewise.
7903 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
7904 * doc/invoke.texi (Link Options): Document -r.
7905
7906 2018-09-20 Richard Biener <rguenther@suse.de>
7907
7908 PR middle-end/87054
7909 * gimplify.c (gimplify_expr): Retain alignment of
7910 addressable lvalue in dereference.
7911
7912 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
7913
7914 PR bootstrap/87013
7915 * configure.ac: Check for .loc is_stmt support.
7916 * configure, config.in: Rebuilt.
7917 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
7918 if not supported.
7919
7920 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
7921
7922 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
7923 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
7924 -misel=no.
7925
7926 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
7927
7928 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
7929 VECTOR_OTHER.
7930 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
7931 case VECTOR_OTHER.
7932
7933 2018-09-20 Marek Polacek <polacek@redhat.com>
7934
7935 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
7936
7937 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
7938
7939 PR tree-optimization/87288
7940 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
7941 into account when determining PEELING_FOR_NITERS.
7942
7943 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
7944
7945 PR tree-optimization/86877
7946 * tree-vect-loop.c (vect_analyze_loop_2): Call
7947 vect_verify_datarefs_alignment.
7948
7949 2018-09-19 Marek Polacek <polacek@redhat.com>
7950
7951 * doc/invoke.texi: Document -Wclass-conversion.
7952
7953 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
7954
7955 * config/pa/pa.c (pa_adjust_priority): Delete.
7956 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
7957
7958 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
7959 (atomic_storehi): Likewise.
7960 (atomic_storesi): Likewise.
7961 (atomic_loaddi): Restore compare and swap exchange loop code.
7962
7963 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
7964
7965 PR rtl-optimization/86902
7966 * combine.c (try_combine): When changing the CC mode used, don't change
7967 an unrelated mode in other_insn to that new CC mode.
7968
7969 2018-09-19 David Malcolm <dmalcolm@redhat.com>
7970
7971 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
7972 with %T in place of calls to dump_generic_expr.
7973 (prune_runtime_alias_test_list): Likewise.
7974 (create_runtime_alias_checks): Likewise.
7975 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
7976 (vect_analyze_data_ref_dependence): Likewise.
7977 (vect_slp_analyze_data_ref_dependence): Likewise.
7978 (vect_record_base_alignment): Likewise. Use %G in place of call
7979 to dump_gimple_stmt.
7980 (vect_compute_data_ref_alignment): Likewise.
7981 (verify_data_ref_alignment): Likewise.
7982 (vect_find_same_alignment_drs): Likewise.
7983 (vect_analyze_group_access_1): Likewise.
7984 (vect_analyze_data_ref_accesses): Likewise.
7985 (dependence_distance_ge_vf): Likewise.
7986 (dump_lower_bound): Likewise.
7987 (vect_prune_runtime_alias_test_list): Likewise.
7988 (vect_find_stmt_data_reference): Likewise.
7989 (vect_analyze_data_refs): Likewise.
7990 (vect_create_addr_base_for_vector_ref): Likewise.
7991 (vect_create_data_ref_ptr): Likewise.
7992 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
7993 (vect_can_advance_ivs_p): Likewise.
7994 (vect_update_ivs_after_vectorizer): Likewise.
7995 (vect_gen_prolog_loop_niters): Likewise.
7996 (vect_prepare_for_masked_peels): Likewise.
7997 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
7998 (vect_determine_vectorization_factor): Likewise.
7999 (vect_is_simple_iv_evolution): Likewise.
8000 (vect_analyze_scalar_cycles_1): Likewise.
8001 (vect_analyze_loop_operations): Likewise.
8002 (report_vect_op): Likewise.
8003 (vect_is_slp_reduction): Likewise.
8004 (check_reduction_path): Likewise.
8005 (vect_is_simple_reduction): Likewise.
8006 (vect_create_epilog_for_reduction): Likewise.
8007 (vect_finalize_reduction:): Likewise.
8008 (vectorizable_induction): Likewise.
8009 (vect_transform_loop_stmt): Likewise.
8010 (vect_transform_loop): Likewise.
8011 (optimize_mask_stores): Likewise.
8012 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
8013 (vect_split_statement): Likewise.
8014 (vect_recog_over_widening_pattern): Likewise.
8015 (vect_recog_average_pattern): Likewise.
8016 (vect_determine_min_output_precision_1): Likewise.
8017 (vect_determine_precisions_from_range): Likewise.
8018 (vect_determine_precisions_from_users): Likewise.
8019 (vect_mark_pattern_stmts): Likewise.
8020 (vect_pattern_recog_1): Likewise.
8021 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8022 (vect_record_max_nunits): Likewise.
8023 (vect_build_slp_tree_1): Likewise.
8024 (vect_build_slp_tree_2): Likewise.
8025 (vect_print_slp_tree): Likewise.
8026 (vect_analyze_slp_instance): Likewise.
8027 (vect_detect_hybrid_slp_stmts): Likewise.
8028 (vect_detect_hybrid_slp_1): Likewise.
8029 (vect_slp_analyze_operations): Likewise.
8030 (vect_slp_analyze_bb_1): Likewise.
8031 (vect_transform_slp_perm_load): Likewise.
8032 (vect_schedule_slp_instance): Likewise.
8033 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8034 (vect_mark_stmts_to_be_vectorized): Likewise.
8035 (vect_init_vector_1): Likewise.
8036 (vect_get_vec_def_for_operand): Likewise.
8037 (vect_finish_stmt_generation_1): Likewise.
8038 (vect_check_load_store_mask): Likewise.
8039 (vectorizable_call): Likewise.
8040 (vectorizable_conversion): Likewise.
8041 (vectorizable_operation): Likewise.
8042 (vectorizable_load): Likewise.
8043 (vect_analyze_stmt): Likewise.
8044 (vect_is_simple_use): Likewise.
8045 (vect_get_vector_types_for_stmt): Likewise.
8046 (vect_get_mask_type_for_stmt): Likewise.
8047 * tree-vectorizer.c (increase_alignment): Likewise.
8048
8049 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
8050
8051 * doc/rtl.texi: Adjust vec_select description.
8052 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
8053 non-constant selectors.
8054
8055 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
8056
8057 * config/aarch64/aarch64-protos.h
8058 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
8059 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
8060 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
8061 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
8062 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
8063 (AARCH64_FL_PROFILE): Move index so flags are ordered.
8064 (AARCH64_ISA_RCPC8_4): New flag.
8065 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
8066 to aarch64_offset_9bit_signed_unscaled_p.
8067 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
8068 and use stlur.
8069 * config/aarch64/constraints.md (Ust): New constraint.
8070 * config/aarch64/predicates.md.
8071 (aarch64_9bit_offset_memory_operand): New predicate.
8072 (aarch64_rcpc_memory_operand): New predicate.
8073
8074 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
8075
8076 PR rtl-optimization/87361
8077 * rtlanal.c (nonzero_bits1): Revert accidental change.
8078
8079 2018-09-19 Richard Biener <rguenther@suse.de>
8080
8081 PR tree-optimization/87349
8082 PR tree-optimization/87342
8083 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
8084
8085 2018-09-18 Marek Polacek <polacek@redhat.com>
8086
8087 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
8088 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
8089
8090 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
8091
8092 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
8093
8094 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
8095
8096 PR rtl-optimization/86882
8097 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
8098
8099 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
8100
8101 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
8102 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
8103
8104 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
8105
8106 PR other/87353
8107 * doc/invoke.texi (Link Options): Fix formatting and grammar.
8108
8109 2018-09-18 Richard Biener <rguenther@suse.de>
8110
8111 PR middle-end/63155
8112 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
8113 (compute_samebase_partition_bases): Likewise.
8114 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
8115 (gimple_can_coalesce_p): Simplify.
8116
8117 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
8118
8119 Handle a library implementation of ffs calling __builtin_ffs.
8120 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
8121 (mmix_init_libfuncs): New function: make __builtin_ffs expand
8122 to __ffsdi2.
8123
8124 2018-09-17 David Malcolm <dmalcolm@redhat.com>
8125
8126 * diagnostic-show-locus.c (class layout_range): Add field
8127 "m_original_idx".
8128 (layout_range::layout_range): Add "original_idx" param and use it
8129 to initialize new field.
8130 (make_range): Use 0 for original_idx.
8131 (layout::layout): Pass in index to calls to
8132 maybe_add_location_range.
8133 (layout::maybe_add_location_range): Add param "original_idx" and
8134 pass it on to layout_range.
8135 (layout::print_any_labels): Pass on range->m_original_idx to
8136 get_text call.
8137 (gcc_rich_location::add_location_if_nearby): Use 0 for
8138 original_idx.
8139 * gcc-rich-location.h (text_range_label::get_text): Update for new
8140 param.
8141 (range_label_for_type_mismatch::get_text): Likewise.
8142
8143 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
8144
8145 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
8146
8147 2018-09-17 David Malcolm <dmalcolm@redhat.com>
8148
8149 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
8150 format_string_diagnostic_t.
8151 (fmtwarn_n): Likewise.
8152 * substring-locations.c
8153 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
8154 (format_warning_n_va): Convert to...
8155 (format_string_diagnostic_t::emit_warning_n_va): ...this.
8156 (format_warning_va): Convert to...
8157 (format_string_diagnostic_t::emit_warning_va): ...this.
8158 (format_warning_at_substring): Convert to...
8159 (format_string_diagnostic_t::emit_warning): ...this.
8160 (format_warning_at_substring_n): Convert to...
8161 (format_string_diagnostic_t::emit_warning_n): ...this.
8162 * substring-locations.h (class format_string_diagnostic_t): New
8163 class.
8164 (format_warning_va): Convert to
8165 format_string_diagnostic_t::emit_warning_va.
8166 (format_warning_n_va): Convert to
8167 format_string_diagnostic_t::emit_warning_n_va.
8168 (format_warning_at_substring): Convert to
8169 format_string_diagnostic_t::emit_warning.
8170 (format_warning_at_substring_n): Convert to
8171 format_string_diagnostic_t::emit_warning_n.
8172
8173 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
8174 Bernd Schmidt <bernds_cb1@t-online.de>
8175
8176 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
8177 SImode args.
8178
8179 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
8180
8181 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
8182 operand 0 predicate to nonimmediate operand.
8183 (rint<mode>2_frndint): Remove insn pattern.
8184 (rint<mode>2): Change operand 1 predicate to general_operand.
8185 Extend operand 1 to XFmode and generate rintxf2 insn.
8186 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
8187 Do not use X87MODEF mode macro.
8188 (frndintxf2_<rounding>_i387): Rename from
8189 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
8190 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
8191 to XFmode and generate significandxf3 insn.
8192
8193 2018-09-17 Richard Biener <rguenther@suse.de>
8194
8195 PR tree-optimization/87328
8196 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
8197 visiting unexecutable backedges when not iterating.
8198 (do_rpo_vn): Mark all edges not executable even when not
8199 iterating.
8200
8201 2018-09-17 Martin Jambor <mjambor@suse.cz>
8202
8203 PR c/63886
8204 * doc/invoke.texi (Warning Options): Likewise.
8205
8206 2018-09-17 Richard Biener <rguenther@suse.de>
8207
8208 PR tree-optimization/87301
8209 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
8210 clean EH info from leftover copy assignments.
8211
8212 2018-09-17 Martin Liska <mliska@suse.cz>
8213
8214 PR gcov-profile/85871
8215 * gcov.c (output_intermediate_file): Fix out of bounds
8216 access.
8217
8218 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
8219
8220 * config/arc/arc.c: Object attributes for core4 not reflected
8221 correctly.
8222 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
8223 core3).
8224
8225 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
8226
8227 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
8228
8229 2018-09-17 Martin Liska <mliska@suse.cz>
8230
8231 * doc/gcov.texi: Document new option --use-hotness-colors.
8232 * gcov.c (struct source_info): Declare new field.
8233 (source_info::source_info): Set default for maximum_count.
8234 (print_usage): Add new -q option.
8235 (process_args): Process it.
8236 (accumulate_line_info): Save src->maximum_count.
8237 (output_line_beginning): Make color line number if
8238 flag_use_hotness_colors is set.
8239 (output_line_details): Pass default argument value.
8240 (output_lines): Pass src->maximum_count.
8241
8242 2018-09-17 Martin Liska <mliska@suse.cz>
8243
8244 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
8245 Use processor_names table.
8246 * config/i386/i386.c (ix86_default_align): Use
8247 processor_cost_table for alignment values.
8248 (ix86_option_override_internal): Use processor_names.
8249 (ix86_function_specific_print): Likewise.
8250 * config/i386/i386.h (struct processor_costs):
8251 Add alignment values.
8252 (struct ptt): Remove and replace with const char *.
8253 * config/i386/x86-tune-costs.h (struct processor_costs):
8254 Declare default alignments for all costs.
8255
8256 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
8257
8258 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
8259 symbolics or VR_VARYING ranges for ABS_EXPR.
8260 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
8261 when range will wrap.
8262
8263 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
8264
8265 PR middle-end/86864
8266 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
8267 before and after a JUMP_TABLE_DATA.
8268
8269 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
8270
8271 PR middle-end/87188
8272 * dojump.c (do_compare_and_jump): Canonicalize function pointers
8273 when one operand is a function pointer. Use POINTER_TYPE_P and
8274 FUNC_OR_METHOD_TYPE_P.
8275 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
8276 * fold-const.c (build_range_check): Likewise.
8277 * match.pd (simple_comparison): Likewise.
8278
8279 2018-09-14 David Malcolm <dmalcolm@redhat.com>
8280
8281 PR c/82967
8282 * spellcheck.c (get_edit_distance_cutoff): New function.
8283 (selftest::test_edit_distance_unit_test_oneway): Rename to...
8284 (selftest::test_get_edit_distance_one_way): ...this.
8285 (selftest::test_get_edit_distance_unit): Rename to...
8286 (selftest::test_get_edit_distance_both_ways): ...this.
8287 (selftest::test_edit_distances): Move tests to this new function,
8288 and test some more pairs of strings. Update for above renaming.
8289 (selftest::get_old_cutoff): New function.
8290 (selftest::test_get_edit_distance_cutoff): New function.
8291 (selftest::assert_suggested_for): New function.
8292 (ASSERT_SUGGESTED_FOR): New macro.
8293 (selftest::assert_not_suggested_for): New function.
8294 (ASSERT_NOT_SUGGESTED_FOR): New macro.
8295 (selftest::test_suggestions): New function.
8296 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
8297 tests to selftest::test_edit_distances and call it. Add calls to
8298 selftest::test_get_edit_distance_cutoff and
8299 selftest::test_suggestions.
8300 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
8301 (best_match::consider): Replace hard-coded cutoff calculation with
8302 a call to...
8303 (best_match::get_cutoff): New declaration.
8304 (best_match::get_best_meaningful_candidate): Likewise.
8305
8306 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
8307
8308 * builtins.c (fold_builtin_strlen): Remove TODO comment.
8309
8310 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
8311
8312 revert:
8313 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
8314
8315 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8316 terminated string literal.
8317
8318 2018-09-14 Martin Sebor <msebor@redhat.com>
8319
8320 * builtins.c (unterminated_array): Handle ARRAY_REF.
8321 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
8322 * builtins.h (unterminated_array): Declare extern.
8323 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
8324 arrays.
8325 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
8326 calls.
8327
8328 2018-09-14 Martin Sebor <msebor@redhat.com>
8329 Jeff Law <law@redhat.com>
8330
8331 * builtins.c (unterminated_array): New.
8332 (expand_builtin_strcpy): Adjust.
8333 (expand_builtin_strcpy_args): Detect unterminated arrays.
8334 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
8335 unterminated arrays.
8336 * gimple-fold.h (get_maxval_strlen): Add argument.
8337 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
8338
8339 * gimple-fold.c (get_range_strlen): Add argument.
8340 (get_maxval_strlen): Adjust.
8341 * gimple-fold.h (get_range_strlen): Add argument.
8342
8343 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
8344
8345 * config/i386/movdirintrin.h: Fix copyright year.
8346
8347 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
8348
8349 * reg-stack.c: Include regs.h.
8350 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
8351 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
8352 FIRST_STACK_REG, not DFmode.
8353 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
8354 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
8355 (change stack): Default register mode to the reg_raw_mode of
8356 FIRST_STACK_REG, not DFmode.
8357 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
8358 (*swapxf): Rename from swapxf.
8359
8360 2018-09-14 Carl Love <cel@us.ibm.com>
8361
8362 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
8363 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
8364
8365 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
8366
8367 PR target/87224
8368 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
8369 alternatives.
8370
8371 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
8372
8373 PR target/85628
8374 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
8375
8376 2018-09-14 Jason Merrill <jason@redhat.com>
8377
8378 Fix --enable-gather-detailed-mem-stats.
8379 * hash-table.c (hash_table_usage): Change from variable to function.
8380 * hash-table.h: Adjust.
8381 * Makefile.in: Add missing dependencies on hash-table.h.
8382
8383 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8384
8385 PR tree-optimization/87259
8386 PR lto/87283
8387 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
8388 execute_cse_reciprocals_1 has tried transforming.
8389
8390 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
8391
8392 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
8393 VR_VARYING for PLUS/MINUS_EXPR.
8394
8395 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
8396
8397 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
8398 formatting.
8399
8400 2018-09-14 Richard Biener <rguenther@suse.de>
8401
8402 PR middle-end/63155
8403 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
8404 bits for the merged partition.
8405
8406 2018-09-13 Martin Sebor <msebor@redhat.com>
8407 Bernd Edlinger <bernd.edlinger@hotmail.de>
8408
8409 * builtins.h (c_srlen): Add argument.
8410 * builtins.c (warn_string_no_nul): New function.
8411 (c_strlen): Add argument and use it. Update recursive calls.
8412 Pass DECL argument to string_constant to get info on non
8413 terminated strings. Update *NONSTR as needed.
8414 (fold_builtin_strlen): Add argument to calls to c_strlen.
8415 Warn for unterminated arrays.
8416 (warn_string_no_null): Add prototype.
8417 * expr.c (string_constant): Update arguments. Update recursive
8418 calls appropriately. Detect missing NUL terminator and outermost
8419 declaration its missing in.
8420 Improve checks for arrays with nonzero lower bound or elements
8421 that are not a single byte. Simplify offset computation.
8422 Simplify checks for non-NUL terminated strings.
8423 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
8424 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
8425
8426 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
8427
8428 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
8429 correctly.
8430 * fold-const.c (c_getstr): Fix function comment. Remove unused third
8431 argument. Fix range checks.
8432 * fold-const.h (c_getstr): Adjust protoype.
8433 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
8434 string is constant but contains no NUL byte.
8435
8436 * expr.c (string_constant): Adjust function comment.
8437 Remove bogus check for zero termination.
8438
8439 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
8440
8441 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
8442 (get_constant_size): Don't make STRING_CSTs larger than they are.
8443 (check_string_literal): New check function for STRING_CSTs.
8444 (output_constant): Use it.
8445
8446 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
8447
8448 PR target/86812
8449 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
8450
8451 2018-09-13 Richard Biener <rguenther@suse.de>
8452
8453 PR tree-optimization/87263
8454 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
8455 (struct unwind_state): Add max_rpo field.
8456 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
8457 Compute max_rpo, the max RPO number a block can be backwards reached
8458 from. Re-write non-iterating mode to a RPO ordered worklist approach,
8459 separating it from the iterating mode.
8460
8461 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
8462
8463 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
8464 (rfs_decision): New scheduling decision.
8465
8466 2018-09-13 Richard Biener <rguenther@suse.de>
8467
8468 PR bootstrap/87134
8469 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
8470 (vn_nary_op_insert_pieces_predicated): Do not write useless
8471 valid_dominated_by_p entry outside of the allocated storage.
8472
8473 2018-09-13 Omar Sandoval <osandov@osandov.com>
8474 Tom de Vries <tdevries@suse.de>
8475
8476 PR debug/86985
8477 * dwarf2out.c (is_c): New function.
8478 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
8479
8480 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
8481
8482 PR target/85628
8483 * config/aarch64/aarch64.md (*aarch64_bfxil):
8484 Define.
8485 * config/aarch64/constraints.md (Ulc): Define.
8486 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
8487 Define.
8488 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
8489 New function.
8490
8491 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
8492
8493 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
8494 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
8495 aarch64_layout_frame call.
8496 (aarch64_expand_epilogue): Likewise.
8497 (aarch64_initial_elimination_offset): Likewise.
8498 (aarch64_get_separate_components): Likewise.
8499 (aarch64_use_return_insn_p): Likewise.
8500 (aarch64_layout_frame): Remove unneeded check.
8501
8502 2018-09-13 Jakub Jelinek <jakub@redhat.com>
8503
8504 * configure.ac: Only append
8505 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
8506 gcc_config_arguments if it was never reconfigured or last reconfigure
8507 was with different arguments.
8508 * configure: Regenerated.
8509
8510 2018-09-13 Jakub Jelinek <jakub@redhat.com>
8511 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8512
8513 PR middle-end/87290
8514 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
8515 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
8516
8517 2018-09-13 Jakub Jelinek <jakub@redhat.com>
8518
8519 PR tree-optimization/87287
8520 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
8521 X % C == 0 to X % (unsigned) C == 0 optimization to ...
8522 * match.pd (X % C == 0): ... here. New optimization.
8523
8524 2018-09-12 Jakub Jelinek <jakub@redhat.com>
8525
8526 PR middle-end/82853
8527 * expr.h (maybe_optimize_mod_cmp): Declare.
8528 * expr.c (mod_inv): New function.
8529 (maybe_optimize_mod_cmp): New function.
8530 (do_store_flag): Use it.
8531 * cfgexpand.c (expand_gimple_cond): Likewise.
8532
8533 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
8534 Julian Brown <julian@codesourcery.com>
8535
8536 PR middle-end/86336
8537 * gimplify.c (gimplify_scan_omp_clauses): Set
8538 target_firstprivatize_array_bases in OpenACC parallel and kernels
8539 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
8540 OpenACC data regions.
8541
8542 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
8543
8544 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
8545 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
8546
8547 2018-09-12 Richard Biener <rguenther@suse.de>
8548
8549 PR tree-optimization/87280
8550 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
8551 edge but unreachable target.
8552 (do_rpo_vn): For conservatively handling a PHI only mark
8553 the backedge executable but not the block reachable.
8554
8555 2018-09-12 Richard Biener <rguenther@suse.de>
8556
8557 PR tree-optimization/87266
8558 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
8559 visited blocks.
8560
8561 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
8562
8563 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
8564 constants.
8565 ("trunc<BFP:mode><DFP_ALL:mode>2")
8566 ("trunc<DFP_ALL:mode><BFP:mode>2")
8567 ("extend<BFP:mode><DFP_ALL:mode>2")
8568 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
8569 according to the target operand type.
8570
8571 2018-09-12 Jakub Jelinek <jakub@redhat.com>
8572 Andreas Krebbel <krebbel@linux.ibm.com>
8573
8574 PR tree-optimization/86844
8575 * gimple-ssa-store-merging.c
8576 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
8577 there are any overlapping stores in between them, make sure they are
8578 also coalesced or we give up completely.
8579
8580 2018-09-12 Jakub Jelinek <jakub@redhat.com>
8581
8582 PR middle-end/87248
8583 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
8584 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
8585
8586 2018-09-12 Tom de Vries <tdevries@suse.de>
8587
8588 * common.opt (gdescribe-dies): Add option.
8589 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
8590 attribute for artifical and nameless decls.
8591 (dwarf2out_register_external_die): Add description attribute to
8592 external reference die.
8593 (add_desc_attribute): New functions.
8594 (gen_subprogram_die): Add description attribute to
8595 DW_TAG_call_site_parameter.
8596 * tree-pretty-print.c (print_generic_expr_to_str): New function.
8597 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
8598 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
8599 -gno-describe-dies.
8600 (@item -gdescribe-dies): Add.
8601
8602 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
8603
8604 * tree-vrp.c (vrp_shift_undefined_p): Remove.
8605 (extract_range_from_binary_expr_1: Call
8606 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
8607 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
8608 depend on sign.
8609
8610 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
8611
8612 * gimple-ssa-warn-alloca.c
8613 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
8614 field for ALLOCA_BOUND_*_LARGE.
8615
8616 2018-09-11 Nathan Sidwell <nathan@acm.org>
8617
8618 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
8619
8620 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
8621
8622 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
8623 for clobbers. Remove obsolete comment.
8624
8625 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
8626
8627 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
8628 mpxchk, mpxld and mpxst types.
8629 (define_attr length_immediate): Remove all processing of mpx types.
8630 (define_attr prefix_0f): Ditto.
8631 (define_attr memory): Ditto.
8632
8633 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
8634
8635 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
8636 (log<mode>2): Change operand 1 predicate to general_operand.
8637 Extend operand 1 to XFmode and generate logxf3 insn.
8638 (log10<mode>2): Change operand 1 predicate to general_operand.
8639 Extend operand 1 to XFmode and generate log10xf3 insn.
8640 (log2<mode>2): Change operand 1 predicate to general_operand.
8641 Extend operand 1 to XFmode and generate log2xf3 insn.
8642 (fyl2xp1_extend<mode>xf3_i387): Remove.
8643 (log1p<mode>2): Change operand 1 predicate to general_operand.
8644 Extend operand 1 to XFmode and generate log1pxf3 insn.
8645 (fxtract_extend<mode>xf3_i387): Remove.
8646 (logb<mode>2): Change operand 1 predicate to general_operand.
8647 Extend operand 1 to XFmode and generate logbxf3 insn.
8648 (ilogb<mode>2): Change operand 1 predicate to general_operand.
8649 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
8650 (significand<mode>2): Change operand 1 predicate to general_operand.
8651 Extend operand 1 to XFmode and generate significandxf3 insn.
8652
8653 2018-09-11 Nathan Sidwell <nathan@acm.org>
8654
8655 * gcc.c (perror_with_name, pfatal_with_name): Delete.
8656 (load_specs): Use fatal_error.
8657 (DELETE_IF_ORDINARY, process_command): Use error.
8658 (execute, run_attempt): Use fatal_error.
8659
8660 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
8661
8662 * diagnostic-core.h (sorry_at): New prototype.
8663 * diagnostic.c (sorry_at): New function.
8664
8665 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
8666
8667 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
8668 by zero as VR_UNDEFINED.
8669
8670 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
8671
8672 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
8673 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
8674 (<sincos>mode2): New expander.
8675 (sincos_extend<mode>xf3_i387): Remove insn pattern.
8676 (sincos -> sin, cos splitters): Remove splitter patterns.
8677 (sincos<mode>3): Change operand 2 predicate to general_operand.
8678 Extend operand 2 to XFmode and generate sincosxf3 insn.
8679 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
8680 Change operand 3 predicate to const1_operand.
8681 (fptan_extend<mode>xf4_i387): Remove insn pattern.
8682 (tanxf2): Update operands in the call to fptanxf4_i387.
8683 (tan<mode>2): Change operand 1 predicate to general_operand.
8684 Extend operand 1 to XFmode and generate tanxf3 insn.
8685 (atan2xf3): Rename from *fpatanxf3_i387.
8686 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
8687 (atan2xf3): Remove expander.
8688 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
8689 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
8690 (atan<mode>2): Change operand 1 predicate to general_operand.
8691 Extend operand 1 to XFmode and generate atanxf3 insn.
8692
8693 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
8694
8695 * config/i386/i386.md (x87/SSE constant load splitter): Use
8696 memory_operand instead of nonimmediate_operand for input operand
8697 predicate.
8698
8699 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
8700
8701 * config/i386/i386.md (float partial SSE register stall splitter): Move
8702 splitter near its instruction pattern.
8703 (float_extend partial SSE register stall splitter): Ditto.
8704 (float_truncate partial SSE register stall splitter): Ditto.
8705
8706 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
8707
8708 PR target/86794
8709 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8710 to speculation_safe_value_not_needed.
8711
8712 PR target/85666
8713 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
8714 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
8715 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
8716 leaf_function_p, instead use has_hard_reg_initial_val.
8717
8718 2018-09-09 Nathan Sidwell <nathan@acm.org>
8719
8720 * gcc.h (pfatal_with_name): Don't declare here.
8721 * gcc.c (pfatal_with_name): Make static.
8722
8723 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
8724
8725 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
8726 earlyclobber.
8727
8728 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
8729
8730 PR rtl-optimization/85458
8731 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
8732 priority hook to reduce the priority of EXPR.
8733
8734 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
8735
8736 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
8737 DImode for x87 on 32bit targets. Conditionally disable x87 modes
8738 with X87_ENABLE_FLOAT. Remove preparation code.
8739 (*float<SWI48:mode><MODEF:mode>2): Rename from
8740 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
8741 math using "enabled" attribute.
8742 (*floatdi<MODEF:mode>2_i387): Rename from
8743 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
8744 enable for 32bit targets only.
8745 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
8746 splitter.
8747 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
8748 as operand 1 predicate. Rewrite as define_insn_and_split.
8749 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
8750
8751 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
8752
8753 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
8754 to fallthru to FLOAT case.
8755
8756 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
8757
8758 PR target/86731
8759 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
8760 around folding of vec_sl to handle out of range shift values.
8761
8762 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
8763
8764 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
8765 Update callers to gen_fix_trunc<mode>_i387_fisttp
8766 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
8767 nonimmediate_operand.
8768 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
8769 and corresponding splitters.
8770 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
8771 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
8772 (fix_truncdi_i387_with_temp): Remove insn pattern
8773 and corresponding splitters.
8774 (fix_trunc<mode>_i387): Change operand 0 predicate to
8775 nonimmediate_operand.
8776 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
8777 and corresponding splitters.
8778 (*fistdi2_1): Remove.
8779 (fistdi2): Ditto.
8780 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
8781 (lrintxfdi2): Remove expander. Reimplement as define_insn.
8782 (*fist<mode>2_1): Remove.
8783 (fist<mode>2): Ditto.
8784 (fist<mode>2_with_temp): Remove insn pattern and corresponding
8785 splitters.
8786 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
8787 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
8788 (fistdi2_<rounding>): Change operand 0 predicate to
8789 nonimmediate_operand.
8790 (fistdi2_<rounding>_with_temp): Remove insn pattern
8791 and corresponding splitters.
8792 (fist<mode>2_<rounding>): Change operand 0 predicate to
8793 nonimmediate_operand.
8794 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
8795 and corresponding splitters.
8796
8797 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
8798
8799 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
8800
8801 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
8802 the init value.
8803
8804 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
8805
8806 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
8807 early gimple folding of vec_splat().
8808 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
8809 * gimple-fold.h: Add an extern define for tree_vec_extract().
8810
8811 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
8812
8813 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
8814 wrappers around TREE_TYPE comparisons.
8815
8816 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
8817
8818 PR target/80080
8819 * config/s390/predicates.md: Add nonsym_memory_operand.
8820 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
8821 contains a SYMBOL_REF, load it into an intermediate pseudo.
8822 (s390_emit_compare_and_swap): Legitimize operand.
8823 * config/s390/s390.md: Use the new nonsym_memory_operand
8824 with UNSPECV_CAS patterns.
8825
8826 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
8827
8828 PR target/80080
8829 * config/s390/s390-passes.def: New file.
8830 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
8831 declaration.
8832 (make_pass_s390_early_mach): Add declaration.
8833 * config/s390/s390.c (make_pass_s390_early_mach):
8834 (s390_option_override): Remove dynamic registration.
8835 * config/s390/t-s390: Add s390-passes.def.
8836
8837 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
8838
8839 * config/s390/s390.c (s390_decompose_constant_pool_ref):
8840 Remove UNSPEC_LTREL_BASE check.
8841 (annotate_constant_pool_refs): Likewise.
8842 (find_constant_pool_ref): Likewise.
8843 (find_ltrel_base): Removed.
8844 (replace_ltrel_base): Removed.
8845 (s390_mainpool_finish): Remove replace_ltrel_base call.
8846 (s390_chunkify_start): Remove pending LTREL_BASE logic.
8847 (s390_chunkify_finish): Remove replace_ltrel_base call.
8848 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
8849
8850 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
8851
8852 PR target/86779
8853 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8854 to speculation_safe_value_not_needed.
8855
8856 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
8857 Bernd Schmidt <bernds_cb1@t-online.de>
8858
8859 * config/nvptx/nvptx-opts.h: New file.
8860 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
8861 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
8862 (ASM_SPEC): Define.
8863 (TARGET_SM35): New macro.
8864 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
8865 correct predicate.
8866 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
8867 values.
8868 (misa=): New option.
8869 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
8870
8871 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
8872
8873 * config/i386/i386.md (truncdfsf2): Remove expander.
8874 (truncdfsf2_with_temp): Ditto.
8875 (truncxf<mode>2): Ditto.
8876 (*truncdfsf_fast_mixed): Remove insn pattern.
8877 (*truncdfsf_fast_i387): Ditto.
8878 (*truncdfsf_mixed): Ditto.
8879 (*truncdfsf_i387): Ditto.
8880 (*truncdfsf2_i387_1): Ditto.
8881 (*truncxfsf2_mixed): Ditto.
8882 (*truncxfdf2_mixed): Ditto.
8883 (*truncxf<mode>2_i387_noop): Ditto. Update callers
8884 to call gen_truncxf<mode>2 instead.
8885 (*truncxf<mode>2_i387): Remove.
8886 (reg->reg splitters): Remove splitter pattern.
8887 (reg->mem splitters): Ditto.
8888
8889 (truncdfsf2): New insn pattern.
8890 (truncxf<mode>2): Ditto.
8891
8892 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8893
8894 * tree-ssa-math-opts.c (is_mult_by): New function.
8895 (is_square_of): Use the above.
8896 (optimize_recip_sqrt): New function.
8897 (pass_cse_reciprocals::execute): Use the above.
8898
8899 2018-09-05 Richard Biener <rguenther@suse.de>
8900
8901 PR bootstrap/87134
8902 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
8903 to zero-init the emplaced vec.
8904
8905 2018-09-05 Martin Liska <mliska@suse.cz>
8906
8907 PR tree-optimization/87205
8908 * tree-switch-conversion.c (pass_lower_switch::execute):
8909 Group cases for switch statements.
8910
8911 2018-09-05 Richard Biener <rguenther@suse.de>
8912
8913 PR tree-optimization/87217
8914 * tree-ssa-sccvn.c (vuse_valueize): New.
8915 (vn_reference_lookup_pieces): Use it.
8916 (vn_reference_lookup): Likewise.
8917
8918 2018-09-05 Nathan Sidwell <nathan@acm.org>
8919
8920 PR c++/87137
8921 * stor-layout.c (place_field): Scan forwards to check last
8922 bitfield when ms_bitfield_placement is in effect.
8923
8924 2018-09-05 Richard Biener <rguenther@suse.de>
8925
8926 PR bootstrap/87225
8927 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
8928 return.
8929
8930 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
8931 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
8932
8933 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
8934 * config.gcc (extra_objs): Build it.
8935 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
8936 Likewise.
8937 * config/aarch64/aarch64-passes.def
8938 (pass_tag_collision_avoidance): New pass.
8939 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
8940 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
8941 (aarch64_classify_address): Remove static qualifier.
8942 (aarch64_address_info, aarch64_address_type): Move to...
8943 * config/aarch64/aarch64-protos.h: ... here.
8944 (make_pass_tag_collision_avoidance): New function.
8945 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
8946 New tuning flag.
8947
8948 2018-09-05 Martin Liska <mliska@suse.cz>
8949
8950 * doc/gcov.texi: Update documentation of humar
8951 readable mode.
8952 * gcov.c (format_count): Print one decimal place, it provides
8953 more fine number of situations like '1G' vs. '1.4G'.
8954
8955 2018-09-05 Martin Liska <mliska@suse.cz>
8956
8957 PR target/87164
8958 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
8959 * optc-gen.awk: Allow 'Var' for Deprecated options in order
8960 to generate a MASK value.
8961
8962 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
8963
8964 PR debug/86593
8965 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
8966 if frame pointer isn't used.
8967 (compute_frame_pointer_to_fb_displacement): Likewise.
8968
8969 2018-09-04 Jakub Jelinek <jakub@redhat.com>
8970
8971 PR target/87198
8972 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
8973 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
8974 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
8975 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
8976 and OPTION_MASK_ISA_XSAVEC_UNSET.
8977
8978 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
8979
8980 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
8981 XOR operations in NAND case.
8982
8983 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
8984
8985 * wide-int-range.cc (wide_int_range_convert): New.
8986 * wide-int-range.h (wide_int_range_convert): New.
8987 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
8988 code into wide_int_range_convert.
8989 (extract_range_into_wide_ints): Do not munge anti range constants
8990 into the entire domain. Just return the range back.
8991
8992 2018-09-04 Martin Liska <mliska@suse.cz>
8993
8994 * genmatch.c (output_line_directive): Add new argument
8995 fnargs.
8996 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
8997
8998 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
8999
9000 * doc/invoke.texi (Option Summary): Add whitespace.
9001
9002 * doc/invoke.texi (Option Summary): Add -Waligned-new.
9003
9004 2018-09-04 Richard Biener <rguenther@suse.de>
9005
9006 PR tree-optimization/87211
9007 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
9008 backedge value we're supposed to treat as VARYING also number
9009 the PHI to VARYING in case it got a different value-number already.
9010
9011 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
9012
9013 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
9014 (extract_range_from_binary_expr_1): Do not call
9015 vrp_can_optimize_bit_op.
9016 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
9017 static.
9018 (wide_int_range_get_mask_and_bounds): New.
9019 (wide_int_range_optimize_bit_op): New.
9020 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
9021 (wide_int_range_bit_and): Same.
9022 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
9023 (wide_int_range_optimize_bit_op): New.
9024 (wide_int_range_get_mask_and_bounds): New.
9025
9026 2018-09-04 Richard Biener <rguenther@suse.de>
9027
9028 PR tree-optimization/87176
9029 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
9030 variable. When value-numbering a virtual PHI node make sure
9031 to not value-number to the backedge value.
9032
9033 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
9034
9035 * doc/extend.texi (Long Long, Hex Floats): Document support for
9036 long long and hex floats in more recent versions of ISO C++.
9037
9038 2018-09-03 Richard Biener <rguenther@suse.de>
9039
9040 PR tree-optimization/87177
9041 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
9042 cleanup.
9043
9044 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9045
9046 * bb-reorder.c (edge_order): Convert to C-qsort-style
9047 tri-state comparator.
9048 (reorder_basic_blocks_simple): Change std::stable_sort to
9049 gcc_stablesort.
9050
9051 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9052
9053 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
9054 tri-state comparator.
9055 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
9056
9057 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9058
9059 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
9060 (mergesort): ... here as maximum count for using netsort.
9061 (gcc_qsort): Set nlim to 3 if stable sort is requested.
9062 (gcc_stablesort): New.
9063 * system.h (gcc_stablesort): Declare.
9064
9065 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9066
9067 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
9068 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
9069 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
9070
9071 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
9072
9073 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
9074 lxsdx and stxsdx alternatives.
9075 (*mov<mode>_hardfloat64): Ditto.
9076 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
9077
9078 2018-09-03 Richard Biener <rguenther@suse.de>
9079
9080 PR tree-optimization/87200
9081 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
9082 simplify result.
9083
9084 2018-09-03 Martin Liska <mliska@suse.cz>
9085
9086 PR tree-optimization/87201
9087 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
9088 Fix parenthesis in an expression.
9089
9090 2018-09-03 Richard Biener <rguenther@suse.de>
9091
9092 PR tree-optimization/87197
9093 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
9094 visited. CSE the VN_INFO hashtable lookup.
9095
9096 PR tree-optimization/87169
9097 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
9098 iterating make sure there's no extra backedges from irreducible
9099 regions feeding the header. Mark the destination block
9100 executable.
9101
9102 2018-09-03 Martin Liska <mliska@suse.cz>
9103
9104 PR driver/83193
9105 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
9106 * common/common-targhooks.c (default_get_valid_option_values):
9107 New function.
9108 * common/common-targhooks.h (default_get_valid_option_values):
9109 Likewise.
9110 * common/config/i386/i386-common.c: Move processor_target_table
9111 from i386.c.
9112 (ix86_get_valid_option_values): New function.
9113 (TARGET_GET_VALID_OPTION_VALUES): New macro.
9114 * config/i386/i386.c (struct ptt): Move to i386-common.c.
9115 (PTA_*): Move all defined masks into i386-common.c.
9116 (ix86_function_specific_restore): Use new processor_cost_table.
9117 * config/i386/i386.h (struct ptt): Moved from i386.c.
9118 (struct pta): Likewise.
9119 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
9120 * doc/tm.texi.in: Likewise.
9121 * opt-suggestions.c (option_proposer::suggest_option):
9122 Pass prefix to build_option_suggestions.
9123 (option_proposer::get_completions): Likewise.
9124 (option_proposer::build_option_suggestions): Use the new target
9125 hook.
9126 * opts.c (struct option_help_tuple): New struct.
9127 (print_filtered_help): Use the new target hook.
9128
9129 2018-09-03 Martin Liska <mliska@suse.cz>
9130
9131 PR middle-end/59521
9132 * predict.c (set_even_probabilities): Add likely_edges
9133 argument and handle cases where we have precisely one
9134 likely edge.
9135 (combine_predictions_for_bb): Catch also likely_edges.
9136 (tree_predict_by_opcode): Handle gswitch statements.
9137 * tree-cfg.h (find_case_label_for_value): New declaration.
9138 (find_taken_edge_switch_expr): Likewise.
9139 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
9140 Find pivot in decision tree based on probabily, not by number of
9141 nodes.
9142
9143 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
9144
9145 * doc/standards.texi (Standards): Update Objective-C reference.
9146
9147 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
9148
9149 * doc/install.texi (Prerequisites): Update link for MPC.
9150
9151 2018-09-01 Michael Matz <matz@suse.de>
9152
9153 PR tree-optimization/87074
9154 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
9155 PHIs for outer-loop uses.
9156
9157 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
9158
9159 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
9160 * doc/invoke.texi (C Dialect Options): Ditto.
9161
9162 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
9163
9164 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
9165
9166 2018-08-31 Richard Biener <rguenther@suse.de>
9167
9168 PR tree-optimization/87168
9169 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
9170 (rpo_elim::eliminate_avail): When OP was not visited it must
9171 be available.
9172
9173 2018-08-31 David Malcolm <dmalcolm@redhat.com>
9174
9175 * tree-vrp.c (copy_value_range): Convert param "from" from
9176 "value_range *" to "const value_range *".
9177 (range_is_null): Likewise for param "vr".
9178 (range_int_cst_p): Likewise.
9179 (range_int_cst_singleton_p): Likewise.
9180 (symbolic_range_p): Likewise.
9181 (value_ranges_intersect_p): Likewise for both params.
9182 (value_range_nonnegative_p): Likewise for param "vr".
9183 (value_range_constant_singleton): Likewise.
9184 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
9185 (extract_range_into_wide_ints): Likewise for param "vr".
9186 (extract_range_from_multiplicative_op): Likewise for params "vr0"
9187 and "vr1".
9188 (vrp_can_optimize_bit_op): Likewise.
9189 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
9190 "vr1_".
9191 (extract_range_from_unary_expr): Likewise.
9192 (debug_value_range): Likewise for param "vr".
9193 (value_range::dump): Add "const" qualifier.
9194 (vrp_prop::check_array_ref): Convert local "vr" from
9195 "value_range *" to "const value_range *".
9196 (vrp_prop::check_mem_ref): Likewise.
9197 (vrp_prop::visit_stmt): Likewise for local "old_vr".
9198 (vrp_intersect_ranges_1): Likewise for param "vr_1".
9199 (vrp_intersect_ranges): Likewise.
9200 (simplify_stmt_for_jump_threading): Likewise for local "vr".
9201 (vrp_prop::vrp_finalize): Likewise.
9202 * tree-vrp.h (value_range::dump): Add "const" qualifier.
9203 (vrp_intersect_ranges): Add "const" qualifier to params as above.
9204 (extract_range_from_unary_expr): Likewise.
9205 (value_range_constant_singleton): Likewise.
9206 (symbolic_range_p): Likewise.
9207 (copy_value_range): Likewise.
9208 (extract_range_from_binary_expr_1): Likewise.
9209 (range_int_cst_p): Likewise.
9210 (vrp_set_zero_nonzero_bits): Likewise.
9211 (range_int_cst_singleton_p): Likewise.
9212
9213 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
9214
9215 * config/aarch64/arm_neon.h (vabsd_s64): New.
9216 (vnegd_s64): Likewise.
9217
9218 2018-08-31 Martin Jambor <mjambor@suse.cz>
9219
9220 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
9221
9222 2018-08-31 Martin Liska <mliska@suse.cz>
9223
9224 * ipa-icf.c (sem_item::add_type): Use
9225 sem_item::m_type_hash_cache.
9226 * ipa-icf.h: Move the cache from sem_item_optimizer
9227 to sem_item.
9228
9229 2018-08-31 Nathan Sidwell <nathan@acm.org>
9230
9231 * doc/extend.texi (Backwards Compatibility): Remove implicit
9232 extern C leeway of () being (...).
9233
9234 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9235
9236 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
9237
9238 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
9239
9240 PR target/86684
9241 PR target/87149
9242 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
9243
9244 2018-08-31 Jakub Jelinek <jakub@redhat.com>
9245
9246 PR middle-end/87138
9247 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
9248 gen_int_mode. Formatting fixes.
9249
9250 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
9251
9252 * target.def (custom_function_descriptors): Improve documentation.
9253 * doc/tm.texi.in (Trampolines): Expand discussion of function
9254 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
9255 beginning of the section.
9256 * doc/tm.texi: Regenerated.
9257
9258 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
9259
9260 * cfg.h (class auto_edge_flag): Spell out the template-id of the
9261 base class in the initializer list. This is a workaround for
9262 building with older GCC.
9263 (class auto_bb_flag): Likewise.
9264
9265 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
9266
9267 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
9268 (altivec_vcmpequ<VI_char>_p): Remove star.
9269 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
9270 vector load modes.
9271 (expand_strncmp_vec_sequence): New function.
9272 (emit_final_str_compare_vec): New function.
9273 (expand_strn_compare): Add support for vector strncmp.
9274 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
9275 length specification to bytes.
9276 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
9277 (vcmpnezb_p): New pattern.
9278 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
9279 for option -mstring-compare-inline-limit.
9280
9281 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
9282
9283 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
9284 (PTA_SKYLAKE): Add PTA_AES.
9285 (PTA_GOLDMONT): Likewise.
9286
9287 2018-08-29 Jan Hubicka <jh@suse.cz>
9288
9289 PR lto/86517
9290 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
9291 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
9292
9293 2018-08-29 Jan Hubicka <jh@suse.cz>
9294
9295 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
9296 TYPE_STUB_DECL.
9297 (hash_tree): Do not visit TYPE_STUB_DECL.
9298 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
9299 stream TYPE_STUB_DECL.
9300 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
9301 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
9302 after free_lang_data.
9303 (type_in_anonymous_namespace_p): Likewise.
9304
9305 2018-08-29 Jan Hubicka <jh@suse.cz>
9306
9307 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
9308 comment that it has to be even number.
9309 (class sreal): Change m_sig type to int32_t.
9310 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
9311 int64_t for temporary calculations.
9312 (sreal_verify_basics): Drop one bit from minimum and maximum.
9313
9314 2018-08-30 Richard Biener <rguenther@suse.de>
9315
9316 PR tree-optimization/87147
9317 * tree-ssa-sccvn.c (SSA_VISITED): New function.
9318 (visit_phi): When the degenerate result is from the backedge and
9319 we didn't visit its definition yet drop to VARYING.
9320 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
9321
9322 2018-08-29 Jan Hubicka <jh@suse.cz>
9323
9324 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
9325 DECL_VINDEX.
9326 (hash_tree): Likewise.
9327
9328 2018-08-29 Jan Hubicka <jh@suse.cz>
9329
9330 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
9331 and TYPE_NEXT_REF_TO.
9332
9333 2018-08-29 Jan Hubicka <jh@suse.cz>
9334
9335 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
9336 comment that it has to be even number.
9337 (class sreal): Change m_sig type to int32_t.
9338 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
9339 int64_t for temporary calculations.
9340 (sreal_verify_basics): Drop one bit from minimum and maximum.
9341
9342 2018-08-30 Tamar Christina <tamar.christina@arm.com>
9343
9344 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
9345
9346 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
9347
9348 PR middle-end/86995
9349 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
9350 if to_add is negative.
9351
9352 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
9353
9354 PR middle-end/87053
9355 * builtins.c (c_strlen): Improve range checks.
9356
9357 2018-08-29 Martin Sebor <msebor@redhat.com>
9358 Jeff Law <law@redhat.com>
9359
9360 PR tree-optimization/86714
9361 PR tree-optimization/86711
9362 * builtins.c (c_strlen): Add arguments to call to string_constant.
9363 * expr.c (string_constant): Add argument. Detect missing nul
9364 terminator and outermost declaration it's missing in.
9365 * expr.h (string_constant): Add argument.
9366 * fold-const.c (read_from_constant_string): Add arguments to call to
9367 string_constant.
9368 (c_getstr): Likewise.
9369 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
9370 to string_constant.
9371 * tree-ssa-strlen.c (get_stridx): Likewise.
9372
9373 2018-08-29 Jan Hubicka <jh@suse.cz>
9374
9375 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
9376 Do not stream DECL_VINDEX.
9377 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
9378 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
9379 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
9380
9381 2018-08-29 Richard Biener <rguenther@suse.de>
9382
9383 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
9384 virtual operands that are not default defs to honor region
9385 boundaries.
9386 (rpo_vn_valueize): Remove ineffective code here.
9387
9388 2018-08-29 Richard Biener <rguenther@suse.de>
9389
9390 PR tree-optimization/87132
9391 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
9392 when skipping defs reachable over backedges.
9393
9394 2018-08-29 Richard Biener <rguenther@suse.de>
9395
9396 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
9397 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
9398 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
9399 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
9400 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
9401 (vn_reference_lookup_3): Remove use of const_parms.
9402 (free_rpo_vn): Do not free const_parms.
9403 (do_rpo_vn): Do not call init_const_parms.
9404 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
9405 SSA_NAME_POINTS_TO_READONLY_MEMORY.
9406 (call_may_clobber_ref_p_1): Likewise.
9407
9408 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
9409
9410 PR other/86726
9411 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
9412 (-O): Ditto.
9413 (-ftree-scev-cprop): Document.
9414
9415 2018-08-29 Jan Hubicka <jh@suse.cz>
9416
9417 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
9418 parameters.
9419 (sreal constructor): Update.
9420 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
9421 sreal:operator/): Update.
9422
9423 2018-08-29 Martin Liska <mliska@suse.cz>
9424
9425 * tree-switch-conversion.c (switch_conversion::expand):
9426 Strenghten assumption about gswitch statements.
9427
9428 2018-08-29 Richard Biener <rguenther@suse.de>
9429
9430 PR tree-optimization/87117
9431 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
9432 re-value-number released SSA VDEFs.
9433
9434 2018-08-29 Richard Biener <rguenther@suse.de>
9435
9436 PR tree-optimization/87126
9437 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
9438
9439 2018-08-28 Jim Wilson <jimw@sifive.com>
9440
9441 * config/riscv/pic.md: Rewrite.
9442 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
9443 invalid address.
9444 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
9445 (SOFTF, default_load, softload, softstore): New.
9446
9447 2018-08-28 Jeff Law <law@redhat.com>
9448
9449 * fold-const.c (fold_binary_loc): Remove recently added assert.
9450
9451 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
9452
9453 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
9454 to OP parmeter of generated function.
9455
9456 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
9457
9458 PR tree-optimization/87009
9459 * match.pd: Add boolean optimizations.
9460
9461 2018-08-28 Martin Sebor <msebor@redhat.com>
9462
9463 PR middle-end/86631
9464 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
9465 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
9466 (pass_walloca::gate): Use it.
9467 (alloca_call_type): Same.
9468 (pass_walloca::execute): Same.
9469 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
9470
9471 2018-08-28 David Malcolm <dmalcolm@redhat.com>
9472
9473 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
9474 GCC_VERSION for usage of "__gcc_dump_printf__" format from
9475 >= 3005 to >= 9000.
9476
9477 2018-08-28 Richard Biener <rguenther@suse.de>
9478
9479 PR tree-optimization/87124
9480 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
9481 constants before looking up avail.
9482
9483 2018-08-28 Jakub Jelinek <jakub@redhat.com>
9484
9485 PR middle-end/87099
9486 * calls.c (maybe_warn_nonstring_arg): Punt early if
9487 warn_stringop_overflow is zero. Don't call get_range_strlen
9488 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
9489 Swap comparison operands to have constants on rhs. Only use
9490 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
9491 increment lenrng[0].
9492
9493 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
9494
9495 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
9496 use of tree_to_shwi. Remove duplicated test for the size being
9497 a whole number of bytes.
9498
9499 2018-08-28 Richard Biener <rguenther@suse.de>
9500
9501 PR tree-optimization/87117
9502 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
9503 Handle removed stmt without LHS (GIMPLE_NOP).
9504
9505 2018-08-28 Richard Biener <rguenther@suse.de>
9506
9507 PR tree-optimization/87117
9508 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
9509 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
9510
9511 2018-08-28 Richard Biener <rguenther@suse.de>
9512
9513 PR tree-optimization/87117
9514 * tree-ssa-pre.c (compute_avail): Do not make expressions
9515 with predicated values available.
9516 (get_expr_value_id): Assert we do not run into predicated value
9517 expressions.
9518
9519 2018-08-28 Richard Biener <rguenther@suse.de>
9520
9521 PR tree-optimization/87117
9522 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
9523 get virtual operands.
9524 (get_expr_operands): Handle STRING_CST like other decls.
9525
9526 2018-08-28 Martin Liska <mliska@suse.cz>
9527
9528 * tree.h: Update documentation of fndecl_built_in_p
9529 functions.
9530
9531
9532 2018-08-27 Jeff Law <law@redhat.com>
9533 PR tree-optimization/87110
9534 * tree-ssa-dse.c (compute_trims): Handle non-constant
9535 TYPE_SIZE_UNIT.
9536
9537 2018-08-27 Martin Sebor <msebor@redhat.com>
9538
9539 PR tree-optimization/86914
9540 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
9541
9542 2018-08-27 Martin Sebor <msebor@redhat.com>
9543
9544 PR tree-optimization/87112
9545 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
9546 the type of the bound argument.
9547
9548 2018-08-27 Jeff Law <law@redhat.com>
9549
9550 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
9551 type does not have a TYPE_SIZE_UNIT.
9552
9553 2018-08-27 Steve Ellcey <sellcey@cavium.com>
9554
9555 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
9556 with include of backend.h.
9557
9558 2018-08-27 Richard Biener <rguenther@suse.de>
9559
9560 PR tree-optimization/86927
9561 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
9562 use const cond reduction code.
9563
9564 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
9565
9566 PR tree-optimization/85758
9567 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
9568
9569 2018-08-27 David Malcolm <dmalcolm@redhat.com>
9570
9571 PR c++/87091
9572 * diagnostic-show-locus.c (class layout_range): Update for
9573 conversion of show_caret_p to a tri-state.
9574 (layout_range::layout_range): Likewise.
9575 (make_range): Likewise.
9576 (layout::maybe_add_location_range): Likewise.
9577 (layout::should_print_annotation_line_p): Don't show annotation
9578 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
9579 (layout::get_state_at_point): Update for conversion of
9580 show_caret_p to a tri-state. Bail out early for
9581 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
9582 underlining or source colorization.
9583 (gcc_rich_location::add_location_if_nearby): Update for conversion
9584 of show_caret_p to a tri-state.
9585 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
9586 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
9587 Likewise.
9588 (selftest::test_one_liner_labels): Likewise.
9589 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
9590 conversion of show_caret_p to a tri-state.
9591 * pretty-print.c (text_info::set_location): Likewise.
9592 * pretty-print.h (text_info::set_location): Likewise.
9593 * substring-locations.c (format_warning_n_va): Likewise.
9594 * tree-diagnostic.c (default_tree_printer): Likewise.
9595 * tree-pretty-print.c (newline_and_indent): Likewise.
9596
9597 2018-08-27 David Malcolm <dmalcolm@redhat.com>
9598
9599 PR c++/87091
9600 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
9601 line above for line-insertion fix-it hints.
9602 (selftest::test_fixit_insert_containing_newline): Update the
9603 expected results, and add a test with line-numbering enabled.
9604
9605 2018-08-27 Martin Liska <mliska@suse.cz>
9606
9607 PR sanitizer/86962
9608 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
9609 params with DECL_HAS_VALUE_EXPR_P.
9610
9611 2018-08-27 Martin Liska <mliska@suse.cz>
9612
9613 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
9614 selected expansion strategy.
9615
9616 2018-08-27 Martin Liska <mliska@suse.cz>
9617
9618 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
9619 * builtins.c (is_builtin_fn): Likewise.
9620 * attribs.c (diag_attr_exclusions): Use new function
9621 fndecl_built_in_p and remove check for FUNCTION_DECL if
9622 possible.
9623 (builtin_mathfn_code): Likewise.
9624 (fold_builtin_expect): Likewise.
9625 (fold_call_expr): Likewise.
9626 (fold_builtin_call_array): Likewise.
9627 (fold_call_stmt): Likewise.
9628 (set_builtin_user_assembler_name): Likewise.
9629 (is_simple_builtin): Likewise.
9630 * calls.c (gimple_alloca_call_p): Likewise.
9631 (maybe_warn_nonstring_arg): Likewise.
9632 * cfgexpand.c (expand_call_stmt): Likewise.
9633 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
9634 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
9635 (cgraph_node::verify_node): Likewise.
9636 * cgraphclones.c (build_function_decl_skip_args): Likewise.
9637 (cgraph_node::create_clone): Likewise.
9638 * config/arm/arm.c (arm_insert_attributes): Likewise.
9639 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
9640 * dse.c (scan_insn): Likewise.
9641 * expr.c (expand_expr_real_1): Likewise.
9642 * fold-const.c (operand_equal_p): Likewise.
9643 (fold_binary_loc): Likewise.
9644 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
9645 * gimple-low.c (lower_stmt): Likewise.
9646 * gimple-pretty-print.c (dump_gimple_call): Likewise.
9647 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
9648 Likewise.
9649 * gimple.c (gimple_build_call_from_tree): Likewise.
9650 (gimple_call_builtin_p): Likewise.
9651 (gimple_call_combined_fn): Likewise.
9652 * gimplify.c (gimplify_call_expr): Likewise.
9653 (gimple_boolify): Likewise.
9654 (gimplify_modify_expr): Likewise.
9655 (gimplify_addr_expr): Likewise.
9656 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
9657 * ipa-cp.c (determine_versionability): Likewise.
9658 * ipa-fnsummary.c (compute_fn_summary): Likewise.
9659 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
9660 * ipa-split.c (visit_bb): Likewise.
9661 (split_function): Likewise.
9662 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9663 * lto-cgraph.c (input_node): Likewise.
9664 * lto-streamer-out.c (write_symbol): Likewise.
9665 * omp-low.c (setjmp_or_longjmp_p): Likewise.
9666 (lower_omp_1): Likewise.
9667 * predict.c (strip_predict_hints): Likewise.
9668 * print-tree.c (print_node): Likewise.
9669 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
9670 * trans-mem.c (is_tm_irrevocable): Likewise.
9671 (is_tm_load): Likewise.
9672 (is_tm_simple_load): Likewise.
9673 (is_tm_store): Likewise.
9674 (is_tm_simple_store): Likewise.
9675 (is_tm_abort): Likewise.
9676 (tm_region_init_1): Likewise.
9677 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
9678 * tree-cfg.c (verify_gimple_call): Likewise.
9679 (move_stmt_r): Likewise.
9680 (stmt_can_terminate_bb_p): Likewise.
9681 * tree-eh.c (lower_eh_constructs_2): Likewise.
9682 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
9683 * tree-inline.c (remap_gimple_stmt): Likewise.
9684 (copy_bb): Likewise.
9685 (estimate_num_insns): Likewise.
9686 (fold_marked_statements): Likewise.
9687 * tree-sra.c (scan_function): Likewise.
9688 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
9689 (optimize_stack_restore): Likewise.
9690 (pass_fold_builtins::execute): Likewise.
9691 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
9692 (mark_all_reaching_defs_necessary_1): Likewise.
9693 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
9694 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
9695 (pass_forwprop::execute): Likewise.
9696 * tree-ssa-loop-im.c (stmt_cost): Likewise.
9697 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
9698 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
9699 * tree-ssa-strlen.c (get_string_length): Likewise.
9700 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
9701 (find_func_aliases_for_call): Likewise.
9702 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
9703 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
9704 * tree-tailcall.c (find_tail_calls): Likewise.
9705 * tree.c (need_assembler_name_p): Likewise.
9706 (free_lang_data_in_decl): Likewise.
9707 (get_call_combined_fn): Likewise.
9708 * ubsan.c (is_ubsan_builtin_p): Likewise.
9709 * varasm.c (incorporeal_function_p): Likewise.
9710 * tree.h (DECL_BUILT_IN): Remove and replace with
9711 fndecl_built_in_p.
9712 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
9713 (fndecl_built_in_p): New.
9714
9715 2018-08-27 Martin Liska <mliska@suse.cz>
9716
9717 PR tree-optimization/86847
9718 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
9719 Dump also subtree probability.
9720 (switch_decision_tree::do_jump_if_equal): New function.
9721 (switch_decision_tree::emit_case_nodes): Handle special
9722 situations in balanced tree that can be emitted much simpler.
9723 Fix calculation of probabilities that happen in tree expansion.
9724 * tree-switch-conversion.h (struct cluster): Add
9725 is_single_value_p.
9726 (struct simple_cluster): Likewise.
9727 (struct case_tree_node): Add new function has_child.
9728 (do_jump_if_equal): New.
9729
9730 2018-08-27 Martin Liska <mliska@suse.cz>
9731
9732 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
9733 Add new argument to bit_test_cluster constructor.
9734 (bit_test_cluster::emit): Set bits really number of values
9735 handlel by a test.
9736 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
9737 probability argument.
9738 * tree-switch-conversion.h (struct bit_test_cluster):
9739 Add m_handles_entire_switch.
9740
9741 2018-08-27 Martin Liska <mliska@suse.cz>
9742
9743 PR tree-optimization/86702
9744 * tree-switch-conversion.c (jump_table_cluster::emit):
9745 Make probabilities even for values in jump table
9746 according to number of cases handled.
9747 (switch_decision_tree::compute_cases_per_edge): Pass
9748 argument to reset_out_edges_aux function.
9749 (switch_decision_tree::analyze_switch_statement): Likewise.
9750 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
9751 Make it static.
9752
9753 2018-08-27 Martin Liska <mliska@suse.cz>
9754
9755 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
9756 cfun argument explicitly.
9757 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
9758 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
9759 function gimple_switch_default_bb.
9760 (convert_switch_statements):
9761 (expand_builtins):
9762 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
9763 * stmt.c (label_to_block_fn): Use label_to_block and pass
9764 cfun argument explicitly and use gimple_switch_label_bb.
9765 (expand_case): Likewise.
9766 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
9767 cfun argument explicitly. Likewise.
9768 (make_edges_bb): Likewise.
9769 (make_cond_expr_edges): Likewise.
9770 (get_cases_for_edge): Likewise.
9771 (make_gimple_switch_edges): Likewise.
9772 (label_to_block_fn): Likewise.
9773 (label_to_block): Likewise.
9774 (make_goto_expr_edges): Likewise.
9775 (make_gimple_asm_edges): Likewise.
9776 (main_block_label): Likewise.
9777 (group_case_labels_stmt): Likewise.
9778 (find_taken_edge_computed_goto): Likewise.
9779 (find_taken_edge_switch_expr): Likewise.
9780 (gimple_verify_flow_info): Likewise.
9781 (gimple_redirect_edge_and_branch): Likewise.
9782 (gimple_switch_label_bb): New function.
9783 (gimple_switch_default_bb): Likewise.
9784 (gimple_switch_edge): Likewise.
9785 (gimple_switch_default_edge): Likewise.
9786 * tree-cfg.h (label_to_block_fn): Remove and replace ...
9787 (label_to_block): ... with this.
9788 (gimple_switch_label_bb): New.
9789 (gimple_switch_default_bb): Likewise.
9790 (gimple_switch_edge): Likewise.
9791 (gimple_switch_default_edge): Likewise.
9792 * tree-cfgcleanup.c (convert_single_case_switch): Use
9793 new gimple functions and pass new argument to label_to_block.
9794 (cleanup_control_flow_bb):
9795 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
9796 cfun argument explicitly.
9797 (make_eh_edges): Likewise.
9798 (redirect_eh_dispatch_edge): Likewise.
9799 (lower_resx): Likewise.
9800 (lower_eh_dispatch): Likewise.
9801 (maybe_remove_unreachable_handlers): Likewise.
9802 (unsplit_eh): Likewise.
9803 (cleanup_empty_eh): Likewise.
9804 (verify_eh_edges): Likewise.
9805 (verify_eh_dispatch_edge): Likewise.
9806 * tree-ssa-dom.c (record_edge_info): Likewise.
9807 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
9808 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
9809 (thread_through_normal_block): Likewise.
9810 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
9811 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
9812 * tree-switch-conversion.c (switch_conversion::collect): Use new
9813 gimple functions.
9814 (switch_conversion::check_final_bb): Likewise.
9815 (switch_conversion::gather_default_values): Pass new argument
9816 to label_to_block.
9817 (switch_conversion::build_constructors): Likewise.
9818 (switch_decision_tree::compute_cases_per_edge): Use new
9819 gimple_switch_edge function.
9820 (switch_decision_tree::analyze_switch_statement): Pass new argument
9821 to label_to_block.
9822 (switch_decision_tree::try_switch_expansion): Use
9823 gimple_switch_default_edge.
9824 * tree-vrp.c (find_switch_asserts): Pass new argument
9825 to label_to_block.
9826 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
9827 (vr_values::simplify_switch_using_ranges): Likewise.
9828
9829 2018-08-27 Richard Biener <rguenther@suse.de>
9830
9831 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
9832 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
9833
9834 * tree-ssa-sccvn.h (struct vn_pval): New structure.
9835 (struct vn_nary_op_s): Add unwind_to member. Add
9836 predicated_values flag and put result into a union together
9837 with a linked list of vn_pval.
9838 (struct vn_ssa_aux): Add name member to make maintaining
9839 a map of SSA name to vn_ssa_aux possible. Remove no longer
9840 needed info, dfsnum, low, visited, on_sccstack, use_processed
9841 and range_info_anti_range_p members.
9842 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
9843 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
9844 New functions.
9845 (vn_valueize): New global.
9846 (vn_context_bb): Likewise.
9847 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
9848 VN_INFO_PTR_INFO): Remove.
9849 * tree-ssa-sccvn.c: ... (rewrite)
9850 (pass_fre::execute): For -O2+ initialize loops and run
9851 RPO VN in optimistic mode (iterating). For -O1 and -Og
9852 run RPO VN in non-optimistic mode.
9853 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
9854 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
9855 * doc/invoke.texi (sccvn-max-scc-size): Remove.
9856 (rpo-vn-max-loop-depth): Document.
9857 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
9858 when valuezing the VUSE signals we walked out of the region.
9859 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
9860 (phi_translate): Set VN context block to use for availability
9861 lookup.
9862 (compute_avail): Likewise.
9863 (pre_valueize): New function.
9864 (pass_pre::execute): Adjust to the RPO VN API.
9865
9866 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
9867 (propagate_constants_for_unrolling): Remove.
9868 (tree_unroll_loops_completely): Perform value-numbering
9869 on the unrolled bodies loop parent.
9870
9871 2018-08-27 Richard Biener <rguenther@suse.de>
9872
9873 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
9874 for partial antic compute.
9875
9876 2018-08-27 Jakub Jelinek <jakub@redhat.com>
9877
9878 PR rtl-optimization/87065
9879 * combine.c (simplify_if_then_else): Formatting fix.
9880 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
9881 check.
9882 (known_cond): Don't return const_true_rtx for vector modes. Use
9883 CONST0_RTX instead of const0_rtx. Formatting fixes.
9884
9885 2018-08-27 Martin Liska <mliska@suse.cz>
9886
9887 PR gcov-profile/87069
9888 * gcov.c (process_file): Record files already processed
9889 and warn about a file being processed multiple times.
9890
9891 2018-08-27 Martin Liska <mliska@suse.cz>
9892
9893 PR driver/83193
9894 * config/aarch64/aarch64.c (aarch64_override_options_internal):
9895 Set default values for x_aarch64_*_string strings.
9896 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
9897 prefix. For -mabi do not print '=ABI' in help and use
9898 <option_value> format for -msve-vector-bits and -moverride
9899 options.
9900
9901 2018-08-26 Jeff Law <law@redhat.com>
9902
9903 * config/mips/frame-header-opt.c: Include "backend.h" rather than
9904 "cfg.h"
9905
9906 2018-08-26 Marek Polacek <polacek@redhat.com>
9907
9908 PR c++/87029, Implement -Wredundant-move.
9909 * doc/invoke.texi: Document -Wredundant-move.
9910
9911 2018-08-25 Martin Sebor <msebor@redhat.com>
9912
9913 PR tree-optimization/87059
9914 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
9915 to the same type as the other.
9916 * fold-const.c (fold_binary_loc): Assert expectation.
9917
9918 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
9919
9920 * config/darwin.c (machopic_legitimize_pic_address): Clean up
9921 extraneous parentheses, dead code section and formatting.
9922
9923 2018-08-24 David Malcolm <dmalcolm@redhat.com>
9924
9925 PR c++/87091
9926 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
9927 wide enough for jumps in the line-numbering to be visible.
9928 (layout::print_gap_in_line_numbering): New member function.
9929 (layout::calculate_line_spans): When using line numbering, merge
9930 line spans that are only 1 line apart.
9931 (diagnostic_show_locus): When printing line numbers, show gaps in
9932 line numbering directly, rather than printing headers.
9933 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
9934 line-numbering with multiple line spans.
9935 (selftest::test_fixit_insert_containing_newline_2): Add test of
9936 line-numbering, in which the spans are close enough to be merged.
9937
9938 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
9939
9940 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
9941 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
9942 * tree-vrp.c (range_is_nonnull): Remove.
9943 (range_includes_zero_p): Accept value_range instead of min/max.
9944 (extract_range_from_binary_expr_1): Do not early bail on
9945 POINTER_PLUS_EXPR.
9946 Use range_includes_zero_p instead of range_is_nonnull.
9947 (extract_range_from_unary_expr): Use range_includes_zero_p instead
9948 of range_is_nonnull.
9949 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
9950 special case VR_ANTI_RANGE.
9951 (vrp_finalize): Same.
9952 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
9953 instead of min/max.
9954 (range_is_nonnull): Remove.
9955 * vr-values.c (vrp_stmt_computes_nonzero): Use
9956 range_includes_zero_p instead of range_is_nonnull.
9957 (extract_range_basic): Pass value_range to range_includes_zero_p
9958 instead of range_is_nonnull.
9959
9960 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
9961
9962 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
9963 * emit-rtl.h (rtl_data): Remove return_bnd.
9964 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
9965 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
9966 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
9967 (POINTER_BOUNDS_MODE): Remove definition.
9968 (make_pointer_bounds_mode): Remove.
9969 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
9970 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
9971 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
9972 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
9973 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
9974 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
9975 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
9976
9977 * config/i386/i386-modes.def (BND32, BND64): Remove.
9978 * config/i386/i386.c (dbx_register_map): Remove bound registers.
9979 (dbx64_register_map): Ditto.
9980 (svr4_dbx_register_map): Ditto.
9981 (indirect_thunk_bnd_needed): Remove.
9982 (indirect_thunks_bnd_used): Ditto.
9983 (indirect_return_bnd_needed): Ditto.
9984 (indirect_return_via_cx_bnd): Ditto.
9985 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
9986 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
9987 (output_indirect_thunk): Ditto. Remove need_prefix argument.
9988 (output_indirect_thunk_function): Remove handling of
9989 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
9990 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
9991 (ix86_save_reg): Remove handling of crtl->return_bnd.
9992 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
9993 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
9994 and UNSPEC_BNDLX_ADDR.
9995 (ix86_output_indirect_branch_via_reg): Remove handling of
9996 indirect_thunk_prefix_bnd.
9997 (ix86_output_indirect_branch_via_push): Ditto.
9998 (ix86_output_function_return): Ditto.
9999 (ix86_output_indirect_function_return): Ditto.
10000 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
10001 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
10002 (CALL_USED_REGISTERS): Ditto.
10003 (REG_ALLOC_ORDER): Update for removal of bound registers.
10004 (HI_REGISTER_NAMES): Ditto.
10005 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
10006 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
10007 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
10008 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
10009 (FIRST_PSEUDO_REG): Update.
10010 (BND): Remove mode iterator.
10011 * config/i386/predicates.md (bnd_mem_operator): Remove.
10012
10013 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
10014
10015 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
10016 vectors.
10017
10018 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
10019
10020 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
10021 the case in which the permute needs only a single element and
10022 repeats for every vector of the result. Extend that case to
10023 handle variable-length vectors.
10024 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10025
10026 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
10027
10028 PR debug/79342
10029 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
10030 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
10031
10032 2018-08-24 Richard Biener <rguenther@suse.de>
10033
10034 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
10035 bb_flags_allocated members.
10036 (auto_flag): New RAII class for allocating flags.
10037 (auto_edge_flag): New RAII class for allocating edge flags.
10038 (auto_bb_flag): New RAII class for allocating bb flags.
10039 * cfgloop.c (verify_loop_structure): Allocate temporary edge
10040 flag dynamically.
10041 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
10042 in favor of temporarily allocated BB flag.
10043 * hsa-brig.c: Re-order includes.
10044 * hsa-dump.c: Likewise.
10045 * hsa-regalloc.c: Likewise.
10046 * print-rtl.c: Likewise.
10047 * profile-count.c: Likewise.
10048
10049 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
10050
10051 PR target/86989
10052 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
10053 the TOC register.
10054
10055 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
10056
10057 PR 87073/bootstrap
10058 * wide-int-range.cc (wide_int_range_div): Do not ignore result
10059 from wide_int_range_multiplicative_op.
10060
10061 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10062
10063 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
10064 "permutaion".
10065
10066 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
10067
10068 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
10069 to 'expanded'.
10070
10071 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
10072
10073 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
10074 full GENERIC expression used for replacement.
10075
10076 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
10077
10078 * tree-vrp.c (abs_extent_range): Remove.
10079 (extract_range_into_wide_ints): Pass wide ints by reference.
10080 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
10081 Pass wide ints by reference in all calls to
10082 extract_range_into_wide_ints.
10083 * wide-int-range.cc (wide_int_range_div): New.
10084 * wide-int-range.h (wide_int_range_div): New.
10085 (wide_int_range_includes_zero_p): New.
10086 (wide_int_range_zero_p): New.
10087
10088 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
10089
10090 * config/aarch64/aarch64.md (arches): New enum.
10091 (arch): New enum attr.
10092 (arch_enabled): New attr.
10093 (enabled): Now uses arch_enabled only.
10094 (simd, sve, fp16): Removed attribute.
10095 (fp): Attr now defined in terms of 'arch'.
10096 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
10097 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
10098 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
10099 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
10100 attributes into 'arch'.
10101 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
10102 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
10103 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
10104 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
10105 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
10106 'simd' attribute into 'arch'.
10107 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
10108 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
10109 Convert use of 'fp' attribute to 'arch'.
10110 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
10111 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
10112 into 'arch'.
10113 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
10114 (different modes) Merge 'fp' and 'simd' into 'arch'.
10115 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
10116 'simd' into 'arch'.
10117
10118 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
10119
10120 PR rtl-optimization/87026
10121 * expmed.c (canonicalize_comparison): If we can no longer create
10122 pseudoregisters, don't.
10123
10124 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
10125
10126 PR target/86951
10127 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
10128 prototype.
10129 * config/arm/arm.c (speculation_barrier_libfunc): New static
10130 variable.
10131 (arm_init_libfuncs): Initialize it.
10132 (arm_emit_speculation_barrier): New function.
10133 * config/arm/arm.md (speculation_barrier): Call
10134 arm_emit_speculation_barrier for architectures that do not have
10135 DSB or ISB.
10136 (speculation_barrier_insn): Only match on Armv7 or later.
10137
10138 2018-08-23 Richard Biener <rguenther@suse.de>
10139
10140 PR middle-end/87024
10141 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
10142 calls.
10143
10144 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
10145
10146 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
10147 of single-vector TBLs.
10148 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
10149 one input is given.
10150
10151 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
10152
10153 PR target/85910
10154 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
10155 aarch64_evpc_tbl guard.
10156
10157 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
10158
10159 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
10160 behaviour.
10161
10162 2018-08-22 Martin Sebor <msebor@redhat.com>
10163
10164 PR middle-end/87052
10165 * tree-pretty-print.c (pretty_print_string): Add argument.
10166 (dump_generic_node): Call to pretty_print_string with string size.
10167
10168 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
10169
10170 PR rtl-optimization/86771
10171 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
10172 of two SETs into those two SETs, one to be placed at i2, if that SETs
10173 destination is modified between i2 and i3.
10174
10175 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
10176
10177 PR tree-optimization/86725
10178 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
10179 function.
10180 (vect_analyze_scalar_cycles_1): Check it.
10181
10182 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
10183
10184 PR tree-optimization/86725
10185 * tree-vect-loop.c (vect_is_simple_reduction): When treating
10186 an outer loop phi as a double reduction, make sure that the
10187 single user of the phi result is an inner loop phi.
10188
10189 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
10190
10191 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
10192 grouped stores with gaps to a strided group.
10193
10194 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
10195
10196 * tree-vect-stmts.c (get_group_load_store_type)
10197 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
10198 first statement in a group.
10199
10200 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
10201
10202 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
10203 the sequence used in gcc/gcc.c.
10204
10205 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
10206
10207 PR other/704
10208 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
10209 building it.
10210
10211 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
10212
10213 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
10214 Darwin10-specific unwinder-shim.
10215 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
10216 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
10217 New to cater for Darwin10 Rosetta.
10218
10219 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
10220
10221 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
10222 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
10223
10224 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
10225
10226 PR bootstrap/81033
10227 PR target/81733
10228 PR target/52795
10229 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
10230 (dwarf2out_switch_text_section): Generate a local label for the
10231 second function sub-section and apply it as the second FDE start
10232 label.
10233 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
10234 second sub-section start.
10235
10236 2018-08-22 Richard Biener <rguenther@suse.de>
10237
10238 PR tree-optimization/86988
10239 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
10240
10241 2018-08-22 Richard Biener <rguenther@suse.de>
10242
10243 PR tree-optimization/86945
10244 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
10245
10246 2018-08-22 Alexandre Oliva <oliva@adacore.com>
10247
10248 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
10249 a comment about how uses of r2 for .sdata2 come about.
10250
10251 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
10252
10253 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
10254
10255 2018-08-21 Marek Polacek <polacek@redhat.com>
10256
10257 PR c++/86981, Implement -Wpessimizing-move.
10258 * doc/invoke.texi: Document -Wpessimizing-move.
10259
10260 2018-08-21 Jan Hubicka <jh@suse.cz>
10261
10262 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
10263 * tree.h (is_redundant_typedef): Remove.
10264 * dwarf2out.c (is_redundant_typedef): Turn into static function.
10265
10266 2018-08-21 Jan Hubicka <jh@suse.cz>
10267
10268 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
10269 when possible.
10270
10271 2018-08-21 Tamar Christina <tamar.christina@arm.com>
10272
10273 * expmed.c (extract_low_bits): Reject invalid subregs early.
10274
10275 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
10276
10277 PR middle-end/86121
10278 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
10279 behaviour.
10280
10281 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
10282
10283 * config/vxworks.h: Guard vxworks_asm_out_constructor and
10284 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
10285 * config/vxworks.c: Likewise.
10286
10287 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
10288
10289 * config/vxworks.c: Set targetm.have_ctors_dtors
10290 if HAVE_INITFINI_ARRAY_SUPPORT.
10291 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
10292 if HAVE_INITFINI_ARRAY_SUPPORT.
10293
10294 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
10295
10296 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
10297 default search path for VxWorks < 7.
10298
10299 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
10300
10301 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
10302 (get_format_string): Refer to c_getstr.
10303
10304 2018-08-21 Tom de Vries <tdevries@suse.de>
10305
10306 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
10307 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
10308 (debuginfo_early_stop): Declare.
10309 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
10310 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
10311 (debuginfo_early_stop): New function.
10312 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
10313 and debuginfo_early_stop.
10314 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
10315 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
10316 (general_init): Call debuginfo_early_init.
10317 (finalize): Call debuginfo_fini.
10318 (do_compile): Call debuginfo_init.
10319 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
10320 -fdump-early-debug.
10321 (@item -fdump-debug, @item -fdump-earlydebug): Add.
10322
10323 2018-08-21 Tom de Vries <tdevries@suse.de>
10324
10325 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
10326 flag_dump_noaddr and flag_dump_unnumbered.
10327
10328 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
10329
10330 * wide-int-range.cc (wide_int_range_abs): New.
10331 (wide_int_range_order_set): Rename from wide_int_range_min_max.
10332 * wide-int-range.h (wide_int_range_abs): New.
10333 (wide_int_range_min_max): New.
10334 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
10335 case to call wide_int_range_abs.
10336 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
10337 (extract_range_from_abs_expr): Delete.
10338
10339 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
10340
10341 PR target/87033
10342 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
10343 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
10344 for indexed loads.
10345
10346 2018-08-20 Nathan Sidwell <nathan@acm.org>
10347 Jeff Law <law@redhat.com>
10348
10349 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
10350 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
10351
10352 2018-08-20 David Malcolm <dmalcolm@redhat.com>
10353
10354 PR other/84889
10355 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
10356 (decl_attributes): Likewise.
10357 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
10358 instance.
10359 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10360 * diagnostic-core.h (class auto_diagnostic_group): New class.
10361 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
10362 (diagnostic_report_diagnostic): Handle the first diagnostics within
10363 a group.
10364 (emit_diagnostic): Add auto_diagnostic_group instance.
10365 (inform): Likewise.
10366 (inform_n): Likewise.
10367 (warning): Likewise.
10368 (warning_at): Likewise.
10369 (warning_n): Likewise.
10370 (pedwarn): Likewise.
10371 (permerror): Likewise.
10372 (error): Likewise.
10373 (error_n): Likewise.
10374 (error_at): Likewise.
10375 (sorry): Likewise.
10376 (fatal_error): Likewise.
10377 (internal_error): Likewise.
10378 (internal_error_no_backtrace): Likewise.
10379 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
10380 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
10381 * diagnostic.h (struct diagnostic_context): Add fields
10382 "diagnostic_group_nesting_depth",
10383 "diagnostic_group_emission_count", "begin_group_cb",
10384 "end_group_cb".
10385 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
10386 Add auto_diagnostic_group instance(s).
10387 (find_explicit_erroneous_behavior): Likewise.
10388 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
10389 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
10390 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
10391 (gimplify_va_arg_expr): Likewise.
10392 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
10393 (HSA_SORRY_AT): Likewise.
10394 * ipa-devirt.c (compare_virtual_tables): Likewise.
10395 (warn_odr): Likewise.
10396 * multiple_target.c (expand_target_clones): Likewise.
10397 * opts-common.c (cmdline_handle_error): Likewise.
10398 * reginfo.c (globalize_reg): Likewise.
10399 * substring-locations.c (format_warning_n_va): Likewise.
10400 * tree-inline.c (expand_call_inline): Likewise.
10401 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
10402 * tree-ssa-loop-niter.c
10403 (do_warn_aggressive_loop_optimizations): Likewise.
10404 * tree-ssa-uninit.c (warn_uninit): Likewise.
10405 * tree.c (warn_deprecated_use): Likewise.
10406
10407 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
10408
10409 PR target/87014
10410 * config/i386/i386.md (eh_return): Always update EH return
10411 address in word_mode.
10412
10413 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
10414
10415 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
10416 TARGET_SPLIT_COMPLEX_ARG is defined.
10417
10418 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
10419
10420 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
10421
10422 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
10423
10424 PR target/86984
10425 * expr.c (expand_assignment): Assert that bitpos is positive.
10426 (store_field): Likewise
10427 (expand_expr_real_1): Make sure that bitpos is positive.
10428 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
10429 integer overflow.
10430
10431 2018-08-20 Nathan Sidwell <nathan@acm.org>
10432
10433 * Makefile.in (CPP_ID_DATA_H): Delete.
10434 (CPP_INTERNAL_H): Don't add it.
10435 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
10436 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
10437
10438 2018-08-20 Richard Biener <rguenther@suse.de>
10439
10440 PR tree-optimization/78655
10441 * tree-vrp.c (extract_range_from_binary_expr_1): Make
10442 pointer + offset nonnull if either operand is nonnull work.
10443
10444 2018-08-20 Tom de Vries <tdevries@suse.de>
10445
10446 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
10447 unless the referenced die describes the added property using
10448 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
10449 Otherwise, add a DW_AT_location to the referenced die.
10450
10451 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
10452
10453 PR target/86994
10454 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
10455 register_operand when calling ix86_set_reg_reg_cost.
10456 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
10457 Set *total to 0 for operands that satisfy x86_64_immediate_operand
10458 predicate and to 1 otherwise.
10459
10460 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
10461
10462 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
10463 emit a diagnostic that it is not supported and reset the option.
10464 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
10465 supported and consume the option. (ASM_FINAL_SPEC): New.
10466
10467 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
10468
10469 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
10470 a sentence.
10471
10472 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
10473
10474 C-SKY port: Documentation
10475
10476 * doc/extend.texi (C-SKY Function Attributes): New section.
10477 * doc/invoke.texi (Option Summary): Add C-SKY options.
10478 (C-SKY Options): New section.
10479 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
10480
10481 2018-08-17 Jojo <jijie_rong@c-sky.com>
10482 Huibin Wang <huibin_wang@c-sky.com>
10483 Sandra Loosemore <sandra@codesourcery.com>
10484 Chung-Lin Tang <cltang@codesourcery.com>
10485
10486 C-SKY port: Backend implementation
10487
10488 * config/csky/*: New.
10489 * common/config/csky/*: New.
10490
10491 2018-08-17 Jojo <jijie_rong@c-sky.com>
10492 Huibin Wang <huibin_wang@c-sky.com>
10493 Sandra Loosemore <sandra@codesourcery.com>
10494 Chung-Lin Tang <cltang@codesourcery.com>
10495 Andrew Jenner <andrew@codesourcery.com>
10496
10497 C-SKY port: Configury
10498
10499 * config.gcc (csky-*-*): New.
10500 * configure.ac: Add csky to targets for dwarf2 debug_line support.
10501 * configure: Regenerated.
10502
10503 2018-08-17 David Malcolm <dmalcolm@redhat.com>
10504
10505 * dump-context.h: Include "dumpfile.h".
10506 (dump_context::dump_printf_va): Convert final param from va_list
10507 to va_list *. Convert from ATTRIBUTE_PRINTF to
10508 ATTRIBUTE_GCC_DUMP_PRINTF.
10509 (dump_context::dump_printf_loc_va): Likewise.
10510 * dumpfile.c: Include "stringpool.h".
10511 (make_item_for_dump_printf_va): Delete.
10512 (make_item_for_dump_printf): Delete.
10513 (class dump_pretty_printer): New class.
10514 (dump_pretty_printer::dump_pretty_printer): New ctor.
10515 (dump_pretty_printer::emit_items): New member function.
10516 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
10517 function.
10518 (dump_pretty_printer::emit_item): New member function.
10519 (dump_pretty_printer::stash_item): New member function.
10520 (dump_pretty_printer::format_decoder_cb): New member function.
10521 (dump_pretty_printer::decode_format): New member function.
10522 (dump_context::dump_printf_va): Reimplement in terms of
10523 dump_pretty_printer.
10524 (dump_context::dump_printf_loc_va): Convert final param from va_list
10525 to va_list *.
10526 (dump_context::begin_scope): Reimplement call to
10527 make_item_for_dump_printf.
10528 (dump_printf): Update for change to dump_printf_va.
10529 (dump_printf_loc): Likewise.
10530 (selftest::test_capture_of_dump_calls): Convert "stmt" from
10531 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
10532 with %T, %E, and %G.
10533 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
10534 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
10535 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
10536 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
10537 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
10538 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
10539 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
10540 within a dump_printf_loc call to "%wu".
10541 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
10542 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
10543 missing space after "=".
10544 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
10545 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
10546 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
10547 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
10548 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
10549 duplicate "vectorized" from message.
10550
10551 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
10552
10553 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
10554 polyNxK_t element's TYPE_STRING_FLAG.
10555
10556 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
10557
10558 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
10559 (they were unnamed before). Fix comments.
10560
10561 2018-08-17 Nathan Sidwell <nathan@acm.org>
10562
10563 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
10564
10565 2018-08-17 Richard Biener <rguenther@suse.de>
10566
10567 PR tree-optimization/86841
10568 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
10569
10570 2018-08-17 Martin Liska <mliska@suse.cz>
10571
10572 * common.opt: Remove Warn, Init and Report for options with
10573 Ignore/Deprecated flag. Warning is done automatically for
10574 Deprecated flags.
10575 * config/i386/i386.opt: Likewise.
10576 * config/ia64/ia64.opt: Likewise.
10577 * config/rs6000/rs6000.opt: Likewise.
10578 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
10579 Remove usage of flag_check_pointer_bounds.
10580 * lto-wrapper.c (merge_and_complain): Do not handle
10581 OPT_fcheck_pointer_bounds.
10582 (append_compiler_options): Likewise.
10583 * opt-functions.awk: Do not handle Deprecated.
10584 * optc-gen.awk: Check that Var, Report and Init are not
10585 used for an option with Ignore/Deprecated flag.
10586 * opts-common.c (decode_cmdline_option): Do not report
10587 CL_ERR_DEPRECATED.
10588 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
10589 options.
10590 * opts.h (struct cl_option): Remove cl_deprecated flag.
10591 (CL_ERR_DEPRECATED): Remove error enum value.
10592
10593 2018-08-17 Richard Biener <rguenther@suse.de>
10594
10595 PR middle-end/86505
10596 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
10597 across a va-arg-pack using call adjust its return value accordingly.
10598
10599 2018-08-16 Martin Sebor <msebor@redhat.com>
10600
10601 PR tree-optimization/86853
10602 * gimple-ssa-sprintf.c (struct format_result): Rename member.
10603 (struct fmtresult): Add member and initialize it in ctors.
10604 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
10605 (format_string): Handle %S the same as %ls. Set MAYFAIL.
10606 (format_directive): Set POSUNDER4K when MAYFAIL is set.
10607 (parse_directive): Handle %C same as %c.
10608 (sprintf_dom_walker::compute_format_length): Adjust.
10609 (is_call_safe): Adjust.
10610
10611 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
10612
10613 * builtins.c (c_strlen): Add new parameter eltsize. Use it
10614 for determining how to count the elements.
10615 * builtins.h (c_strlen): Adjust prototype.
10616 * expr.c (string_constant): Add new parameter mem_size.
10617 Set *mem_size appropriately.
10618 * expr.h (string_constant): Adjust protoype.
10619 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
10620 * gimple-fold.h (get_range_strlen): Adjust prototype.
10621 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
10622 (format_string): Call get_string_length with eltsize.
10623
10624 2018-08-16 David Malcolm <dmalcolm@redhat.com>
10625
10626 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
10627 to emit the span, rather than setting it as the prefix.
10628
10629 2018-08-16 David Malcolm <dmalcolm@redhat.com>
10630
10631 * diagnostic-show-locus.c (layout::start_annotation_line): Add
10632 "margin_char" parameter, defaulting to space. Use it in place
10633 of pp_space for the initial part of the margin.
10634 (layout::print_leading_fixits): Use '+' when filling the margin
10635 of line-insertion fix-it hints.
10636
10637 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
10638
10639 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
10640 Delete.
10641
10642 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
10643
10644 * config/rs6000/altivec.md: Don't set length attribute to the default
10645 value.
10646 * config/rs6000/darwin.md: Ditto.
10647 * config/rs6000/dfp.md: Ditto.
10648 * config/rs6000/htm.md: Ditto.
10649 * config/rs6000/rs6000.md: Ditto.
10650 * config/rs6000/sync.md: Ditto.
10651 * config/rs6000/vsx.md: Ditto.
10652
10653 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
10654
10655 * config/rs6000/altivec.md: Don't set length attribute to the default
10656 value, for branch instructions.
10657 * config/rs6000/darwin.md: Ditto.
10658 * config/rs6000/rs6000.md: Ditto.
10659
10660 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
10661
10662 * config/rs6000/rs6000.md (length): Always define as const_int 4.
10663 (unnamed conditional branch define_insn): Set length to 4 or 8
10664 depending on offset.
10665 (<bd>_<mode>): Similar, for alternative 0.
10666 (<bd>tf_<mode>): Ditto.
10667
10668 2018-08-16 Tamar Christina <tamar.christina@arm.com>
10669
10670 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
10671
10672 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
10673
10674 * doc/rtl.texi: Replace old RTX class names with new names.
10675
10676
10677 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
10678
10679 * expmed.h (canonicalize_comparison): New declaration.
10680 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
10681 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
10682 * optabs.c (prepare_cmp_insn): Likewise.
10683 * rtl.h (unsigned_condition_p): New function which checks if a
10684 comparison operator is unsigned.
10685
10686 2018-08-16 Nathan Sidwell <nathan@acm.org>
10687
10688 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
10689 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
10690
10691 2018-08-16 Tamar Christina <tamar.christina@arm.com>
10692
10693 PR target/84711
10694 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
10695 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
10696 (mov<mov>): ..this and enable unconditionally.
10697
10698 2018-08-16 Tamar Christina <tamar.christina@arm.com>
10699
10700 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
10701
10702 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
10703
10704 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
10705 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
10706 "Common" with "Target".
10707
10708 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
10709
10710 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
10711 * doc/invoke.texi (mmitigate-rop): Remove.
10712 * config/i386/i386.c: Do not include "regrename.h".
10713 (ix86_rop_should_change_byte_p, reg_encoded_number)
10714 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
10715 Remove.
10716 (ix86_reorg): Remove call to ix86_mitigate_rop.
10717 * config/i386/i386.md (attr "modrm_class"): Remove.
10718 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
10719 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
10720 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
10721
10722 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
10723
10724 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
10725 allow folding of mergeh() and mergel() for the float and double types.
10726 (fold_mergehl_helper): Rework to handle building a permute tree
10727 for float vectors.
10728
10729 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
10730
10731 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
10732 for TARGET_SSE.
10733
10734 2018-08-15 David Malcolm <dmalcolm@redhat.com>
10735
10736 * common.opt (fdiagnostics-show-labels): New option.
10737 * diagnostic-show-locus.c (class layout_range): Add field
10738 "m_label".
10739 (class layout): Add field "m_show_labels_p".
10740 (layout_range::layout_range): Add param "label" and use it to
10741 initialize m_label.
10742 (make_range): Pass in NULL for new "label" param of layout_range's
10743 ctor.
10744 (layout::layout): Initialize m_show_labels_p.
10745 (layout::maybe_add_location_range): Pass in loc_range->m_label
10746 when constructing layout_range instances.
10747 (struct line_label): New struct.
10748 (layout::print_any_labels): New member function.
10749 (layout::print_line): Call it if label-printing is enabled.
10750 (selftest::test_one_liner_labels): New test.
10751 (selftest::test_diagnostic_show_locus_one_liner): Call it.
10752 * diagnostic.c (diagnostic_initialize): Initialize
10753 context->show_labels_p.
10754 * diagnostic.h (struct diagnostic_context): Add field
10755 "show_labels_p".
10756 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
10757 -fno-diagnostics-show-labels.
10758 * dwarf2out.c (gen_producer_string): Add
10759 OPT_fdiagnostics_show_labels to the ignored options.
10760 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
10761 param.
10762 (gcc_rich_location::maybe_add_expr): Likewise.
10763 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
10764 label" param, defaulting to NULL.
10765 (gcc_rich_location::add_expr): Add "label" param.
10766 (gcc_rich_location::maybe_add_expr): Likewise.
10767 (class text_range_label): New class.
10768 (class range_label_for_type_mismatch): New class.
10769 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
10770 of format_warning_va.
10771 (fmtwarn_n): Likewise for new params of format_warning_n_va.
10772 * lto-wrapper.c (merge_and_complain): Add
10773 OPT_fdiagnostics_show_labels to the "pick one setting" options.
10774 (append_compiler_options): Likewise to the dropped options.
10775 (append_diag_options): Likewise to the passed-on options.
10776 * opts.c (common_handle_option): Handle the new option.
10777 * selftest-diagnostic.c
10778 (test_diagnostic_context::test_diagnostic_context): Enable
10779 show_labels_p.
10780 * substring-locations.c: Include "gcc-rich-location.h".
10781 (format_warning_n_va): Add "fmt_label" and "param_label" params
10782 and use them as appropriate.
10783 (format_warning_va): Add "fmt_label" and "param_label" params,
10784 passing them on to format_warning_n_va.
10785 (format_warning_at_substring): Likewise.
10786 (format_warning_at_substring_n): Likewise.
10787 * substring-locations.h (format_warning_va): Add "fmt_label" and
10788 "param_label" params.
10789 (format_warning_n_va): Likewise.
10790 (format_warning_at_substring): Likewise.
10791 (format_warning_at_substring_n): Likewise.
10792 * toplev.c (general_init): Initialize global_dc->show_labels_p.
10793
10794 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
10795
10796 PR testsuite/86519
10797 * builtins.c (expand_builtin_memcmp): Do not expand the call
10798 when overflow is detected.
10799
10800 2018-08-15 Martin Sebor <msebor@redhat.com>
10801
10802 PR tree-optimization/71625
10803 * config/aarch64/aarch64-builtins.c
10804 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
10805
10806 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
10807
10808 * config/s390/s390.c (s390_reorg): Remove loop.
10809
10810 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
10811
10812 * config/darwin.c
10813 (darwin_function_switched_text_sections): Delete.
10814 * gcc/config/darwin.h
10815 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
10816
10817 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
10818
10819 PR target/81685
10820 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
10821 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
10822 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
10823
10824 2018-08-15 Martin Liska <mliska@suse.cz>
10825
10826 PR tree-optimization/86925
10827 * predict.c (expr_expected_value_1): When taking
10828 later predictor, assign also probability.
10829 Use fold_build2_initializer_loc in order to fold
10830 the expression in -frounding-math.
10831
10832 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
10833
10834 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
10835 patterns.
10836 (expand_vec_perm_1): Try the new method.
10837
10838 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
10839
10840 PR target/86547
10841 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
10842 Check whether lra_live_max_point is 0 before dividing.
10843
10844 2018-08-14 Martin Sebor <msebor@redhat.com>
10845
10846 PR tree-optimization/86650
10847 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
10848 (vrp_prop::check_mem_ref): Same.
10849
10850 2018-08-13 Liu Hao <lh_mouse@126.com>
10851
10852 * pretty-print.c (eat_esc_sequence): Swap the foreground and
10853 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
10854 and clear it thereafter, as it only works for DBCS.
10855
10856 2018-08-13 Liu Hao <lh_mouse@126.com>
10857
10858 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
10859 handle returned by _get_osf_handle().
10860
10861 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
10862
10863 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
10864 for folding vec_perm.
10865
10866 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
10867
10868 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
10869 Add support for gimple-folding of vec_pack() and vec_unpack()
10870 intrinsics.
10871
10872 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
10873
10874 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
10875 vec_xst variants to the list.
10876 (rs6000_gimple_fold_builtin): Add support for folding unaligned
10877 vector loads and stores.
10878
10879 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
10880
10881 * config.gcc (rs6000-ibm-aix4.x): Delete.
10882 (rs6000-ibm-aix5.1): Delete.
10883 (rs6000-ibm-aix5.2): Delete.
10884 (rs6000-ibm-aix5.3): Delete.
10885 * config/rs6000/aix43.h: Delete.
10886 * config/rs6000/aix51.h: Delete.
10887 * config/rs6000/aix52.h: Delete.
10888 * config/rs6000/t-aix43: Delete.
10889
10890 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
10891
10892 * config/s390/s390.c (s390_decompose_constant_pool_ref):
10893 New function.
10894 (s390_decompose_address): Factor out constant pool ref
10895 decomposition.
10896
10897 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
10898
10899 * config/nds32/nds32-predicates.c
10900 (nds32_can_use_bclr_p): Change return type as bool.
10901 (nds32_can_use_bset_p): Ditto.
10902 (nds32_can_use_btgl_p): Ditto.
10903 (nds32_can_use_bitci_p): Ditto.
10904 * config/nds32/nds32-protos.h
10905 (nds32_can_use_bclr_p): Change declaration.
10906 (nds32_can_use_bset_p): Ditto.
10907 (nds32_can_use_btgl_p): Ditto.
10908 (nds32_can_use_bitci_p): Ditto.
10909
10910 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
10911
10912 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
10913 Support -msched-prolog-epilog option.
10914 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
10915
10916 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
10917
10918 * common/config/nds32/nds32-common.c
10919 (nds32_option_optimization_table): Enalbe -malways-align.
10920
10921 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
10922
10923 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
10924 extra_headers.
10925 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
10926 OPT_misr_secure_ case.
10927 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
10928 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
10929 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
10930 secure attribute.
10931 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
10932 (nds32_isr_info): New field security_level.
10933 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
10934 * config/nds32/nds32.md (return_internal): Consider critical attribute.
10935 * config/nds32/nds32.opt (misr-secure): New option.
10936 * config/nds32/nds32_init.inc: New file.
10937 * config/nds32/nds32_isr.h: New file.
10938
10939 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
10940
10941 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
10942 Update comment for atomic instructions.
10943 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
10944 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
10945 Remove.
10946 (atomic_loaddi): Revise fence expansion to only emit fence prior to
10947 load for __ATOMIC_SEQ_CST model.
10948 (atomic_loaddi_1): Remove float register target.
10949 (atomic_storedi): Handle CONST_INT values.
10950 (atomic_storedi_1): Remove float register source. Add special case
10951 for zero value.
10952 (memory_barrier): New expander and insn.
10953
10954 2018-08-11 Jakub Jelinek <jakub@redhat.com>
10955
10956 PR tree-optimization/86835
10957 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
10958 new_stmt after def_gsi, make sure to insert new_square_stmt after
10959 that stmt, not 2 stmts before it.
10960
10961 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
10962
10963 PR target/82418
10964 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
10965 instead of SWI48.
10966
10967 2018-08-10 Martin Liska <mliska@suse.cz>
10968
10969 PR target/83610
10970 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
10971 function type.
10972 * builtins.c (expand_builtin_expect_with_probability):
10973 New function.
10974 (expand_builtin_expect_with_probability): New function.
10975 (build_builtin_expect_predicate): Add new argumnet probability
10976 for BUILT_IN_EXPECT_WITH_PROBABILITY.
10977 (fold_builtin_expect):
10978 (fold_builtin_2):
10979 (fold_builtin_3):
10980 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
10981 * builtins.h (fold_builtin_expect): Set new argument.
10982 * doc/extend.texi: Document __builtin_expect_with_probability.
10983 * doc/invoke.texi: Likewise.
10984 * gimple-fold.c (gimple_fold_call): Pass new argument.
10985 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
10986 also BUILT_IN_EXPECT_WITH_PROBABILITY.
10987 * predict.c (get_predictor_value): New function.
10988 (expr_expected_value): Add new argument probability. Assume
10989 that predictor and probability are always non-null.
10990 (expr_expected_value_1): Likewise. For __builtin_expect and
10991 __builtin_expect_with_probability set probability. Handle
10992 combination in binary expressions.
10993 (tree_predict_by_opcode): Simplify code by simply calling
10994 get_predictor_value.
10995 (pass_strip_predict_hints::execute): Add handling of
10996 BUILT_IN_EXPECT_WITH_PROBABILITY.
10997 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
10998 new predictor.
10999 * tree.h (DECL_BUILT_IN_P): New function.
11000
11001 2018-08-10 Martin Liska <mliska@suse.cz>
11002
11003 PR tree-optimization/85799
11004 * passes.def: Add argument for pass_strip_predict_hints.
11005 * predict.c (class pass_strip_predict_hints): Add new argument
11006 early_p.
11007 (strip_predictor_early): New function.
11008 (pass_strip_predict_hints::execute): Call the function to
11009 strip predictors.
11010 (strip_predict_hints): New function.
11011 * predict.def: Fix comment.
11012
11013 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
11014
11015 * Makefile.in: Clarify which tm.texi to copy over to assert the
11016 right to grant a GFDL license for all.
11017
11018 2018-08-09 Jeff Law <law@redhat.com>
11019
11020 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
11021 unused variable.
11022
11023 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
11024
11025 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
11026 prototype.
11027
11028 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
11029
11030 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
11031 reductions for variable-length vectors.
11032
11033 2018-08-09 David Malcolm <dmalcolm@redhat.com>
11034
11035 PR other/84889
11036 * common.opt (fdiagnostics-show-line-numbers): New option.
11037 * diagnostic-show-locus.c (class layout): Add fields
11038 "m_show_line_numbers_p" and "m_linenum_width";
11039 (num_digits): New function.
11040 (test_num_digits): New function.
11041 (layout::layout): Initialize new fields. Update m_x_offset
11042 logic to handle any left margin.
11043 (layout::print_source_line): Print line number when requested.
11044 (layout::start_annotation_line): New member function.
11045 (layout::print_annotation_line): Call it.
11046 (layout::print_leading_fixits): Likewise.
11047 (layout::print_trailing_fixits): Likewise. Update calls to
11048 move_to_column for new parameter.
11049 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
11050 it to potentially call start_annotation_line.
11051 (layout::show_ruler): Call start_annotation_line.
11052 (selftest::test_line_numbers_multiline_range): New selftest.
11053 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
11054 and selftest::test_line_numbers_multiline_range.
11055 * diagnostic.c (diagnostic_initialize): Initialize
11056 show_line_numbers_p.
11057 * diagnostic.h (struct diagnostic_context): Add field
11058 "show_line_numbers_p".
11059 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
11060 -fno-diagnostics-show-line-numbers.
11061 * dwarf2out.c (gen_producer_string): Add
11062 OPT_fdiagnostics_show_line_numbers to the ignored options.
11063 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
11064 one setting" options.
11065 (append_compiler_options): Likewise to the dropped options.
11066 (append_diag_options): Likewise to the passed-on options.
11067 * opts.c (common_handle_option): Handle the new option.
11068 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
11069
11070 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
11071
11072 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
11073 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
11074 third argument of type "const signed char" to descriptions of
11075 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
11076 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
11077 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
11078 __builtin_bcdsub_ov functions.
11079
11080 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
11081
11082 PR tree-optimization/86858
11083 * tree-vect-loop.c (vect_is_simple_reduction): Restore
11084 flow_bb_inside_loop_p calls.
11085
11086 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
11087
11088 PR tree-optimization/86871
11089 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
11090 instead of gimple_assign_lhs.
11091
11092 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
11093
11094 PR target/86887
11095 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
11096 register constraint to operand 0.
11097 (add<mode>3_carryinC): Likewise.
11098 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
11099
11100 2018-08-09 Martin Liska <mliska@suse.cz>
11101
11102 PR c/86895
11103 * common.opt: Remove extra line.
11104
11105 2018-08-09 Martin Liska <mliska@suse.cz>
11106
11107 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
11108 at the end of a line, make first letter capital and end up
11109 a sentence with a dot.
11110 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
11111 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
11112 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
11113 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
11114 (PARAM_MAX_ISL_OPERATIONS): Likewise.
11115 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
11116 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
11117 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
11118 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
11119 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
11120 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
11121 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
11122 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
11123 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
11124 (PARAM_TREE_REASSOC_WIDTH): Likewise.
11125 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
11126 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
11127 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
11128
11129 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
11130
11131 PR target/84332
11132 * config/s390/s390.c (s390_option_override_internal): Reduce the
11133 stack-clash-protection-probe-interval param if it would be too big
11134 for z900.
11135
11136 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
11137
11138 PR target/46179
11139 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
11140 * config/m68k/m68k.c (handle_move_double): Don't call
11141 m68k_final_prescan_insn.
11142 (m68k_adjust_decorated_operand): Renamed from
11143 m68k_final_prescan_insn, remove first and third operand and
11144 simplify.
11145 (print_operand): Call it.
11146 (print_operand_address): Call it.
11147
11148 2018-08-08 Nathan Sidwell <nathan@acm.org>
11149
11150 * diagnostic.c (diagnostic_report_current_module): Use
11151 linemap_included_from & linemap_included_from_linemap.
11152
11153 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
11154
11155 * config/aarch64/aarch64-cores.def: Add phecda core.
11156 * config/aarch64/aarch64-tune.md: Regenerate.
11157 * doc/invoke.texi: Add phecda core.
11158
11159 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
11160
11161 PR target/85295
11162 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
11163 definitions.
11164 * config/s390/s390.md ("movti"): Add more alternatives for
11165 constant to GPR copies.
11166
11167 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
11168
11169 * config/s390/s390.c: Fix whitespace damage throughout the file.
11170 * config/s390/s390.h: Likewise.
11171 * config/s390/tpf.h: Likewise.
11172
11173 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
11174
11175 * config/s390/s390.c (s390_loadrelative_operand_p):
11176 Remove TARGET_CPU_ZARCH usages.
11177 (s390_rtx_costs): Likewise.
11178 (s390_legitimate_constant_p): Likewise.
11179 (s390_cannot_force_const_mem): Likewise.
11180 (legitimate_reload_constant_p): Likewise.
11181 (s390_preferred_reload_class): Likewise.
11182 (legitimize_pic_address): Likewise.
11183 (legitimize_tls_address): Likewise.
11184 (s390_split_branches): Removed.
11185 (s390_add_execute): Removed.
11186 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
11187 (s390_mainpool_start): Likewise.
11188 (s390_mainpool_finish): Likewise.
11189 (s390_mainpool_cancel): Removed.
11190 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
11191 (s390_chunkify_cancel): Likewise.
11192 (s390_return_addr_rtx): Likewise.
11193 (s390_register_info): Remove split_branches_pending_p uages.
11194 (s390_optimize_register_info): Likewise.
11195 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
11196 split_branches_pending_p usages.
11197 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
11198 (s390_load_got): Likewise.
11199 (s390_expand_split_stack_prologue): Likewise.
11200 (output_asm_nops): Likewise.
11201 (s390_function_profiler): Likewise.
11202 (s390_emit_call): Likewise.
11203 (s390_conditional_register_usage): Likewise.
11204 (s390_optimize_prologue): Likewise.
11205 (s390_reorg): Remove TARGET_CPU_ZARCH and
11206 split_branches_pending_p usages.
11207 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
11208 usages.
11209 (s390_output_indirect_thunk_function): Likewise.
11210 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
11211 (TARGET_CPU_ZARCH_P): Removed.
11212 (struct machine_function): Remove split_branches_pending_p.
11213 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
11214
11215 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
11216
11217 * common/config/s390/s390-common.c (processor_flags_table):
11218 Remove flags.
11219 * config.gcc: Remove with_arch/with_tune support.
11220 * config/s390/2064.md: Remove cpu attribute comparisons.
11221 * config/s390/driver-native.c (s390_host_detect_local_cpu):
11222 Remove MTN.
11223 * config/s390/linux.h (ASM_SPEC):
11224 Remove -march support.
11225 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
11226 Use a table to get an arch level.
11227 * config/s390/s390-opts.h (enum processor_type):
11228 Remove enum values.
11229 * config/s390/s390.c
11230 (processor_table): Remove entries, add arch_level values.
11231 (s390_issue_rate): Remove cases.
11232 (s390_option_override): Adjust
11233 s390_option_override_internal() call.
11234 (s390_option_override_internal): Remove deprecation warning.
11235 (s390_valid_target_attribute_tree): Adjust
11236 s390_option_override_internal() call.
11237 * config/s390/s390.h (struct s390_processor):
11238 Share with s390-c.c, add arch_level field.
11239 * config/s390/s390.md:
11240 Remove occurrences in cpu attribute.
11241 * config/s390/s390.opt: Remove -march/-mtune support.
11242 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
11243 * doc/invoke.texi: Remove deprecation warning.
11244
11245 2018-08-08 Luis Machado <luis.machado@linaro.org>
11246
11247 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
11248 global.
11249 (qdf24xx_tunings): Set vector cost structure to
11250 qdf24xx_vector_cost.
11251
11252 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
11253 <register_sextend>: Set to 3.
11254
11255 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
11256
11257 PR target/86838
11258 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
11259 * config/aarch64/aarch64-simd.md
11260 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
11261 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
11262 (aarch64_frecpx<mode>): ...this new pattern.
11263 * config/aarch64/aarch64-simd-builtins.def: Remove comment
11264 about aarch64_frecp<FRECP:frecp_suffix><mode>.
11265
11266 2018-08-07 Martin Liska <mliska@suse.cz>
11267
11268 PR middle-end/83023
11269 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
11270 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
11271 * predict.def (PRED_MALLOC_NONNULL): New predictor.
11272 * doc/extend.texi: Document that malloc attribute adds
11273 hit to compiler.
11274
11275 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
11276
11277 PR target/86785
11278 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11279 Define to speculation_safe_value_not_needed.
11280
11281 2018-08-06 Jeff Law <law@redhat.com>
11282
11283 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
11284 the vr_values instance to cprop_into_stmt.
11285 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
11286 (cprop_operand): Also query EVRP to determine if OP is a constant.
11287
11288 2018-08-06 Nathan Sidwell <nathan@acm.org>
11289
11290 * diagnostic.c (diagnostic_report_current_module): Reroll
11291 included-at loop. Translate text.
11292
11293 2018-08-06 David Malcolm <dmalcolm@redhat.com>
11294
11295 * function-tests.c (selftest::test_expansion_to_rtl): Call
11296 free_after_compilation.
11297
11298 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11299
11300 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
11301
11302 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
11303
11304 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
11305 loops with memory block operations from getting unrolled.
11306
11307 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
11308
11309 PR target/86807
11310 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11311 Define to speculation_safe_value_not_needed.
11312
11313 2018-08-06 Jeff Law <law@redhat.com>
11314
11315 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
11316 assert.
11317
11318 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11319
11320 PR target/86662
11321 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
11322 with all enabled __intN types.
11323
11324 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
11325
11326 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11327
11328 * alias.c (record_set): Check for clobber high.
11329 * cfgexpand.c (expand_gimple_stmt): Likewise.
11330 * combine-stack-adj.c (single_set_for_csa): Likewise.
11331 * combine.c (find_single_use_1): Likewise.
11332 (set_nonzero_bits_and_sign_copies): Likewise.
11333 (get_combine_src_dest): Likewise.
11334 (is_parallel_of_n_reg_sets): Likewise.
11335 (try_combine): Likewise.
11336 (record_dead_and_set_regs_1): Likewise.
11337 (reg_dead_at_p_1): Likewise.
11338 (reg_dead_at_p): Likewise.
11339 * dce.c (deletable_insn_p): Likewise.
11340 (mark_nonreg_stores_1): Likewise.
11341 (mark_nonreg_stores_2): Likewise.
11342 * df-scan.c (df_find_hard_reg_defs): Likewise.
11343 (df_uses_record): Likewise.
11344 (df_get_call_refs): Likewise.
11345 * dwarf2out.c (mem_loc_descriptor): Likewise.
11346 * haifa-sched.c (haifa_classify_rtx): Likewise.
11347 * ira-build.c (create_insn_allocnos): Likewise.
11348 * ira-costs.c (scan_one_insn): Likewise.
11349 * ira.c (equiv_init_movable_p): Likewise.
11350 (rtx_moveable_p): Likewise.
11351 (interesting_dest_for_shprep): Likewise.
11352 * jump.c (mark_jump_label_1): Likewise.
11353 * postreload-gcse.c (record_opr_changes): Likewise.
11354 * postreload.c (reload_cse_simplify): Likewise.
11355 (struct reg_use): Add source expr.
11356 (reload_combine): Check for clobber high.
11357 (reload_combine_note_use): Likewise.
11358 (reload_cse_move2add): Likewise.
11359 (move2add_note_store): Likewise.
11360 * print-rtl.c (print_pattern): Likewise.
11361 * recog.c (decode_asm_operands): Likewise.
11362 (store_data_bypass_p): Likewise.
11363 (if_test_bypass_p): Likewise.
11364 * regcprop.c (kill_clobbered_value): Likewise.
11365 (kill_set_value): Likewise.
11366 * reginfo.c (reg_scan_mark_refs): Likewise.
11367 * reload1.c (maybe_fix_stack_asms): Likewise.
11368 (eliminate_regs_1): Likewise.
11369 (elimination_effects): Likewise.
11370 (mark_not_eliminable): Likewise.
11371 (scan_paradoxical_subregs): Likewise.
11372 (forget_old_reloads_1): Likewise.
11373 * reorg.c (find_end_label): Likewise.
11374 (try_merge_delay_insns): Likewise.
11375 (redundant_insn): Likewise.
11376 (own_thread_p): Likewise.
11377 (fill_simple_delay_slots): Likewise.
11378 (fill_slots_from_thread): Likewise.
11379 (dbr_schedule): Likewise.
11380 * resource.c (update_live_status): Likewise.
11381 (mark_referenced_resources): Likewise.
11382 (mark_set_resources): Likewise.
11383 * rtl.c (copy_rtx): Likewise.
11384 * rtlanal.c (reg_referenced_p): Likewise.
11385 (single_set_2): Likewise.
11386 (noop_move_p): Likewise.
11387 (note_stores): Likewise.
11388 * sched-deps.c (sched_analyze_reg): Likewise.
11389 (sched_analyze_insn): Likewise.
11390
11391 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11392
11393 * cse.c (invalidate_reg): New function extracted from...
11394 (invalidate): ...here.
11395 (canonicalize_insn): Check for clobber high.
11396 (invalidate_from_clobbers): invalidate clobber highs.
11397 (invalidate_from_sets_and_clobbers): Likewise.
11398 (count_reg_usage): Check for clobber high.
11399 (insn_live_p): Likewise.
11400 * cselib.c (cselib_expand_value_rtx_1):Likewise.
11401 (cselib_invalidate_regno): Check for clobber in setter.
11402 (cselib_invalidate_rtx): Pass through setter.
11403 (cselib_invalidate_rtx_note_stores):
11404 (cselib_process_insn): Check for clobber high.
11405 * cselib.h (cselib_invalidate_rtx): Add operand.
11406
11407 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11408
11409 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
11410 (mark_not_eliminable): Likewise.
11411 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
11412 * lra-lives.c (process_bb_lives): Check for clobber high.
11413 * lra.c (new_insn_reg): Remember clobber highs.
11414 (collect_non_operand_hard_regs): Check for clobber high.
11415 (lra_set_insn_recog_data): Likewise.
11416 (add_regs_to_insn_regno_info): Likewise.
11417 (lra_update_insn_regno_info): Likewise.
11418
11419 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11420
11421 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
11422 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
11423
11424 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11425
11426 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
11427 (copy_insn_1): Likewise.
11428 (gen_hard_reg_clobber_high): New gen function.
11429 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
11430 * genemit.c (gen_exp): Likewise.
11431 (gen_emit_seq): Pass through info.
11432 (gen_insn): Check for CLOBBER_HIGH.
11433 (gen_expand): Pass through info.
11434 (gen_split): Likewise.
11435 (output_add_clobbers): Likewise.
11436 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
11437 (remove_clobbers): Likewise.
11438 * rtl.h (gen_hard_reg_clobber_high): New declaration.
11439
11440 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11441
11442 * doc/rtl.texi (clobber_high): Add.
11443 (parallel): Add in clobber high
11444 * rtl.c (rtl_check_failed_code3): Add function.
11445 * rtl.def (CLOBBER_HIGH): Add expression.
11446 * rtl.h (RTL_CHECKC3): Add macro.
11447 (rtl_check_failed_code3): Add declaration.
11448 (XC3EXP): Add macro.
11449
11450 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
11451
11452 PR target/86386
11453 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
11454 cfun->machine->max_used_stack_alignment if needed.
11455
11456 2018-08-04 Martin Sebor <msebor@redhat.com>
11457
11458 PR tree-optimization/86571
11459 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
11460 NaN output to 4.
11461
11462 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
11463
11464 PR target/86799
11465 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11466 Define.
11467
11468 2018-08-03 Jeff Law <law@redhat.com>
11469
11470 PR target/86795
11471 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11472 Define to speculation_safe_value_not_needed.
11473
11474 2018-08-03 David Malcolm <dmalcolm@redhat.com>
11475
11476 * doc/gcov.texi (-x): Remove duplicate "to".
11477 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
11478 (-Wif-not-aligned): Remove duplicate "is".
11479 (-flto): Remove duplicate "the".
11480 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
11481 duplicate "v5.00.b".
11482 (MSP430 Options): Remove duplicate "and" from the description
11483 of "-mgprel-sec=regexp".
11484 (x86 Options): Remove duplicate copies of "vmldLog102" and
11485 vmlsLog104 from description of "-mveclibabi=type".
11486
11487 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
11488
11489 * internal-fn.h (first_commutative_argument): Declare.
11490 * internal-fn.c (first_commutative_argument): New function.
11491 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
11492 restrictions for pattern statements. Use first_commutative_argument
11493 to look for commutative operands in calls to internal functions.
11494
11495 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
11496
11497 * Makefile.in (wide-int-range.o): New.
11498 * tree-vrp.c: Move all the wide_int_* functions to...
11499 * wide-int-range.cc: ...here.
11500 * tree-vrp.h: Move all the wide_int_* prototypes to...
11501 * wide-int-range.h: ...here.
11502
11503 2018-08-03 Tom de Vries <tdevries@suse.de>
11504
11505 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
11506 UI_NONE.
11507 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
11508 * except.c (output_function_exception_table): Do early exit if
11509 targetm_common.except_unwind_info (&global_options) == UI_NONE.
11510
11511 2018-08-03 Martin Liska <mliska@suse.cz>
11512
11513 * predict.c (dump_prediction): Change to 2 digits
11514 in fraction part.
11515
11516 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
11517
11518 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
11519 neon_dup_q to...
11520 (falkor_am_1_gtov_gtov): ... a new insn reservation.
11521
11522 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
11523
11524 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
11525 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
11526 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
11527 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
11528 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
11529
11530 2018-08-02 David Malcolm <dmalcolm@redhat.com>
11531
11532 * diagnostic-show-locus.c (diagnostic_show_locus): Use
11533 pp_take_prefix when saving the existing prefix.
11534 * diagnostic.c (diagnostic_append_note): Likewise.
11535 * langhooks.c (lhd_print_error_function): Likewise.
11536 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
11537 param's type. Free the existing prefix.
11538 (pp_take_prefix): New function.
11539 (pretty_printer::pretty_printer): Drop the prefix parameter.
11540 Rename the length parameter to match the comment.
11541 (pretty_printer::~pretty_printer): Free the prefix.
11542 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
11543 parameter.
11544 (struct pretty_printer): Drop the "const" from "prefix" field's
11545 type and clarify memory management.
11546 (pp_set_prefix): Drop the "const" from the 2nd param.
11547 (pp_take_prefix): New decl.
11548
11549 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
11550
11551 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
11552 for word_mode_ok here instead of passing as argument.
11553 (expand_block_compare): Change select_block_compare_mode() call.
11554 (expand_strncmp_gpr_sequence): New function.
11555 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
11556
11557 2018-08-02 Jeff Law <law@redhat.com>
11558
11559 PR target/86790
11560 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11561 Define to speculation_safe_value_not_needed.
11562
11563 PR target/86784
11564 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11565 Define to speculation_safe_value_not_needed.
11566
11567 2018-08-02 Tom de Vries <tdevries@suse.de>
11568
11569 PR target/86660
11570 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
11571 function. Return UI_TARGET unconditionally.
11572 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
11573 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
11574
11575 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
11576
11577 * genemit.c (print_overload_test): Fix typo.
11578
11579 2018-08-02 Richard Biener <rguenther@suse.de>
11580
11581 PR tree-optimization/86816
11582 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
11583 which checks for value availability before querying it.
11584 (gvn_uses_equal): Use it.
11585 (same_succ_hash): Likewise.
11586 (gimple_equal_p): Likewise.
11587
11588 2018-08-02 Nick Clifton <nickc@redhat.com>
11589
11590 PR target/86813
11591 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11592 Define to speculation_safe_value_not_needed.
11593
11594 PR target/86810
11595 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11596 Define to speculation_safe_value_not_needed.
11597
11598 PR target/86810
11599 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11600 Define to speculation_safe_value_not_needed.
11601
11602 PR target/86803
11603 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11604 Define to speculation_safe_value_not_needed.
11605
11606 PR target/86797
11607 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11608 Define to speculation_safe_value_not_needed.
11609
11610 PR target/86791
11611 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11612 Define to speculation_safe_value_not_needed.
11613
11614 PR target/86789
11615 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11616 Define to speculation_safe_value_not_needed.
11617
11618 PR target/86787
11619 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11620 Define to speculation_safe_value_not_needed.
11621
11622 PR target/86782
11623 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
11624 speculation_safe_value_not_needed.
11625
11626 PR target/86781
11627 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
11628 to speculation_safe_value_not_needed.
11629
11630 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
11631
11632 * doc/md.texi: Expand the documentation of instruction names
11633 to mention port-local uses. Document '@' in pattern names.
11634 * read-md.h (overloaded_instance, overloaded_name): New structs.
11635 (mapping): Declare.
11636 (md_reader::handle_overloaded_name): New member function.
11637 (md_reader::get_overloads): Likewise.
11638 (md_reader::m_first_overload): New member variable.
11639 (md_reader::m_next_overload_ptr): Likewise.
11640 (md_reader::m_overloads_htab): Likewise.
11641 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
11642 m_next_overload_ptr and m_overloads_htab.
11643 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
11644 (get_mode_token, get_code_token, get_int_token): New functions.
11645 (map_attr_string): Add an optional argument that passes back
11646 the associated iterator.
11647 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
11648 (md_reader::handle_overloaded_name, add_overload_instance): New
11649 functions.
11650 (apply_iterators): Handle '@' names. Report an error if '@'
11651 is used without iterators.
11652 (initialize_iterators): Initialize the new iterator_group fields.
11653 * genopinit.c (handle_overloaded_code_for)
11654 (handle_overloaded_gen): New functions.
11655 (main): Use them to print declarations of maybe_code_for_* and
11656 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
11657 * genemit.c (print_overload_arguments, print_overload_test)
11658 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
11659 (main): Use it to print definitions of maybe_code_for_* and
11660 maybe_gen_* functions.
11661 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
11662 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
11663 instead of explicit mode checks.
11664 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
11665 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
11666 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
11667 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
11668 (aarch64_expand_compare_and_swap): Likewise
11669 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
11670 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
11671 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
11672 (aarch64_constant_pool_reload_icode): Delete.
11673 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
11674 instead of aarch64_constant_pool_reload_icode. Use
11675 code_for_aarch64_reload_mov instead of explicit mode checks.
11676 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
11677 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
11678 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
11679 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
11680 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
11681 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
11682 (aarch64_atomic_load_op_code): Delete.
11683 (aarch64_emit_atomic_load_op): Likewise.
11684 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
11685 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
11686 instead of aarch64_emit_atomic_load_op.
11687 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
11688 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
11689 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
11690 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
11691 character before the pattern name.
11692 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
11693 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
11694 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
11695 (aarch64_frecps<mode>): Likewise.
11696 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
11697 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
11698 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
11699 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
11700 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
11701
11702 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
11703
11704 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
11705 Allow HFmode constants if TARGET_FP_F16INST.
11706
11707 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
11708
11709 PR target/86014
11710 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
11711 No longer check last store for clobber of address register.
11712
11713 2018-08-02 Martin Liska <mliska@suse.cz>
11714
11715 PR gcov-profile/86817
11716 * gcov.c (process_all_functions): New function.
11717 (main): Call it.
11718 (process_file): Move functions processing to
11719 process_all_functions.
11720
11721 2018-08-02 David Malcolm <dmalcolm@redhat.com>
11722
11723 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
11724 "const" to the "gimple *" and "rtx_insn *" parameters.
11725 * dumpfile.h (dump_user_location_t::dump_user_location_t):
11726 Likewise.
11727 (dump_location_t::dump_location_t): Likewise.
11728
11729 2018-08-01 Martin Sebor <msebor@redhat.com>
11730
11731 PR tree-optimization/86650
11732 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
11733 rather than a "gcall *". Directly pass the data of interest
11734 to percent_K_format, rather than building a temporary CALL_EXPR
11735 to hold it.
11736 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
11737 (gimple_fold_builtin_strncat): Adjust.
11738 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
11739 gcall* argument with gimple*.
11740 * gimple-ssa-warn-restrict.c (check_call): Same.
11741 (wrestrict_dom_walker::before_dom_children): Same.
11742 (builtin_access::builtin_access): Same.
11743 (check_bounds_or_overlap): Same
11744 (maybe_diag_overlap): Same.
11745 (maybe_diag_offset_bounds): Same.
11746 * tree-diagnostic.c (default_tree_printer): Move usage of
11747 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
11748 to this callsite.
11749 * tree-pretty-print.c (percent_K_format): Add argument.
11750 * tree-pretty-print.h: Add argument.
11751 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
11752 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
11753 (maybe_diag_stxncpy_trunc): Same.
11754 (handle_builtin_stxncpy): Same.
11755 (handle_builtin_strcat): Same.
11756
11757 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11758
11759 * match.pd: Optimise pointer range checks.
11760
11761 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11762
11763 PR tree-optimization/86758
11764 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
11765 to remove pattern statements.
11766
11767 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11768
11769 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
11770 result of dfs_enumerate_from when constructing stmt_vec_infos,
11771 instead of additionally calling get_loop_body.
11772
11773 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11774
11775 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
11776 parameter.
11777 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
11778 When creating an iv, assert that the step is not known to be zero.
11779 (vect_setup_realignment): Update call accordingly.
11780 * tree-vect-stmts.c (vectorizable_store): Likewise.
11781 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
11782
11783 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11784
11785 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
11786 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
11787 (vectorizable_reduction): Likewise.
11788 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11789 (vect_detect_hybrid_slp_stmts): Likewise.
11790 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11791
11792 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
11793
11794 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
11795 (wide_int_set_zero_nonzero_bits): ...this.
11796 (zero_nonzero_bits_from_vr): Rename to...
11797 (vrp_set_zero_nonzero_bits): ...this.
11798 (extract_range_from_multiplicative_op_1): Abstract wide int
11799 code...
11800 (wide_int_range_multiplicative_op): ...here.
11801 (extract_range_from_binary_expr_1): Extract wide int binary
11802 operations into their own functions.
11803 (wide_int_range_lshift): New.
11804 (wide_int_range_can_optimize_bit_op): New.
11805 (wide_int_range_shift_undefined_p): New.
11806 (wide_int_range_bit_xor): New.
11807 (wide_int_range_bit_ior): New.
11808 (wide_int_range_bit_and): New.
11809 (wide_int_range_trunc_mod): New.
11810 (extract_range_into_wide_ints): New.
11811 (vrp_shift_undefined_p): New.
11812 (extract_range_from_multiplicative_op): New.
11813 (vrp_can_optimize_bit_op): New.
11814 * tree-vrp.h (value_range::dump): New.
11815 (wide_int_range_multiplicative_op): New.
11816 (wide_int_range_lshift):New.
11817 (wide_int_range_shift_undefined_p): New.
11818 (wide_int_range_bit_xor): New.
11819 (wide_int_range_bit_ior): New.
11820 (wide_int_range_bit_and): New.
11821 (wide_int_range_trunc_mod): New.
11822 (zero_nonzero_bits_from_bounds): Rename to...
11823 (wide_int_set_zero_nonzero_bits): ...this.
11824 (zero_nonzero_bits_from_vr): Rename to...
11825 (vrp_set_zero_nonzero_bits): ...this.
11826 (range_easy_mask_min_max): Rename to...
11827 (wide_int_range_can_optimize_bit_op): this.
11828 * vr-values.c (simplify_bit_ops_using_ranges): Rename
11829 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
11830
11831 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11832
11833 * tree-vectorizer.h (vect_orig_stmt): New function.
11834 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
11835 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
11836 (vect_create_epilog_for_reduction): Likewise.
11837 (vectorizable_live_operation): Likewise.
11838 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
11839 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
11840 * tree-vect-stmts.c (vectorizable_call): Likewise.
11841 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
11842
11843 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11844
11845 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
11846 argument.
11847 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
11848 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
11849 (vect_transform_loop): Likewise.
11850 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
11851
11852 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11853
11854 * tree-vectorizer.h (vect_schedule_slp): Return void.
11855 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
11856 (vect_schedule_slp): Likewise.
11857
11858 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11859
11860 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
11861 argument.
11862 (vect_transform_loop): Update calls accordingly. Schedule SLP
11863 instances before the main loop, if any exist.
11864
11865 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11866
11867 PR tree-optimization/86749
11868 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
11869 If the lhs is used in a COND_EXPR, check that it is being used
11870 as the "then" or "else" value.
11871
11872 2018-08-01 Tom de Vries <tdevries@suse.de>
11873
11874 PR target/86800
11875 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
11876 speculation_safe_value_not_needed.
11877
11878 2018-08-01 Richard Biener <rguenther@suse.de>
11879
11880 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
11881 as base and offset.
11882
11883 2018-08-01 Martin Liska <mliska@suse.cz>
11884
11885 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
11886 format how successful transformation is dumped.
11887 (gimple_mod_pow2_value_transform): Likewise.
11888 (gimple_mod_subtract_transform): Likewise.
11889 (gimple_stringops_transform): Likewise.
11890
11891 2018-08-01 Martin Liska <mliska@suse.cz>
11892
11893 PR value-prof/35543
11894 * value-prof.c (interesting_stringop_to_profile_p):
11895 Simplify the code and add BUILT_IN_MEMMOVE.
11896 (gimple_stringops_transform): Likewise.
11897
11898 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
11899
11900 * config/aarch64/aarch64-simd.md
11901 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
11902 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
11903 use GPI iterator instead of SI mode.
11904
11905 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
11906
11907 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
11908 rs6000_speculation_barrier.
11909 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
11910 new barrier pattern name.
11911
11912 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
11913
11914 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
11915 (speculation_barrier): New insn.
11916
11917 2018-08-01 Richard Biener <rguenther@suse.de>
11918
11919 PR bootstrap/86724
11920 * graphite.h: Include isl/id.h and isl/space.h to allow build
11921 with ISL 0.20.
11922
11923 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
11924
11925 PR target/86651
11926 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11927 mode for COFF targets.
11928 * defaults.h (TARGET_COFF): Define.
11929 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
11930 TARGET_COFF): Define.
11931 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
11932 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
11933 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
11934
11935 2018-07-31 Alexandre Oliva <oliva@adacore.com>
11936
11937 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
11938 * gimple-streamer-out.c (output_bb): Save it.
11939 * lto-streamer-in.c (input_struct_function_base): Restore
11940 instance discriminator if available. Create map on demand.
11941 * lto-streamer-out.c (output_struct_function_base): Save it if
11942 available.
11943 * final.c (decl_to_instance_map): Document LTO strategy.
11944
11945 2018-07-31 Alexandre Oliva <oliva@adacore.com>
11946 Olivier Hainque <hainque@adacore.com>
11947
11948 * debug.h (decl_to_instance_map_t): New type.
11949 (decl_to_instance_map): Declare.
11950 (maybe_create_decl_to_instance_map): New inline function.
11951 * final.c (bb_discriminator, last_bb_discriminator): New statics,
11952 to track basic block discriminators.
11953 (final_start_function_1): Initialize them.
11954 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
11955 bb_discriminator.
11956 (decl_to_instance_map): New variable.
11957 (map_decl_to_instance, maybe_set_discriminator): New functions.
11958 (notice_source_line): Set discriminator.
11959
11960 2018-07-31 Ian Lance Taylor <iant@golang.org>
11961
11962 * targhooks.c (default_have_speculation_safe_value): Add
11963 ATTRIBUTE_UNUSED.
11964
11965 2018-07-31 David Malcolm <dmalcolm@redhat.com>
11966
11967 * dump-context.h: Include "pretty-print.h".
11968 (dump_context::refresh_dumps_are_enabled): New decl.
11969 (dump_context::emit_item): New decl.
11970 (class dump_context): Add fields "m_test_pp" and
11971 "m_test_pp_flags".
11972 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
11973 (temp_dump_context::get_dumped_text): New decl.
11974 (class temp_dump_context): Add field "m_pp".
11975 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
11976 (dump_context::refresh_dumps_are_enabled): ...and add a test for
11977 m_test_pp.
11978 (set_dump_file): Update for above change.
11979 (set_alt_dump_file): Likewise.
11980 (dump_loc): New overload, taking a pretty_printer *.
11981 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
11982 to any test pretty-printer.
11983 (make_item_for_dump_gimple_stmt): New function, adapted from
11984 optinfo::add_gimple_stmt.
11985 (dump_context::dump_gimple_stmt): Call it, and use the result,
11986 eliminating the direct usage of dump_file and alt_dump_file in
11987 favor of indirectly using them via emit_item.
11988 (make_item_for_dump_gimple_expr): New function, adapted from
11989 optinfo::add_gimple_expr.
11990 (dump_context::dump_gimple_expr): Call it, and use the result,
11991 eliminating the direct usage of dump_file and alt_dump_file in
11992 favor of indirectly using them via emit_item.
11993 (make_item_for_dump_generic_expr): New function, adapted from
11994 optinfo::add_tree.
11995 (dump_context::dump_generic_expr): Call it, and use the result,
11996 eliminating the direct usage of dump_file and alt_dump_file in
11997 favor of indirectly using them via emit_item.
11998 (make_item_for_dump_printf_va): New function, adapted from
11999 optinfo::add_printf_va.
12000 (make_item_for_dump_printf): New function.
12001 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
12002 and use the result, eliminating the direct usage of dump_file and
12003 alt_dump_file in favor of indirectly using them via emit_item.
12004 (make_item_for_dump_dec): New function.
12005 (dump_context::dump_dec): Call it, and use the result,
12006 eliminating the direct usage of dump_file and alt_dump_file in
12007 favor of indirectly using them via emit_item.
12008 (make_item_for_dump_symtab_node): New function, adapted from
12009 optinfo::add_symtab_node.
12010 (dump_context::dump_symtab_node): Call it, and use the result,
12011 eliminating the direct usage of dump_file and alt_dump_file in
12012 favor of indirectly using them via emit_item.
12013 (dump_context::begin_scope): Reimplement, avoiding direct usage
12014 of dump_file and alt_dump_file in favor of indirectly using them
12015 via emit_item.
12016 (dump_context::emit_item): New member function.
12017 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
12018 Set up test pretty-printer on the underlying context. Call
12019 refresh_dumps_are_enabled.
12020 (temp_dump_context::~temp_dump_context): Call
12021 refresh_dumps_are_enabled.
12022 (temp_dump_context::get_dumped_text): New member function.
12023 (selftest::verify_dumped_text): New function.
12024 (ASSERT_DUMPED_TEXT_EQ): New macro.
12025 (selftest::test_capture_of_dump_calls): Run all tests twice, with
12026 and then without optinfo enabled. Add uses of
12027 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
12028 * dumpfile.h: Update comment for the dump_* API.
12029 * optinfo-emit-json.cc
12030 (selftest::test_building_json_from_dump_calls): Update for new
12031 param for temp_dump_context ctor.
12032 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
12033 and "m_owned" field.
12034 (optinfo_item::~optinfo_item): Likewise.
12035 (optinfo::add_item): New member function.
12036 (optinfo::emit): Update comment.
12037 (optinfo::add_string): Delete.
12038 (optinfo::add_printf): Delete.
12039 (optinfo::add_printf_va): Delete.
12040 (optinfo::add_gimple_stmt): Delete.
12041 (optinfo::add_gimple_expr): Delete.
12042 (optinfo::add_tree): Delete.
12043 (optinfo::add_symtab_node): Delete.
12044 (optinfo::add_dec): Delete.
12045 * optinfo.h (class dump_context): New forward decl.
12046 (optinfo::add_item): New decl.
12047 (optinfo::add_string): Delete.
12048 (optinfo::add_printf): Delete.
12049 (optinfo::add_printf_va): Delete.
12050 (optinfo::add_gimple_stmt): Delete.
12051 (optinfo::add_gimple_expr): Delete.
12052 (optinfo::add_tree): Delete.
12053 (optinfo::add_symtab_node): Delete.
12054 (optinfo::add_dec): Delete.
12055 (optinfo::add_poly_int): Delete.
12056 (optinfo_item::optinfo_item): Remove "owned" param.
12057 (class optinfo_item): Remove field "m_owned".
12058
12059 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12060
12061 PR middle-end/86705
12062 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
12063 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
12064 requested variable alignment.
12065 (expand_one_ssa_partition): Likewise.
12066 (expand_one_var): Likewise.
12067
12068 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12069
12070 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
12071 to speculation_safe_value_not_needed.
12072
12073 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12074
12075 * targhooks.h (speculation_safe_value_not_needed): New prototype.
12076 * targhooks.c (speculation_safe_value_not_needed): New function.
12077 * target.def (have_speculation_safe_value): Update documentation.
12078 * doc/tm.texi: Regenerated.
12079
12080 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12081
12082 * config/aarch64/iterators.md (ALLI_TI): New iterator.
12083 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
12084 expand.
12085 (despeculate_copy<ALLI:mode>_insn): New insn.
12086 (despeculate_copyti_insn): New insn.
12087 (despeculate_simple<ALLI:mode>): New insn
12088 (despeculate_simpleti): New insn.
12089 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
12090 function.
12091 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
12092 aarch64_speculation_safe_value.
12093 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
12094
12095 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12096
12097 * config/aarch64/aarch64-speculation.cc: New file.
12098 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
12099 before pass_reorder_blocks.
12100 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
12101 prototype.
12102 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
12103 X14 and X15 when tracking speculation.
12104 * config/aarch64/aarch64.md (register name constants): Add
12105 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
12106 (unspec): Add UNSPEC_SPECULATION_TRACKER.
12107 (speculation_barrier): New insn attribute.
12108 (cmp<mode>): Allow SP in comparisons.
12109 (speculation_tracker): New insn.
12110 (speculation_barrier): Add speculation_barrier attribute.
12111 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
12112 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
12113 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
12114
12115 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12116
12117 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
12118 aarch64_track_speculation is true.
12119 (tb<optab><mode>1): Likewise.
12120 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
12121 generate CB[N]Z when tracking speculation.
12122 (aarch64_split_compare_and_swap): Likewise.
12123 (aarch64_split_atomic_op): Likewise.
12124
12125 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12126
12127 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
12128
12129 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12130
12131 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
12132 (speculation_barrier): New insn.
12133
12134 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12135
12136 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
12137 * config/arm/arm.md (speculation_barrier): New expand.
12138 (speculation_barrier_insn): New pattern.
12139
12140 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12141
12142 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
12143 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
12144 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
12145 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
12146 list.
12147 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
12148 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
12149 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
12150 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
12151 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
12152 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
12153 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
12154 * builtins.c (expand_speculation_safe_value): New function.
12155 (expand_builtin): Call it.
12156 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
12157 * doc/extend.texi: Document __builtin_speculation_safe_value.
12158 * doc/md.texi: Document "speculation_barrier" pattern.
12159 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
12160 TARGET_HAVE_SPECULATION_SAFE_VALUE.
12161 * doc/tm.texi: Regenerated.
12162 * target.def (have_speculation_safe_value, speculation_safe_value): New
12163 hooks.
12164 * targhooks.c (default_have_speculation_safe_value): New function.
12165 (default_speculation_safe_value): New function.
12166 * targhooks.h (default_have_speculation_safe_value): Add prototype.
12167 (default_speculation_safe_value): Add prototype.
12168
12169 2018-07-31 David Malcolm <dmalcolm@redhat.com>
12170
12171 * dump-context.h (dump_context::dump_loc): New decl.
12172 * dumpfile.c (dump_context::dump_loc): New member function.
12173 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
12174 and dump_gimple_stmt.
12175 (dump_context::dump_gimple_expr_loc): Likewise, using
12176 dump_gimple_expr.
12177 (dump_context::dump_generic_expr_loc): Likewise, using
12178 dump_generic_expr.
12179 (dump_context::dump_printf_loc_va): Likewise, using
12180 dump_printf_va.
12181 (dump_context::begin_scope): Explicitly using the global function
12182 "dump_loc", rather than the member function.
12183
12184 2018-07-31 Martin Sebor <msebor@redhat.com>
12185
12186 PR tree-optimization/86741
12187 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
12188
12189 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
12190
12191 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
12192 depend on whether prefetch instructions will be emitted or not.
12193 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
12194 will be emitted or not.
12195 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
12196 (TARGET_SETMEM_PFD): New macros.
12197
12198 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12199
12200 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
12201 (NULL_STMT_VEC_INFO): Delete.
12202 (stmt_vec_info::operator*): Likewise.
12203 (stmt_vec_info::operator gimple *): Likewise.
12204 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
12205 of NULL_STMT_VEC_INFO.
12206 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12207 (vect_reassociating_reduction_p): Likewise.
12208 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
12209 (vectorizable_store): Likewise.
12210 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
12211 (vec_info::free_stmt_vec_infos): Likewise.
12212
12213 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12214
12215 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
12216 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
12217
12218 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12219
12220 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
12221 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
12222 (vec_info::free_stmt_vec_info): New private member functions.
12223 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
12224 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
12225 * tree-parloops.c (gather_scalar_reductions): Remove calls to
12226 set_stmt_vec_info_vec and free_stmt_vec_infos.
12227 * tree-vect-loop.c (_loop_vec_info): Remove call to
12228 set_stmt_vec_info_vec.
12229 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
12230 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
12231 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
12232 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
12233 (vec_info::free_stmt_vec_info): ...these new functions. Remove
12234 assignments in {vec_info::,}new_stmt_vec_info that are redundant
12235 with the clearing in the xcalloc.
12236 (stmt_vec_info_vec): Delete.
12237 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
12238 (vectorize_loops): Likewise.
12239 (vec_info::~vec_info): Remove argument from call to
12240 free_stmt_vec_infos.
12241 (vec_info::add_stmt): Remove vinfo argument from call to
12242 new_stmt_vec_info.
12243
12244 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12245
12246 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
12247 rather than a gimple stmt.
12248 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
12249 information for pattern statements when passed the original
12250 statement; instead wait to be passed the pattern statement itself.
12251 Don't call set_vinfo_for_stmt here.
12252 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
12253 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
12254 stmt_vec_infos here.
12255 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
12256 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
12257 stmt_vec_infos entry.
12258
12259 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12260
12261 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
12262 * tree-vectorizer.c (vec_info::replace_stmt): New function.
12263 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
12264 * tree-vect-stmts.c (vectorizable_call): Likewise.
12265 (vectorizable_simd_clone_call): Likewise.
12266
12267 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12268
12269 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
12270 * tree-vectorizer.c (vec_info::remove_stmt): New function.
12271 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
12272 * tree-vect-loop.c (vect_transform_loop): Likewise.
12273 * tree-vect-slp.c (vect_schedule_slp): Likewise.
12274 * tree-vect-stmts.c (vect_remove_stores): Likewise.
12275
12276 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12277
12278 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
12279 (vect_dr_stmt): Delete.
12280 * tree-vectorizer.c (vec_info::lookup_dr): New function.
12281 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
12282 of DR_VECT_AUX.
12283 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
12284 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
12285 (vect_verify_datarefs_alignment, vect_peeling_supportable)
12286 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
12287 (vect_analyze_data_refs): Likewise.
12288 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
12289 argument.
12290 (vect_find_same_alignment_drs): Likewise.
12291 (vect_slp_analyze_node_dependences): Update calls accordingly.
12292 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
12293 instead of DR_VECT_AUX.
12294 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
12295 of a vector data references. Use vec_info::lookup_dr instead of
12296 DR_VECT_AUX.
12297 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
12298 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
12299 instead of DR_VECT_AUX.
12300
12301 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12302
12303 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
12304 dr_vec_info.
12305 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
12306 accordingly.
12307 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12308 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12309 (vect_gen_prolog_loop_niters): Likewise.
12310
12311 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12312
12313 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
12314 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
12315 (vect_known_alignment_in_bytes, vect_dr_behavior)
12316 (vect_get_scalar_dr_size): Take references as dr_vec_infos
12317 instead of data_references. Update calls to other routines for
12318 which the same change has been made.
12319 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
12320 dr_vec_infos instead of stmt_vec_infos.
12321 (vect_analyze_data_ref_dependence): Update call accordingly.
12322 (vect_slp_analyze_data_ref_dependence)
12323 (vect_record_base_alignments): Use DR_VECT_AUX.
12324 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
12325 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
12326 (vector_alignment_reachable_p, vect_get_data_access_cost)
12327 (vect_peeling_supportable, vect_analyze_group_access_1)
12328 (vect_analyze_group_access, vect_analyze_data_ref_access)
12329 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
12330 (vect_compile_time_alias, vect_small_gap_p)
12331 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
12332 (vect_supportable_dr_alignment): Take references as dr_vec_infos
12333 instead of data_references. Update calls to other routines for
12334 which the same change has been made.
12335 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
12336 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
12337 (vect_slp_analyze_and_verify_node_alignment)
12338 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
12339 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
12340 (vect_setup_realignment): Use dr_vec_infos. Update calls after
12341 above changes.
12342 (_vect_peel_info::dr): Replace with...
12343 (_vect_peel_info::dr_info): ...this new field.
12344 (vect_peeling_hash_get_most_frequent)
12345 (vect_peeling_hash_choose_best_peeling): Update accordingly.
12346 (vect_peeling_hash_get_lowest_cost):
12347 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
12348 routines for which the same change has been made.
12349 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
12350 data_reference.
12351 * tree-vect-loop-manip.c (get_misalign_in_elems)
12352 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
12353 above changes.
12354 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12355 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
12356 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
12357 (get_group_load_store_type, get_negative_load_store_type)
12358 (vect_get_data_ptr_increment, vectorizable_store)
12359 (vectorizable_load): Likewise.
12360 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
12361 Update calls to other routines for which the same change has been made.
12362
12363 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12364
12365 * tree-vectorizer.h (vec_info::move_dr): New member function.
12366 (dataref_aux): Rename to...
12367 (dr_vec_info): ...this and add "dr" and "stmt" fields.
12368 (_stmt_vec_info::dr_aux): Update accordingly.
12369 (_stmt_vec_info::data_ref_info): Delete.
12370 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
12371 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
12372 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
12373 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
12374 of data_ref.
12375 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
12376 (STMT_VINFO_DR_INFO): New macro.
12377 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
12378 (set_dr_misalignment): Update after rename of dataref_aux.
12379 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
12380 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
12381 initialization of STMT_VINFO_DATA_REF.
12382 * tree-vectorizer.c (vec_info::move_dr): New function.
12383 * tree-vect-patterns.c (vect_recog_bool_pattern)
12384 (vect_recog_mask_conversion_pattern)
12385 (vect_recog_gather_scatter_pattern): Use it.
12386 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
12387 the "dr" and "stmt" fields of dr_vec_info instead of
12388 STMT_VINFO_DATA_REF.
12389
12390 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12391
12392 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
12393 (is_pattern_stmt_p): Use it.
12394 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
12395 on pattern statements.
12396
12397 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12398
12399 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
12400 original stmt as a stmt_vec_info rather than a gimple stmt.
12401 (vect_pattern_recog_1): Take the statement directly as a
12402 stmt_vec_info, rather than via a gimple_stmt_iterator.
12403 Update call to vect_mark_pattern_stmts.
12404 (vect_pattern_recog): Update calls accordingly.
12405
12406 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12407
12408 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
12409 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
12410 a vect_def_type for the first argument.
12411 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
12412 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
12413 operand if it isn't defined by a vectorized statement.
12414 (vect_build_gather_load_calls): Remove the mask_dt argument and
12415 update calls to vect_get_vec_def_for_stmt_copy.
12416 (vectorizable_bswap): Likewise the dt argument.
12417 (vectorizable_call): Update calls to vectorizable_bswap and
12418 vect_get_vec_def_for_stmt_copy.
12419 (vectorizable_simd_clone_call, vectorizable_assignment)
12420 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
12421 (vectorizable_comparison): Update calls to
12422 vect_get_vec_def_for_stmt_copy.
12423 (vectorizable_store): Likewise. Remove now-unnecessary calls to
12424 vect_is_simple_use.
12425 (vect_get_loop_based_defs): Remove dt argument and update call
12426 to vect_get_vec_def_for_stmt_copy.
12427 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
12428 and vect_get_vec_def_for_stmt_copy.
12429 (vectorizable_load): Update calls to vect_build_gather_load_calls
12430 and vect_get_vec_def_for_stmt_copy.
12431 * tree-vect-loop.c (vect_create_epilog_for_reduction)
12432 (vectorizable_reduction, vectorizable_live_operation): Update calls
12433 to vect_get_vec_def_for_stmt_copy.
12434
12435 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12436
12437 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
12438 and gimple stmt arguments with a stmt_vec_info.
12439 (vect_record_base_alignments): Update calls accordingly.
12440 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
12441 and gimple stmt arguments with a stmt_vec_info.
12442 (vect_build_slp_tree_1): Remove vinfo argument and update call
12443 to vect_record_max_nunits.
12444 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
12445 and vect_record_max_nunits.
12446
12447 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12448
12449 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
12450 file and take a stmt_vec_info instead of a gimple stmt.
12451 (supportable_widening_operation, vect_finish_replace_stmt)
12452 (vect_finish_stmt_generation, vect_get_store_rhs)
12453 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
12454 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
12455 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
12456 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
12457 (vect_create_data_ref_ptr, bump_vector_ptr)
12458 (vect_permute_store_chain, vect_setup_realignment)
12459 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
12460 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
12461 (vectorizable_reduction, vectorizable_induction)
12462 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
12463 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
12464 than gimple stmts as arguments.
12465 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
12466 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
12467 (can_group_stmts_p, vect_check_gather_scatter)
12468 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
12469 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
12470 (vect_permute_load_chain, vect_shift_permute_load_chain)
12471 (vect_transform_grouped_load)
12472 (vect_record_grouped_load_vectors): Likewise.
12473 * tree-vect-loop.c (vect_fixup_reduc_chain)
12474 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
12475 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
12476 (vectorizable_reduction, vectorizable_induction)
12477 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
12478 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
12479 (vect_get_load_store_mask): Likewise.
12480 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
12481 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
12482 * tree-vect-stmts.c (vect_mark_relevant)
12483 (is_simple_and_all_uses_invariant)
12484 (exist_non_indexing_operands_for_use_p, process_use)
12485 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
12486 (vect_get_vec_def_for_operand, vect_get_vec_defs)
12487 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
12488 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
12489 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
12490 (get_negative_load_store_type, get_load_store_type)
12491 (vect_check_load_store_mask, vect_check_store_rhs)
12492 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
12493 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12494 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12495 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12496 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
12497 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
12498 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
12499 (supportable_widening_operation): Likewise.
12500
12501 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12502
12503 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
12504 a stmt_vec_info instead of a gcall.
12505 (vect_check_gather_scatter): Update call accordingly.
12506 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
12507 of a gphi.
12508 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
12509 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
12510 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
12511 instead of a gimple stmt.
12512 (vect_transform_loop): Update calls accordingly.
12513 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
12514 stmt_vec_infos instead of gimple stmts.
12515 (vect_analyze_slp_instance): Update use accordingly.
12516 * tree-vect-stmts.c (read_vector_array, write_vector_array)
12517 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
12518 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
12519 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
12520 (vect_gen_widened_results_half, vect_get_loop_based_defs)
12521 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
12522 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
12523 down to subroutines.
12524
12525 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12526
12527 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
12528 of the worklist from a vector of gimple stmts to a vector of
12529 stmt_vec_infos.
12530 * tree-vect-stmts.c (vect_mark_relevant, process_use)
12531 (vect_mark_stmts_to_be_vectorized): Likewise
12532
12533 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12534
12535 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
12536 statement before passing it to vect_analyze_stmt.
12537 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
12538 the chain of phi vector definitions. Track the exit phi via its
12539 stmt_vec_info.
12540 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
12541 STMT_VINFO_REDUC_DEF.
12542 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
12543 stmt_vec_infos to handle the statement chains.
12544 (vect_get_slp_defs): Record the first statement in the node
12545 using a stmt_vec_info.
12546 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
12547 statements here and pass their stmt_vec_info down to subroutines.
12548 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
12549 down to vect_finish_stmt_generation.
12550 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
12551 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
12552 stmt_vec_infos to subroutines.
12553 (vect_remove_stores): Use stmt_vec_infos to handle the statement
12554 chains.
12555
12556 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12557
12558 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
12559 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
12560 (vect_permute_store_chain, vect_setup_realignment)
12561 (vect_permute_load_chain, vect_shift_permute_load_chain)
12562 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
12563 stmts internally, and when passing values to other vectorizer routines.
12564 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
12565 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
12566 (vect_analyze_loop_operations, get_initial_def_for_reduction)
12567 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
12568 (vectorizable_reduction, vectorizable_induction)
12569 (vectorizable_live_operation, vect_transform_loop_stmt)
12570 (vect_transform_loop): Likewise.
12571 * tree-vect-patterns.c (vect_reassociating_reduction_p)
12572 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
12573 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
12574 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12575 (vect_slp_analyze_node_operations_1): Likewise.
12576 * tree-vect-stmts.c (vect_mark_relevant, process_use)
12577 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
12578 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
12579 (vect_finish_stmt_generation_1, get_group_load_store_type)
12580 (get_load_store_type, vect_build_gather_load_calls)
12581 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12582 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12583 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12584 (vectorizable_store, vectorizable_load, vectorizable_condition)
12585 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
12586 (supportable_widening_operation): Likewise.
12587 (vect_get_vector_types_for_stmt): Likewise.
12588 * tree-vectorizer.h (vect_dr_behavior): Likewise.
12589
12590 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12591
12592 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12593 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
12594 (vect_permute_store_chain, vect_permute_load_chain)
12595 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
12596 repeated stmt_vec_info lookups.
12597 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
12598 (vect_update_ivs_after_vectorizer): Likewise.
12599 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
12600 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
12601 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
12602 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12603 (vect_bb_slp_scalar_cost): Likewise.
12604 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
12605
12606 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12607
12608 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
12609 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
12610 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
12611 to get gassigns and gcalls, rather than operating on generc gimple
12612 stmts.
12613 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
12614 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
12615 (vectorizable_load, vect_analyze_stmt): Likewise.
12616 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
12617
12618 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12619
12620 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
12621 return stmt_vec_infos rather than gimple stmts. Do not accept
12622 null arguments.
12623 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
12624 of a gimple stmt.
12625 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
12626 Update use of get_later_stmt.
12627 (vect_get_constant_vectors): Update call accordingly.
12628 (vect_schedule_slp_instance): Likewise
12629 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
12630 (vect_slp_analyze_instance_dependence): Likewise.
12631 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
12632
12633 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12634
12635 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
12636 (stmt_info_for_cost::stmt_info): ...this new field.
12637 (add_stmt_costs): Update accordingly.
12638 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
12639 (vect_get_known_peeling_cost): Likewise.
12640 (vect_estimate_min_profitable_iters): Likewise.
12641 * tree-vect-stmts.c (record_stmt_cost): Likewise.
12642
12643 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12644
12645 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
12646 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12647 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
12648 accordingly.
12649 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
12650
12651 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12652
12653 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
12654 a gimple stmt to a stmt_vec_info.
12655 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
12656
12657 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12658
12659 * tree-vectorizer.h (vec_info::grouped_stores): Change from
12660 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12661 (_loop_vec_info::reduction_chains): Likewise.
12662 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
12663 accordingly.
12664 * tree-vect-slp.c (vect_analyze_slp): Likewise.
12665
12666 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12667
12668 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
12669 a gimple stmt to a stmt_vec_info.
12670 (_stmt_vec_info::next_element): Likewise.
12671 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
12672 (vect_slp_analyze_and_verify_node_alignment)
12673 (vect_analyze_group_access_1, vect_analyze_group_access)
12674 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
12675 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
12676 (vect_supportable_dr_alignment): Update accordingly.
12677 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
12678 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
12679 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
12680 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
12681 * tree-vect-slp.c (vect_build_slp_tree_1)
12682 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
12683 (vect_split_slp_store_group, vect_analyze_slp_instance)
12684 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
12685 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
12686 (get_group_load_store_type, get_load_store_type)
12687 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
12688 (vect_transform_stmt, vect_remove_stores): Likewise.
12689
12690 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12691
12692 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
12693 than a gimple stmt.
12694 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12695 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
12696 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
12697 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
12698 (vector_alignment_reachable_p, vect_get_data_access_cost)
12699 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
12700 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
12701 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
12702 (vect_analyze_group_access_1, vect_analyze_group_access)
12703 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
12704 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
12705 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
12706 result of vect_dr_stmt and use the stmt_vec_info instead of
12707 the associated gimple stmt.
12708 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12709 (vect_gen_prolog_loop_niters): Likewise.
12710 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12711
12712 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12713
12714 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
12715 to a vec<stmt_vec_info>.
12716 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
12717 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
12718 vec<stmt_vec_info>.
12719 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
12720 to a vec<stmt_vec_info>.
12721 (bst_traits::value_type, bst_traits::value_type): Likewise.
12722 (bst_traits::hash): Update accordingly.
12723 (vect_get_and_check_slp_defs): Change the stmts parameter from
12724 a vec<gimple *> to a vec<stmt_vec_info>.
12725 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
12726 (vect_build_slp_tree): Likewise.
12727 (vect_build_slp_tree_2): Likewise. Update uses of
12728 SLP_TREE_SCALAR_STMTS.
12729 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
12730 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
12731 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
12732 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
12733 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
12734 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
12735 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
12736 (vect_get_constant_vectors, vect_get_slp_defs)
12737 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
12738 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
12739 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
12740 instead of gimple stmts.
12741 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
12742 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
12743 (vect_slp_analyze_instance_dependence): Update uses of
12744 SLP_TREE_SCALAR_STMTS.
12745 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12746 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
12747 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
12748 (get_initial_defs_for_reduction): Likewise.
12749 (vect_create_epilog_for_reduction): Likewise.
12750 (vectorize_fold_left_reduction): Likewise.
12751 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
12752 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
12753 (can_vectorize_live_stmts): Likewise.
12754
12755 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12756
12757 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
12758 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12759 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
12760 than gimple stmts.
12761 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
12762 of a gimple stmt.
12763 (gather_scalar_reductions): Update after above interface changes.
12764 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
12765 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
12766 than gimple stmts.
12767 (vect_force_simple_reduction): Likewise.
12768 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
12769 LOOP_VINFO_REDUCTIONS.
12770 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12771
12772 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12773
12774 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
12775 a gimple stmt to a stmt_vec_info.
12776 * tree-vect-loop.c (vect_active_double_reduction_p)
12777 (vect_force_simple_reduction, vectorizable_reduction): Update
12778 accordingly.
12779
12780 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12781
12782 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
12783 vec<gimple *> to a vec<stmt_vec_info>.
12784 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
12785 the reduction_phis argument from a vec<gimple *> to a
12786 vec<stmt_vec_info>.
12787 (vectorizable_reduction): Likewise the phis local variable that
12788 is passed to vect_create_epilog_for_reduction. Update for new type
12789 of SLP_TREE_VEC_STMTS.
12790 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
12791 (vectorizable_live_operation): Likewise.
12792 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
12793 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
12794
12795 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12796
12797 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
12798 a gimple stmt to a stmt_vec_info.
12799 (vectorizable_condition, vectorizable_live_operation)
12800 (vectorizable_reduction, vectorizable_induction): Pass back the
12801 vectorized statement as a stmt_vec_info.
12802 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
12803 use of STMT_VINFO_VEC_STMT.
12804 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
12805 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
12806 as stmt_vec_infos rather than gimple stmts.
12807 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
12808 to a stmt_vec_info.
12809 (vectorizable_live_operation): Likewise.
12810 (vectorizable_reduction, vectorizable_induction): Likewise,
12811 updating use of STMT_VINFO_VEC_STMT.
12812 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
12813 of STMT_VINFO_VEC_STMT.
12814 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
12815 (vectorizable_simd_clone_call, vectorizable_conversion)
12816 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12817 (vectorizable_store, vectorizable_load, vectorizable_condition)
12818 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
12819 from a gimple stmt to a stmt_vec_info.
12820 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
12821 pointer to a stmt_vec_info to the vectorizable_* routines.
12822
12823 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12824
12825 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
12826 a gimple stmt to a stmt_vec_info.
12827 (is_pattern_stmt_p): Update accordingly.
12828 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
12829 (vect_record_grouped_load_vectors): Likewise.
12830 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
12831 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
12832 (vect_model_reduction_cost): Likewise.
12833 (vect_create_epilog_for_reduction): Likewise.
12834 (vectorizable_reduction, vectorizable_induction): Likewise.
12835 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12836 Return the stmt_vec_info for the pattern statement.
12837 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
12838 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
12839 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
12840 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
12841 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
12842 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
12843 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
12844 (free_stmt_vec_info, vect_is_simple_use): Likewise.
12845
12846 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12847
12848 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
12849 (vect_finish_stmt_generation): Likewise.
12850 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
12851 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
12852 (vect_build_gather_load_calls): Use the return value of the above
12853 functions instead of a separate call to vinfo_for_stmt. Use narrow
12854 scopes for the input gimple stmt and wider scopes for the associated
12855 stmt_vec_info. Use vec_info::lookup_def when setting these
12856 stmt_vec_infos from an SSA_NAME definition.
12857 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12858 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12859 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12860 (vectorizable_store, vectorizable_load, vectorizable_condition)
12861 (vectorizable_comparison): Likewise.
12862 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
12863 (vectorizable_reduction): Likewise.
12864
12865 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12866
12867 * tree-vectorizer.h (vect_is_simple_use): Add an optional
12868 stmt_vec_info * parameter before the optional gimple **.
12869 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
12870 (process_use, vect_get_vec_def_for_operand_1): Update callers.
12871 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
12872 * tree-vect-loop.c (vectorizable_reduction): Likewise.
12873 (vectorizable_live_operation): Likewise.
12874 * tree-vect-patterns.c (type_conversion_p): Likewise.
12875 (vect_look_through_possible_promotion): Likewise.
12876 (vect_recog_rotate_pattern): Likewise.
12877 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
12878
12879 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12880
12881 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
12882 a typedef to a wrapper class.
12883 (NULL_STMT_VEC_INFO): New macro.
12884 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
12885 (stmt_vec_info::operator*): New function.
12886 (stmt_vec_info::operator gimple *): Likewise.
12887 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
12888 (add_stmt_costs): Likewise.
12889 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
12890 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
12891 (vect_get_known_peeling_cost): Likewise.
12892 (vect_estimate_min_profitable_iters): Likewise.
12893 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12894 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
12895 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
12896 (vectorizable_store, free_stmt_vec_infos): Likewise.
12897 (new_stmt_vec_info): Change return type of xcalloc to
12898 _stmt_vec_info *.
12899
12900 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12901
12902 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
12903 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
12904 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
12905 a single_imm_use-based sequence.
12906 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
12907
12908 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12909
12910 * tree-vectorizer.h (vec_info::lookup_def): Declare.
12911 * tree-vectorizer.c (vec_info::lookup_def): New function.
12912 * tree-vect-patterns.c (vect_get_internal_def): Use it.
12913 (vect_widened_op_tree): Likewise.
12914 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
12915 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
12916 (vectorizable_reduction): Likewise.
12917 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
12918 of a gimple *.
12919 (vect_is_slp_reduction): Update calls accordingly. Use
12920 vec_info::lookup_def.
12921 (vect_is_simple_reduction): Likewise
12922 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
12923
12924 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12925
12926 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
12927 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
12928 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
12929 of vinfo_for_stmt.
12930 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
12931 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
12932 (vect_update_vf_for_slp, vect_analyze_loop_operations)
12933 (vect_is_slp_reduction, vectorizable_induction)
12934 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
12935 * tree-vect-patterns.c (vect_init_pattern_stmt):
12936 (vect_determine_min_output_precision_1, vect_determine_precisions)
12937 (vect_pattern_recog): Likewise.
12938 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
12939 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
12940 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
12941 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
12942 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
12943 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
12944 info field from a loop to a loop_vec_info.
12945
12946 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12947
12948 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
12949 (vec_info::add_stmt): Declare.
12950 * tree-vectorizer.c (vec_info::add_stmt): New function.
12951 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
12952 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
12953 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
12954 (vectorizable_induction): Likewise.
12955 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
12956 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
12957 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
12958 (vectorizable_load): Likewise.
12959 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12960 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
12961 (vect_recog_gather_scatter_pattern): Likewise.
12962 (append_pattern_def_seq): Likewise. Remove a check that is
12963 performed by add_stmt itself.
12964
12965 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12966
12967 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
12968 which make_ssa_name was called with new_stmt before new_stmt
12969 had been created.
12970
12971 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12972
12973 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
12974 split out from...
12975 (vect_is_slp_reduction): ...here...
12976 (vect_is_simple_reduction): ...and here. Remove repetition of tests
12977 that are already known to be false.
12978
12979 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12980
12981 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
12982 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
12983 STMT_VINFO_NUM_SLP_USES when it's true.
12984 (vect_free_slp_instance): Add a final_p parameter and pass it to
12985 vect_free_slp_tree.
12986 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
12987 (vect_analyze_slp_instance): Likewise.
12988 (vect_slp_analyze_operations): Likewise.
12989 (vect_slp_analyze_bb_1): Likewise.
12990 * tree-vectorizer.c (vec_info): Likewise.
12991 * tree-vect-loop.c (vect_transform_loop): Likewise.
12992
12993 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12994
12995 * tree-vect-loop.c (vectorizable_reduction): Assert that the
12996 function is not called for second and subsequent members of
12997 a reduction group.
12998
12999 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13000
13001 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
13002 cases for nested loops from here to ...
13003 (vect_create_epilog_for_reduction): ...here. Only call
13004 vect_is_simple_use for inner-loop reductions.
13005
13006 2018-07-31 Martin Liska <mliska@suse.cz>
13007
13008 PR gcov-profile/85338
13009 PR gcov-profile/85350
13010 PR gcov-profile/85372
13011 * profile.c (struct location_triplet): New.
13012 (struct location_triplet_hash): Likewise.
13013 (output_location): Do not output a BB that
13014 is already recorded for a line.
13015 (branch_prob): Use streamed_locations.
13016
13017 2018-07-31 Martin Liska <mliska@suse.cz>
13018
13019 PR gcov-profile/85370
13020 * coverage.c (coverage_begin_function): Do not mark target
13021 clones as artificial functions.
13022
13023 2018-07-31 Martin Liska <mliska@suse.cz>
13024
13025 PR gcov-profile/83813
13026 PR gcov-profile/84758
13027 PR gcov-profile/85217
13028 PR gcov-profile/85332
13029 * profile.c (branch_prob): Do not record GOTO expressions
13030 for GIMPLE statements which locations are already streamed.
13031
13032 2018-07-31 Olivier Hainque <hainque@adacore.com>
13033
13034 * gcc.c (handle_spec_function): Accept a soft_matched_part
13035 argument, as do_spec_1. Pass it down to ...
13036 (eval_spec_function): Accept a soft_matched_part argument,
13037 and pass it down to ...
13038 (do_spec_2): Accept a soft_matched_part argument, and pass
13039 it down to do_spec_1.
13040 (do_spec_1): Pass soft_matched_part to handle_spec_function.
13041 (handle_braces): Update call to handle_spec_function.
13042 (driver::set_up_specs): Update calls to do_spec_2.
13043 (compare_debug_dump_opt_spec_function): Likewise.
13044 (compare_debug_self_opt_spec_function): Likewise.
13045
13046 2018-07-31 Olivier Hainque <hainque@adacore.com>
13047
13048 * common.opt (nolibc): New option.
13049 * doc/invoke.texi (Link Options): Document it.
13050 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
13051 * config/alpha/linux.h: Likewise.
13052 * config/arc/elf.h: Likewise.
13053 * config/arm/uclinux-elf.h: Likewise.
13054 * config/arm/unknown-elf.h: Likewise.
13055 * config/avr/avrlibc.h: Likewise.
13056 * config/bfin/bfin.h: Likewise.
13057 * config/bfin/linux.h: Likewise.
13058 * config/bfin/uclinux.h: Likewise.
13059 * config/darwin.h: Likewise.
13060 * config/darwin10.h: Likewise.
13061 * config/darwin12.h: Likewise.
13062 * config/gnu-user.h: Likewise.
13063 * config/lm32/uclinux-elf.h: Likewise.
13064 * config/pa/pa-hpux11.h: Likewise.
13065 * config/pa/pa64-hpux.h: Likewise.
13066 * config/sparc/sparc.h: Likewise.
13067
13068 2018-07-31 Olivier Hainque <hainque@adacore.com>
13069
13070 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
13071 undefined variables.
13072
13073 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
13074
13075 PR target/86640
13076 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
13077 instead of GEN_INT.
13078
13079 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
13080
13081 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
13082 terminated string literal.
13083
13084 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
13085
13086 PR rtl-optimization/85160
13087 * combine.c (is_just_move): New function.
13088 (try_combine): Allow combining two instructions into two if neither of
13089 the original instructions was a move.
13090
13091 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
13092
13093 PR target/86673
13094 * doc/extend.texi (Global Register Variables): Discourage use of type
13095 qualifiers.
13096 (Local Register Variables): Likewise.
13097
13098 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
13099
13100 PR tree-optimization/86506
13101 * hwint.h (ceil_log2): Resync with hwint.c implementation.
13102
13103 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
13104
13105 PR target/86547
13106 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
13107 hard_regno, make sure no insn between `from` and `to` clobbers it.
13108
13109 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
13110 Tom de Vries <tdevries@suse.de>
13111
13112 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
13113 (PTX_DEFAULT_RUNTIME_DIM): ... this.
13114 (nvptx_goacc_validate_dims): Set default worker and gang dims to
13115 PTX_DEFAULT_RUNTIME_DIM.
13116 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
13117
13118 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
13119
13120 * config/pa/pa.c (pa_output_addr_vec): Align address table.
13121 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
13122 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
13123
13124 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
13125
13126 * config/rs6000/constraints.md (wG constraint): Delete, no longer
13127 used.
13128 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
13129 predicate to reflect toc fusion has been deleted.
13130 (toc_fusion_mem_raw): Delete, no longer used.
13131 (toc_fusion_mem_wrapped): Likewise.
13132 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
13133 fusion mask bit.
13134 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
13135 Delete, no longer used.
13136 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
13137 meant to be used for toc fusion.
13138 (rs6000_debug_print_mode): Delete toc fusion debugging.
13139 (rs6000_debug_reg_global): Likewise.
13140 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
13141 fusion and secondary reload support that were never used.
13142 (rs6000_option_override_internal): Delete TOC fusion, that was only
13143 partially defined, and it did not work unless you also used the
13144 -mcmodel= switch.
13145 (rs6000_legitimate_address_p): Delete TOC fusion support.
13146 (rs6000_opt_masks): Likewise.
13147 (fusion_wrap_memory_address): Delete function, no longer used.
13148 (fusion_split_address); Delete TOC fusion support.
13149 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
13150 longer used with toc fusion being deleted.
13151 (TARGET_TOC_FUSION_FP): Likewise.
13152 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
13153 UNSPEC.
13154 (toc fusion spliter): Delete TOC fusion support.
13155 (toc_fusionload_<mode>): Likewise.
13156 (toc_fusionload_di): Likewise.
13157 (fusion_gpr_load_<mode>): Delete generator function, this insn no
13158 longer needs to be named. Rename predicate to delete TOC fusion.
13159 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
13160 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
13161 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
13162 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
13163 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
13164
13165 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
13166
13167 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
13168 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
13169 __int128 in built-in function prototypes.
13170 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
13171 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
13172
13173 2018-07-27 Martin Sebor <msebor@redhat.com>
13174
13175 PR tree-optimization/86696
13176 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
13177 types, including enums.
13178 (handle_char_store): Be prepared for the above function to fail.
13179
13180 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
13181
13182 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
13183 when optimization level is lower than 2 or optimize for size.
13184
13185 2018-07-26 Martin Sebor <msebor@redhat.com>
13186
13187 PR tree-optimization/86043
13188 PR tree-optimization/86042
13189 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
13190 (get_string_cst_length): Rename...
13191 (get_min_string_length): ...to this. Add argument.
13192 (handle_char_store): Extend to handle multi-character stores by
13193 MEM_REF.
13194 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
13195 * tree.h (initializer_zerop): Add argument.
13196
13197 2018-07-26 Jakub Jelinek <jakub@redhat.com>
13198
13199 PR middle-end/86660
13200 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
13201 declare target to variables if they have always,{to,from,tofrom} map
13202 kinds.
13203
13204 2018-07-26 Martin Liska <mliska@suse.cz>
13205
13206 PR lto/86548
13207 * lto-wrapper.c: Add linker_output as prefix
13208 for ltrans_output_file.
13209
13210 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
13211
13212 PR rtl-optimization/85805
13213 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
13214 value for hard registers if that was written in the same mode.
13215
13216 2018-07-26 Martin Liska <mliska@suse.cz>
13217
13218 PR gcov-profile/86536
13219 * gcov.c (format_gcov): Use printf format %.*f directly
13220 and do not handle special values.
13221
13222 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
13223
13224 * common/config/arc/arc-common.c (arc_option_optimization_table):
13225 Update default optimizations for size.
13226
13227 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
13228
13229 * config/arc/arc.md (movsf_insn): Add short instruction selection.
13230 * config/arc/constraints.md (CfZ): New constraint.
13231 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
13232 (subsf3_fpu): Likewise.
13233 (cmpsf_fpu): Likewise.
13234 (cmpsf_fpu_uneq): Likewise.
13235
13236 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
13237
13238 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
13239 accesses as well.
13240 (arc_is_uncached_mem_p): uncached applies to both the variable and
13241 the pointer.
13242
13243 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
13244
13245 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
13246 register names.
13247
13248 2018-07-25 David Malcolm <dmalcolm@redhat.com>
13249
13250 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
13251 field "m_scopes" from vec to auto_vec.
13252
13253 2018-07-25 Martin Liska <mliska@suse.cz>
13254
13255 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
13256 return type.
13257
13258 2018-07-25 Richard Biener <rguenther@suse.de>
13259
13260 PR debug/86654
13261 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
13262 special wrt context_die late.
13263 (gen_subprogram_die): Re-use DIEs in local scope.
13264
13265 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
13266
13267 PR tree-optimization/86644
13268 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
13269
13270 2018-07-25 Martin Liska <mliska@suse.cz>
13271
13272 PR middle-end/86645
13273 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
13274 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
13275
13276 2018-07-25 Martin Liska <mliska@suse.cz>
13277
13278 PR sanitizer/79635
13279 * params.def: Explain ASan abbreviation and provide
13280 a documentation link.
13281
13282 2018-07-24 Martin Sebor <msebor@redhat.com>
13283
13284 PR tree-optimization/86622
13285 PR tree-optimization/86532
13286 * builtins.h (string_length): Declare.
13287 * builtins.c (c_strlen): Correct handling of non-constant offsets.
13288 (check_access): Be prepared for non-constant length ranges.
13289 (string_length): Make extern.
13290 * expr.c (string_constant): Only handle the minor non-constant
13291 array index. Use string_constant to compute the length of
13292 a generic string constant.
13293
13294 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
13295
13296 PR tree-optimization/86618
13297 * tree-vect-stmts.c (vectorizable_call): Don't take the address
13298 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
13299
13300 2018-07-24 David Malcolm <dmalcolm@redhat.com>
13301
13302 PR tree-optimization/86636
13303 * json.cc (json::object::set): Fix comment. Add assertions.
13304 (json::array::append): Move here from json.h. Add comment and an
13305 assertion.
13306 (json::string::string): Likewise.
13307 * json.h (json::array::append): Move to json.cc.
13308 (json::string::string): Likewise.
13309 * optinfo-emit-json.cc
13310 (optrecord_json_writer::impl_location_to_json): Assert that we
13311 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
13312 wrapper around it. Expand the location once, rather than three
13313 times.
13314 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
13315 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
13316 wrappers.
13317 (optrecord_json_writer::optinfo_to_json): Likewise, in four
13318 places. Fix some overlong lines.
13319
13320 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
13321
13322 * config/aarch64/aarch64-simd.md
13323 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
13324 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
13325 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
13326 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
13327 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
13328 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
13329 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
13330 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
13331 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
13332
13333 2018-07-24 Jakub Jelinek <jakub@redhat.com>
13334
13335 PR middle-end/86627
13336 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
13337 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
13338 and abs_d == d, do the power of two handling if profitable.
13339
13340 2018-07-24 Richard Biener <rguenther@suse.de>
13341
13342 * match.pd: Add BIT_FIELD_REF canonicalizations.
13343
13344 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
13345
13346 PR c/86617
13347 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
13348
13349 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
13350
13351 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
13352 terminated STRING_CST object.
13353
13354 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
13355
13356 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
13357
13358 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
13359
13360 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
13361 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
13362 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
13363 the elements into a register.
13364 (rs6000_split_v4si_init_di_reg): Delete.
13365 (rs6000_split_v4si_init): Delete.
13366 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
13367 (vsx_init_v4si): Rewrite as a define_expand.
13368
13369 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
13370
13371 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
13372 zero_extend argument from memory): New.
13373
13374 2018-07-22 Martin Sebor <msebor@redhat.com>
13375
13376 PR bootstrap/86621
13377 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
13378 diagnosing calls with unknown arguments unless -Walloca-larger-than
13379 is restricted to less than PTRDIFF_MAX bytes.
13380
13381 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
13382
13383 * doc/gcov.texi (Invoking Gcov): Editorial changes.
13384
13385 2018-07-20 David Malcolm <dmalcolm@redhat.com>
13386
13387 * pretty-print.c (text_info::set_location): Remove redundant
13388 "line_table" parameter from call to rich_location::set_range.
13389
13390 2018-07-20 Martin Sebor <msebor@redhat.com>
13391
13392 PR middle-end/82063
13393 * builtins.c (expand_builtin_alloca): Adjust.
13394 * calls.c (alloc_max_size): Simplify.
13395 * cgraphunit.c (cgraph_node::expand): Adjust.
13396 * common.opt (larger_than_size, warn_frame_larger_than): Remove
13397 variables.
13398 (frame_larger_than_size): Same.
13399 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
13400 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
13401 Initialize.
13402 * doc/invoke.texi (GCC Command Options): Document option arguments.
13403 Explain byte-size arguments and suffixes.
13404 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
13405 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
13406 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
13407 * doc/options.texi (UInteger): Expand.
13408 (Host_Wide_Int, ByteSize): Document new properties.
13409 * final.c (final_start_function_1): Include sizes in an error message.
13410 * function.c (frame_offset_overflow): Same.
13411 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
13412 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
13413 Diagnose unbounded alloca calls only for limits of less than
13414 PTRDIFF_MAX.
13415 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
13416 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
13417 for alloca(0).
13418 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
13419 only for limits of less than PTRDIFF_MAX.
13420 * langhooks-def.h (lhd_handle_option): Change function argument
13421 to HOST_WIDE_INT.
13422 * langhooks.c (lhd_handle_option): Same.
13423 * langhooks.h (handle_option): Same.
13424 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
13425 ByteSize flags.
13426 (var_type, var_type_struct): Same.
13427 (var_set): Handle ByteSize flag.
13428 * optc-gen.awk: Add comments to output to ease debugging. Make
13429 use of HOST_WIDE_INT where appropriate.
13430 * opts-gen-save.awk: Use %lx to format unsigned long.
13431 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
13432 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
13433 arguments. Parse bytes-size suffixes.
13434 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
13435 (enum_value_to_arg): Same.
13436 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
13437 (handle_option): Adjust.
13438 (generate_option): Change function argument to HOST_WIDE_INT.
13439 (cmdline_handle_error): Adjust.
13440 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
13441 (set_option): Change function argument to HOST_WIDE_INT.
13442 (option_enabled): Handle cl_host_wide_int.
13443 (get_option_state): Handle CLVC_SIZE.
13444 (control_warning_option): Same.
13445 * opts.c (common_handle_option): Change function argument to
13446 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
13447 OPT_Wvla_larger_than_.
13448 * opts.h (enum cl_var_type): Add an enumerator.
13449 * stor-layout.c (layout_decl): Print a more meaningful warning.
13450 * toplev.c (output_stack_usage): Adjust.
13451
13452 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
13453
13454 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
13455 call to inline_expand_builtin_string_cmp.
13456 (expand_builtin_strcmp): Likewise.
13457 (expand_builtin_strncmp): Likewise.
13458 (inline_string_cmp): Delete the last parameter, change char_type_node
13459 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
13460 two operands.
13461 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
13462 the inlining expansion on target where the type of the call has same or
13463 narrower precision than unsigned char.
13464
13465 2018-07-20 David Malcolm <dmalcolm@redhat.com>
13466
13467 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
13468 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
13469 * common.opt (fsave-optimization-record): New option.
13470 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
13471 * doc/invoke.texi (-fsave-optimization-record): New option.
13472 * dumpfile.c: Include "optinfo-emit-json.h".
13473 (struct kv_pair): Move to coretypes.h.
13474 (optgroup_options): Make non-static.
13475 (dump_context::end_scope): Call
13476 optimization_records_maybe_pop_dump_scope.
13477 * dumpfile.h (optgroup_options): New decl.
13478 * json.cc: New file.
13479 * json.h: New file.
13480 * optinfo-emit-json.cc: New file.
13481 * optinfo-emit-json.h: New file.
13482 * optinfo.cc: Include "optinfo-emit-json.h".
13483 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
13484 (optinfo_enabled_p): Check optimization_records_enabled_p.
13485 (optinfo_wants_inlining_info_p): Likewise.
13486 * optinfo.h: Update comment.
13487 * profile-count.c (profile_quality_as_string): New function.
13488 * profile-count.h (profile_quality_as_string): New decl.
13489 (profile_count::quality): New accessor.
13490 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
13491 and optinfo_emit_json_cc_tests.
13492 * selftest.h (selftest::json_cc_tests): New decl.
13493 (selftest::optinfo_emit_json_cc_tests): New decl.
13494 * toplev.c: Include "optinfo-emit-json.h".
13495 (compile_file): Call optimization_records_finish.
13496 (do_compile): Call optimization_records_start.
13497 * tree-ssa-live.c: Include optinfo.h.
13498 (remove_unused_scope_block_p): Retain inlining information if
13499 optinfo_wants_inlining_info_p returns true.
13500
13501 2018-07-20 Richard Biener <rguenther@suse.de>
13502
13503 PR debug/86585
13504 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
13505 to cover -flto-partition=none.
13506
13507 2018-07-20 Martin Liska <mliska@suse.cz>
13508
13509 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
13510 (get_decl_source_range): Remove unused function.
13511
13512 2018-07-20 Richard Biener <rguenther@suse.de>
13513
13514 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
13515 (struct vn_phi_s): Likewise.
13516 (struct vn_reference_s): Likewise.
13517 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
13518 for searching the slot of an entry known to be in the hash itself.
13519 (vn_phi_hasher::equal): Likewise.
13520 (vn_reference_hasher::equal): Likewise.
13521 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
13522 globals.
13523 (optimistic_info, current_info): Remove, keeping only valid_info.
13524 (vn_reference_lookup_1): Remove fallback lookup.
13525 (vn_reference_lookup_2): Likewise.
13526 (vn_nary_op_lookup_1): Likewise.
13527 (vn_phi_lookup): Likewise.
13528 (vn_nary_build_or_lookup_1): Make sure to not chain the built
13529 hash element.
13530 (vn_reference_insert): Adjust, chain the inserted hash element
13531 at last_inserted_ref.
13532 (vn_reference_insert_pieces): Likewise.
13533 (visit_reference_op_call): Likewise.
13534 (vn_nary_op_insert_into): Chain the inserted hash element at
13535 last_inserted_nary.
13536 (vn_nary_op_insert_pieces): Adjust.
13537 (vn_nary_op_insert): Likewise.
13538 (vn_nary_op_insert_stmt): Likewise.
13539 (vn_phi_insert): Adjust, chain the inserted hash element at
13540 last_inserted_phi.
13541 (process_scc): Remove clearing and copying the optimistic
13542 table. Instead remove elements inserted during an optimistic
13543 iteration from the single table we maintain.
13544 (init_scc_vn): Adjust.
13545 (free_scc_vn): Likewise.
13546 (sccvn_dom_walker::record_cond): Likewise.
13547 (sccvn_dom_walker::after_dom_children): Likewise.
13548
13549 2018-07-19 Martin Sebor <msebor@redhat.com>
13550
13551 PR tree-optimization/84047
13552 PR tree-optimization/83776
13553 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
13554 (check_array_bounds): Call it.
13555
13556 2018-07-19 Martin Sebor <msebor@redhat.com>
13557
13558 * align.h (align_flags): Use member initialization.
13559
13560 2018-07-19 David Malcolm <dmalcolm@redhat.com>
13561
13562 * Makefile.in (OBJS): Add optinfo.o.
13563 * coretypes.h (class symtab_node): New forward decl.
13564 (struct cgraph_node): New forward decl.
13565 (class varpool_node): New forward decl.
13566 * dump-context.h: New file.
13567 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
13568 "tree-pass.h".
13569 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
13570 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
13571 (set_alt_dump_file): Likewise.
13572 (dump_context::~dump_context): New dtor.
13573 (dump_gimple_stmt): Move implementation to...
13574 (dump_context::dump_gimple_stmt): ...this new member function.
13575 Add the stmt to any pending optinfo, creating one if need be.
13576 (dump_gimple_stmt_loc): Move implementation to...
13577 (dump_context::dump_gimple_stmt_loc): ...this new member function.
13578 Start a new optinfo and add the stmt to it.
13579 (dump_gimple_expr): Move implementation to...
13580 (dump_context::dump_gimple_expr): ...this new member function.
13581 Add the stmt to any pending optinfo, creating one if need be.
13582 (dump_gimple_expr_loc): Move implementation to...
13583 (dump_context::dump_gimple_expr_loc): ...this new member function.
13584 Start a new optinfo and add the stmt to it.
13585 (dump_generic_expr): Move implementation to...
13586 (dump_context::dump_generic_expr): ...this new member function.
13587 Add the tree to any pending optinfo, creating one if need be.
13588 (dump_generic_expr_loc): Move implementation to...
13589 (dump_context::dump_generic_expr_loc): ...this new member
13590 function. Add the tree to any pending optinfo, creating one if
13591 need be.
13592 (dump_printf): Move implementation to...
13593 (dump_context::dump_printf_va): ...this new member function. Add
13594 the text to any pending optinfo, creating one if need be.
13595 (dump_printf_loc): Move implementation to...
13596 (dump_context::dump_printf_loc_va): ...this new member function.
13597 Start a new optinfo and add the stmt to it.
13598 (dump_dec): Move implementation to...
13599 (dump_context::dump_dec): ...this new member function. Add the
13600 value to any pending optinfo, creating one if need be.
13601 (dump_context::dump_symtab_node): New member function.
13602 (dump_context::get_scope_depth): New member function.
13603 (dump_context::begin_scope): New member function.
13604 (dump_context::end_scope): New member function.
13605 (dump_context::ensure_pending_optinfo): New member function.
13606 (dump_context::begin_next_optinfo): New member function.
13607 (dump_context::end_any_optinfo): New member function.
13608 (dump_context::s_current): New global.
13609 (dump_context::s_default): New global.
13610 (dump_scope_depth): Delete global.
13611 (dumpfile_ensure_any_optinfo_are_flushed): New function.
13612 (dump_symtab_node): New function.
13613 (get_dump_scope_depth): Reimplement in terms of dump_context.
13614 (dump_begin_scope): Likewise.
13615 (dump_end_scope): Likewise.
13616 (selftest::temp_dump_context::temp_dump_context): New ctor.
13617 (selftest::temp_dump_context::~temp_dump_context): New dtor.
13618 (selftest::verify_item): New function.
13619 (ASSERT_IS_TEXT): New macro.
13620 (ASSERT_IS_TREE): New macro.
13621 (ASSERT_IS_GIMPLE): New macro.
13622 (selftest::test_capture_of_dump_calls): New test.
13623 (selftest::dumpfile_c_tests): Call it.
13624 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
13625 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
13626 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
13627 descriptive comment.
13628 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
13629 (dump_node, dump_bb): Move these unrelated decls.
13630 (class dump_manager): Add leading comment.
13631 * optinfo.cc: New file.
13632 * optinfo.h: New file.
13633
13634 2018-07-19 Michael Collison <michael.collison@arm.com>
13635 Richard Henderson <rth@redhat.com>
13636
13637 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
13638 (subti): Handle op1 zero.
13639 (subvti4, usub4ti4): New.
13640 (*sub<GPI>3_compare1_imm): New.
13641 (sub<GPI>3_carryinCV): New.
13642 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
13643 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
13644
13645 2018-07-19 Michael Collison <michael.collison@arm.com>
13646 Richard Henderson <rth@redhat.com>
13647
13648 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
13649 (addti3): Create simpler code if low part is already known to be 0.
13650 (addvti4, uaddvti4): New.
13651 (*add<GPI>3_compareC_cconly_imm): New.
13652 (*add<GPI>3_compareC_cconly): New.
13653 (*add<GPI>3_compareC_imm): New.
13654 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
13655 handle constants within this pattern..
13656 (*add<GPI>3_compareV_cconly_imm): New.
13657 (*add<GPI>3_compareV_cconly): New.
13658 (*add<GPI>3_compareV_imm): New.
13659 (add<GPI>3_compareV): New.
13660 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
13661 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
13662 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
13663 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
13664 with 'comparison' operator.
13665 (*add<GPI>3_compareV_cconly_imm): Ditto.
13666 (*add<GPI>3_compareV_cconly): Ditto.
13667 (*add<GPI>3_compareV_imm): Ditto.
13668 (add<GPI>3_compareV): Ditto.
13669 (add<mode>3_carryinC): Ditto.
13670 (*add<mode>3_carryinC_zero): Ditto.
13671 (*add<mode>3_carryinC): Ditto.
13672 (add<mode>3_carryinV): Ditto.
13673 (*add<mode>3_carryinV_zero): Ditto.
13674 (*add<mode>3_carryinV): Ditto.
13675
13676 2018-07-19 Michael Collison <michael.collison@arm.com>
13677 Richard Henderson <rth@redhat.com>
13678
13679 * config/aarch64/aarch64-modes.def (CC_V): New.
13680 * config/aarch64/aarch64-protos.h
13681 (aarch64_addti_scratch_regs): Declare
13682 (aarch64_subvti_scratch_regs): Declare.
13683 (aarch64_expand_subvti): Declare.
13684 (aarch64_gen_unlikely_cbranch): Declare
13685 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
13686 for signed overflow using CC_Vmode.
13687 (aarch64_get_condition_code_1): Handle CC_Vmode.
13688 (aarch64_gen_unlikely_cbranch): New function.
13689 (aarch64_addti_scratch_regs): New function.
13690 (aarch64_subvti_scratch_regs): New function.
13691 (aarch64_expand_subvti): New function.
13692
13693 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
13694
13695 * config/aarch64/aarch64-option-extensions.def: New entry for profile
13696 extension.
13697 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
13698 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
13699 extension.
13700
13701 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
13702
13703 PR target/83009
13704 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13705 address check not strict.
13706
13707 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
13708
13709 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
13710 Umq with Umn.
13711 (store_pair_lanes<mode>): Likewise.
13712 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
13713 enum value 'ADDR_QUERY_LDP_STP_N'.
13714 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
13715 (aarch64_print_address_internal): Add declaration.
13716 (aarch64_print_ldpstp_address): Remove.
13717 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
13718 (aarch64_print_operand): Change printing of 'y'.
13719 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
13720 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
13721 'true' rather than '1'.
13722 * config/aarch64/constraints.md (Uml): Likewise.
13723 (Uml): Rename to Umn.
13724 (Umq): Remove.
13725
13726 2018-07-19 Richard Biener <rguenther@suse.de>
13727
13728 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
13729 a trailing array.
13730 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
13731 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
13732 (vn_reference_hasher): Likewise.
13733 (struct vn_tables_s): Remove obstack and alloc-pool members.
13734 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
13735 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
13736 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
13737 (vn_reference_insert_pieces): Likewise.
13738 (alloc_vn_nary_op_noinit): Adjust.
13739 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
13740 (vn_phi_eq): Adjust.
13741 (shared_lookup_phiargs): Remove.
13742 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
13743 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
13744 (visit_reference_op_call): Likewise.
13745 (copy_nary, copy_phi, copy_reference): Remove.
13746 (process_scc): Rewind the obstack when iterating. Do not
13747 copy the elements to valid_info but just move them from one
13748 hashtable to the other.
13749 (allocate_vn_table): Adjust.
13750 (free_vn_table): Likewise.
13751 (init_scc_vn): Likewise.
13752 (free_scc_vn): Likewise.
13753
13754 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
13755
13756 PR target/86560
13757 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
13758 indirect_return as function type attribute.
13759 (ix86_attribute_table): Change indirect_return to function
13760 type attribute.
13761 * doc/extend.texi: Update indirect_return attribute.
13762
13763 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
13764
13765 * wide-int.h (widest2_int): New.
13766 * gimple-fold.c (arith_overflowed_p): Use it.
13767 * tree.h (widest2_int_cst): New.
13768 * tree-vrp.c (wide_int_binop_overflow): Rename from
13769 vrp_int_const_binop.
13770 Rewrite to work on trees.
13771 (extract_range_from_multiplicative_op_1): Abstract code to...
13772 (wide_int_range_min_max): ...here.
13773 (wide_int_range_cross_product): ...and here.
13774 (extract_range_from_binary_expr_1): Abstract overflow code to...
13775 (wide_int_range_mult_wrapping): ...here.
13776 * tree-vrp.h (wide_int_range_cross_product): New.
13777 (wide_int_range_mult_wrapping): New.
13778
13779 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
13780 Julia Koval <julia.koval@intel.com>
13781
13782 * config/i386/x86-tune-costs.h (skylake_memcpy,
13783 skylake_memset): Replace rep_prefix with unrolling for size 512.
13784
13785 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
13786
13787 PR middle-end/86544
13788 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
13789 comparision with EQ_EXPR in last stmt.
13790
13791 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
13792
13793 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
13794 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
13795 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
13796 previously known as "PowerPC AltiVec Built-in Functions". Move
13797 some material to new subsubsections "PowerPC AltiVec Built-in
13798 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
13799 ISA 2.07".
13800 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
13801 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
13802 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
13803 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
13804
13805 2018-07-18 Richard Biener <rguenther@suse.de>
13806
13807 PR tree-optimization/86557
13808 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
13809 EXACT_DIV_EXPR.
13810
13811 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
13812
13813 * config/s390/s390.c (s390_function_profiler): Generate CFI.
13814
13815 2018-07-17 Jeff Law <law@redhat.com>
13816
13817 * config/arm/arm.c (get_label_padding): Update for recent
13818 changes to label_to_alignment.
13819
13820 PR tree-optimization/86010
13821 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
13822
13823 * config/mips/mips.c (vr4130_align_insns): Update for recent
13824 changes to label_to_alignment.
13825
13826 * config/frv/frv.c (frv_label_align): Update for recent changes
13827 to label_to_alignment.
13828
13829 * config/nios2/nios2.c (nios2_label_align): Update for recent
13830 changes which dropped ALIGN_LABELS_LOG.
13831
13832 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
13833
13834 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
13835 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
13836
13837 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
13838
13839 * config/arc/arc.c (arc_label_align): Use align_labels instead of
13840 deprecated align_labels_log.
13841
13842 2018-07-17 Richard Biener <rguenther@suse.de>
13843
13844 PR lto/86456
13845 * dwarf2out.c (init_sections_and_labels): Always generate
13846 a debug_line_str_section for early LTO debug.
13847 (dwarf2out_finish): Reset debug_line_str_hash output early.
13848 Bump counter for extra dwarf5 .debug_loc labels to not conflict
13849 with fat LTO part.
13850 (dwarf2out_early_finish): Output debug_line_str.
13851
13852 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
13853
13854 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
13855 index register on z196 or later.
13856
13857 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
13858
13859 * config/s390/s390.c (s390_default_align): Set default function
13860 alignment to 16.
13861 (s390_override_options_after_change): Call s390_default align.
13862 (s390_option_override_internal): Call s390_default_align.
13863 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
13864
13865 2018-07-17 Jakub Jelinek <jakub@redhat.com>
13866
13867 PR middle-end/86542
13868 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
13869 to _looptemp_ clauses, other than the first two.
13870
13871 2018-07-17 Martin Liska <mliska@suse.cz>
13872
13873 * opts.c: Do not enable OPT_falign_* for -Os.
13874
13875 2018-07-17 Martin Liska <mliska@suse.cz>
13876
13877 * align.h (MAX_CODE_ALIGN): New.
13878 (MAX_CODE_ALIGN_VALUE): New.
13879 * common/config/i386/i386-common.c (ix86_handle_option):
13880 (MAX_CODE_ALIGN): Moved to align.h.
13881 * final.c (MAX_CODE_ALIGN): Likewise.
13882 * opts.c (parse_and_check_align_values):
13883 (MAX_CODE_ALIGN): Likewise.
13884 (MAX_CODE_ALIGN_VALUE): Likewise.
13885
13886 2018-07-17 Martin Liska <mliska@suse.cz>
13887
13888 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
13889 in order to fulfil coding style.
13890 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
13891 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13892 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13893 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
13894 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
13895 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
13896 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
13897 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
13898 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13899
13900 2018-07-17 Martin Liska <mliska@suse.cz>
13901
13902 * align.h: New file.
13903 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
13904 directly.
13905 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
13906 align_flags of label_to_alignment.
13907 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
13908 align_flags class.
13909 * config/m68k/m68k.c: Do not use removed align_labels_value and
13910 align_loops_value.
13911 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
13912 (LOOP_ALIGN): Likewise.
13913 (LABEL_ALIGN): Likewise.
13914 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
13915 Remove not used macro.
13916 (rs6000_loop_align): Change return type to align_flags.
13917 (rs6000_loop_align_max_skip): Remove.
13918 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
13919 Change return type to align_flags.
13920 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
13921 Remove not used macro.
13922 (rs6000_loop_align): Change return type to align_flags.
13923 (rs6000_loop_align_max_skip): Remove.
13924 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
13925 * config/rx/rx-protos.h (rx_align_for_label): Make it
13926 static function.
13927 * config/rx/rx.c (rx_align_for_label): Change return type
13928 to align_flags.
13929 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
13930 macro definitions.
13931 into align_flags class.
13932 (LABEL_ALIGN): Likewise.
13933 (LOOP_ALIGN): Likewise.
13934 * config/s390/s390.c (s390_label_align): Use align_flags
13935 class member.
13936 (s390_asm_output_function_label): Likewise.
13937 * config/sh/sh.c (sh_override_options_after_change):
13938 Use align_flags class directly without macros.
13939 (find_barrier): Likewise.
13940 (barrier_align): Likewise.
13941 (sh_loop_align): Likewise.
13942 * config/spu/spu.c (spu_option_override):
13943 Use align_flags_tuple::get_value instead of removed macros.
13944 (spu_sched_init): Likewise.
13945 * config/spu/spu.h (GTY): Likewise.
13946 * config/visium/visium.c (visium_option_override):
13947 Set "8" as default secondary alignment.
13948 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
13949 in order to guarantee secondary alignment of 8.
13950 * coretypes.h: Include align.h header file.
13951 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
13952 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
13953 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
13954 * doc/tm.texi.in: Likewise.
13955 * final.c (struct label_alignment): Remove not used structure.
13956 (LABEL_ALIGN): Change type to align_flags.
13957 (LOOP_ALIGN): Likewise.
13958 (JUMP_ALIGN): Likewise.
13959 (default_loop_align_max_skip): Remove.
13960 (default_label_align_max_skip): Likewise.
13961 (default_jump_align_max_skip): Likewise.
13962 (default_label_align_after_barrier_max_skip):
13963 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
13964 (LABEL_TO_MAX_SKIP): Remove.
13965 (label_to_alignment): Return align_flags type instead of integer.
13966 (label_to_max_skip): Remove.
13967 (align_fuzz): Use align_flags type.
13968 (compute_alignments): Use align_flags type and use align_flags::max
13969 to combine multiple alignments.
13970 (grow_label_align): Grow vec instead of C array.
13971 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
13972 (shorten_branches): Use align_flags type and use align_flags::max
13973 to combine multiple alignments.
13974 (final_scan_insn_1): Remove usage of secondary alignment that comes
13975 from label alignment, but instead use proper secondary alignment
13976 which is computed in grow_label_align.
13977 * flags.h (struct align_flags_tuple): Move to align.h.
13978 (struct align_flags): Likewise.
13979 (state_align_loops): Rename to align_loops.
13980 (state_align_jumps): Rename to align_jumps.
13981 (state_align_labels): Rename to align_labels.
13982 (state_align_functions): Rename to align_functions.
13983 (align_loops_log): Remove.
13984 (align_jumps_log): Remove.
13985 (align_labels_log): Remove.
13986 (align_functions_log): Remove.
13987 (align_loops_max_skip): Remove.
13988 (align_jumps_max_skip): Remove.
13989 (align_labels_max_skip): Remove.
13990 (align_functions_max_skip): Remove.
13991 (align_loops_value): Remove.
13992 (align_jumps_value): Remove.
13993 (align_labels_value): Remove.
13994 (align_functions_value): Remove.
13995 * output.h (label_to_alignment): Change return type to align_flags.
13996 (label_to_max_skip): Remove.
13997 * target.def: Remove loop_align_max_skip, label_align_max_skip,
13998 jump_align_max_skip macros.
13999 * targhooks.h (default_loop_align_max_skip): Remove.
14000 (default_label_align_max_skip): Likewise.
14001 (default_jump_align_max_skip): Likewise.
14002 (default_label_align_after_barrier_max_skip): Remove.
14003 * toplev.c (read_log_maxskip): Use ::normalize function.
14004 (parse_N_M): Remove not used argument and also call ::normalize.
14005 (parse_alignment_opts): Do not pass unused arguments.
14006 * varasm.c (assemble_start_function): Use directly align_functions
14007 instead of removed macros.
14008 * system.h: Do not poison removed macros.
14009
14010 2018-07-17 Jakub Jelinek <jakub@redhat.com>
14011
14012 PR middle-end/86539
14013 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
14014 and cond temporaries don't have reference type if iterator has
14015 pointer type. For init use &for_pre_body instead of pre_p if
14016 for_pre_body is non-empty.
14017
14018 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
14019
14020 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
14021 double-double modes to SFmode directly directly.
14022 (trunc<mode>sf2_fprs): Delete.
14023
14024 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
14025
14026 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
14027 for conversions between IFmode and the decimal floating point modes.
14028 (init_float128_ieee): Use the correct names for conversions between
14029 KFmode and the decimal floating point modes.
14030
14031 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
14032
14033 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
14034 for the conversions between TDmode and IFmode.
14035 (init_float128_ieee): Use more correct names for the conversions
14036 between TDmode and KFmode.
14037
14038 2018-07-16 Jakub Jelinek <jakub@redhat.com>
14039
14040 PR tree-optimization/86526
14041 * builtins.c (expand_builtin_memcmp): Formatting fixes.
14042 (inline_expand_builtin_string_cmp): Likewise.
14043 (inline_string_cmp): Likewise. Use c_readstr instead of
14044 builtin_memcpy_read_str. Add unit_mode temporary.
14045
14046 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
14047
14048 PR middle-end/86528
14049 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
14050 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
14051
14052 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
14053
14054 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
14055 Alphabetize prototypes of built-in functions, separating out
14056 built-in functions that are listed in this section but should be
14057 described elsewhere.
14058
14059 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
14060
14061 PR target/86511
14062 * expmed.c (emit_store_flag): Do not emit setcc followed by a
14063 conditional move when trapping comparison was split to a
14064 non-trapping one (and vice versa).
14065
14066 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
14067
14068 * config/s390/s390.c (s390_function_profiler): Generate nops
14069 instead of profiler call sequences.
14070 * config/s390/s390.opt: Add the new option.
14071
14072 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
14073
14074 * config/s390/s390.c (s390_function_profiler): Generate
14075 __mcount_loc section.
14076 * config/s390/s390.opt: Add the new option.
14077
14078 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
14079
14080 * common.opt: Add the new warning.
14081 * config/s390/s390.c (s390_function_profiler): Emit "brasl
14082 %r0,__fentry__" when -mfentry is specified.
14083 (s390_option_override_internal): Disallow -mfentry for 31-bit
14084 CPUs.
14085 * config/s390/s390.opt: Add the new option.
14086
14087 2018-07-16 Richard Biener <rguenther@suse.de>
14088
14089 PR lto/86523
14090 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
14091 for function-local FUNCTION_DECL and RESULT_DECL immediately.
14092
14093 2018-07-16 Martin Liska <mliska@suse.cz>
14094
14095 PR ipa/86529
14096 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
14097 to ::get_create.
14098
14099 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
14100
14101 * config/arc/arcHS.md: Update ARCHS scheduling rules.
14102
14103 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
14104
14105 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
14106 for ARCHS4x.
14107 * config/arc/arc-cpus.def (hs4x): New cpu.
14108 (hs4xd): Likewise.
14109 * config/arc/arc-tables.opt: Regenerate.
14110 * config/arc/arc.c (arc_sched_issue_rate): New function.
14111 (TARGET_SCHED_ISSUE_RATE): Define.
14112 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
14113 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
14114 fpu_cvt.
14115 (attr tune): Add ARCHS4x tune values.
14116 (attr tune_dspmpy): Define.
14117 (*tst): Correct instruction type.
14118 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
14119 * config/arc/arcHS4x.md: New file.
14120 * config/arc/fpu.md: Update instruction type attributes.
14121 * config/arc/t-multilib: Regenerate.
14122
14123 2018-07-16 Tom de Vries <tdevries@suse.de>
14124
14125 PR debug/86455
14126 * var-tracking.c (vt_initialize): Fix pre_dec handling.
14127
14128 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14129
14130 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
14131 early clobber.
14132
14133 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
14134
14135 PR tree-optimization/86514
14136 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
14137 conversion to a boolean type from a type with greater precision.
14138
14139 2018-07-16 Tom de Vries <tdevries@suse.de>
14140
14141 * var-tracking.c (vt_initialize): Print adjusted insn slim if
14142 dump_flags request TDF_SLIM.
14143
14144 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
14145
14146 * fold-const.c (int_const_binop_1): Abstract...
14147 (wide_int_binop): ...wide int code here.
14148 (poly_int_binop): ...poly int code here.
14149 Abstract the rest of int_const_binop_1 into int_const_binop.
14150 * fold-const.h (wide_int_binop): New.
14151 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
14152 Remove useless PLUS/MINUS_EXPR case.
14153 (zero_nonzero_bits_from_vr): Move wide int code...
14154 (zero_nonzero_bits_from_bounds): ...here.
14155 (extract_range_from_binary_expr_1): Move mask optimization code...
14156 (range_easy_mask_min_max): ...here.
14157 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
14158 (range_easy_mask_min_max): New.
14159
14160 2018-07-15 Jeff Law <law@redhat.com>
14161
14162 PR target/85993
14163 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
14164 block.
14165
14166 2018-07-14 Jim Wilson <jimw@sifive.com>
14167
14168 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
14169
14170 2018-07-14 Paul Koning <ni1d@arrl.net>
14171
14172 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
14173
14174 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
14175
14176 * lto-streamer-out.c (copy_function_or_variable): Dump info about
14177 copying section.
14178
14179 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
14180 Steve Munroe <munroesj52@gmail.com>
14181
14182 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
14183 (_mm_andnot_si128): Likewise.
14184 (_mm_or_si128): Likewise.
14185 (_mm_xor_si128): Likewise.
14186
14187 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
14188
14189 PR middle-end/78809
14190 * builtins.c (expand_builtin_memcmp): Inline the calls first
14191 when result_eq is false.
14192 (expand_builtin_strcmp): Inline the calls first.
14193 (expand_builtin_strncmp): Likewise.
14194 (inline_string_cmp): New routine. Expand a string compare
14195 call by using a sequence of char comparison.
14196 (inline_expand_builtin_string_cmp): New routine. Inline expansion
14197 a call to str(n)cmp/memcmp.
14198 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
14199 New option.
14200 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
14201
14202 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
14203
14204 * config/arm/driver-arm.c: Include arm-native.h.
14205 (host_detect_local_cpu): Use auto-generated data tables.
14206 (vendors, arm_cpu_table): Delete. Move part information to ...
14207 * config/arm/arm-cpus.in: ... here.
14208 * config/arm/parsecpu.awk (gen_native): New function.
14209 (vendor, part): New CPU fields.
14210 (END): Add support for building the native CPU detection tables.
14211 * config/arm/t-arm (arm-native.h): Add build rule.
14212 (driver-arm.o): Add dependency on arm-native.h.
14213
14214 2018-07-13 Richard Biener <rguenther@suse.de>
14215
14216 PR middle-end/85974
14217 * match.pd (addr1 - addr2): Allow either of the operand to
14218 have a conversion.
14219
14220 2018-07-13 Tom de Vries <tdevries@suse.de>
14221
14222 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
14223 in remap_ssa_name.
14224
14225 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
14226
14227 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
14228 arrays instead of numbered variables.
14229
14230 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
14231
14232 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
14233 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
14234
14235 2018-07-13 Richard Biener <rguenther@suse.de>
14236
14237 PR debug/86452
14238 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
14239 instead of get_context_die.
14240
14241 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
14242 Richard Biener <rguenther@suse.de>
14243
14244 PR middle-end/86489
14245 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
14246 that the loop latch destination where phi is defined.
14247
14248 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
14249
14250 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
14251 (riscv_expand_epilogue): Add assertion to check interrupt mode.
14252 (riscv_set_current_function): Extract getting interrupt type to new
14253 function.
14254 (riscv_get_interrupt_type): New function.
14255 (riscv_merge_decl_attributes): New function, checking interrupt type is
14256 same.
14257 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
14258
14259 2018-07-12 Paul Koning <ni1d@arrl.net>
14260
14261 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
14262 directive.
14263
14264 2018-07-12 Paul Koning <ni1d@arrl.net>
14265
14266 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
14267 zero reference, add doloop_end instead.
14268 * doc/md.texi (decrement_and_branch_until_zero): Remove.
14269 (Looping patterns): Remove decrement_and_branch_until_zero. Add
14270 detail for doloop_end.
14271
14272 2018-07-12 Martin Sebor <msebor@redhat.com>
14273
14274 PR c/86453
14275 * attribs.c (decl_attributes): Reject conflicting attributes before
14276 calling attribute handlers.
14277
14278 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
14279
14280 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
14281 parameter.
14282 (gcc::dump_manager::get_dump_file_name): likewise.
14283 (dump_begin): Likewise.
14284 * dumpfile.h (dump_begin): Update prototype.
14285 (gcc::dump_manager::get_dump_file_name,
14286 gcc::dump_manager::get_dump_file_name): Update prototype.
14287
14288 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
14289
14290 * internal-fn.h (vectorizable_internal_fn_p): New function.
14291 * tree-vect-slp.c (compatible_calls_p): Likewise.
14292 (vect_build_slp_tree_1): Remove nops argument. Handle calls
14293 to internal functions.
14294 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
14295
14296 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
14297
14298 * fold-const.h (inverse_conditions_p): Declare.
14299 * fold-const.c (inverse_conditions_p): New function.
14300 * match.pd: Use inverse_conditions_p. Add folds of view_converts
14301 that test the inverse condition of a conditional internal function.
14302 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
14303 * internal-fn.c (internal_fn_mask_index): Handle conditional
14304 internal functions.
14305 (vectorized_internal_fn_supported_p): New function.
14306 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
14307 (any_pred_load_store): Replace with...
14308 (need_to_predicate): ...this new variable.
14309 (redundant_ssa_names): New variable.
14310 (ifcvt_can_use_mask_load_store): Move initial checks to...
14311 (ifcvt_can_predicate): ...this new function. Handle tree codes
14312 for which a conditional internal function exists.
14313 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
14314 instead of ifcvt_can_use_mask_load_store. Update after variable
14315 name change.
14316 (predicate_load_or_store): New function, split out from
14317 predicate_mem_writes.
14318 (check_redundant_cond_expr): New function.
14319 (value_available_p): Likewise.
14320 (predicate_rhs_code): Likewise.
14321 (predicate_mem_writes): Rename to...
14322 (predicate_statements): ...this. Use predicate_load_or_store
14323 and predicate_rhs_code.
14324 (combine_blocks, tree_if_conversion): Update after above name changes.
14325 (ifcvt_local_dce): Handle redundant_ssa_names.
14326 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
14327 general conditional functions.
14328 * tree-vect-stmts.c (vectorizable_call): Likewise.
14329
14330 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
14331 Alan Hayward <alan.hayward@arm.com>
14332 David Sherwood <david.sherwood@arm.com>
14333
14334 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
14335 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
14336 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
14337 plus and minus and convert them into IFN_COND_FMA-based sequences.
14338 (convert_mult_to_fma): Handle conditional plus and minus.
14339
14340 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
14341
14342 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
14343 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
14344 (cond_fnms_optab): New optabs.
14345 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
14346 internal functions.
14347 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
14348 * internal-fn.h (get_conditional_internal_fn): Declare.
14349 (get_unconditional_internal_fn): Likewise.
14350 * internal-fn.c (cond_ternary_direct): New macro.
14351 (expand_cond_ternary_optab_fn): Likewise.
14352 (direct_cond_ternary_optab_supported_p): Likewise.
14353 (FOR_EACH_COND_FN_PAIR): Likewise.
14354 (get_conditional_internal_fn): New function.
14355 (get_unconditional_internal_fn): Likewise.
14356 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
14357 (gimple_match_op::gimple_match_op): Add a new overload for 5
14358 operands.
14359 (gimple_match_op::set_op): Likewise.
14360 (gimple_resimplify5): Declare.
14361 * genmatch.c (decision_tree::gen): Generate simplifications for
14362 5 operands.
14363 * gimple-match-head.c (gimple_simplify): Define an overload for
14364 5 operands. Handle calls with 5 arguments in the top-level overload.
14365 (convert_conditional_op): Handle conversions from unconditional
14366 internal functions to conditional ones.
14367 (gimple_resimplify5): New function.
14368 (build_call_internal): Pass a fifth operand.
14369 (maybe_push_res_to_seq): Likewise.
14370 (try_conditional_simplification): Try converting conditional
14371 internal functions to unconditional internal functions.
14372 Handle 3-operand unconditional forms.
14373 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
14374 Define ternary equivalents of the current rules for binary conditional
14375 internal functions.
14376 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
14377 ternary operations.
14378 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
14379 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
14380 (optab): Handle them.
14381 (SVE_COND_FP_TERNARY): New int iterator.
14382 (sve_fmla_op, sve_fmad_op): New int attributes.
14383 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
14384 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
14385 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
14386
14387 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
14388
14389 * target.def (preferred_else_value): New target hook.
14390 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
14391 * doc/tm.texi: Regenerate.
14392 * targhooks.h (default_preferred_else_value): Declare.
14393 * targhooks.c (default_preferred_else_value): New function.
14394 * internal-fn.h (conditional_internal_fn_code): Declare.
14395 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
14396 (get_conditional_internal_fn): Use it.
14397 (conditional_internal_fn_code): New function.
14398 * gimple-match.h (gimple_match_cond): New struct.
14399 (gimple_match_op): Add a cond member function.
14400 (gimple_match_op::gimple_match_op): Update all forms to take a
14401 gimple_match_cond.
14402 * genmatch.c (expr::gen_transform): Use the same condition as res_op
14403 for the suboperation, but don't specify a particular else_value.
14404 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
14405 (visit_nary_op, visit_reference_op_load): Pass
14406 gimple_match_cond::UNCOND to the gimple_match_op constructor.
14407 * gimple-match-head.c: Include tree-eh.h
14408 (convert_conditional_op): New function.
14409 (maybe_resimplify_conditional_op): Likewise.
14410 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
14411 (gimple_resimplify2): Likewise.
14412 (gimple_resimplify3): Likewise.
14413 (gimple_resimplify4): Likewise.
14414 (maybe_push_res_to_seq): Return null for conditional operations.
14415 (try_conditional_simplification): New function.
14416 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
14417 constructor.
14418 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
14419 IFN_COND_* call.
14420 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
14421 function.
14422 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
14423
14424 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
14425
14426 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
14427 DECL_FCONTEXT
14428 (hash_tree): Do not hash DECL_FCONTEXT
14429 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
14430 Do not stream DECL_FCONTEXT.
14431 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
14432 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
14433
14434 2018-07-12 Richard Biener <rguenther@suse.de>
14435
14436 PR debug/86462
14437 * dwarf2out.c (gen_block_die): Only output blocks when they have
14438 at least one !DECL_IGNORED_P variable.
14439
14440 2018-07-12 Richard Biener <rguenther@suse.de>
14441
14442 PR target/84829
14443 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
14444 Remove -mieee-fp handling.
14445
14446 2018-07-12 Richard Biener <rguenther@suse.de>
14447
14448 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
14449 left-over from last patch.
14450
14451 2018-07-12 Jakub Jelinek <jakub@redhat.com>
14452
14453 PR tree-optimization/86492
14454 * gimple-ssa-store-merging.c
14455 (imm_store_chain_info::coalesce_immediate_stores): Call
14456 check_no_overlap even for the merge_overlapping case. Formatting fix.
14457
14458 2018-07-12 Richard Biener <rguenther@suse.de>
14459
14460 PR middle-end/86479
14461 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
14462 move possibly trapping operations into the conditional.
14463
14464 2018-07-12 Richard Biener <rguenther@suse.de>
14465
14466 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
14467 (vn_lookup_simplify_result): Remove recursion limit applied
14468 here.
14469 (vn_nary_build_or_lookup_1): Adjust.
14470 (try_to_simplify): Likewise.
14471 * gimple-match-head.c (gimple_resimplify1): Instead apply one
14472 here.
14473 (gimple_resimplify2): Likewise.
14474 (gimple_resimplify3): Likewise.
14475 (gimple_resimplify4): Likewise.
14476
14477 2018-07-11 Jakub Jelinek <jakub@redhat.com>
14478
14479 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
14480 Use __mmask64 type instead of __mmask8 for __M argument.
14481 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
14482 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
14483 __U argument.
14484 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
14485 __mmask16 for __M argument.
14486 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
14487 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
14488 to __mmask16 instead of __mmask8.
14489 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
14490 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
14491 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
14492 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
14493 instead of __mmask16 for __U argument.
14494 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
14495 __mmask16 instead of __mmask8 for __U argument.
14496 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
14497 __U argument.
14498 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
14499 __mmask16.
14500 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
14501 argument.
14502 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
14503 __U argument.
14504 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
14505 __mmask16.
14506 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
14507 of __mmask16.
14508 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
14509 __U argument.
14510 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
14511 __U argument.
14512 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
14513 __U argument.
14514 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
14515 __U argument.
14516 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
14517 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
14518 return type as well as __M argument type and all casts from __mmask8
14519 to __mmask32.
14520 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
14521 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
14522 return type as well as __M argument type and all casts from __mmask8
14523 to __mmask16.
14524 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
14525 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
14526 return type as well as __M argument type and all casts from __mmask8
14527 to __mmask32.
14528 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
14529 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
14530 return type as well as __M argument type and all casts from __mmask8
14531 to __mmask16.
14532 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
14533 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
14534 __mmask16.
14535
14536 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
14537
14538 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
14539 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
14540 for __U argument.
14541
14542 2018-07-11 Paul Koning <ni1d@arrl.net>
14543
14544 * doc/md.texi (define_subst): Document how multiple occurrences of
14545 the same argument in the replacement pattern are handled.
14546
14547 2018-07-11 Paul Koning <ni1d@arrl.net>
14548
14549 * doc/extend.texi (Common Variable Attributes): Move "mode" into
14550 alphabetical order.
14551 (Common Type Attributes): Add "mode" attribute.
14552
14553 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
14554
14555 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
14556 stream DECL_ORIGINAL_TYPE.
14557 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
14558 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
14559 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
14560 Do not walk original type.
14561 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
14562 external decls.
14563 (write_ts_decl_non_common_tree_pointers): Do not stream
14564 DECL_ORIGINAL_TYPE
14565 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
14566 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
14567
14568 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
14569
14570 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
14571 thread twice from the same starting edge.
14572
14573 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
14574
14575 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
14576 * gimple.c (gimple_call_nonnull_result_p): ...here...
14577 (gimple_call_nonnull_arg): ...and here.
14578 * gimple.h (gimple_call_nonnull_result_p): New.
14579 (gimple_call_nonnull_arg): New.
14580
14581 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
14582
14583 * config/arm/arm-cpus.in: Move information from fpu field of each
14584 cpu definition to the isa field.
14585 * config/arm/parsecpu.awk (fpu): Delete match rule.
14586 (gen_comm_data): Don't add bits from the CPU's FPU entry.
14587
14588 2018-07-11 Richard Biener <rguenther@suse.de>
14589
14590 PR debug/86457
14591 * dwarf2out.c (init_sections_and_labels): Use
14592 output_asm_line_debug_info consistently.
14593 (dwarf2out_early_finish): Likewise.
14594 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
14595 type units.
14596
14597 2018-07-11 Richard Biener <rguenther@suse.de>
14598
14599 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
14600 Rework father_bb setting in a way to avoid propagating constants
14601 multiple times on a loop body.
14602
14603 2018-07-10 Mark Wielaard <mark@klomp.org>
14604
14605 PR debug/86459
14606 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
14607
14608 2018-07-10 Richard Biener <rguenther@suse.de>
14609
14610 * hash-map.h (hash_map::iterator::operator*): Return
14611 references to key and value.
14612
14613 2018-07-10 Jakub Jelinek <jakub@redhat.com>
14614
14615 PR c++/86443
14616 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
14617 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
14618 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
14619 (gimplify_omp_for): For composite loops, move outer
14620 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
14621 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
14622 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
14623 TREE_LIST for both the original class iterator and the "last" helper
14624 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
14625 loop, remember has_decl_expr from outer composite loops for the
14626 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
14627
14628 2018-07-09 Martin Sebor <msebor@redhat.com>
14629
14630 PR middle-end/77357
14631 PR middle-end/86428
14632 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
14633 accessing implicitly initialized array elements.
14634 * expr.c (string_constant): Handle string initializers of
14635 character arrays within aggregates.
14636 * gimple-fold.c (fold_array_ctor_reference): Add argument.
14637 Store element offset. As a special case, handle zero size.
14638 (fold_nonarray_ctor_reference): Same.
14639 (fold_ctor_reference): Add argument. Store subobject offset.
14640 * gimple-fold.h (fold_ctor_reference): Add argument.
14641
14642 2018-07-09 Paul Koning <ni1d@arrl.net>
14643
14644 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
14645 (pdp11_insn_cost): New function.
14646 (pdp11_md_asm_adjust): New function.
14647 (TARGET_INVALID_WITHIN_DOLOOP): Define.
14648 (pdp11_rtx_costs): Update to match machine better.
14649 (output_addr_const_pdp11): Correct format mismatch warnings.
14650 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
14651 * config/pdp11/pdp11.md: General change to add base_cost and/or
14652 length attributes for use by new pdp11_insn_cost function.
14653 (MIN_BRANCH): Correct definition.
14654 (MIN_SOB): Ditto.
14655 (doloop_end): Use standard pattern name for looping pattern.
14656 (doloop_end_nocc): New.
14657 (movsf): Add another constraint alternative.
14658 (zero_extendqihi2): Add constraint alternatives for not in place
14659 extend.
14660 (zero_extendhisi2): Remove.
14661 (shift patterns): Add CC handling variants.
14662 (bswaphi2): New.
14663 (bswapsi2): New.
14664 (rothi3): New.
14665 (define_peephole2): New peephole to recognize mov that sets CC for
14666 subsequent test.
14667
14668 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14669
14670 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
14671 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
14672 wi::add.
14673
14674 2018-07-09 Jakub Jelinek <jakub@redhat.com>
14675
14676 PR c/86420
14677 * real.c (real_nextafter): Return true if result is denormal.
14678
14679 2018-07-09 Martin Liska <mliska@suse.cz>
14680
14681 * common.opt: Add back wrongly removed attribute.
14682
14683 2018-07-09 Richard Biener <rguenther@suse.de>
14684
14685 PR debug/86413
14686 * dwarf2out.c (gen_block_die): For an early generated DIE
14687 always output high/low PC attributes.
14688
14689 2018-07-09 Tom de Vries <tdevries@suse.de>
14690
14691 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
14692 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
14693 onto VAR_DECL with abstract origin.
14694
14695 2018-07-07 Jim Wilson <jimw@sifive.com>
14696
14697 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
14698
14699 2018-07-07 Tom de Vries <tdevries@suse.de>
14700
14701 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
14702
14703 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
14704
14705 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
14706 overflow_type.
14707 (combine_bound): Use wide-int overflow calculation instead of
14708 rolling our own.
14709 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
14710 overflow_type.
14711 * fold-const.c (int_const_binop_2): Same.
14712 (extract_muldiv_1): Same.
14713 (fold_div_compare): Same.
14714 (fold_abs_const): Same.
14715 * match.pd: Same.
14716 * poly-int.h (add): Same.
14717 (sub): Same.
14718 (neg): Same.
14719 (mul): Same.
14720 * predict.c (predict_iv_comparison): Same.
14721 * profile-count.c (slow_safe_scale_64bit): Same.
14722 * simplify-rtx.c (simplify_const_binary_operation): Same.
14723 * tree-chrec.c (tree_fold_binomial): Same.
14724 * tree-data-ref.c (split_constant_offset_1): Same.
14725 * tree-if-conv.c (idx_within_array_bound): Same.
14726 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
14727 * tree-ssa-phiopt.c (minmax_replacement): Same.
14728 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
14729 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
14730 * vr-values.c (vr_values::adjust_range_with_scev): Same.
14731 * wide-int.cc (wi::add_large): Same.
14732 (wi::mul_internal): Same.
14733 (wi::sub_large): Same.
14734 (wi::divmod_internal): Same.
14735 * wide-int.h: Change overflow type to overflow_type for neg, add,
14736 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
14737 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
14738 mul_internal, divmod_internal.
14739 (overflow_type): New enum.
14740 (accumulate_overflow): New.
14741
14742 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
14743
14744 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
14745 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
14746
14747 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
14748
14749 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
14750 argument is checked for zero before entering loop, avoid checking again.
14751
14752 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
14753
14754 * gimplify.h (generic_expr_could_trap_p): Set as global function.
14755 * gimplify.h (generic_expr_could_trap_p): Likwise.
14756 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
14757
14758 2018-07-06 Jakub Jelinek <jakub@redhat.com>
14759
14760 PR tree-optimization/86401
14761 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
14762 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
14763 (fold_bit_and_mask): ... here. New helper function for match.pd.
14764 * fold-const.h (fold_bit_and_mask): Declare.
14765 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
14766
14767 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
14768
14769 PR target/86324
14770 * target.def (translate_mode_attribute): New hook.
14771 * targhooks.h (default_translate_mode_attribute): Declare.
14772 * targhooks.c (default_translate_mode_attribute): New function.
14773 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
14774 * doc/tm.texi: Regenerate.
14775 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
14776 (rs6000_translate_mode_attribute): New function.
14777
14778 2018-07-06 Paul Koning <ni1d@arrl.net>
14779
14780 * doc/md.texi (define_split): Document DONE and FAIL.
14781 (define_peephole2): Ditto.
14782
14783 2018-07-05 Jeff Law <law@redhat.com>
14784
14785 PR tree-optimization/86010
14786 * tree-ssa-dse.c (compute_trims): More aggressively trim at
14787 both the head and tail of mem* and str* calls.
14788
14789 2018-07-05 Jim Wilson <jimw@sifive.com>
14790
14791 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
14792
14793 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
14794
14795 * config/aarch64/aarch64-simd.md: correct flags text for
14796 MIN_EXPR replacement.
14797
14798 2018-07-05 James Clarke <jrtc27@jrtc27.com>
14799
14800 * configure: Regenerated.
14801
14802 2018-07-05 Carl Love <cel@us.ibm.com>
14803
14804 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
14805 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
14806 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
14807 VSX_BUILTIN_DOUBLEL_V4SF.
14808
14809 2018-07-05 Martin Sebor <msebor@redhat.com>
14810
14811 PR c++/86400
14812 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
14813 than its domain to compute its the upper bound of a char array.
14814
14815 2018-07-05 Nathan Sidwell <nathan@acm.org>
14816
14817 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
14818 * doc/cpp.texi: Update comment.
14819 * doc/tm.texi: Rebuilt.
14820 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
14821 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
14822 * doc/extend.texi (Backwards Compatibility): Clarify it is system
14823 headers affected by extern "C".
14824 * system.h: Poison NO_IMPLICIT_EXTERN_C.
14825 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
14826 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
14827 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
14828 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
14829 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
14830 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
14831 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
14832 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
14833 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
14834 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
14835 config/sparc/sp64-elf.h, config/spu/spu.h,
14836 config/stormy16/stormy16.h, config/v850/v850.h,
14837 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
14838 define NO_IMPLICIT_EXTERN_C.
14839 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
14840
14841 2018-07-05 Tamar Christina <tamar.christina@arm.com>
14842
14843 PR target/84711
14844 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14845 instead of GET_MODE_SIZE when comparing Units.
14846
14847 2018-07-05 Tamar Christina <tamar.christina@arm.com>
14848
14849 PR target/84711
14850 * rtlanal.c (set_noop_p): Constrain on mode change,
14851 include hard-reg-set.h
14852
14853 2018-07-05 Tamar Christina <tamar.christina@arm.com>
14854
14855 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
14856
14857 2018-07-05 Jakub Jelinek <jakub@redhat.com>
14858
14859 Revert
14860 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
14861
14862 PR sanitizer/84250
14863 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
14864 libasan.
14865 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
14866
14867 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
14868
14869 PR sanitizer/84250
14870 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
14871 libasan.
14872 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
14873
14874 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
14875
14876 PR middle-end/86380
14877 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
14878
14879 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
14880
14881 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
14882 neg_*_op* variables.
14883
14884 2018-07-04 Martin Liska <mliska@suse.cz>
14885
14886 * tree-switch-conversion.c: Define
14887 max_ratio_for_speed and max_ratio_for_size constants.
14888
14889 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
14890 Martin Liska <mliska@suse.cz>
14891
14892 PR middle-end/66240
14893 PR target/45996
14894 PR c/84100
14895 * common.opt: Rename align options with 'str_' prefix.
14896 * common/config/i386/i386-common.c (set_malign_value): New
14897 function.
14898 (ix86_handle_option): Use it to set -falign-* options/
14899 * config/aarch64/aarch64-protos.h (struct tune_params): Change
14900 type from int to string.
14901 * config/aarch64/aarch64.c: Update default values from int
14902 to string.
14903 * config/alpha/alpha.c (alpha_override_options_after_change):
14904 Likewise.
14905 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
14906 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14907 max skip conditionally.
14908 * config/i386/freebsd.h (SUBALIGN_LOG): New.
14909 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14910 max skip conditionally.
14911 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14912 max skip conditionally.
14913 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
14914 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14915 max skip conditionally.
14916 * config/i386/i386.c (struct ptt): Change type from int to
14917 string.
14918 (ix86_default_align): Set default values.
14919 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
14920 max skip conditionally.
14921 * config/i386/iamcu.h (SUBALIGN_LOG): New.
14922 (ASM_OUTPUT_MAX_SKIP_ALIGN):
14923 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
14924 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14925 max skip conditionally.
14926 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
14927 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
14928 * config/i386/x86-64.h (SUBALIGN_LOG): New.
14929 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14930 max skip conditionally.
14931 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14932 * config/ia64/ia64.c (ia64_option_override): Set default values
14933 for alignment options.
14934 * config/m68k/m68k.c: Handle new str_align_* options.
14935 * config/mips/mips.c (mips_set_compression_mode): Change
14936 type of constants.
14937 (mips_option_override): Set default values for options.
14938 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
14939 Likewise.
14940 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14941 Likewise.
14942 * config/rx/rx.c (rx_option_override): Likewise.
14943 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
14944 (LABEL_ALIGN): Use align_labels_log.
14945 (LOOP_ALIGN): Use align_loops_align.
14946 * config/s390/s390.c (s390_asm_output_function_label): Use new
14947 macros.
14948 * config/sh/sh.c (sh_override_options_after_change):
14949 Change type of constants.
14950 * config/spu/spu.c (spu_sched_init): Likewise.
14951 * config/sparc/sparc.c (sparc_option_override): Set default
14952 values for options.
14953 * config/visium/visium.c (visium_option_override): Likewise.
14954 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
14955 emit p2align format with last argument if it's not needed.
14956 * doc/invoke.texi: Document extended format of -falign-*.
14957 * final.c: Use align_labels alignment.
14958 * flags.h (struct target_flag_state): Change type to use
14959 align_flags.
14960 (struct align_flags_tuple): New.
14961 (struct align_flags): Likewise.
14962 (align_loops_log): Redefine macro to use new types.
14963 (align_loops_max_skip): Redefine macro to use new types.
14964 (align_jumps_log): Redefine macro to use new types.
14965 (align_jumps_max_skip): Redefine macro to use new types.
14966 (align_labels_log): Redefine macro to use new types.
14967 (align_labels_max_skip): Redefine macro to use new types.
14968 (align_functions_log): Redefine macro to use new types.
14969 (align_loops): Redefine macro to use new types.
14970 (align_jumps): Redefine macro to use new types.
14971 (align_labels): Redefine macro to use new types.
14972 (align_functions): Redefine macro to use new types.
14973 (align_functions_max_skip): Redefine macro to use new types.
14974 (align_loops_value): New macro.
14975 (align_jumps_value): New macro.
14976 (align_labels_value): New macro.
14977 (align_functions_value): New macro.
14978 * function.c (invoke_set_current_function_hook): Propagate
14979 alignment values from flags to global variables default in
14980 topleev.h.
14981 * ipa-icf.c (sem_function::equals_wpa): Use
14982 cl_optimization_option_eq instead of memcmp.
14983 * lto-streamer.h (cl_optimization_stream_out): Support streaming
14984 of string types.
14985 (cl_optimization_stream_in): Likewise.
14986 * optc-save-gen.awk: Support strings in cl_optimization.
14987 * opth-gen.awk: Likewise.
14988 * opts.c (finish_options): Remove error checking of invalid
14989 value ranges.
14990 (MAX_CODE_ALIGN): Remove.
14991 (MAX_CODE_ALIGN_VALUE): Likewise.
14992 (parse_and_check_align_values): New function.
14993 (check_alignment_argument): Likewise.
14994 (common_handle_option): Use check_alignment_argument.
14995 * opts.h (parse_and_check_align_values): Declare.
14996 * toplev.c (init_alignments): Remove.
14997 (read_log_maxskip): New.
14998 (parse_N_M): Likewise.
14999 (parse_alignment_opts): Likewise.
15000 (backend_init_target): Remove usage of init_alignments.
15001 * toplev.h (parse_alignment_opts): Declare.
15002 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
15003 argument.
15004 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
15005 * tree.c (cl_option_hasher::equal): New.
15006 * varasm.c: Use new global macros.
15007
15008 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
15009
15010 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
15011 Use a simpler align directive also if MAXSKIP = ALIGN-1.
15012 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15013 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15014 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15015 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15016 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
15017 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
15018 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
15019 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15020 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15021 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15022 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15023
15024 2018-07-04 Martin Liska <mliska@suse.cz>
15025 Jonathan Wakely <jwakely@redhat.com>
15026
15027 * coverage.c: Use correct type.
15028 * doc/invoke.texi: Language correction.
15029
15030 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
15031
15032 PR target/85620
15033 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
15034 ENDBRANCH for non-tail call which may return via indirect branch.
15035 * doc/extend.texi: Document indirect_return attribute.
15036
15037 2018-07-03 Martin Sebor <msebor@redhat.com>
15038
15039 PR tree-optimization/86274
15040 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
15041 precondition.
15042 (format_floating): Correct handling of infinities and NaNs.
15043
15044 2018-07-03 Martin Sebor <msebor@redhat.com>
15045
15046 * print-tree.c (print_real_cst): New function.
15047 (print_node_brief): Call it.
15048 (print_node): Ditto.
15049
15050 2018-07-03 Jeff Law <law@redhat.com>
15051
15052 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
15053 into a single pattern.
15054
15055 * config/h8300/h8300.md (ors code_iterator): New.
15056 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
15057 a single pattern and single splitter.
15058 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
15059 (iorqi3_1, xorqi3_1): Likewise.
15060 (iorqi3, xorqi3 expanders): Similarly.
15061
15062 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
15063 (movmd_internal) into a single pattern using the P mode iterator.
15064 (movmd splitters): Similarly.
15065 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
15066 (movsd splitters): Similarly.
15067
15068 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
15069 ADDB, ADDW and ADDL into a single ADD attribute which selects the
15070 right table based on the size of the operand.
15071 * config/h8300/h8300.md (length_table): Corresponding changes. All
15072 references to "addb", "addw" and "addl" changed to "add".
15073 (btst patterns): Merge two variants into a single pattern.
15074 (tstqi, tsthi): Likewise.
15075 (addhi3_incdec, addsi3_incdec): Likewise.
15076 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
15077 (mulhi3, mulsi3): Likewise.
15078 (udivhi3, udivsi3): Likewise.
15079 (divhi3, divsi3): Likewise.
15080 (andorqi3, andorhi3, andorsi3): Likewise.
15081
15082 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
15083
15084 PR target/85694
15085 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
15086 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
15087
15088 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15089
15090 PR tree-optimization/85694
15091 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
15092 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
15093 UNSPEC_URHADD.
15094 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
15095 (<u>avg<mode>3_ceil): New patterns.
15096
15097 2018-07-03 David Malcolm <dmalcolm@redhat.com>
15098
15099 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
15100 scan-tree-dump directive.
15101 * gcc.dg/vect/slp-perm-2.c: Likewise.
15102 * gcc.dg/vect/slp-perm-3.c: Likewise.
15103 * gcc.dg/vect/slp-perm-5.c: Likewise.
15104 * gcc.dg/vect/slp-perm-6.c: Likewise.
15105 * gcc.dg/vect/slp-perm-7.c: Likewise.
15106 * gcc.dg/vect/slp-perm-8.c: Likewise.
15107
15108 2018-07-03 Marek Polacek <polacek@redhat.com>
15109
15110 PR middle-end/86202
15111 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
15112
15113 2018-07-03 Richard Biener <rguenther@suse.de>
15114
15115 PR ipa/86389
15116 * tree-ssa-structalias.c (find_func_clobbers): Properly
15117 handle indirect calls.
15118
15119 2018-07-03 Jeff Law <law@redhat.com>
15120
15121 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
15122 (shifts): New code iterator.
15123 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
15124 expander. Fix HImode handling on H8/SX.
15125 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
15126 (subqi3, subhi3, subsi3 expanders): Likewise.
15127 (andqi3, andhi3, andsi3 expanders): Likewise.
15128 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
15129 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
15130 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
15131 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
15132 (zero_extendqihi2, zero_extendqisi2): Likewise.
15133 (extendqihi2, extendqisi2): Likewise.
15134 (rotlqi3, rotlhi3, rotlsi3): Likewise.
15135 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
15136 (rotlqi3_1, rotlhi3_1): Likewise.
15137 (logicalhi3_sn, logicalsi3_sn): Likewise.
15138 (logicalhi3, logicalsi3): Likewise.
15139
15140 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15141
15142 * tree-vect-patterns.c (vect_recog_rotate_pattern)
15143 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
15144 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
15145 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
15146 type to append_pattern_def_seq instead of creating a stmt_vec_info
15147 directly.
15148 (build_mask_conversion): Likewise. Remove vinfo argument.
15149 (vect_add_conversion_to_patterm): Likewise, renaming to...
15150 (vect_add_conversion_to_pattern): ...this.
15151 (vect_recog_mask_conversion_pattern): Update call to
15152 build_mask_conversion. Pass the vector type to
15153 append_pattern_def_seq here too.
15154 (vect_recog_gather_scatter_pattern): Update call to
15155 vect_add_conversion_to_pattern.
15156
15157 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15158
15159 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
15160 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15161 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
15162 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
15163 STMT_VINFO_PATTERN_DEF_SEQ to null here.
15164 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
15165 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
15166 append_pattern_def_seq instead of new_pattern_def_seq.
15167 (vect_recog_divmod_pattern): Do both of the above.
15168 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
15169 is null.
15170
15171 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15172
15173 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
15174 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
15175 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
15176 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
15177 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
15178 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
15179 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
15180 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
15181 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
15182 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
15183 parameter with a single stmt_vec_info.
15184 (vect_recog_func_ptr): Likewise.
15185 (vect_recog_gather_scatter_pattern): Likewise, folding in...
15186 (vect_try_gather_scatter_pattern): ...this.
15187 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
15188 the stmt_vec_info of the statement to be matched. Don't clear
15189 STMT_VINFO_RELATED_STMT.
15190 (vect_pattern_recog): Update call accordingly.
15191
15192 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15193
15194 PR tree-optimization/85694
15195 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
15196 (uavgM3_ceil): Document new optabs.
15197 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
15198 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
15199 functions.
15200 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
15201 (savg_ceil_optab): New optabs.
15202 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
15203 (vect_vect_recog_func_ptrs): Add it.
15204 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
15205 constant directly from the associated lhs.
15206
15207 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15208
15209 * tree-vect-patterns.c (vect_split_statement): New function.
15210 (vect_convert_input): Use it to try to split an existing cast.
15211
15212 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15213
15214 * poly-int.h (print_hex): New function.
15215 * dumpfile.h (dump_dec, dump_hex): Declare.
15216 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
15217 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
15218 min_input_precision, operation_precision and operation_sign.
15219 * tree-vect-patterns.c (vect_get_range_info): New function.
15220 (vect_same_loop_or_bb_p, vect_single_imm_use)
15221 (vect_operation_fits_smaller_type): Delete.
15222 (vect_look_through_possible_promotion): Add an optional
15223 single_use_p parameter.
15224 (vect_recog_over_widening_pattern): Rewrite to use new
15225 stmt_vec_info infomration. Handle one operation at a time.
15226 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
15227 (vect_truncatable_operation_p, vect_set_operation_type)
15228 (vect_set_min_input_precision): New functions.
15229 (vect_determine_min_output_precision_1): Likewise.
15230 (vect_determine_min_output_precision): Likewise.
15231 (vect_determine_precisions_from_range): Likewise.
15232 (vect_determine_precisions_from_users): Likewise.
15233 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
15234 (vect_vect_recog_func_ptrs): Put over_widening first.
15235 Add cast_forwprop.
15236 (vect_pattern_recog): Call vect_determine_precisions.
15237
15238 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15239
15240 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
15241 statements that have been replaced by further pattern statements.
15242 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
15243
15244 2018-07-03 Richard Biener <rguenther@suse.de>
15245
15246 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
15247 always set *dt. Dump vectype in vectype overload.
15248 * dumpfile.h (dump_gimple_expr): New function.
15249 (dump_gimple_expr_loc): Likewise.
15250 * dumpfile.c (dump_gimple_expr): New function.
15251 (dump_gimple_expr_loc): Likewise.
15252
15253 2018-07-02 Jeff Law <law@redhat.com>
15254
15255 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
15256 the H8/300, H8/300H and H8/S variants into a single pattern.
15257 (movhi_h8300, movqi_h8300hs): Similarly.
15258 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
15259 (QHI mode iterator): New.
15260
15261 * config/h8300/h8300.md: Remove trailing whitespace.
15262
15263 2018-07-02 Jim Wilson <jimw@sifive.com>
15264
15265 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
15266 instead of emit_insn for interrupt returns.
15267 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
15268 (riscv_sret, riscv_uret): Likewise.
15269
15270 2018-07-02 David Malcolm <dmalcolm@redhat.com>
15271
15272 * pretty-print.c (selftest::test_pp_format): Move save and restore
15273 of quotes to class auto_fix_quotes, and add an instance.
15274 * selftest.c: Include "intl.h".
15275 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
15276 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
15277 * selftest.h (selftest::auto_fix_quotes): New class.
15278
15279 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
15280
15281 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
15282 (aarch64_sve_prepare_conditional_op): Remove.
15283 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
15284 Allow aarch64_simd_reg_or_zero as select operand; remove
15285 the aarch64_sve_prepare_conditional_op call.
15286 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
15287 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
15288 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
15289 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
15290 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
15291 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
15292 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
15293 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
15294 and a splitters to match all of the *_any patterns.
15295 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
15296
15297 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
15298 (SVE_COND_FP_BINARY_REV): Remove.
15299 (sve_int_op_rev, sve_fp_op_rev): New.
15300 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
15301 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
15302 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
15303 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
15304 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
15305 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
15306 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
15307 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
15308 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
15309
15310 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
15311 Remove match_dup 1 from the inner unspec.
15312 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
15313
15314 * config/aarch64/aarch64.md (movprfx): New attr.
15315 (length): Default movprfx to 8.
15316 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
15317 (*madd<SVE_I>, *msub<SVE_I): Likewise.
15318 (*<su>mul<SVE_I>3_highpart): Likewise.
15319 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
15320 (*v<ASHIFT><SVE_I>3): Likewise.
15321 (*<su><MAXMIN><SVE_I>3): Likewise.
15322 (*<su><MAXMIN><SVE_F>3): Likewise.
15323 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
15324 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
15325 (*div<SVE_F>4): Likewise.
15326
15327 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
15328
15329 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
15330 in dump string.
15331
15332 2018-07-02 Richard Biener <rguenther@suse.de>
15333
15334 PR tree-optimization/86363
15335 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
15336 memset argument refers to a non-variable address.
15337
15338 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
15339
15340 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
15341 {PLUS,MINUS}_EXPR code to...
15342 (adjust_symbolic_bound): ...here,
15343 (combine_bound): ...here,
15344 (set_value_range_with_overflow): ...and here.
15345
15346 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
15347
15348 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
15349 code...
15350 (extract_range_from_abs_expr): ...here.
15351
15352 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
15353
15354 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
15355 -fno-omit-frame-pointer when not optimizing.
15356
15357 2018-07-02 Martin Liska <mliska@suse.cz>
15358
15359 PR ipa/86279
15360 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
15361 (propagate_nothrow): Likewise.
15362
15363 2018-07-02 Martin Liska <mliska@suse.cz>
15364
15365 PR ipa/86323
15366 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
15367
15368 2018-07-02 David Malcolm <dmalcolm@redhat.com>
15369
15370 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
15371 function in r262149, changing "loc" param from source_location to
15372 const dump_location_t &.
15373 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
15374 declaration, as above.
15375
15376 2018-07-01 Paul Koning <ni1d@arrl.net>
15377
15378 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
15379 -munit-asm, -mgnu-asm, -mdec-asm.
15380 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
15381 (pdp11_output_labelref): New.
15382 (pdp11_output_def): New.
15383 (pdp11_output_addr_vec_elt): New.
15384 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
15385 %# and %@ format codes.
15386 (pdp11_option_override): New.
15387 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
15388 (pdp11_output_ident): New.
15389 (pdp11_asm_named_section): New.
15390 (pdp11_asm_init_sections): New.
15391 (pdp11_file_start): New.
15392 (pdp11_file_end): New.
15393 (output_ascii): Use .ascii/.asciz for -mdec-asm.
15394 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
15395 %o, like %c but octal.
15396 (pdp11_option_override): New.
15397 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
15398 -mdec-asm.
15399 (DATA_SECTION_ASM_OP): Ditto.
15400 (READONLY_DATA_SECTION_ASM_OP): New.
15401 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
15402 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
15403 (ASM_OUTPUT_LABELREF): Ditto.
15404 (ASM_OUTPUT_DEF): Ditto.
15405 (ASM_OUTPUT_EXTERNAL): New.
15406 (ASM_OUTPUT_SOURCE_FILENAME): New.
15407 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
15408 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
15409 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
15410 %# and %@ format codes.
15411 * config/pdp11/pdp11.opt (mgnu-asm): New.
15412 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
15413 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
15414 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
15415
15416 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
15417
15418 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
15419 dereferencing path[] beyond its length.
15420 (debug_path): New.
15421 (debug_all_paths): New.
15422 (rewire_first_differing_edge): New.
15423 (adjust_paths_after_duplication): New.
15424 (duplicate_thread_path): Call adjust_paths_after_duplication.
15425 Add new argument.
15426 (thread_through_all_blocks): Add new argument to
15427 duplicate_thread_path.
15428
15429 2018-06-30 Jim Wilson <jimw@sifive.com>
15430
15431 * config/riscv/predicates.md (p2m1_shift_operand): New.
15432 (high_mask_shift_operand): New.
15433 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
15434 pattern using p2m1_shift_operand.
15435 (lshsi3_zero_extend_3+2): New combiner pattern using
15436 high_mask_shift_operand.
15437
15438 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15439
15440 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
15441 split out from...
15442 (vect_recog_rotate_pattern): ...here.
15443 (vect_convert_input): Try to insert casts of invariants in the
15444 preheader.
15445 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
15446 preheader to be empty.
15447
15448 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15449
15450 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
15451 vector type. If given, install it in the new statement's
15452 STMT_VINFO_VECTYPE.
15453 (vect_element_precision): New function.
15454 (vect_unpromoted_value): New struct.
15455 (vect_unpromoted_value::vect_unpromoted_value): New function.
15456 (vect_unpromoted_value::set_op): Likewise.
15457 (vect_look_through_possible_promotion): Likewise.
15458 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
15459 (vect_widened_op_tree, vect_convert_input): Likewise.
15460 (vect_convert_inputs, vect_convert_output): Likewise.
15461 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
15462 to handle the optional cast of the multiplication result and
15463 vect_widened_op_tree to detect the widened multiplication itself.
15464 Do not require the input and output of promotion casts to have
15465 the same sign, but base the signedness of the operation on the
15466 input rather than the result. If the pattern includes two
15467 promotions, check that those promotions have the same sign.
15468 Do not restrict the MULT_EXPR handling to a double-width result;
15469 handle quadruple-width results and wider. Use vect_convert_inputs
15470 to convert the inputs to the common type.
15471 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
15472 to handle the optional cast of the ABS result. Also allow a sign
15473 change or a sign extension between the ABS and MINUS.
15474 Use vect_widened_op_tree to detect the widened subtraction and use
15475 vect_convert_inputs to convert the inputs to the common type.
15476 (vect_handle_widen_op_by_const): Delete.
15477 (vect_recog_widen_op_pattern): New function.
15478 (vect_recog_widen_mult_pattern): Use it.
15479 (vect_recog_widen_shift_pattern): Likewise.
15480 (vect_recog_widen_sum_pattern): Use
15481 vect_look_through_possible_promotion to handle the promoted
15482 PLUS_EXPR operand.
15483
15484 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15485
15486 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
15487 the containing gimple_seq *.
15488 * gimple-iterator.h (gsi_for_stmt): Declare it.
15489 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
15490 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
15491 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
15492 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
15493 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
15494 checks.
15495 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
15496 split out from...
15497 (vect_mark_pattern_stmts): ...here. Handle cases in which the
15498 statement being replaced is part of an existing pattern
15499 definition sequence, inserting the new pattern statements before
15500 the original one.
15501 (vect_pattern_recog_1): Don't return a bool. If the statement
15502 is already part of a pattern, instead apply pattern matching
15503 to the pattern definition statements. Don't clear the
15504 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
15505 (vect_pattern_recog): Don't break after the first match;
15506 continue processing the pattern definition statements instead.
15507 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
15508
15509 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15510
15511 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15512 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15513 (vect_recog_widen_sum_pattern): Use it.
15514
15515 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15516
15517 * tree-vect-loop.c (vectorizable_reduction): Assert that the
15518 phi is not a pattern statement and has not been replaced by
15519 a pattern statement.
15520 * tree-vect-patterns.c (type_conversion_p): Don't check
15521 STMT_VINFO_IN_PATTERN_P.
15522 (vect_recog_vector_vector_shift_pattern): Likewise.
15523 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
15524 the pattern statement rather than the original statement; check
15525 directly for a WIDEN_MULT_EXPR here.
15526 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
15527 vect_is_simple_use to return the pattern statement rather
15528 than the original statement; use is_pattern_stmt_p to check
15529 for such a pattern statement.
15530 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
15531 to return the pattern statement rather than the original statement;
15532 don't do the same transformation here.
15533 (vect_is_simple_use): If the defining statement has been replaced
15534 by a pattern statement, return the pattern statement instead.
15535 Remove the corresponding (local) transformation from the vectype
15536 overload.
15537
15538 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15539
15540 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
15541 end and default to null.
15542 * tree-vect-loop.c (vect_create_epilog_for_reduction)
15543 (vectorizable_reduction): Update calls accordingly, dropping the
15544 gimple ** argument if the passed-back statement isn't needed.
15545 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
15546 (vect_recog_rotate_pattern): Likewise.
15547 (vect_recog_mask_conversion_pattern): Likewise.
15548 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
15549 (vect_mask_constant_operand_p): Likewise.
15550 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
15551 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
15552 (get_group_load_store_type, get_load_store_type): Likewise.
15553 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
15554 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
15555 (vectorizable_conversion, vectorizable_assignment): Likewise.
15556 (vectorizable_shift, vectorizable_operation): Likewise.
15557 (vectorizable_store, vect_is_simple_cond): Likewise.
15558 (vectorizable_condition, vectorizable_comparison): Likewise.
15559 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
15560 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
15561 and move it to the end. Cope with null def_stmt_outs.
15562
15563 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
15564
15565 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
15566
15567 2018-06-29 Jeff Law <law@redhat.com>
15568
15569 * config/v850/v850.c (v850_legitimate_address_p): Handle large
15570 displacements for TARGET_V850E2V3 and newer.
15571 (TARGET_LRA_P): Remove. Defaults to LRA now.
15572 * config/v850/v850.md (sign23byte_load): Remove.
15573 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
15574 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
15575
15576 2018-06-29 Martin Liska <mliska@suse.cz>
15577
15578 PR lto/85759
15579 * coverage.c (coverage_init): Mangle full path name.
15580 * doc/invoke.texi: Document the change.
15581 * gcov-io.c (mangle_path): New.
15582 * gcov-io.h (mangle_path): Likewise.
15583 * gcov.c (mangle_name): Use mangle_path for path mangling.
15584
15585 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15586
15587 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
15588 if starting source register is not even.
15589
15590 2018-06-29 Martin Liska <mliska@suse.cz>
15591
15592 PR tree-optimization/86263
15593 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
15594 Make edge redirection.
15595
15596 2018-06-29 David Malcolm <dmalcolm@redhat.com>
15597
15598 * dumpfile.c (dump_loc): Add indentation based on scope depth.
15599 (dump_scope_depth): New variable.
15600 (get_dump_scope_depth): New function.
15601 (dump_begin_scope): New function.
15602 (dump_end_scope): New function.
15603 * dumpfile.h (get_dump_scope_depth): New declaration.
15604 (dump_begin_scope): New declaration.
15605 (dump_end_scope): New declaration.
15606 (class auto_dump_scope): New class.
15607 (AUTO_DUMP_SCOPE): New macro.
15608 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
15609 AUTO_DUMP_SCOPE.
15610
15611 2018-06-29 Richard Biener <rguenther@suse.de>
15612
15613 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
15614 compute_all_dependences succeeds.
15615 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
15616 exceed --param loop-max-datarefs-for-datadeps.
15617
15618 2018-06-29 Jakub Jelinek <jakub@redhat.com>
15619
15620 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
15621
15622 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
15623
15624 PR target/86348
15625 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
15626 alternative 0 in preferred_for_speed attribute.
15627
15628 2018-06-28 Paul Koning <ni1d@arrl.net>
15629
15630 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
15631 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
15632 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
15633 * config/pdp11/pdp11.md: Correct "length" attribute calculation
15634 for shift insn patterns.
15635
15636 2018-06-28 David Malcolm <dmalcolm@redhat.com>
15637
15638 * cgraph.c (cgraph_node::get_body): Replace assignments to
15639 "dump_file" with calls to set_dump_file.
15640 * dumpfile.c (alt_dump_file): Make static, and group with...
15641 (alt_flags): ...this definition.
15642 (dumps_are_enabled): New variable.
15643 (refresh_dumps_are_enabled): New function.
15644 (set_dump_file): New function.
15645 (set_alt_dump_file): New function.
15646 (gcc::dump_manager::dump_start): Replace assignments to
15647 "dump_file" and "alt_dump_file" with calls to set_dump_file and
15648 set_alt_dump_file.
15649 (gcc::dump_manager::dump_finish): Likewise.
15650 * dumpfile.h (alt_dump_file): Delete decl.
15651 (dumps_are_enabled): New variable decl.
15652 (set_dump_file): New function decl.
15653 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
15654 global.
15655 * tree-nested.c (lower_nested_functions): Replace assignments to
15656 "dump_file" with calls to set_dump_file.
15657
15658 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
15659
15660 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
15661 goto_locus of each outgoing edge of each basic block.
15662
15663 2018-06-28 Richard Biener <rguenther@suse.de>
15664
15665 * dwarf2out.c (decl_scope_table): Remove.
15666 (push_decl_scope): Likewise.
15667 (pop_decl_scope): Likewise.
15668 (gen_type_die_for_member): Do not call push/pop_decl_scope.
15669 (gen_struct_or_union_type_die): Likewise.
15670 (gen_tagged_type_die): Likewise.
15671 (dwarf2out_init): Do not initialize decl_scope_table.
15672 (dwarf2out_c_finalize): Do not free it.
15673
15674 2018-06-28 Richard Biener <rguenther@suse.de>
15675
15676 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
15677 deciding whether to not re-use a DIE.
15678
15679 2018-06-28 Richard Biener <rguenther@suse.de>
15680
15681 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
15682 DW_AT_abstract_origin attribute.
15683
15684 2018-06-28 Martin Liska <mliska@suse.cz>
15685
15686 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15687 Use newly introduced constants.
15688 * tree-switch-conversion.h (struct jump_table_cluster):
15689 Define max_ratio_for_size and max_ratio_for_speed.
15690
15691 2018-06-28 Martin Liska <mliska@suse.cz>
15692
15693 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15694 Add new checking assert to catch invalid state.
15695 (jump_table_cluster::can_be_handled): Handle single case
15696 clusters.
15697 (jump_table_cluster::is_beneficial): Bail out for such case.
15698 (bit_test_cluster::find_bit_tests):
15699 Add new checking assert to catch invalid state.
15700 (bit_test_cluster::can_be_handled): Handle single case
15701 clusters.
15702 (bit_test_cluster::is_beneficial): Bail out for such case.
15703 (switch_decision_tree::analyze_switch_statement):
15704 Fix comment.
15705
15706 2018-06-28 Martin Liska <mliska@suse.cz>
15707
15708 * common.opt: Introduce -completion option.
15709 * gcc.c (driver_handle_option): Handle it.
15710 (driver::main): Print completions if completion
15711 is set.
15712 * opt-suggestions.c (option_proposer::get_completions):
15713 New function.
15714 (option_proposer::suggest_completion): Likewise.
15715 (option_proposer::find_param_completions): Likewise.
15716 (verify_autocompletions): Likewise.
15717 (test_completion_valid_options): Likewise.
15718 (test_completion_valid_params): Likewise.
15719 (in_completion_p): Likewise.
15720 (empty_completion_p): Likewise.
15721 (test_completion_partial_match): Likewise.
15722 (test_completion_garbage): Likewise.
15723 (opt_proposer_c_tests): Likewise.
15724 * opt-suggestions.h: Declare new functions.
15725 * opts.c (common_handle_option): Handle OPT__completion_.
15726 * selftest-run-tests.c (selftest::run_tests): Add
15727 opt_proposer_c_tests.
15728 * selftest.c (assert_str_startswith): New.
15729 * selftest.h (assert_str_startswith): Likewise.
15730 (opt_proposer_c_tests): New.
15731 (ASSERT_STR_STARTSWITH): Likewise.
15732
15733 2018-06-28 Martin Liska <mliska@suse.cz>
15734
15735 * Makefile.in: Add opt-suggestions.o.
15736 * gcc-main.c: Include opt-suggestions.h.
15737 * gcc.c (driver::driver): Likewise.
15738 (driver::~driver): Remove m_option_suggestions.
15739 (driver::build_option_suggestions): Moved to option_proposer.
15740 (driver::suggest_option): Likewise.
15741 (driver::handle_unrecognized_options): Use option_proposer.
15742 * gcc.h (class driver): Add new memver m_option_proposer.
15743 * opt-suggestions.c: New file.
15744 * opt-suggestions.h: New file.
15745
15746 2018-06-28 Martin Liska <mliska@suse.cz>
15747
15748 * vec.h (class auto_string_vec): New (moved from auto_argvec).
15749 (auto_string_vec::~auto_string_vec): Likewise.
15750
15751 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
15752
15753 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
15754 prevent_decl_creation_for_types fields up and add reset_location field.
15755 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
15756 statement if id->reset_location is true.
15757 (copy_edges_for_bb): Do not set goto_locus on the new edges if
15758 id->reset_location is true.
15759 (copy_phis_for_bb): Force input_location on the arguments if
15760 id->reset_location is true.
15761 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
15762 is set on the function to be inlined.
15763
15764 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
15765
15766 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
15767
15768 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
15769
15770 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
15771 registers for Pmode.
15772 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
15773 hard registers for the clobbered pseudo.
15774
15775 2018-06-27 Paul Koning <ni1d@arrl.net>
15776
15777 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
15778 mutually exclusive options.
15779 * config/pdp11/constraints.md (h): New constraint.
15780 (O): Update definition to match shift code generation.
15781 (D): New constraint.
15782 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
15783 (CCFP): Remove.
15784 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
15785 function.
15786 (output_jump): Change arguments.
15787 (pdp11_fixed_cc_regs): New function.
15788 (pdp11_cc_mode): Ditto.
15789 (pdp11_expand_shift): Ditto.
15790 (pdp11_assemble_shift): Ditto.
15791 (pdp11_small_shift): Ditto.
15792 (pdp11_branch_cost): Remove.
15793 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
15794 from output.
15795 (pdp11_register_move_cost): Update for CC registers.
15796 (pdp11_rtx_costs): Add case for LSHIFTRT.
15797 (pdp11_output_jump): Add CCNZ mode conditional branches.
15798 (notice_update_cc_on_set): Remove.
15799 (pdp11_cc_mode): New function.
15800 (simple_memory_operand): Correct pre/post decrement case.
15801 (no_side_effect_operand): New function.
15802 (pdp11_regno_reg_class): Add CC_REGS class.
15803 (pdp11_fixed_cc_regs): New function.
15804 (pdp11_small_shift): New function.
15805 (pdp11_expand_shift): New function to expand shift insns.
15806 (pdp11_assemble_shift): New function to output shifts.
15807 (pdp11_branch_cost): Remove.
15808 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
15809 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
15810 (WCHAR_TYPE): Ditto.
15811 (PTRDIFF_TYPE): Ditto.
15812 (ADJUST_INSN_LENGTH): New macro.
15813 (FIXED_REGISTERS): Add CC registers.
15814 (CALL_USED_REGISTERS): Ditto.
15815 (reg_class): Ditto.
15816 (REG_CLASS_NAMES): Ditto.
15817 (REG_CLASS_CONTENTS): Ditto.
15818 (SELECT_CC_MODE): Use new function.
15819 (TARGET_FLAGS_REGNUM): New macro.
15820 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
15821 (cc0_reg_rtx): Remove.
15822 (CC_STATUS_MDEP): Remove.
15823 (CC_STATUS_MDEFP_INIT): Remove.
15824 (CC_IN_FPU): Remove.
15825 (NOTICE_UPDATE_CC): Remove.
15826 (REGISTER_NAMES): Add CC registers.
15827 (BRANCH_COST): Change to constant 1.
15828 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
15829 handling.
15830 * config/pdp11/pdp11.opt (mbcopy): Remove.
15831 (mbcopy-builtin): Remove.
15832 (mbranch-cheap): Remove.
15833 (mbranch-expensive): Remove.
15834 * config/pdp11/predicates.md (expand_shift_operand): Update to
15835 match shift code generation.
15836 (ccnz_operator): New predicate.
15837 * doc/invoke.texi (PDP-11 Options): Remove deleted options
15838 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
15839 Remove non-existent option -mabshi, -mno-abshi. Document mutually
15840 exclusive options.
15841 * doc/md.texi (PDP-11): Document new D and h constraints. Update
15842 description of O constraint.
15843
15844 2018-06-27 Jeff Law <law@redhat.com>
15845 Austin Law <austinklaw@gmail.com>
15846
15847 * config/v850/v850.md (addsi3_set_flags): New pattern.
15848 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
15849 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
15850 (zero_extendhisi2_v850_set_flags): Likewise.
15851 (zero_extendqisi2_v850_set_flags): Likewise.
15852 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
15853 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
15854 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
15855
15856 * config/v850/v850-protos.h (notice_update_cc): Remove.
15857 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
15858 (v850_print_operand): Handle 'D' and "d".
15859 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
15860 Add handling of arithmetic/logical operations compared against zero.
15861 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
15862 Do not look at v850_compare_op, instead get mode from last argument.
15863 (v850_gen_compare): Remove
15864 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
15865 after reload for prologue insns.
15866 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
15867 patterns.
15868 (construct_save_jarl): Likewise.
15869 (TARGET_FLAGS_REGNUM): Define.
15870 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
15871 (NOTICE_UPDATE_CC): Remove.
15872 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
15873 than cc0. Conditionalize on reload_completed.
15874 (cmpsi_insn, setfcc_insn): Likewise.
15875 (tst1 splitter): Turn into define_and_split which sets the flags
15876 after reload.
15877 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
15878 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
15879 (cstoresf4, cstoredf4): Clobber the flags.
15880 (cmpsi, cmpsf, cmpdf): Remove expanders.
15881 (setf_insn): Remove pattern.
15882 (addsi3): Turn into define_and_split which clobbers the flags after
15883 reload and a suitable pattern (addsi3_clobber_flags) for use after
15884 reload.
15885 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
15886 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
15887 (ashrsi3, ashrsi3_v850e2): Likewise.
15888 (bins): Clobber the flags.
15889 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
15890 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
15891 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
15892 (call_value_internal_short, call_value_internal_long): Likewise.
15893 (callt_save_interrupt, callt_return_interrupt): Likewise.
15894 (save_interrupt, return_interrupt): Likewise.
15895 (callt_save_all_interrupt, save_all_interrupt): Likewise.
15896 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
15897 (restore_all_interrupt, _restore_all_interrupt): Likewise.
15898 (All FP comparisons): Only allow after reload has completed.
15899 (trfsr): Likewise.
15900 (divh, divhu): Tweak output template.
15901 (branch_z_normal, branch_z_invert): Remove
15902 (branch_nz_normal, branch_nz_invert): Likewise.
15903 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
15904
15905 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
15906 * config/v850/v850.c (notice_update_cc): Remove.
15907 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
15908 (CC_NO_CARRY): Likewise.
15909 (NOTICE_UPDATE_CC): Define to nothing.
15910 * config/v850/v850.md: Remove block comment on cc0 handling
15911 Remove "cc" attribute from all patterns. Remove cc_status handling
15912 from all patterns. Minor formatting fixes.
15913
15914 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15915
15916 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
15917 (cortex-a76.cortex-a55): Likewise.
15918 * config/aarch64/aarch64-tune.md: Regenerate.
15919 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
15920 cortex-a76.cortex-a55.
15921
15922 2018-06-27 Jeff Law <law@redhat.com>
15923
15924 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
15925 (MULTILIB_DIRNAMES): Similarly.
15926
15927 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
15928
15929 * gimple.h (gimple_return_retbnd): Delete.
15930 (gimple_return_set_retbnd): Likewise.
15931 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
15932 gimple_return_set_retbnd.
15933 * gimple-pretty-print.c (dump_gimple_return): Remove call to
15934 gimple_return_retbnd and adjust.
15935 * tree-inline.h (struct copy_body_data): Remove retbnd field.
15936 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
15937 Explicitly return NULL in a couple more cases. Move assertion
15938 on debug statements and remove unreachable code.
15939 (reset_debug_binding): Do not test id->retbnd.
15940 (expand_call_inline): Do not set it.
15941
15942 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
15943
15944 * configure.ac: Add --disable-gcov option.
15945 * configure: Regenerate.
15946 * Makefile.in: Honour @enable_gcov@.
15947 * doc/install.texi: Document --disable-gcov.
15948
15949 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15950
15951 * config/arm/arm-cpus.in (cortex-a76): New entry.
15952 (cortex-a76.cortex-a55): Likewise.
15953 * config/arm/arm-tables.opt: Regenerate.
15954 * config/arm/arm-tune.md: Likewise.
15955 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
15956 * doc/invoke.texi (ARM Options): Document cortex-a76 and
15957 cortex-a76.cortex-a55.
15958
15959 2018-06-27 Tamar Christina <tamar.christina@arm.com>
15960
15961 PR target/85769
15962 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
15963
15964 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
15965
15966 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
15967 comment.
15968 (EPILOGUE_USES): Likewise.
15969
15970 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
15971
15972 * tree-inline.c (remap_location): New function extracted from...
15973 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
15974 (copy_phis_for_bb): ...here. Call remap_location.
15975 (copy_cfg_body): Adjust call to copy_edges_for_bb.
15976
15977 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
15978
15979 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
15980 unaligned vsx for 16B memset.
15981
15982 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
15983
15984 PR target/86285
15985 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
15986 ieee128_float_type_node to long_double_type_node unless
15987 TARGET_LONG_DOUBLE_128 is set.
15988
15989 2018-06-26 David Malcolm <dmalcolm@redhat.com>
15990
15991 * cfgloop.c (get_loop_location): Convert return type from
15992 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
15993 by implicit construction from rtx_insn *, and using
15994 dump_user_location_t::from_function_decl for the fallback case.
15995 * cfgloop.h (get_loop_location): Convert return type from
15996 location_t to dump_user_location_t.
15997 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
15998 dump_printf_loc to pass in a dump_location_t rather than a
15999 location_t, via the gimple stmt.
16000 * coverage.c (get_coverage_counts): Update calls to
16001 dump_printf_loc to pass in dump_location_t rather than a
16002 location_t.
16003 * doc/optinfo.texi (Dump types): Convert example of
16004 dump_printf_loc from taking "locus" to taking "insn". Update
16005 description of the "_loc" calls to cover dump_location_t.
16006 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
16007 "selftest.h".
16008 (dump_user_location_t::dump_user_location_t): New constructors,
16009 from gimple *stmt and rtx_insn *.
16010 (dump_user_location_t::from_function_decl): New function.
16011 (dump_loc): Make static.
16012 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
16013 const dump_location_t &.
16014 (dump_generic_expr_loc): Delete.
16015 (dump_printf_loc): Convert param "loc" from location_t to
16016 const dump_location_t &.
16017 (selftest::test_impl_location): New function.
16018 (selftest::dumpfile_c_tests): New function.
16019 * dumpfile.h: Include "profile-count.h".
16020 (class dump_user_location_t): New class.
16021 (struct dump_impl_location_t): New struct.
16022 (class dump_location_t): New class.
16023 (dump_printf_loc): Convert 2nd param from source_location to
16024 const dump_location_t &.
16025 (dump_generic_expr_loc): Delete.
16026 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
16027 const dump_location_t &.
16028 * gimple-fold.c (fold_gimple_assign): Update call to
16029 dump_printf_loc to pass in a dump_location_t rather than a
16030 location_t, via the gimple stmt.
16031 (gimple_fold_call): Likewise.
16032 * gimple-loop-interchange.cc
16033 (loop_cand::analyze_iloop_reduction_var): Update for change to
16034 check_reduction_path.
16035 (tree_loop_interchange::interchange): Update for change to
16036 find_loop_location.
16037 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
16038 change in return-type of find_loop_location.
16039 (graphite_regenerate_ast_isl): Likewise.
16040 * graphite-optimize-isl.c (optimize_isl): Likewise.
16041 * graphite.c (graphite_transform_loops): Likewise.
16042 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
16043 pass in a dump_location_t rather than a location_t, via the
16044 gimple stmt.
16045 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16046 * ipa.c (walk_polymorphic_call_targets): Likewise.
16047 * loop-unroll.c (report_unroll): Convert "locus" param from
16048 location_t to dump_location_t.
16049 (decide_unrolling): Update for change to get_loop_location's
16050 return type.
16051 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
16052 location_t to dump_user_location_t.
16053 (grid_find_single_omp_among_assignments_1): Updates calls to
16054 dump_printf_loc to pass in a dump_location_t rather than a
16055 location_t, via the gimple stmt.
16056 (grid_parallel_clauses_gridifiable): Convert "tloc" from
16057 location_t to dump_location_t. Updates calls to dump_printf_loc
16058 to pass in a dump_location_t rather than a location_t, via the
16059 gimple stmt.
16060 (grid_inner_loop_gridifiable_p): Likewise.
16061 (grid_dist_follows_simple_pattern): Likewise.
16062 (grid_gfor_follows_tiling_pattern): Likewise.
16063 (grid_target_follows_gridifiable_pattern): Likewise.
16064 (grid_attempt_target_gridification): Convert initialization
16065 of local "grid" from memset to zero-initialization; FIXME: does
16066 this require C++11? Update call to dump_printf_loc to pass in a
16067 optinfo_location rather than a location_t, via the gimple stmt.
16068 * profile.c (read_profile_edge_counts): Updates call to
16069 dump_printf_loc to pass in a dump_location_t rather than a
16070 location_t
16071 (compute_branch_probabilities): Likewise.
16072 * selftest-run-tests.c (selftest::run_tests): Call
16073 dumpfile_c_tests.
16074 * selftest.h (dumpfile_c_tests): New decl.
16075 * tree-loop-distribution.c (pass_loop_distribution::execute):
16076 Update for change in return type of find_loop_location.
16077 * tree-parloops.c (parallelize_loops): Likewise.
16078 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
16079 "locus" from location_t to dump_user_location_t.
16080 (canonicalize_loop_induction_variables): Likewise.
16081 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
16082 for change in return type of find_loop_location.
16083 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
16084 to dump_printf_loc to pass in a dump_location_t rather than a
16085 location_t, via the stmt.
16086 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
16087 Likewise.
16088 * tree-vect-loop-manip.c (find_loop_location): Convert return
16089 type from source_location to dump_user_location_t.
16090 (vect_do_peeling): Update for above change.
16091 (vect_loop_versioning): Update for change in type of
16092 vect_location.
16093 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
16094 from location_t to dump_user_location_t.
16095 (vect_estimate_min_profitable_iters): Update for change in type
16096 of vect_location.
16097 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
16098 location_t to dump_location_t.
16099 (vect_slp_bb): Update for change in type of vect_location.
16100 * tree-vectorizer.c (vect_location): Convert from source_location
16101 to dump_user_location_t.
16102 (try_vectorize_loop_1): Update for change in vect_location's type.
16103 (vectorize_loops): Likewise.
16104 (increase_alignment): Likewise.
16105 * tree-vectorizer.h (vect_location): Convert from source_location
16106 to dump_user_location_t.
16107 (find_loop_location): Convert return type from source_location to
16108 dump_user_location_t.
16109 (check_reduction_path): Convert 1st param from location_t to
16110 dump_user_location_t.
16111 * value-prof.c (check_counter): Update call to dump_printf_loc to
16112 pass in a dump_user_location_t rather than a location_t; update
16113 call to error_at for change in type of "locus".
16114 (check_ic_target): Update call to dump_printf_loc to
16115 pass in a dump_user_location_t rather than a location_t, via the
16116 call_stmt.
16117
16118 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
16119
16120 * config/s390/s390.h (enum processor_flags): Do not use
16121 default tune parameter when -march was specified.
16122
16123 2018-06-26 Jakub Jelinek <jakub@redhat.com>
16124
16125 PR target/86314
16126 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
16127 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
16128 operands.
16129
16130 2018-06-26 Richard Biener <rguenther@suse.de>
16131
16132 PR tree-optimization/86287
16133 PR bootstrap/86316
16134 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
16135 (vect_analyze_loop): Initialize n_stmts.
16136
16137 2018-06-26 Richard Biener <rguenther@suse.de>
16138
16139 PR middle-end/86271
16140 * fold-const.c (fold_convertible_p): Pointer extension
16141 isn't valid.
16142
16143 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
16144
16145 PR debug/86064
16146 * dwarf2out.c (loc_list_has_views): Adjust comments.
16147 (dw_loc_list): Split single cross-partition range with
16148 nonzero locview.
16149
16150 2018-06-25 Jeff Law <law@redhat.com>
16151
16152 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
16153 on -mbig-switch by default.
16154
16155 * config/v850/predicates.md (const_float_1_operand): Fix match_code
16156 test.
16157 (const_float_0_operand): Remove unused predicate.
16158 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
16159 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
16160 (recipsf2): New expander. Original pattern now called
16161 (recipsf2_insn).
16162 (recipdf2, recipdf2_insn): Similarly.
16163 (rsqrtsf2, rsqrtsf2_insn): Similarly
16164 (rsqrtdf2, rsqrtdf2_insn): Similarly
16165
16166 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
16167
16168 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
16169 Simplify logic for FreeBSD (twice).
16170
16171 2018-06-25 Martin Sebor <msebor@redhat.com>
16172
16173 PR tree-optimization/86204
16174 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
16175 a strnlen result if it's less than the length of the string.
16176
16177 2018-06-25 Martin Sebor <msebor@redhat.com>
16178
16179 PR tree-optimization/85700
16180 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
16181 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
16182 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
16183
16184 2018-06-25 Martin Sebor <msebor@redhat.com>
16185
16186 * doc/extend.texi (Zero-length arrays): Update and clarify.
16187
16188 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
16189
16190 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
16191 added IEEE/IBM long double multilib support on PowerPC little
16192 endian Linux systems.
16193 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
16194 (MULTILIB_DEFAULTS): Likewise.
16195 * config/rs6000/rs6000.c (rs6000_option_override_internal):
16196 Likewise.
16197 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
16198 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
16199 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
16200
16201 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
16202
16203 PR middle-end/86311
16204 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
16205 (REORDER_45): Likewise.
16206
16207 2018-06-25 Jeff Law <law@redhat.com>
16208
16209 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
16210 dividend to 32 bits. Adjust length.
16211 (udivmodhi4): Cleanup output template. Fix length.
16212
16213 2018-06-25 Carl Love <cel@us.ibm.com>
16214
16215 * config/rs6000/vsx.md: Change word selector to prefered location.
16216
16217 2018-06-25 Richard Biener <rguenther@suse.de>
16218
16219 PR tree-optimization/86304
16220 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
16221 epilogue-if-converted loops as well.
16222
16223 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
16224
16225 * lto-section-out.c (lto_begin_section): Do not print section
16226 name for noaddr and unnumbered dumps.
16227
16228 2018-06-25 Richard Biener <rguenther@suse.de>
16229
16230 * tree-vectorizer.h (struct vec_info_shared): New structure
16231 with parts split out from struct vec_info and loop_nest from
16232 struct _loop_vec_info.
16233 (struct vec_info): Adjust accordingly.
16234 (struct _loop_vec_info): Likewise.
16235 (LOOP_VINFO_LOOP_NEST): Adjust.
16236 (LOOP_VINFO_DATAREFS): Likewise.
16237 (LOOP_VINFO_DDRS): Likewise.
16238 (struct _bb_vec_info): Likewise.
16239 (BB_VINFO_DATAREFS): Likewise.
16240 (BB_VINFO_DDRS): Likewise.
16241 (struct _stmt_vec_info): Add dr_aux member.
16242 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
16243 (DR_MISALIGNMENT_UNINITIALIZED): New.
16244 (set_dr_misalignment): Adjust.
16245 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
16246 (vect_analyze_loop): Adjust prototype.
16247 (vect_analyze_loop_form): Likewise.
16248 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
16249 Compute dependences lazily.
16250 (vect_record_base_alignments): Use shared datarefs/ddrs.
16251 (vect_verify_datarefs_alignment): Likewise.
16252 (vect_analyze_data_refs_alignment): Likewise.
16253 (vect_analyze_data_ref_accesses): Likewise.
16254 (vect_analyze_data_refs): Likewise.
16255 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
16256 constructor parameter for shared part.
16257 (vect_analyze_loop_form): Pass in shared part and adjust.
16258 (vect_analyze_loop_2): Pass in storage for the number of
16259 stmts. Move loop nest finding to the caller. Compute
16260 datarefs lazily.
16261 (vect_analyze_loop): Pass in shared part.
16262 (vect_transform_loop): Verify shared datarefs are unchanged.
16263 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
16264 constructor parameter for shared part.
16265 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
16266 (vect_slp_bb): Verify shared datarefs are unchanged before
16267 transform.
16268 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
16269 change.
16270 (new_stmt_vec_info): Initialize DR_AUX misalignment to
16271 DR_MISALIGNMENT_UNINITIALIZED.
16272 * tree-vectorizer.c (vec_info::vec_info): Add constructor
16273 parameter for shared part.
16274 (vec_info::~vec_info): Adjust.
16275 (vec_info_shared::vec_info_shared): New.
16276 (vec_info_shared::~vec_info_shared): Likewise.
16277 (vec_info_shared::save_datarefs): Likewise.
16278 (vec_info_shared::check_datarefs): Likewise.
16279 (try_vectorize_loop_1): Construct shared part live for analyses
16280 of a single loop for multiple vector sizes.
16281 * tree-parloops.c (gather_scalar_reductions): Adjust.
16282
16283 2018-06-25 Richard Biener <rguenther@suse.de>
16284
16285 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
16286 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
16287 (vect_analyze_data_refs): Remove similar code from here and
16288 simplify accordingly.
16289
16290 2018-06-25 Richard Biener <rguenther@suse.de>
16291
16292 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
16293 for reverse storage order accesses rather than asserting
16294 they cannot happen here.
16295
16296 2018-06-25 Tom de Vries <tdevries@suse.de>
16297
16298 PR debug/86257
16299 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
16300 Use data16 instead of .byte for insn prefix.
16301
16302 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
16303
16304 PR C++/86082
16305 * parser.c (make_char_string_pack): Pass this literal chars
16306 through cpp_interpret_string.
16307 (cp_parser_userdef_numeric_literal): Check the result of
16308 make_char_string_pack.
16309
16310 2018-06-24 Maya Rashish <coypu@sdf.org>
16311
16312 * ginclude/stddef.h: Simplify conditions around avoiding
16313 re-definition of __size_t.
16314
16315 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
16316
16317 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
16318 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
16319
16320 2018-06-22 Maya Rashish <coypu@sdf.org>
16321
16322 * doc/invoke.texi (mno-fancy-math-387): Update for changes
16323 made to OpenBSD and NetBSD through the years.
16324
16325 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16326
16327 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
16328 behavior of vec_pack (vector double, vector double) to match
16329 behavior of vec_float2 (vector double, vector double).
16330
16331 2018-06-22 Olivier Hainque <hainque@adacore.com>
16332
16333 * gimplify.c (gimplify_function_tree): Prevent creation
16334 of a trampoline for the address of the current function
16335 passed to entry/exit instrumentation hooks.
16336
16337 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
16338
16339 PR target/86222
16340 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
16341 correctly.
16342
16343 2018-06-22 Martin Liska <mliska@suse.cz>
16344
16345 PR tree-optimization/86263
16346 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16347 Bail out if is_enabled is false.
16348 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
16349 New declaration.
16350 (jump_table_cluster::is_enabled): New function.
16351
16352 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
16353
16354 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
16355 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
16356 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
16357 (lto_input_ts_binfo_tree_pointers): Likewise.
16358 * tree-streamer-out.c (streamer_write_tree_bitfields,
16359 write_ts_binfo_tree_pointers): Likewise.
16360 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
16361
16362 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
16363
16364 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
16365
16366 2018-06-22 Martin Liska <mliska@suse.cz>
16367
16368 * symbol-summary.h (get): Make it pure and inline move
16369 functionality from ::get function.
16370 (get): Remove and inline into ::get and ::get_create.
16371 (get_create): Move code from ::get function.
16372
16373 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16374
16375 PR target/85994
16376 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
16377 -x assembler-with-cpp.
16378
16379 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16380
16381 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
16382 _FILE_OFFSET_BITS=64 for C++.
16383
16384 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
16385
16386 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
16387 conversion insn that shows up when pr85657-3.c is compiled using
16388 IEEE 128-bit long double.
16389 (neg<mode>2_internal): Use the correct mode to check whether the
16390 mode is IBM extended.
16391 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
16392 multiply and divide external functions from being created more
16393 than once.
16394
16395 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
16396
16397 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
16398 functions.
16399 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
16400 the edge can be forwarded.
16401 (cfg_layout_merge_blocks): Likewise.
16402
16403 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
16404
16405 * except.c (finish_eh_generation): Commit edge insertions only after
16406 the EH edges have been redirected from post-landing to landing pads.
16407
16408 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
16409
16410 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
16411 create_tmp_var_for to create the FRAME decl.
16412 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
16413
16414 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
16415
16416 * tree-inline.c (copy_edges_for_bb): Minor tweak.
16417 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
16418 debug statement when resetting its value.
16419 (expand_call_inline): Copy the locus of the call onto the assignment
16420 of the return value, if any. Use local variable in more cases.
16421
16422 2018-06-21 Martin Liska <mliska@suse.cz>
16423
16424 * ipa-pure-const.c (propagate_nothrow): Use
16425 funct_state_summaries->get.
16426 (dump_malloc_lattice): Likewise.
16427 (propagate_malloc): Likewise.
16428
16429 2018-06-21 Richard Biener <rguenther@suse.de>
16430
16431 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
16432 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
16433 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
16434 comment.
16435 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
16436 BLOCK_ABSTRACT_ORIGIN unconditionally.
16437
16438 2018-06-21 David Malcolm <dmalcolm@redhat.com>
16439
16440 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
16441 deleting it.
16442 * ipa-reference.c (ipa_reference_c_finalize): Delete
16443 ipa_ref_opt_sum_summaries and set it to NULL.
16444
16445 2018-06-21 Tom de Vries <tdevries@suse.de>
16446
16447 PR tree-optimization/85859
16448 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
16449 test with comment from bb_no_side_effects_p.
16450
16451 2018-06-21 Richard Biener <rguenther@suse.de>
16452
16453 PR tree-optimization/86232
16454 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
16455 max for constant niter.
16456
16457 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
16458
16459 * config/aarch64/aarch64-simd.md
16460 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
16461
16462 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
16463
16464 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
16465 Make opernads of the unspec commutative.
16466
16467 2018-06-21 Richard Biener <rguenther@suse.de>
16468
16469 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
16470 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
16471 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
16472 (vect_analyze_data_ref_dependence): Re-order checks to deal with
16473 NULL DR_STEP.
16474 (vect_record_base_alignments): Do not record base alignment
16475 for gathers or scatters.
16476 (vect_compute_data_ref_alignment): Drop return value that is always
16477 true. Bail out early for gathers or scatters.
16478 (vect_enhance_data_refs_alignment): Bail out early for gathers
16479 or scatters.
16480 (vect_find_same_alignment_drs): Likewise.
16481 (vect_analyze_data_refs_alignment): Remove dead code.
16482 (vect_slp_analyze_and_verify_node_alignment): Likewise.
16483 (vect_analyze_data_refs): For possible gathers or scatters do
16484 not create an alternate DR, just check their possible validity
16485 and mark them. Adjust DECL_NONALIASED handling to not rely
16486 on DR_BASE_ADDRESS.
16487 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
16488 update inits of gathers or scatters.
16489 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
16490 Also copy gather/scatter flag to pattern vinfo.
16491
16492 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
16493
16494 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
16495 behavior of vec_packsu (vector unsigned long long, vector unsigned
16496 long long) to match behavior of vec_packs with same signature.
16497
16498 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
16499 Thomas Schwinge <thomas@codesourcery.com>
16500 Cesar Philippidis <cesar@codesourcery.com>
16501
16502 * gimplify.c (gimplify_scan_omp_clauses): Add support for
16503 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
16504 (gimplify_adjust_omp_clauses): Likewise.
16505 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
16506 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
16507 (gimplify_omp_target_update): Update handling of acc update and
16508 enter/exit data.
16509 * omp-low.c (install_var_field): Remove unused parameter
16510 base_pointers_restrict.
16511 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
16512 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
16513 FINALIZE}
16514 (omp_target_base_pointers_restrict_p): Delete.
16515 (scan_omp_target): Update call to scan_sharing_clauses.
16516 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
16517 FINALIZE}.
16518 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
16519 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
16520 (convert_local_omp_clauses): Likewise.
16521 * tree-pretty-print.c (dump_omp_clause): Likewise.
16522 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
16523 FINALIZE}.
16524 (omp_clause_code_name): Likewise.
16525
16526 2018-06-20 Jakub Jelinek <jakub@redhat.com>
16527
16528 PR debug/86194
16529 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
16530 be narrowed.
16531
16532 PR tree-optimization/86231
16533 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
16534 anti-range don't overwrite *vr0min before using it to compute *vr0max.
16535
16536 2018-06-20 Tom de Vries <tdevries@suse.de>
16537
16538 PR tree-optimization/86097
16539 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
16540 iv type if signedness of iv type is not the same as that of *nit.
16541
16542 2018-06-20 Jakub Jelinek <jakub@redhat.com>
16543
16544 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
16545 EDGE_EH edges, verify they are all EDGE_EH.
16546
16547 2018-06-20 Maya Rashish <coypu@sdf.org>
16548
16549 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
16550
16551 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16552
16553 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
16554 * config/aarch64/aarch64.c (xgene1_tunings): Add
16555 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
16556 (aarch64_mode_valid_for_sched_fusion_p):
16557 Allow 16-byte modes.
16558 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
16559 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
16560 128-bit modes.
16561 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
16562 New pattern.
16563 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
16564 * config/aarch64/iterators.md (VQ2): New mode iterator.
16565
16566 2018-06-20 Martin Liska <mliska@suse.cz>
16567
16568 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
16569 Change default ratio from 10 to 8.
16570
16571 2018-06-20 Martin Liska <mliska@suse.cz>
16572
16573 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16574 New.
16575 (bit_test_cluster::find_bit_tests): Likewise.
16576 (switch_decision_tree::analyze_switch_statement): Find clusters.
16577 * tree-switch-conversion.h (struct jump_table_cluster): Document
16578 hierarchy.
16579
16580 2018-06-20 Martin Liska <mliska@suse.cz>
16581
16582 * tree-switch-conversion.c (switch_conversion::collect):
16583 Record m_uniq property.
16584 (switch_conversion::expand): Bail out for special conditions.
16585 (group_cluster::~group_cluster): New.
16586 (group_cluster::group_cluster): Likewise.
16587 (group_cluster::dump): Likewise.
16588 (jump_table_cluster::emit): New.
16589 (switch_decision_tree::fix_phi_operands_for_edges): New.
16590 (struct case_node): Remove struct.
16591 (jump_table_cluster::can_be_handled): New.
16592 (case_values_threshold): Moved to header.
16593 (reset_out_edges_aux): Likewise.
16594 (jump_table_cluster::is_beneficial): New.
16595 (bit_test_cluster::can_be_handled): Likewise.
16596 (add_case_node): Remove.
16597 (bit_test_cluster::is_beneficial): New.
16598 (case_bit_test::cmp): New.
16599 (bit_test_cluster::emit): New.
16600 (expand_switch_as_decision_tree_p): Remove.
16601 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
16602 (fix_phi_operands_for_edge): Likewise.
16603 (switch_decision_tree::analyze_switch_statement): New.
16604 (compute_cases_per_edge): Move ...
16605 (switch_decision_tree::compute_cases_per_edge): ... here.
16606 (try_switch_expansion): Likewise.
16607 (switch_decision_tree::try_switch_expansion): Likewise.
16608 (record_phi_operand_mapping): Likewise.
16609 (switch_decision_tree::record_phi_operand_mapping): Likewise.
16610 (emit_case_decision_tree): Likewise.
16611 (switch_decision_tree::emit): Likewise.
16612 (balance_case_nodes): Likewise.
16613 (switch_decision_tree::balance_case_nodes): Likewise.
16614 (dump_case_nodes): Likewise.
16615 (switch_decision_tree::dump_case_nodes): Likewise.
16616 (emit_jump): Likewise.
16617 (switch_decision_tree::emit_jump): Likewise.
16618 (emit_cmp_and_jump_insns): Likewise.
16619 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
16620 (emit_case_nodes): Likewise.
16621 (switch_decision_tree::emit_case_nodes): Likewise.
16622 (conditional_probability): Remove.
16623 * tree-switch-conversion.h (enum cluster_type): New.
16624 (PRINT_CASE): New.
16625 (struct cluster): Likewise.
16626 (cluster::cluster): Likewise.
16627 (struct simple_cluster): Likewise.
16628 (simple_cluster::simple_cluster): Likewise.
16629 (struct group_cluster): Likewise.
16630 (struct jump_table_cluster): Likewise.
16631 (struct bit_test_cluster): Likewise.
16632 (struct min_cluster_item): Likewise.
16633 (struct case_tree_node): Likewise.
16634 (case_tree_node::case_tree_node): Likewise.
16635 (jump_table_cluster::case_values_threshold): Likewise.
16636 (struct case_bit_test): Likewise.
16637 (struct switch_decision_tree): Likewise.
16638 (struct switch_conversion): Likewise.
16639 (switch_decision_tree::reset_out_edges_aux): Likewise.
16640
16641 2018-06-20 Martin Liska <mliska@suse.cz>
16642
16643 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
16644 (hoist_edge_and_branch_if_true): Likewise.
16645 (expand_switch_using_bit_tests_p): Likewise.
16646 (struct case_bit_test): Likewise.
16647 (case_bit_test_cmp): Likewise.
16648 (emit_case_bit_tests): Likewise.
16649 (switch_conversion::switch_conversion): New class.
16650 (struct switch_conv_info): Remove old struct.
16651 (collect_switch_conv_info): More to ...
16652 (switch_conversion::collect): ... this.
16653 (check_range): Likewise.
16654 (switch_conversion::check_range): Likewise.
16655 (check_all_empty_except_final): Likewise.
16656 (switch_conversion::check_all_empty_except_final): Likewise.
16657 (check_final_bb): Likewise.
16658 (switch_conversion::check_final_bb): Likewise.
16659 (create_temp_arrays): Likewise.
16660 (switch_conversion::create_temp_arrays): Likewise.
16661 (free_temp_arrays): Likewise.
16662 (gather_default_values): Likewise.
16663 (switch_conversion::gather_default_values): Likewise.
16664 (build_constructors): Likewise.
16665 (switch_conversion::build_constructors): Likewise.
16666 (constructor_contains_same_values_p): Likewise.
16667 (switch_conversion::contains_same_values_p): Likewise.
16668 (array_value_type): Likewise.
16669 (switch_conversion::array_value_type): Likewise.
16670 (build_one_array): Likewise.
16671 (switch_conversion::build_one_array): Likewise.
16672 (build_arrays): Likewise.
16673 (switch_conversion::build_arrays): Likewise.
16674 (gen_def_assigns): Likewise.
16675 (switch_conversion::gen_def_assigns): Likewise.
16676 (prune_bbs): Likewise.
16677 (switch_conversion::prune_bbs): Likewise.
16678 (fix_phi_nodes): Likewise.
16679 (switch_conversion::fix_phi_nodes): Likewise.
16680 (gen_inbound_check): Likewise.
16681 (switch_conversion::gen_inbound_check): Likewise.
16682 (process_switch): Use the newly created class.
16683 (switch_conversion::expand): New.
16684 (switch_conversion::~switch_conversion): New.
16685 * tree-switch-conversion.h: New file.
16686
16687 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16688
16689 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
16690 tree-vect-patterns.c.
16691 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
16692 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
16693 (vect_recog_sad_pattern): Likewise.
16694 (vect_recog_widen_sum_pattern): Likewise.
16695 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
16696 (vect_recog_widen_shift_pattern): Remove the type_in argument.
16697 (vect_recog_rotate_pattern): Likewise.
16698 (vect_recog_mult_pattern): Likewise.
16699 (vect_recog_vector_vector_shift_pattern): Likewise.
16700 (vect_recog_divmod_pattern): Likewise.
16701 (vect_recog_mixed_size_cond_pattern): Likewise.
16702 (vect_recog_bool_pattern): Likewise.
16703 (vect_recog_mask_conversion_pattern): Likewise.
16704 (vect_try_gather_scatter_pattern): Likewise.
16705 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
16706 (vect_recog_over_widening_pattern): Likewise.
16707 (vect_recog_gather_scatter_pattern): Likewise.
16708 (vect_recog_func_ptr): Move from tree-vectorizer.h
16709 (vect_vect_recog_func_ptrs): Move further down the file.
16710 (vect_recog_func): Likewise. Remove the third argument.
16711 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
16712 (vect_pattern_recog_1): Expect the pattern function to do any
16713 necessary target tests. Also expect it to provide a vector type.
16714 Remove the type_in handling.
16715
16716 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16717
16718 * tree-vect-patterns.c (vect_pattern_detected): New function.
16719 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
16720 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
16721 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
16722 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
16723 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
16724 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
16725 (vect_recog_mask_conversion_pattern)
16726 (vect_try_gather_scatter_pattern): Likewise.
16727
16728 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16729
16730 * tree-vect-patterns.c (vect_get_internal_def): New function.
16731 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16732 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
16733 (search_type_for_mask_1): Use it.
16734
16735 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16736
16737 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
16738 redundant WIDEN_SUM_EXPR handling.
16739 (vect_recog_sad_pattern): Likewise.
16740
16741 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16742
16743 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
16744 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
16745 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
16746 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
16747 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
16748
16749 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16750
16751 * tree-vect-stmts.c (vectorizable_call): Make sure that we
16752 use the stmt_vec_info of the original bb statement for the
16753 new zero assignment, even if the call is part of a pattern.
16754
16755 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16756
16757 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
16758 that the sequence is attached to the original statement rather
16759 than the pattern statement.
16760 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
16761 PATTERN_DEF_SEQ from the original statement rather than
16762 the main pattern statement.
16763 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
16764 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
16765 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
16766
16767 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16768
16769 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
16770 definition statements before the early exit for statements that aren't
16771 live or relevant.
16772 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
16773 split out from...
16774 (vect_transform_loop): ...here. Process pattern definition
16775 statements without first checking whether the main pattern
16776 statement is live or relevant.
16777
16778 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
16779
16780 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
16781 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
16782
16783 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
16784
16785 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
16786 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
16787 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
16788 (expand_block_compare): Change select_block_compare_mode call.
16789 (expand_strncmp_align_check): Use new functions, fix comment.
16790 (emit_final_str_compare_gpr): New function.
16791 (expand_strn_compare): Refactor and clean up code.
16792 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
16793
16794 2018-06-19 Tony Reix <tony.reix@atos.com>
16795 Damien Bergamini <damien.bergamini@atos.com>
16796 David Edelsohn <dje.gcc@gmail.com>
16797
16798 * collect2.c (static_obj): New variable.
16799 (static_libs): New variable.
16800 (is_in_list): Uncomment declaration.
16801 (main): Track AIX libraries linked statically.
16802 (is_in_list): Uncomment definition.
16803 (scan_prog_file): Don't add AIX shared libraries initializer
16804 to constructor list if linking statically.
16805
16806 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
16807
16808 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
16809 constant.
16810 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
16811
16812 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
16813
16814 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
16815 blocks.
16816
16817 2018-06-19 Martin Liska <mliska@suse.cz>
16818
16819 * config/i386/i386.c (ix86_can_inline_p): Do not use
16820 ipa_fn_summaries::get_create.
16821 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
16822 get.
16823 (devirtualization_time_bonus): Likewise.
16824 (ipcp_propagate_stage): Likewise.
16825 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16826 (edge_set_predicate): Likewise.
16827 (evaluate_conditions_for_known_args): Likewise.
16828 (evaluate_properties_for_edge): Likewise.
16829 (ipa_call_summary::reset): Tranform to ...
16830 (ipa_call_summary::~ipa_call_summary): ... this.
16831 (ipa_fn_summary::reset): Transform to ...
16832 (ipa_fn_summary::~ipa_fn_summary): ... this.
16833 (ipa_fn_summary_t::remove): Rename to ...
16834 (ipa_fn_summary_t::remove_callees): ... this.
16835 (ipa_fn_summary_t::duplicate): Use placement new
16836 instead of memory copy.
16837 (ipa_call_summary_t::duplicate): Likewise.
16838 (ipa_call_summary_t::remove): Remove.
16839 (dump_ipa_call_summary): Change get_create to get.
16840 (ipa_dump_fn_summary): Dump only when summary exists.
16841 (analyze_function_body): Use symbol_summary::get instead
16842 of get_create.
16843 (compute_fn_summary): Likewise.
16844 (estimate_edge_devirt_benefit): Likewise.
16845 (estimate_edge_size_and_time): Likewise.
16846 (inline_update_callee_summaries): Likewise.
16847 (remap_edge_change_prob): Likewise.
16848 (remap_edge_summaries): Likewise.
16849 (ipa_merge_fn_summary_after_inlining): Likewise.
16850 (write_ipa_call_summary): Likewise.
16851 (ipa_fn_summary_write): Likewise.
16852 (ipa_free_fn_summary): Likewise.
16853 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
16854 (struct ipa_call_summary): Likewise.
16855 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
16856 of get_create.
16857 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
16858 (estimate_size_after_inlining): Likewise.
16859 (estimate_growth): Likewise.
16860 (growth_likely_positive): Likewise.
16861 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16862 (inline_call): Likewise.
16863 * ipa-inline.c (caller_growth_limits): Likewise.
16864 (can_inline_edge_p): Likewise.
16865 (can_inline_edge_by_limits_p): Likewise.
16866 (compute_uninlined_call_time): Likewise.
16867 (compute_inlined_call_time): Likewise.
16868 (want_inline_small_function_p): Likewise.
16869 (edge_badness): Likewise.
16870 (update_caller_keys): Likewise.
16871 (update_callee_keys): Likewise.
16872 (inline_small_functions): Likewise.
16873 (inline_to_all_callers_1): Likewise.
16874 (dump_overall_stats): Likewise.
16875 (early_inline_small_functions): Likewise.
16876 (early_inliner): Likewise.
16877 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16878 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16879 * ipa-pure-const.c (malloc_candidate_p): Likewise.
16880 * ipa-split.c (execute_split_functions): Likewise.
16881 * symbol-summary.h: Likewise.
16882 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16883
16884 2018-06-19 Richard Biener <rguenther@suse.de>
16885
16886 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
16887 (vectorize_loops): ... here. Fix dbgcnt handling.
16888 (try_vectorize_loop): Wrap try_vectorize_loop_1.
16889
16890 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
16891
16892 PR target/86197
16893 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
16894 ieee128 argument takes up only one (vector) register, not two (floating
16895 point) registers.
16896
16897 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
16898
16899 * gimplify.c (gimplify_init_constructor): Really never clear for an
16900 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
16901
16902 2018-06-19 Richard Biener <rguenther@suse.de>
16903
16904 PR tree-optimization/86179
16905 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
16906 after failed recognition.
16907
16908 2018-06-18 Martin Sebor <msebor@redhat.com>
16909
16910 PR middle-end/85602
16911 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
16912 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
16913 Handle integer subtraction.
16914 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
16915 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
16916
16917 2018-06-18 David Malcolm <dmalcolm@redhat.com>
16918
16919 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
16920 param from rtx to rtx_insn *.
16921 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
16922 param.
16923 (frv_ifcvt_modify_insn): Likwise.
16924 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
16925 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
16926 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
16927 as_a <rtx_insn *> cast to local "unprotected_region" once
16928 it's been established that it's not NULL or pc_rtx.
16929 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
16930 param "sethi" from rtx to rtx_insn *.
16931 (nds32_group_float_insns): Likewise for param "insn".
16932 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
16933 param.
16934 (vax_output_int_subtract): Likewise.
16935 * config/vax/vax.c (vax_output_int_add): Likewise for param
16936 "insn".
16937 (vax_output_int_subtract): Likewise.
16938 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
16939 (emit_pattern_after): Likewise for param "after".
16940 (emit_insn_after): Likewise.
16941 (emit_jump_insn_after): Likewise.
16942 (emit_call_insn_after): Likewise.
16943 (emit_debug_insn_after): Likewise.
16944 (emit_pattern_before): Likewise for param "before".
16945 (emit_insn_before): Likewise.
16946 (emit_jump_insn_before): Likewise.
16947 * final.c (get_insn_template): Likewise for param "insn", removing
16948 a cast.
16949 * output.h (get_insn_template): Likewise for 2nd param.
16950 * rtl.h (emit_insn_before): Likewise.
16951 (emit_jump_insn_before): Likewise.
16952 (emit_debug_insn_before_noloc): Likewise.
16953 (emit_insn_after): Likewise.
16954 (emit_jump_insn_after): Likewise.
16955 (emit_call_insn_after): Likewise.
16956 (emit_debug_insn_after): Likewise.
16957 (set_insn_deleted): Likewise for param.
16958
16959 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
16960
16961 PR target/85358
16962 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
16963 floating point modes, so that IFmode is numerically greater than
16964 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
16965 to declare the ordering. This prevents IFmode from being
16966 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
16967 machine. Include rs6000-modes.h to share the fractional values
16968 between genmodes* and the rest of the compiler.
16969 (IFmode): Likewise.
16970 (KFmode): Likewise.
16971 (TFmode): Likewise.
16972 * config/rs6000/rs6000-modes.h: New file.
16973 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
16974 meaning of rs6000_long_double_size so that 126..128 selects an
16975 appropriate 128-bit floating point type.
16976 (rs6000_option_override_internal): Likewise.
16977 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
16978 (TARGET_LONG_DOUBLE_128): Change the meaning of
16979 rs6000_long_double_size so that 126..128 selects an appropriate
16980 128-bit floating point type.
16981 (LONG_DOUBLE_TYPE_SIZE): Update comment.
16982 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
16983 source and destination to match the standard usage.
16984 (truncifkf2): Likewise.
16985 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
16986 ISA 2.07 to use an explicit clobber, instead of passing in a
16987 temporary.
16988 (copysign<mode>3_soft): Likewise.
16989
16990 2018-06-18 David Malcolm <dmalcolm@redhat.com>
16991
16992 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
16993 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
16994 (vect_slp_analyze_instance_dependence): Likewise.
16995 (vect_enhance_data_refs_alignment): Likewise.
16996 (vect_analyze_data_refs_alignment): Likewise.
16997 (vect_slp_analyze_and_verify_instance_alignment
16998 (vect_analyze_data_ref_accesses): Likewise.
16999 (vect_prune_runtime_alias_test_list): Likewise.
17000 (vect_analyze_data_refs): Likewise.
17001 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
17002 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17003 (vect_analyze_scalar_cycles_1): Likewise.
17004 (vect_get_loop_niters): Likewise.
17005 (vect_analyze_loop_form_1): Likewise.
17006 (vect_update_vf_for_slp): Likewise.
17007 (vect_analyze_loop_operations): Likewise.
17008 (vect_analyze_loop): Likewise.
17009 (vectorizable_induction): Likewise.
17010 (vect_transform_loop): Likewise.
17011 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
17012 * tree-vect-slp.c (vect_analyze_slp): Likewise.
17013 (vect_make_slp_decision): Likewise.
17014 (vect_detect_hybrid_slp): Likewise.
17015 (vect_slp_analyze_operations): Likewise.
17016 (vect_slp_bb): Likewise.
17017 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
17018 (vectorizable_bswap): Likewise.
17019 (vectorizable_call): Likewise.
17020 (vectorizable_simd_clone_call): Likewise.
17021 (vectorizable_conversion): Likewise.
17022 (vectorizable_assignment): Likewise.
17023 (vectorizable_shift): Likewise.
17024 (vectorizable_operation): Likewise.
17025 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
17026
17027 2018-06-18 Martin Sebor <msebor@redhat.com>
17028
17029 PR tree-optimization/81384
17030 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
17031 * builtins.c (expand_builtin_strnlen): New function.
17032 (expand_builtin): Call it.
17033 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
17034 * builtins.def (BUILT_IN_STRNLEN): New.
17035 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
17036 Warn for bounds in excess of maximum object size.
17037 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
17038 single-value ranges. Handle strnlen.
17039 (handle_builtin_strlen): Handle strnlen.
17040 (strlen_check_and_optimize_stmt): Same.
17041 * doc/extend.texi (Other Builtins): Document strnlen.
17042
17043 2018-06-18 Maya Rashish <coypu@sdf.org>
17044
17045 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
17046 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
17047 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
17048
17049 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
17050 here to ...
17051 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
17052
17053 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17054
17055 * tree.c (escaped_string::escape): Replace cast to char * by
17056 const_cast<char *> (unescaped).
17057
17058 2018-06-18 Nick Clifton <nickc@redhat.com>
17059
17060 PR 84195
17061 * tree.c (escaped_string): New class. Converts an unescaped
17062 string into its escaped equivalent.
17063 (warn_deprecated_use): Use the new class to convert the
17064 deprecation message, if present.
17065 (test_escaped_strings): New self test.
17066 (test_c_tests): Add test_escaped_strings.
17067 * doc/extend.texi (deprecated): Add a note that the
17068 deprecation message is affected by the -fmessage-length
17069 option, and that control characters will be escaped.
17070 (#pragma GCC error): Document this pragma.
17071 (#pragma GCC warning): Likewise.
17072 * doc/invoke.texi (-fmessage-length): Document this option's
17073 effect on the #warning and #error preprocessor directives and
17074 the deprecated attribute.
17075
17076 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
17077
17078 * tree.c (decl_value_expr_lookup): Revert latest change.
17079 (decl_value_expr_insert): Likewise.
17080
17081 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
17082
17083 * gimplify.c (nonlocal_vlas): Delete.
17084 (nonlocal_vla_vars): Likewise.
17085 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
17086 referenced VLAs.
17087 (gimplify_body): Do not create and destroy nonlocal_vlas.
17088 * tree-nested.c: Include diagnostic.h.
17089 (use_pointer_in_frame): Tweak.
17090 (lookup_field_for_decl): Add assertion and declare the transformation.
17091 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
17092 internal error when the reference is in a wrong context. Do not
17093 create a debug decl by default.
17094 (note_nonlocal_block_vlas): Delete.
17095 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
17096 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
17097 create a debug decl by default.
17098 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
17099 call is in a wrong context.
17100 (fixup_vla_decls): New function.
17101 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
17102 debug variables were created.
17103 * tree.c (decl_value_expr_lookup): Add checking assertion.
17104 (decl_value_expr_insert): Likewise.
17105
17106 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
17107
17108 PR middle-end/82479
17109 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
17110 * tree-scalar-evolution.c (interpret_expr): Likewise.
17111 (expression_expensive_p): Likewise.
17112 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
17113 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
17114 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
17115 (ssa_defined_by_minus_one_stmt_p): New.
17116
17117 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
17118
17119 PR middle-end/64946
17120 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
17121 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
17122 * dojump.c (do_jump): Likewise.
17123 * expr.c (expand_expr_real_2): Check operand type's sign.
17124 * fold-const.c (const_unop): Handle ABSU_EXPR.
17125 (fold_abs_const): Likewise.
17126 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
17127 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
17128 (strip_sign_op_1): Likesise.
17129 * match.pd: Add new pattern to generate ABSU_EXPR.
17130 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
17131 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17132 * tree-eh.c (operation_could_trap_helper_p): Likewise.
17133 * tree-inline.c (estimate_operator_cost): Likewise.
17134 * tree-pretty-print.c (dump_generic_node): Likewise.
17135 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
17136 * tree.def (ABSU_EXPR): New.
17137
17138 2018-06-16 Jakub Jelinek <jakub@redhat.com>
17139
17140 PR middle-end/86095
17141 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
17142 documented as preserved for backward compatibility only.
17143 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
17144
17145 PR rtl-optimization/86108
17146 * bb-reorder.c (create_forwarder_block): Renamed to ...
17147 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
17148 jump from new landing pad to the second part.
17149 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
17150 Adjust callers.
17151
17152 2018-06-15 Jakub Jelinek <jakub@redhat.com>
17153
17154 PR middle-end/85878
17155 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
17156 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
17157 Only call store_expr for halves if the mode is the same.
17158
17159 PR middle-end/86123
17160 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
17161 Fix up comment formatting.
17162
17163 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
17164
17165 * typed-splay-tree.h (typed_splay_tree::remove): New function.
17166 (typed_splay_tree::closure,
17167 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
17168 (typed_splay_tree::typed_splay_tree,
17169 typed_splay_tree::operator =): Declared private.
17170 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
17171 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
17172 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
17173 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
17174 typed_splay_tree::splay_tree_splay,
17175 typed_splay_tree::splay_tree_foreach_helper,
17176 typed_splay_tree::splay_tree_insert,
17177 typed_splay_tree::splay_tree_remove,
17178 typed_splay_tree::splay_tree_lookup,
17179 typed_splay_tree::splay_tree_predecessor,
17180 typed_splay_tree::splay_tree_successor,
17181 typed_splay_tree::splay_tree_min,
17182 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
17183 (typed_splay_tree::root, typed_splay_tree::comp,
17184 typed_splay_tree::delete_key,
17185 typed_splay_tree::delete_value): New data members.
17186 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
17187 typed_splay_tree::remove.
17188
17189 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
17190
17191 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
17192 -mginv and -mno-ginv to the assembler.
17193 * config/mips/mips.opt (-mcrc): New option.
17194 (-mginv): Likewise.
17195 * doc/invoke.text (-mcrc): Document.
17196 (-mginv): Likewise.
17197
17198 2018-06-15 Nick Clifton <nickc@redhat.com>
17199
17200 PR 84195
17201 * tree.c (escaped_string): New class. Converts an unescaped
17202 string into its escaped equivalent.
17203 (warn_deprecated_use): Use the new class to convert the
17204 deprecation message, if present.
17205 (test_escaped_strings): New self test.
17206 (test_c_tests): Add test_escaped_strings.
17207 * doc/extend.texi (deprecated): Add a note that the
17208 deprecation message is affected by the -fmessage-length
17209 option, and that control characters will be escaped.
17210 (#pragma GCC error): Document this pragma.
17211 (#pragma GCC warning): Likewise.
17212 * doc/invoke.texi (-fmessage-length): Document this option's
17213 effect on the #warning and #error preprocessor directives and
17214 the deprecated attribute.
17215
17216 2018-06-15 Richard Biener <rguenther@suse.de>
17217
17218 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
17219 here, also noting vector size used.
17220 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
17221 size used in MSG_OPTIMIZED_LOCATIONS dump.
17222 (pass_slp_vectorize::execute): Adjust.
17223
17224 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
17225
17226 PR target/85968
17227 * config/arc/arc.c (arc_return_address_register): Fix
17228 if-condition.
17229
17230 2018-06-15 Richard Biener <rguenther@suse.de>
17231
17232 PR middle-end/86159
17233 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
17234 leave useless conversion stripping to force_gimple_operand_gsi.
17235 (gimplify_build2): Likewise.
17236 (gimplify_build1): Likewise.
17237
17238 2018-06-15 Richard Biener <rguenther@suse.de>
17239
17240 PR middle-end/86076
17241 * tree-cfg.c (move_stmt_op): unshare invariant addresses
17242 before adjusting their block.
17243
17244 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
17245
17246 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
17247 multilibs for *-*-rtems*.
17248 * config/riscv/t-rtems: New file.
17249
17250 2018-06-14 Jakub Jelinek <jakub@redhat.com>
17251
17252 PR middle-end/86122
17253 * match.pd ((A +- CST1) +- CST2): Punt if last resort
17254 unsigned_type_for returns NULL.
17255
17256 PR target/85945
17257 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
17258 subregs of multi-word pseudos unless the float mode has word size.
17259
17260 2018-06-14 Richard Biener <rguenther@suse.de>
17261
17262 PR middle-end/86139
17263 * tree-vect-generic.c (build_word_mode_vector_type): Remove
17264 duplicate and harmful type_hash_canon.
17265 * tree.c (type_hash_canon): Assert we didn't find ourselves.
17266
17267 2018-06-14 Richard Biener <rguenther@suse.de>
17268
17269 PR ipa/86124
17270 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
17271 NULL cgraph_node.
17272
17273 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
17274
17275 * config/rtems.h (STDINT_LONG32): Define.
17276
17277 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
17278 Prachi Godbole <prachi.godbole@imgtec.com>
17279
17280 * config/mips/mips-cpus.def: Define P6600.
17281 * config/mips/mips-tables.opt: Regenerate.
17282 * config/mips/mips.c (mips_ucbranch_type): New enum.
17283 (mips_rtx_cost_data): Add support for P6600.
17284 (mips_issue_rate): Likewise.
17285 (mips_multipass_dfa_lookahead): Likewise.
17286 (mips_avoid_hazard): Likewise.
17287 (mips_reorg_process_insns): Likewise.
17288 (mips_classify_branch_p6600): New function.
17289 * config/mips/mips.h (TUNE_P6600): New define.
17290 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
17291 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
17292 * config/mips/mips.md: Include p6600.md.
17293 (processor): Add p6600.
17294 * config/mips/p6600.md: New file.
17295 * doc/invoke.texi: Add p6600 to supported architectures.
17296
17297 2018-06-13 Martin Sebor <msebor@redhat.com>
17298
17299 PR tree-optimization/86114
17300 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
17301 of integer types.
17302 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
17303
17304 2018-06-13 Richard Biener <rguenther@suse.de>
17305
17306 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
17307 Properly set vector type of the intermediate stmt.
17308 * tree-vect-stmts.c (vectorizable_operation): The destination
17309 var always has vectype_out type.
17310
17311 2018-06-13 Jeff Law <law@redhat.com>
17312
17313 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
17314 integer 0 for argument to print_rtl_with_bb.
17315 (rl78_reorg): Likewise.
17316
17317 2018-06-13 David Malcolm <dmalcolm@redhat.com>
17318
17319 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
17320 from rtx to rtx_insn *.
17321 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
17322 "label".
17323 (add_sched_insns_for_speculation): Likewise for local "target",
17324 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
17325 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
17326 from rtx_insn ** to rtx_code_label **.
17327 (reorg_emit_nops): Likewise.
17328 (c6x_reorg): Likewise for local "call_labels".
17329 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
17330 rtx to rtx_insn *.
17331 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
17332 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
17333 the loops over LABEL_REFS.
17334 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
17335 braf_label.
17336 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
17337 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
17338 (split_branches): Strengthen local "olabel" from rtx to
17339 rtx_insn *, adding a safe_as_a cast.
17340 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
17341 to "rtx_insn *".
17342 (add_insn_after): Likewise for first two params.
17343 (add_insn_before): Likewise.
17344 (remove_insn): Likewise for param.
17345 (emit_pattern_before_noloc): Likewise for second and third params.
17346 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
17347 (emit_call_insn_before_noloc): Likewise.
17348 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
17349 to "rtx_insn *".
17350 (emit_barrier_before): Likewise.
17351 (emit_label_before): Strengthen "label" param from "rtx" to
17352 "rtx_code_label *". Strengthen "before" param from "rtx" to
17353 "rtx_insn *".
17354 (emit_insn_after_1): Strengthen "after" param from "rtx" to
17355 "rtx_insn *".
17356 (emit_pattern_after_noloc): Likewise.
17357 (emit_insn_after_noloc): Likewise.
17358 (emit_jump_insn_after_noloc): Likewise.
17359 (emit_call_insn_after_noloc): Likewise.
17360 (emit_debug_insn_after_noloc): Likewise.
17361 (emit_barrier_after): Likewise.
17362 (emit_label_after): Likewise for both params.
17363 (emit_pattern_after_setloc): Likewise for "after" param. Convert
17364 "loc" param from "int" to "location_t".
17365 (emit_insn_after_setloc): Likewise.
17366 (emit_jump_insn_after_setloc): Likewise.
17367 (emit_call_insn_after_setloc): Likewise.
17368 (emit_debug_insn_after_setloc): Likewise.
17369 (emit_pattern_before_setloc): Likewise for "before" param. Convert
17370 "loc" param from "int" to "location_t".
17371 (emit_pattern_before): Convert NULL_RTX to NULL.
17372 (emit_insn_before_setloc): Convert "loc" param from "int" to
17373 "location_t".
17374 (emit_jump_insn_before_setloc): Likewise.
17375 (emit_call_insn_before_setloc): Likewise.
17376 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
17377 rtx_insn *. Convert "loc" param from "int" to "location_t".
17378 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
17379 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
17380 Convert 3rd param from "int" to "location_t".
17381 (emit_barrier_before, emit_barrier_after, next_real_insn):
17382 Strengthen param from rtx to rtx_insn *.
17383 (emit_label_before): Strengthen 1st param from "rtx" to
17384 "rtx_code_label *". Strengthen 2nd param from "rtx" to
17385 "rtx_insn *".
17386 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
17387 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
17388 Strengthen 2nd param from "rtx" to "rtx_insn *".
17389 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
17390 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
17391 Likewise. Convert 3rd param from "int" to "location_t".
17392 (emit_label_after): Strengthen 1st param from "rtx" to
17393 "rtx_code_label *".
17394 (next_real_insn, remove_insn): Strengthen param from "rtx" to
17395 "rtx_insn *".
17396 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
17397 from "rtx" to "rtx_insn *".
17398
17399 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
17400
17401 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
17402 bodies streamed in with -Q.
17403 * dumpfile.c (dump_files): Add lto-stream-out dump file.
17404 * dumpfile.h (tree_dump_index): Add lto_stream_out.
17405 * gimple-streamer-out.c: Include gimple-pretty-print.h
17406 (output_bb): Dump stmts streamed.
17407 * lto-section-out.c: Include print-tree.h
17408 (lto_begin_section): Dump sections created.
17409 (lto_output_decl_index): Dump decl encoded.
17410 * lto-streamer-out.c: Include print-tree.h
17411 (create_output_block): Dump output block created.
17412 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
17413 (output_function): Dump function output.
17414 (output_constructor): Dump constructor streamed.
17415 (write_global_stream): Output indexes encoded.
17416 (produce_asm_for_decls): Dump streams encoded.
17417 * lto-streamer.c (streamer_dump_file): New global var.
17418 * lto-streamer.h (streamer_dump_file): Declare.
17419 * passes.c (ipa_write_summaries): Initialize streamer dump.
17420 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
17421 in.
17422
17423 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
17424
17425 PR target/86048
17426 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
17427 offsets for register save directives. Emit a second batch of save
17428 directives, if need be, when the function accesses prior frames.
17429
17430 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17431
17432 * config/arc/fpu.md (fmasf4): Force operand to register.
17433 (fnmasf4): Likewise.
17434
17435 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17436
17437 * config/arc/arc-protos.h (arc_pad_return): Remove.
17438 * config/arc/arc.c (machine_function): Remove force_short_suffix
17439 and size_reason.
17440 (arc_print_operand): Adjust printing of '&'.
17441 (arc_verify_short): Remove conditional printing of short suffix.
17442 (arc_final_prescan_insn): Remove reference to size_reason.
17443 (pad_return): New function.
17444 (arc_reorg): Call pad_return.
17445 (arc_pad_return): Remove.
17446 (arc_init_machine_status): Remove reference to force_short_suffix.
17447 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
17448 (attr length): When attribute iscompact is true force to 2
17449 regardless; in the case of maybe check if we want to force the
17450 instruction to have 4 bytes length.
17451 (nopv): Change it to generate 4 byte long nop as well.
17452 (blockage): New pattern.
17453 (simple_return): Remove call to arc_pad_return.
17454 (p_return_i): Likewise.
17455
17456 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17457
17458 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
17459
17460 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17461
17462 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
17463 ARC cores.
17464
17465 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17466
17467 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
17468 for ARC700 and ARCv2.
17469
17470 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
17471
17472 PR target/86076
17473 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
17474 operands[2] instead of operands[1].
17475
17476
17477 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
17478
17479 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
17480 case, check whether the outer register overlaps an unallocatable
17481 register, not just whether it fits the required class.
17482
17483 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
17484
17485 * poly-int.h (can_div_trunc_p): Add new overload in which all values
17486 are poly_ints.
17487 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
17488 (memrefs_conflict_p): Likewise.
17489 (init_alias_analysis): Likewise.
17490 * cfgexpand.c (expand_debug_expr): Likewise.
17491 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
17492 * cse.c (fold_rtx): Likewise.
17493 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
17494 * expr.c (emit_block_move_hints): Likewise.
17495 (clear_storage_hints, push_block, emit_push_insn): Likewise.
17496 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
17497 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
17498 (emit_group_store): Likewise.
17499 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
17500 to read the PRE/POST_MODIFY increment.
17501 * calls.c (store_one_arg): Use strip_offset.
17502 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
17503 poly_int_rtx_p.
17504 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
17505 by a VEC_SELECT.
17506 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
17507 (simplify_binary_operation_1): Extend CONST_INT handling to
17508 poly_int_rtx_p.
17509 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
17510 than a HOST_WIDE_INT.
17511 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
17512 poly_int64.
17513 (adjust_mems, add_stores): Update accodingly.
17514 (vt_canonicalize_addr): Track polynomial offsets.
17515 (emit_note_insn_var_location): Likewise.
17516 (vt_add_function_parameter): Likewise.
17517 (vt_initialize): Likewise.
17518
17519 2018-06-12 Jeff Law <law@redhat.com>
17520
17521 * config.gcc (alpha*-*-freebsd*): Remove.
17522 * config/alpha/freebsd.h: Remove.
17523
17524 2018-06-12 David Malcolm <dmalcolm@redhat.com>
17525
17526 PR other/69968
17527 * spellcheck-tree.c (levenshtein_distance): Rename to...
17528 (get_edit_distance): ...this, and update for underlying renaming.
17529 * spellcheck-tree.h (levenshtein_distance): Rename to...
17530 (get_edit_distance): ...this.
17531 * spellcheck.c (levenshtein_distance): Rename to...
17532 (get_edit_distance): ...this. Convert from Levenshtein distance
17533 to Damerau-Levenshtein distance by supporting transpositions of
17534 adjacent characters. Rename "v1" to "v_next" and "v0" to
17535 "v_one_ago".
17536 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
17537 (selftest::test_edit_distance_unit_test_oneway): ...this, and
17538 update for underlying renaming.
17539 (selftest::levenshtein_distance_unit_test): Rename to...
17540 (selftest::test_get_edit_distance_unit): ...this, and update for
17541 underlying renaming.
17542 (selftest::test_find_closest_string): Add example from PR 69968
17543 where transposition helps
17544 (selftest::test_metric_conditions): Update for renaming.
17545 (selftest::test_metric_conditions): Likewise.
17546 (selftest::spellcheck_c_tests): Likewise.
17547 * spellcheck.h (levenshtein_distance): Rename both overloads to...
17548 (get_edit_distance): ...this.
17549 (best_match::consider): Update for renaming.
17550
17551 2018-06-12 Martin Sebor <msebor@redhat.com>
17552
17553 PR tree-optimization/85259
17554 * builtins.c (compute_objsize): Handle constant offsets.
17555 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
17556 true iff a warning has been issued.
17557 * gimple.h (gimple_nonartificial_location): New function.
17558 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
17559 gimple_nonartificial_location and handle -Wno-system-headers.
17560 (handle_builtin_stxncpy): Same.
17561
17562 2018-06-12 Martin Sebor <msebor@redhat.com>
17563
17564 PR c/85931
17565 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
17566
17567 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
17568
17569 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
17570 BUILTIN_VEC_XST entries for pointer to double and long long.
17571
17572 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
17573
17574 PR target/85990
17575 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
17576 Update comments.
17577 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
17578 Likewise.
17579
17580 2018-06-12 Martin Liska <mliska@suse.cz>
17581
17582 * doc/options.texi: Document IntegerRange.
17583
17584 2018-06-12 Martin Liska <mliska@suse.cz>
17585
17586 * config/i386/i386.opt: Make MPX-related options as Deprecated.
17587 * opt-functions.awk: Handle Deprecated flag.
17588 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
17589 and report error.
17590 (read_cmdline_option): Report warning for a deprecated option.
17591 * opts.h (struct cl_option): Add new field cl_deprecated.
17592 (CL_ERR_DEPRECATED): New.
17593
17594 2018-06-12 Martin Liska <mliska@suse.cz>
17595
17596 * doc/options.texi: Document Deprecated option flag.
17597
17598 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17599
17600 * config/arc/arc-arch.h (arc_extras): New enum.
17601 (arc_cpu_t):Add field extra.
17602 (arc_cpu_types): Consider the extras.
17603 * config/arc/arc-cpus.def: Add extras info.
17604 * config/arc/arc-opts.h (processor_type): Consider extra field.
17605 * config/arc/arc.c (arc_override_options): Handle extra field.
17606
17607 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17608
17609 * config/arc/arc-arch.h: Update ARC_OPTX macro.
17610 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
17611 field.
17612 * config/arc/arc.c (arc_init): Update pic warning.
17613 (irq_range): Update irq range parsing warnings.
17614 (arc_override_options): Update various warning messages.
17615 (arc_handle_aux_attribute): Likewise.
17616
17617 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
17618
17619 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
17620
17621 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17622
17623 * doc/sourcebuild.texi: Document usage of line number 0 in verify
17624 compiler messages directives.
17625
17626 2018-06-12 Matthew Fortune <mfortune@gmail.com>
17627
17628 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
17629 * config/mips/mips-tables.opt: Regenerate.
17630 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
17631 mips64r6.
17632 * doc/invoke.texi: Document -march=i6500.
17633
17634 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
17635
17636 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
17637 (i6400_gpmul): Add cpu_unit.
17638 (i6400_gpdiv): Likewise.
17639 (i6400_msa_add_d): Update reservations.
17640 (i6400_msa_int_add) Likewise.
17641 (i6400_msa_short_logic3) Likewise.
17642 (i6400_msa_short_logic2) Likewise.
17643 (i6400_msa_short_logic) Likewise.
17644 (i6400_msa_move) Likewise.
17645 (i6400_msa_cmp) Likewise.
17646 (i6400_msa_short_float2) Likewise.
17647 (i6400_msa_div_d) Likewise.
17648 (i6400_msa_long_logic1) Likewise.
17649 (i6400_msa_long_logic2) Likewise.
17650 (i6400_msa_mult) Likewise.
17651 (i6400_msa_long_float2) Likewise.
17652 (i6400_msa_long_float4) Likewise.
17653 (i6400_msa_long_float5) Likewise.
17654 (i6400_msa_long_float8) Likewise.
17655 (i6400_fpu_fadd): Include frint type.
17656 (i6400_fpu_store): New define_insn_reservation.
17657 (i6400_fpu_load): Likewise.
17658 (i6400_fpu_move): Likewise.
17659 (i6400_fpu_fcmp): Likewise.
17660 (i6400_fpu_fmadd): Likewise.
17661 (i6400_int_mult): Include imul3nc type and update reservation.
17662 (i6400_int_div): Include idiv3 type and update reservation.
17663 (i6400_int_load): Update to check type not move_type.
17664 (i6400_int_store): Likewise.
17665 (i6400_int_prefetch): Set zero latency.
17666
17667 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
17668
17669 * gcc.c: Document new %@{...} sequence.
17670 (LINK_COMMAND_SPEC): Use it for the -L switches.
17671 (cpp_unique_options): Use it for the -I switches.
17672 (at_file_argbuf): New global variable.
17673 (in_at_file): Likewise.
17674 (alloc_args): Create at_file_argbuf.
17675 (clear_args): Truncate at_file_argbuf.
17676 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
17677 (open_at_file): New function.
17678 (close_at_file): Likewise.
17679 (create_at_file): Delete.
17680 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
17681 <'o'>: Likewise.
17682 <'@'>: New case.
17683 (validate_switches_from_spec): Deal with %@{...} sequence.
17684 (validate_switches): Likewise.
17685 (driver::finalize): Call clear_args.
17686
17687 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
17688
17689 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
17690
17691 2018-06-11 Martin Sebor <msebor@redhat.com>
17692
17693 * doc/invoke.texi (-Wall): List -Wc++17-compat.
17694 (Wno-class-memaccess): Add @opindex.
17695 (Wno-templates, Wno-multiple-inheritance): Same.
17696 (Wno-virtual-inheritance, Wno-namespaces): Same.
17697 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
17698 (Wno-format-overflow, Wno-format-truncation): Same.
17699 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
17700 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
17701 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
17702 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
17703 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
17704 (Wno-misspelled-isr): Same.
17705
17706 2018-06-11 Martin Sebor <msebor@redhat.com>
17707
17708 * PR tree-optimization/86083
17709 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
17710
17711 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
17712
17713 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
17714
17715 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
17716
17717 PR target/85755
17718 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
17719 on the correct operand.
17720 (*movdi_internal64): Ditto.
17721
17722 2018-06-11 Martin Liska <mliska@suse.cz>
17723
17724 PR tree-optimization/86089
17725 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
17726
17727 2018-06-11 Julia Koval <julia.koval@intel.com>
17728
17729 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
17730 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
17731 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
17732
17733 2018-06-11 Olivier Hainque <hainque@adacore.com>
17734
17735 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
17736 for Ada with strict dwarf2.
17737
17738 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
17739
17740 PR target/85755
17741 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
17742 addresses.
17743
17744 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
17745
17746 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
17747
17748 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
17749
17750 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
17751 TARGET_ELF.
17752
17753 2018-06-08 Martin Liska <mliska@suse.cz>
17754
17755 * tree-cfg.h (debug_function): Fix argument type to match
17756 implementation.
17757
17758 2018-06-08 Martin Liska <mliska@suse.cz>
17759
17760 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
17761 Remove usage of MPX-related (and removed) fields.
17762 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
17763
17764 2018-06-08 David Malcolm <dmalcolm@redhat.com>
17765
17766 * cfg.c (debug): Use TDF_NONE rather than 0.
17767 * cfghooks.c (debug): Likewise.
17768 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
17769 (struct dump_option_value_info): Convert to...
17770 (struct kv_pair): ...this template type.
17771 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
17772 rather than 0.
17773 (optinfo_verbosity_options): Likewise.
17774 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
17775 OPTGROUP_NONE.
17776 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
17777 than int for "optgroup_flags" param.
17778 (dump_generic_expr_loc): Use dump_flags_t rather than int for
17779 "dump_kind" param.
17780 (dump_dec): Likewise.
17781 (dump_finish): Use TDF_NONE rather than 0.
17782 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
17783 rather than int for "optgroup_flags" param. Use TDF_NONE rather
17784 than 0. Update for change to option_ptr.
17785 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
17786 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
17787 0. Update for changes to optinfo_verbosity_options and
17788 optgroup_options.
17789 (opt_info_switch_p): Convert optgroup_flags from int to
17790 optgroup_flags_t.
17791 (dump_basic_block): Use dump_flags_t rather than int
17792 for "dump_kind" param.
17793 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
17794 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
17795 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
17796 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
17797 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
17798 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
17799 TDF_NONE): Convert from macros to...
17800 (enum dump_flag): ...this new enum.
17801 (dump_flags_t): Update to use enum.
17802 (operator|, operator&, operator~, operator|=, operator&=):
17803 Implement for dump_flags_t.
17804 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
17805 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
17806 Convert from macros to...
17807 (enum optgroup_flag): ...this new enum.
17808 (optgroup_flags_t): New typedef.
17809 (operator|, operator|=): Implement for optgroup_flags_t.
17810 (struct dump_file_info): Convert field "alt_flags" to
17811 dump_flags_t. Convert field "optgroup_flags" to
17812 optgroup_flags_t.
17813 (dump_basic_block): Use dump_flags_t rather than int for param.
17814 (dump_generic_expr_loc): Likewise.
17815 (dump_dec): Likewise.
17816 (dump_register): Convert param "optgroup_flags" to
17817 optgroup_flags_t.
17818 (opt_info_enable_passes): Likewise.
17819 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
17820 than 0.
17821 * gimple-pretty-print.c (debug): Likewise.
17822 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
17823 (merged_store_group::apply_stores): Likewise.
17824 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
17825 * gimple.c (verify_gimple_pp): Likewise.
17826 * graphite-poly.c (print_pbb_body): Likewise.
17827 * passes.c (pass_manager::register_one_dump_file): Convert
17828 local "optgroup_flags" to optgroup_flags_t.
17829 * print-tree.c (print_node): Use TDF_NONE rather than 0.
17830 (debug): Likewise.
17831 (debug_body): Likewise.
17832 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
17833 to optgroup_flags_t.
17834 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
17835 than 0.
17836 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
17837 (convert_mult_to_fma): Likewise.
17838 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
17839 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
17840 * tree-vect-data-refs.c (dump_lower_bound): Convert param
17841 "dump_kind" to dump_flags_t.
17842
17843 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
17844
17845 * config/rs6000/rs6000.c (min, max): Delete.
17846
17847 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
17848
17849 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
17850 -mabi=spe and -mabi=no-spe.
17851
17852 2018-06-08 Martin Liska <mliska@suse.cz>
17853
17854 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
17855 where we expect an existing summary.
17856
17857 2018-06-08 Martin Liska <mliska@suse.cz>
17858
17859 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
17860 * ipa-inline.h (estimate_edge_growth): Likewise.
17861
17862 2018-06-08 Martin Liska <mliska@suse.cz>
17863
17864 * cgraph.c (function_version_hasher::hash): Use
17865 cgraph_node::get_uid ().
17866 (function_version_hasher::equal):
17867 * cgraph.h (cgraph_node::get_uid): New method.
17868 * ipa-inline.c (update_caller_keys): Use
17869 cgraph_node::get_uid ().
17870 (update_callee_keys): Likewise.
17871 * ipa-utils.c (searchc): Likewise.
17872 (ipa_reduced_postorder): Likewise.
17873 * lto-cgraph.c (input_node): Likewise.
17874 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
17875 * symbol-summary.h (symtab_insertion): Likewise.
17876 (symtab_removal): Likewise.
17877 (symtab_duplication): Likewise.
17878 * tree-pretty-print.c (dump_function_header): Likewise.
17879 * tree-sra.c (convert_callers_for_node): Likewise.
17880
17881 2018-06-08 Martin Liska <mliska@suse.cz>
17882
17883 * cgraph.c (symbol_table::create_edge): Always assign a new
17884 unique number.
17885 (symbol_table::free_edge): Do not recycle numbers.
17886 * cgraph.h (cgraph_edge::get): New method.
17887 * symbol-summary.h (symtab_removal): Use it.
17888 (symtab_duplication): Likewise.
17889 (call_summary::hashable_uid): Remove.
17890
17891 2018-06-08 Martin Liska <mliska@suse.cz>
17892
17893 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
17894 (initialize_growth_caches): Remove.
17895 (free_growth_caches): Likewise.
17896 (do_estimate_edge_time): Use edge_growth_cache.
17897 (do_estimate_edge_size): Likewise.
17898 (do_estimate_edge_hints): Likewise.
17899 * ipa-inline.c (reset_edge_caches): Likewise.
17900 (recursive_inlining): Likewise.
17901 (inline_small_functions): Likewise.
17902 * ipa-inline.h (initialize_growth_caches): Remove.
17903 (estimate_edge_size): Likewise.
17904 (estimate_edge_time): Likewise.
17905 (estimate_edge_hints): Likewise.
17906 (reset_edge_growth_cache): Likewise.
17907 * symbol-summary.h (call_summary::remove): New method.
17908
17909 2018-06-08 Martin Liska <mliska@suse.cz>
17910
17911 * ipa-cp.c (class edge_clone_summary): New summary.
17912 (grow_edge_clone_vectors): Remove.
17913 (ipcp_edge_duplication_hook): Remove.
17914 (class edge_clone_summary_t): New call_summary class.
17915 (ipcp_edge_removal_hook): Remove.
17916 (edge_clone_summary_t::duplicate): New function.
17917 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
17918 (create_specialized_node): Likewise.
17919 (ipcp_driver): Initialize edge_clone_summaries and do not
17920 register hooks.
17921
17922 2018-06-08 Martin Liska <mliska@suse.cz>
17923
17924 * symbol-summary.h (get): New function.
17925 (call_summary::m_initialize_when_cloning): New class member.
17926
17927 2018-06-08 Martin Liska <mliska@suse.cz>
17928
17929 * cgraph.c (cgraph_node::remove): Do not recycle uid.
17930 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
17931 (symbol_table::allocate_cgraph_symbol): Do not set uid.
17932 * passes.c (uid_hash_t): Record removed_nodes by their uids.
17933 (remove_cgraph_node_from_order): Use the removed_nodes set.
17934 (do_per_function_toporder): Likwise.
17935 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
17936 instead of summary_uid.
17937 (symtab_removal): Likewise.
17938 (symtab_duplication): Likewise.
17939
17940 2018-06-08 Martin Liska <mliska@suse.cz>
17941
17942 * ipa-cp.c (ipcp_store_bits_results): Use
17943 ipcp_transformation_sum.
17944 (ipcp_store_vr_results): Likewise.
17945 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
17946 to ...
17947 (ipcp_transformation_initialize): ... this.
17948 (ipa_set_node_agg_value_chain):
17949 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
17950 (write_ipcp_transformation_info): Likewise.
17951 (read_ipcp_transformation_info): Likewise.
17952 (ipcp_update_bits): Likewise.
17953 (ipcp_update_vr): Likewise.
17954 (ipcp_transform_function): Likewise.
17955 * ipa-prop.h: Rename ipcp_transformation_summary to
17956 ipcp_transformation.
17957 (class ipcp_transformation_t): New function summary.
17958 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
17959 (ipa_get_agg_replacements_for_node): Likewise.
17960
17961 2018-06-08 Martin Liska <mliska@suse.cz>
17962
17963 * ipa-pure-const.c (struct funct_state_d): Do it class instead
17964 of struct.
17965 (class funct_state_summary_t): New function_summary class.
17966 (has_function_state): Remove.
17967 (get_function_state): Likewise.
17968 (set_function_state): Likewise.
17969 (add_new_function): Likewise.
17970 (funct_state_summary_t::insert): New function.
17971 (duplicate_node_data): Remove.
17972 (remove_node_data): Remove.
17973 (funct_state_summary_t::duplicate): New function.
17974 (register_hooks): Create new funct_state_summaries.
17975 (pure_const_generate_summary): Use it.
17976 (pure_const_write_summary): Likewise.
17977 (pure_const_read_summary): Likewise.
17978 (propagate_pure_const): Likewise.
17979 (propagate_nothrow): Likewise.
17980 (dump_malloc_lattice): Likewise.
17981 (propagate_malloc): Likewise.
17982 (execute): Do not register hooks, just remove summary
17983 instead.
17984 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
17985 constructor.
17986
17987 2018-06-08 Martin Liska <mliska@suse.cz>
17988
17989 * ipa-reference.c (remove_node_data): Remove.
17990 (duplicate_node_data): Likewise.
17991 (class ipa_ref_var_info_summary_t): New class.
17992 (class ipa_ref_opt_summary_t): Likewise.
17993 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
17994 (get_reference_optimization_summary): Use
17995 ipa_ref_opt_sum_summaries.
17996 (set_reference_vars_info): Remove.
17997 (set_reference_optimization_summary): Likewise.
17998 (ipa_init): Create summaries.
17999 (init_function_info): Use function summary.
18000 (ipa_ref_opt_summary_t::duplicate): New function.
18001 (ipa_ref_opt_summary_t::remove): New function.
18002 (get_read_write_all_from_node): Fix GNU coding style.
18003 (propagate): Use function summary.
18004 (write_node_summary_p): Fix GNU coding style.
18005 (stream_out_bitmap): Likewise.
18006 (ipa_reference_read_optimization_summary): Use function summary.
18007 (ipa_reference_c_finalize): Do not release hooks.
18008
18009 2018-06-08 Martin Liska <mliska@suse.cz>
18010
18011 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
18012 (analyze_function_body): Extract multiple calls of get_create.
18013 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18014 * ipa-inline.c (recursive_inlining): Use ::get method.
18015 * ipa-inline.h (estimate_edge_growth): Likewise.
18016
18017 2018-06-08 Martin Liska <mliska@suse.cz>
18018
18019 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
18020 HSA_INVALID.
18021 (hsa_function_summary::hsa_function_summary): Use the new enum
18022 value.
18023 (hsa_gpu_implementation_p): Use hsa_summaries::get.
18024 * hsa-gen.c (hsa_get_host_function): Likewise.
18025 (get_brig_function_name): Likewise.
18026 * ipa-hsa.c (process_hsa_functions): Likewise.
18027 (ipa_hsa_write_summary): Likewise.
18028 * symbol-summary.h (symtab_duplication): Use ::get function/
18029 (get): New function.
18030
18031 2018-06-08 Martin Liska <mliska@suse.cz>
18032
18033 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
18034 of get.
18035 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
18036 (hsa_register_kernel): Likewise.
18037 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
18038 * hsa-gen.c (hsa_get_host_function): Likewise.
18039 (get_brig_function_name): Likewise.
18040 (generate_hsa): Likewise.
18041 (pass_gen_hsail::execute): Likewise.
18042 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
18043 (devirtualization_time_bonus): Likewise.
18044 (ipcp_propagate_stage): Likewise.
18045 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
18046 (edge_set_predicate): Likewise.
18047 (evaluate_conditions_for_known_args): Likewise.
18048 (evaluate_properties_for_edge): Likewise.
18049 (ipa_fn_summary::reset): Likewise.
18050 (ipa_fn_summary_t::duplicate): Likewise.
18051 (dump_ipa_call_summary): Likewise.
18052 (ipa_dump_fn_summary): Likewise.
18053 (analyze_function_body): Likewise.
18054 (compute_fn_summary): Likewise.
18055 (estimate_edge_devirt_benefit): Likewise.
18056 (estimate_edge_size_and_time): Likewise.
18057 (estimate_calls_size_and_time): Likewise.
18058 (estimate_node_size_and_time): Likewise.
18059 (inline_update_callee_summaries): Likewise.
18060 (remap_edge_change_prob): Likewise.
18061 (remap_edge_summaries): Likewise.
18062 (ipa_merge_fn_summary_after_inlining): Likewise.
18063 (ipa_update_overall_fn_summary): Likewise.
18064 (read_ipa_call_summary): Likewise.
18065 (inline_read_section): Likewise.
18066 (write_ipa_call_summary): Likewise.
18067 (ipa_fn_summary_write): Likewise.
18068 (ipa_free_fn_summary): Likewise.
18069 * ipa-hsa.c (process_hsa_functions): Likewise.
18070 (ipa_hsa_write_summary): Likewise.
18071 (ipa_hsa_read_section): Likewise.
18072 * ipa-icf.c (sem_function::merge): Likewise.
18073 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18074 (do_estimate_edge_time): Likewise.
18075 (estimate_size_after_inlining): Likewise.
18076 (estimate_growth): Likewise.
18077 (growth_likely_positive): Likewise.
18078 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
18079 (inline_call): Likewise.
18080 * ipa-inline.c (caller_growth_limits): Likewise.
18081 (can_inline_edge_p): Likewise.
18082 (can_inline_edge_by_limits_p): Likewise.
18083 (compute_uninlined_call_time): Likewise.
18084 (compute_inlined_call_time): Likewise.
18085 (want_inline_small_function_p): Likewise.
18086 (edge_badness): Likewise.
18087 (update_caller_keys): Likewise.
18088 (update_callee_keys): Likewise.
18089 (recursive_inlining): Likewise.
18090 (inline_small_functions): Likewise.
18091 (inline_to_all_callers_1): Likewise.
18092 (dump_overall_stats): Likewise.
18093 (early_inline_small_functions): Likewise.
18094 (early_inliner): Likewise.
18095 * ipa-inline.h (estimate_edge_growth): Likewise.
18096 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
18097 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
18098 * ipa-prop.h (IPA_NODE_REF): Likewise.
18099 (IPA_EDGE_REF): Likewise.
18100 * ipa-pure-const.c (malloc_candidate_p): Likewise.
18101 (propagate_malloc): Likewise.
18102 * ipa-split.c (execute_split_functions): Likewise.
18103 * symbol-summary.h: Rename get to get_create.
18104 (get): Likewise.
18105 (get_create): Likewise.
18106 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
18107
18108 2018-06-08 Martin Liska <mliska@suse.cz>
18109
18110 * symbol-summary.h (release): Move definition out of class
18111 declaration.
18112 (symtab_removal): Likewise.
18113 (symtab_duplication): Likewise.
18114
18115 2018-06-08 Martin Liska <mliska@suse.cz>
18116
18117 * symbol-summary.h (function_summary): Move constructor
18118 implementation out of class declaration.
18119 (release): Likewise.
18120 (symtab_insertion): Likewise.
18121 (symtab_removal): Likewise.
18122 (symtab_duplication): Likewise.
18123 (get): Likewise.
18124
18125 2018-06-08 Martin Liska <mliska@suse.cz>
18126
18127 * Makefile.in: Remove support for MPX (macros, related functions,
18128 fields in cgraph_node, ...).
18129 * builtin-types.def (BT_BND): Likewise.
18130 (BT_FN_BND_CONST_PTR): Likewise.
18131 (BT_FN_CONST_PTR_BND): Likewise.
18132 (BT_FN_VOID_PTR_BND): Likewise.
18133 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
18134 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
18135 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
18136 (expand_builtin_mempcpy_with_bounds): Likewise.
18137 (expand_builtin_memset_with_bounds): Likewise.
18138 (expand_builtin_memset_args): Likewise.
18139 (std_expand_builtin_va_start): Likewise.
18140 (expand_builtin): Likewise.
18141 (expand_builtin_with_bounds): Likewise.
18142 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
18143 (DEF_LIB_BUILTIN_CHKP): Likewise.
18144 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
18145 (DEF_CHKP_BUILTIN): Likewise.
18146 (BUILT_IN_MEMCPY): Likewise.
18147 (BUILT_IN_MEMMOVE): Likewise.
18148 (BUILT_IN_MEMPCPY): Likewise.
18149 (BUILT_IN_MEMSET): Likewise.
18150 (BUILT_IN_STPCPY): Likewise.
18151 (BUILT_IN_STRCAT): Likewise.
18152 (BUILT_IN_STRCHR): Likewise.
18153 (BUILT_IN_STRCPY): Likewise.
18154 (BUILT_IN_STRLEN): Likewise.
18155 (BUILT_IN_MEMCPY_CHK): Likewise.
18156 (BUILT_IN_MEMMOVE_CHK): Likewise.
18157 (BUILT_IN_MEMPCPY_CHK): Likewise.
18158 (BUILT_IN_MEMSET_CHK): Likewise.
18159 (BUILT_IN_STPCPY_CHK): Likewise.
18160 (BUILT_IN_STRCAT_CHK): Likewise.
18161 (BUILT_IN_STRCPY_CHK): Likewise.
18162 * calls.c (store_bounds): Likewise.
18163 (emit_call_1): Likewise.
18164 (special_function_p): Likewise.
18165 (maybe_warn_nonstring_arg): Likewise.
18166 (initialize_argument_information): Likewise.
18167 (finalize_must_preallocate): Likewise.
18168 (compute_argument_addresses): Likewise.
18169 (expand_call): Likewise.
18170 * cfgexpand.c (expand_call_stmt): Likewise.
18171 (expand_return): Likewise.
18172 (expand_gimple_stmt_1): Likewise.
18173 (pass_expand::execute): Likewise.
18174 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
18175 (cgraph_node::remove): Likewise.
18176 (cgraph_node::dump): Likewise.
18177 (cgraph_node::verify_node): Likewise.
18178 * cgraph.h (chkp_function_instrumented_p): Likewise.
18179 (symtab_node::get_alias_target): Likewise.
18180 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
18181 (cgraph_local_p): Likewise.
18182 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
18183 (cgraph_edge::rebuild_references): Likewise.
18184 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
18185 (walk_polymorphic_call_targets): Likewise.
18186 (cgraph_node::expand_thunk): Likewise.
18187 (symbol_table::output_weakrefs): Likewise.
18188 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
18189 (ix86_handle_option): Likewise.
18190 * config/i386/constraints.md: Likewise.
18191 * config/i386/i386-builtin-types.def (BND): Likewise.
18192 (VOID): Likewise.
18193 (PVOID): Likewise.
18194 (ULONG): Likewise.
18195 * config/i386/i386-builtin.def (BDESC_END): Likewise.
18196 (BDESC_FIRST): Likewise.
18197 (BDESC): Likewise.
18198 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
18199 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
18200 * config/i386/i386.c (enum reg_class): Likewise.
18201 (ix86_target_string): Likewise.
18202 (ix86_option_override_internal): Likewise.
18203 (ix86_conditional_register_usage): Likewise.
18204 (ix86_valid_target_attribute_inner_p): Likewise.
18205 (ix86_set_indirect_branch_type): Likewise.
18206 (ix86_set_current_function): Likewise.
18207 (ix86_function_arg_regno_p): Likewise.
18208 (init_cumulative_args): Likewise.
18209 (ix86_function_arg_advance): Likewise.
18210 (ix86_function_arg): Likewise.
18211 (ix86_pass_by_reference): Likewise.
18212 (ix86_function_value_regno_p): Likewise.
18213 (ix86_function_value_1): Likewise.
18214 (ix86_function_value_bounds): Likewise.
18215 (ix86_return_in_memory): Likewise.
18216 (ix86_setup_incoming_vararg_bounds): Likewise.
18217 (ix86_va_start): Likewise.
18218 (indirect_thunk_need_prefix): Likewise.
18219 (print_reg): Likewise.
18220 (ix86_print_operand): Likewise.
18221 (ix86_expand_call): Likewise.
18222 (ix86_output_function_return): Likewise.
18223 (reg_encoded_number): Likewise.
18224 (BDESC_VERIFYS): Likewise.
18225 (ix86_init_mpx_builtins): Likewise.
18226 (ix86_init_builtins): Likewise.
18227 (ix86_emit_cmove): Likewise.
18228 (ix86_emit_move_max): Likewise.
18229 (ix86_expand_builtin): Likewise.
18230 (ix86_builtin_mpx_function): Likewise.
18231 (ix86_get_arg_address_for_bt): Likewise.
18232 (ix86_load_bounds): Likewise.
18233 (ix86_store_bounds): Likewise.
18234 (ix86_load_returned_bounds): Likewise.
18235 (ix86_store_returned_bounds): Likewise.
18236 (ix86_class_likely_spilled_p): Likewise.
18237 (ix86_hard_regno_mode_ok): Likewise.
18238 (x86_order_regs_for_local_alloc): Likewise.
18239 (ix86_mitigate_rop): Likewise.
18240 (ix86_bnd_prefixed_insn_p): Likewise.
18241 (ix86_mpx_bound_mode): Likewise.
18242 (ix86_make_bounds_constant): Likewise.
18243 (ix86_initialize_bounds): Likewise.
18244 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
18245 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
18246 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
18247 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
18248 (TARGET_CHKP_BOUND_MODE): Likewise.
18249 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
18250 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
18251 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
18252 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
18253 * config/i386/i386.h (TARGET_MPX): Likewise.
18254 (TARGET_MPX_P): Likewise.
18255 (VALID_BND_REG_MODE): Likewise.
18256 (FIRST_BND_REG): Likewise.
18257 (LAST_BND_REG): Likewise.
18258 (enum reg_class): Likewise.
18259 (BND_REG_P): Likewise.
18260 (BND_REGNO_P): Likewise.
18261 (BNDmode): Likewise.
18262 (ADJUST_INSN_LENGTH): Likewise.
18263 * config/i386/i386.md: Likewise.
18264 * config/i386/i386.opt: Likewise.
18265 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
18266 (defined): Likewise.
18267 (LINK_MPX): Likewise.
18268 (MPX_SPEC): Likewise.
18269 (LIBMPX_SPEC): Likewise.
18270 (LIBMPXWRAPPERS_SPEC): Likewise.
18271 (CHKP_SPEC): Likewise.
18272 * config/i386/predicates.md: Likewise.
18273 * dbxout.c (dbxout_type): Likewise.
18274 * doc/extend.texi: Likewise.
18275 * doc/invoke.texi: Likewise.
18276 * doc/md.texi: Likewise.
18277 * doc/tm.texi: Likewise.
18278 * doc/tm.texi.in: Likewise.
18279 * dwarf2out.c (is_base_type): Likewise.
18280 (gen_formal_types_die): Likewise.
18281 (gen_subprogram_die): Likewise.
18282 (gen_type_die_with_usage): Likewise.
18283 (gen_decl_die): Likewise.
18284 (dwarf2out_late_global_decl): Likewise.
18285 * expr.c (expand_assignment): Likewise.
18286 (emit_storent_insn): Likewise.
18287 (store_expr_with_bounds): Likewise.
18288 (store_expr): Likewise.
18289 (expand_expr_real_1): Likewise.
18290 * expr.h (store_expr_with_bounds): Likewise.
18291 * function.c (use_register_for_decl): Likewise.
18292 (struct bounds_parm_data): Likewise.
18293 (assign_parms_augmented_arg_list): Likewise.
18294 (assign_parm_find_entry_rtl): Likewise.
18295 (assign_parm_is_stack_parm): Likewise.
18296 (assign_parm_load_bounds): Likewise.
18297 (assign_bounds): Likewise.
18298 (assign_parms): Likewise.
18299 (expand_function_start): Likewise.
18300 * gcc.c (CHKP_SPEC): Likewise.
18301 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
18302 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
18303 (wrestrict_dom_walker::check_call): Likewise.
18304 * gimple.c (gimple_build_call_from_tree): Likewise.
18305 * gimple.h (enum gf_mask): Likewise.
18306 (gimple_call_with_bounds_p): Likewise.
18307 (gimple_call_set_with_bounds): Likewise.
18308 * gimplify.c (gimplify_init_constructor): Likewise.
18309 * ipa-cp.c (initialize_node_lattices): Likewise.
18310 (propagate_constants_across_call): Likewise.
18311 (find_more_scalar_values_for_callers_subset): Likewise.
18312 * ipa-hsa.c (process_hsa_functions): Likewise.
18313 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
18314 * ipa-icf.c (sem_function::merge): Likewise.
18315 * ipa-inline.c (early_inliner): Likewise.
18316 * ipa-pure-const.c (warn_function_noreturn): Likewise.
18317 (warn_function_cold): Likewise.
18318 (propagate_pure_const): Likewise.
18319 * ipa-ref.h (enum GTY): Likewise.
18320 * ipa-split.c (find_retbnd): Likewise.
18321 (consider_split): Likewise.
18322 (split_function): Likewise.
18323 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
18324 * ipa.c (walk_polymorphic_call_targets): Likewise.
18325 (symbol_table::remove_unreachable_nodes): Likewise.
18326 (process_references): Likewise.
18327 (cgraph_build_static_cdtor_1): Likewise.
18328 * lto-cgraph.c (lto_output_node): Likewise.
18329 (output_refs): Likewise.
18330 (compute_ltrans_boundary): Likewise.
18331 (input_overwrite_node): Likewise.
18332 (input_node): Likewise.
18333 (input_cgraph_1): Likewise.
18334 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
18335 * passes.c (pass_manager::execute_early_local_passes): Likewise.
18336 (class pass_chkp_instrumentation_passes): Likewise.
18337 (make_pass_chkp_instrumentation_passes): Likewise.
18338 * passes.def: Likewise.
18339 * rtl.h (struct GTY): Likewise.
18340 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
18341 * stor-layout.c (layout_type): Likewise.
18342 * symtab.c: Likewise.
18343 * target.def: Likewise.
18344 * targhooks.c (default_chkp_bound_type): Likewise.
18345 (default_chkp_bound_mode): Likewise.
18346 (default_builtin_chkp_function): Likewise.
18347 (default_chkp_function_value_bounds): Likewise.
18348 (default_chkp_make_bounds_constant): Likewise.
18349 (default_chkp_initialize_bounds): Likewise.
18350 * targhooks.h (default_chkp_bound_type): Likewise.
18351 (default_chkp_bound_mode): Likewise.
18352 (default_builtin_chkp_function): Likewise.
18353 (default_chkp_function_value_bounds): Likewise.
18354 (default_chkp_make_bounds_constant): Likewise.
18355 (default_chkp_initialize_bounds): Likewise.
18356 * toplev.c (compile_file): Likewise.
18357 (process_options): Likewise.
18358 * tree-core.h (DEF_BUILTIN): Likewise.
18359 (DEF_BUILTIN_CHKP): Likewise.
18360 * tree-inline.c (declare_return_variable): Likewise.
18361 (remap_gimple_stmt): Likewise.
18362 (copy_bb): Likewise.
18363 (initialize_inlined_parameters): Likewise.
18364 (expand_call_inline): Likewise.
18365 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
18366 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
18367 (make_pass_ipa_chkp_produce_thunks): Likewise.
18368 (make_pass_chkp): Likewise.
18369 (make_pass_chkp_opt): Likewise.
18370 (make_pass_chkp_instrumentation_passes): Likewise.
18371 * tree-pretty-print.c (dump_generic_node): Likewise.
18372 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
18373 * tree-ssa-dce.c (propagate_necessity): Likewise.
18374 (eliminate_unnecessary_stmts): Likewise.
18375 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
18376 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
18377 * tree-ssa-sccvn.h: Likewise.
18378 * tree-ssa-strlen.c (get_string_length): Likewise.
18379 (valid_builtin_call): Likewise.
18380 (adjust_last_stmt): Likewise.
18381 (handle_builtin_strchr): Likewise.
18382 (handle_builtin_strcpy): Likewise.
18383 (handle_builtin_stxncpy): Likewise.
18384 (handle_builtin_memcpy): Likewise.
18385 (handle_builtin_strcat): Likewise.
18386 (strlen_check_and_optimize_stmt): Likewise.
18387 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
18388 * tree-streamer-in.c: Likewise.
18389 * tree-streamer.c (record_common_node): Likewise.
18390 * tree.c (tree_code_size): Likewise.
18391 (wide_int_to_tree_1): Likewise.
18392 (type_contains_placeholder_1): Likewise.
18393 (build_common_tree_nodes): Likewise.
18394 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
18395 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
18396 (POINTER_BOUNDS_P): Likewise.
18397 (BOUNDED_TYPE_P): Likewise.
18398 (BOUNDED_P): Likewise.
18399 (CALL_WITH_BOUNDS_P): Likewise.
18400 (pointer_bounds_type_node): Likewise.
18401 * value-prof.c (gimple_ic): Likewise.
18402 * var-tracking.c (vt_add_function_parameters): Likewise.
18403 * varasm.c (make_decl_rtl): Likewise.
18404 (assemble_start_function): Likewise.
18405 (output_constant): Likewise.
18406 (maybe_assemble_visibility): Likewise.
18407 * varpool.c (ctor_for_folding): Likewise.
18408 * chkp-builtins.def: Remove.
18409 * ipa-chkp.c: Remove.
18410 * ipa-chkp.h: Remove.
18411 * rtl-chkp.c: Remove.
18412 * rtl-chkp.h: Remove.
18413 * tree-chkp-opt.c: Remove.
18414 * tree-chkp.c: Remove.
18415 * tree-chkp.h: Remove.
18416
18417 2018-06-07 Carl Love <cel@us.ibm.com>
18418
18419 * config/rs6000/vsx.md (vextract_fp_from_shorth,
18420 vextract_fp_from_shortl): Add BE support.
18421
18422 2018-06-07 Paul Koning <ni1d@arrl.net>
18423
18424 * compare-elim.c (try_merge_compare): Don't merge compare if
18425 address contains a side effect.
18426 (try_eliminate_compare): Likewise.
18427
18428 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
18429
18430 * config.gcc: Support "tremont".
18431 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
18432 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18433 PROCESSOR_TREMONT.
18434 * config/i386/i386.c (m_TREMONT): Define.
18435 (processor_target_table): Add "tremont".
18436 (PTA_TREMONT): Define.
18437 (ix86_lea_outperforms): Add TARGET_TREMONT.
18438 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
18439 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
18440 and M_INTEL_GOLDMONT_PLUS.
18441 (fold_builtin_cpu): Add "tremont".
18442 (ix86_add_stmt_cost): Add TARGET_TREMONT.
18443 (ix86_option_override_internal): Add "tremont".
18444 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
18445 (processor_type): Add PROCESSOR_TREMONT.
18446 * config/i386/x86-tune.def: Add m_TREMONT.
18447 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
18448
18449 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18450
18451 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
18452 symbol defined for msp430i* devices to be lower case.
18453
18454 2018-06-07 Richard Biener <rguenther@suse.de>
18455
18456 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
18457 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
18458 Properly wrap signed arithmetic if overflow wraps.
18459
18460 2018-06-07 Jakub Jelinek <jakub@redhat.com>
18461
18462 PR tree-optimization/69615
18463 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
18464 of a cast from a same precision integral SSA_NAME in a bb dominated
18465 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
18466 cast to utype if rhs2 has already a compatible type.
18467
18468 2018-06-07 Richard Biener <rguenther@suse.de>
18469
18470 PR tree-optimization/85935
18471 * graphite-scop-detection.c (find_params_in_bb): Analyze
18472 condition operands with respect to the correct loop. Assert
18473 the analysis doesn't fail.
18474
18475 2018-06-04 Carl Love <cel@us.ibm.com>
18476
18477 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
18478 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
18479 as it is slightly cheaper.
18480 (first_match_or_eos_index_<mode>):
18481 Calculate index using natural element order.
18482 (first_match_index_<mode>):
18483 Calculate index using natural element order.
18484 (first_match_or_eos_index_<mode>):
18485 Calculate index using natural order.
18486 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
18487 for BE and LE modes.
18488 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
18489 P9V_BUILTIN_VCLZLSBB_V16QI.
18490 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
18491 specific.
18492
18493 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
18494
18495 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
18496 indentation and line wrap for many prototypes. Add missing
18497 @smallexample directives around block of prototypes for vec_xl and
18498 vec_xst.
18499
18500 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
18501
18502 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
18503 track if we pass or return IEEE 128-bit floating point.
18504 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
18505 C++ mangling that is compatible with GCC 8.1.
18506 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
18507 (init_cumulative_args): Note if we pass or return IEEE 128-bit
18508 floating point types.
18509 (rs6000_function_arg_advance_1): Likewise.
18510 (rs6000_mangle_type): Optionally generate mangled names that match
18511 what GCC 8.1 generated for IEEE 128-bit floating point types.
18512 (rs6000_globalize_decl_name): If we have an external function that
18513 passes or returns IEEE 128-bit types, generate a weak reference
18514 from the mangled name used in GCC 8.1 to the current mangled
18515 name.
18516 (rs6000_init_builtins): Make __ibm128 use the long double type if
18517 long double is IBM extended double. Make __float128 use the long
18518 double type if long double is IEEE 128-bit.
18519
18520 PR target/85657
18521 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
18522 macro for __ibm128 built-in functions.
18523 (PACK_IF): Add __ibm128 pack/unpack functions.
18524 (UNPACK_IF): Likewise.
18525 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
18526 enable long double built-in functions if long double is IEEE
18527 128-bit floating point.
18528 (rs6000_invalid_builtin): Update long double built-in function
18529 error message.
18530 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
18531 functions, adjust the built-in function to use the long double
18532 built-in function if __ibm128 and long double are the same type.
18533 * doc/extend.texi (PowerPC builtins): Update documention for
18534 __builtin_{,un}pack_longdouble. Add documentation for
18535 __builtin_{,un}pack_ibm128.
18536
18537 2018-06-06 Jim Wilson <jimw@sifive.com>
18538
18539 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
18540 (struct machine_function): New field interrupt_mode.
18541 (riscv_handle_type_attribute): New function. Add forward declaration.
18542 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
18543 (riscv_expand_epilogue): Check interrupt_mode field.
18544 (riscv_set_current_function): Check interrupt attribute args and
18545 set interrupt_mode field.
18546 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
18547 (riscv_sret, riscv_uret): New.
18548 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
18549 new arguments to interrupt attribute.
18550
18551 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
18552
18553 PR target/63177
18554 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
18555 Don't handle -mcpu=power8 if -mpower9-vector is also used.
18556
18557 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
18558
18559 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
18560 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
18561 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
18562 several redundant entries.
18563
18564 2018-06-06 David Malcolm <dmalcolm@redhat.com>
18565
18566 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
18567 type from "rtx" to "rtx_insn *".
18568 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
18569 for local "call_insn", removing cast.
18570 (ix86_expand_call): Likewise, introducing a "call_insn" local.
18571
18572 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
18573
18574 PR tree-optimization/86066
18575 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
18576 for BIT_INSERT_EXPR stores.
18577
18578 2018-06-06 Richard Biener <rguenther@suse.de>
18579
18580 PR tree-optimization/86062
18581 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18582 component refs ontop
18583 of to be offsetted base.
18584
18585 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18586
18587 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
18588 to be static and remove check on interrupt attribute name.
18589
18590 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
18591
18592 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
18593 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
18594
18595 2018-06-05 Steve Ellcey <sellcey@cavium.com>
18596
18597 PR target/79924
18598 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
18599 second argument.
18600 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
18601 Remove second argument, change how error is called.
18602 (aarch64_layout_arg): Remove second argument from
18603 aarch64_err_no_fpadvsimd call.
18604 (aarch64_init_cumulative_args): Ditto.
18605 (aarch64_gimplify_va_arg_expr): Ditto.
18606 * config/aarch64/aarch64.md (mov<mode>): Ditto.
18607
18608 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
18609
18610 * config/i386/i386.md (simple_return_indirect_internal): New expander.
18611 (*simple_return_indirect_internal<mode>): Rename from
18612 simple_return_indirect_internal. Use W mode iterator.
18613 (rstorssp): New expander.
18614 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
18615 (clrssbsy): New expander.
18616 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
18617
18618 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
18619
18620 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
18621 __typeof__.
18622 (cmse_check_pointed_object): Likewise.
18623
18624 2018-06-05 Martin Liska <mliska@suse.cz>
18625
18626 PR gcov-profile/47618
18627 * doc/invoke.texi: Document how -fprofile-dir format
18628 is extended.
18629
18630 2018-06-05 Richard Biener <rguenther@suse.de>
18631
18632 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
18633 removal pretend DOM info isn't available so we do not update
18634 it and only remove edges, not dominated blocks. Actually free
18635 DOM info in case we removed something. Remove unreachable blocks.
18636 (mfb_keep_latches): Work with either DOM info or marked backedges.
18637 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
18638 first. Mark backedges if DOM info isn't available.
18639 (Re-)compute DOM info after cleanup_control_flow_pre.
18640
18641 2018-06-05 Richard Biener <rguenther@suse.de>
18642
18643 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
18644 (locus_discrim_hasher::hash): Adjust.
18645 (locus_discrim_hasher::equal): Likewise.
18646 (next_discriminator_for_locus): Work on line directly.
18647 (same_line_p): Pass in expanded locus1 as well.
18648 (assign_discriminators): Avoid redundant location expansions.
18649
18650 2018-06-05 Richard Biener <rguenther@suse.de>
18651
18652 PR tree-optimization/86046
18653 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
18654 if required after clearing TREE_ADDRESSABLE.
18655
18656 2018-06-05 Richard Biener <rguenther@suse.de>
18657
18658 PR tree-optimization/86047
18659 * tree-ssa-loop.c (for_each_index): Glob handling of all
18660 decls and constants and really handle all of them.
18661
18662 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18663
18664 PR target/81497
18665 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
18666 qualifier_void_pointer and qualifier_const_void_pointer.
18667 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
18668 (arm_init_builtins): Handle the above.
18669 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
18670 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
18671 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
18672 void intrinsics.
18673
18674 2018-06-05 Martin Liska <mliska@suse.cz>
18675
18676 * auto-profile.c (read_autofdo_file): Do not use
18677 gcov_ctr_summary struct.
18678 (afdo_callsite_hot_enough_for_early_inline): Likewise.
18679 * coverage.c (struct counts_entry): Likewise.
18680 (read_counts_file): Read just single summary entry.
18681 (get_coverage_counts): Use gcov_summary struct.
18682 * coverage.h (get_coverage_counts): Likewise.
18683 * gcov-dump.c (dump_working_sets): Likewise.
18684 (tag_summary): Dump just single summary.
18685 * gcov-io.c (gcov_write_summary): Write just histogram
18686 summary.
18687 (gcov_read_summary): Read just single summary.
18688 (compute_working_sets): Use gcov_summary struct.
18689 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
18690 of GCOV_COUNTERS_SUMMABLE.
18691 (GCOV_COUNTERS_SUMMABLE): Remove.
18692 (GCOV_FIRST_VALUE_COUNTER): Replace with
18693 GCOV_COUNTER_V_INTERVAL.
18694 (struct gcov_ctr_summary): Remove.
18695 (struct gcov_summary): Directly use fields of former
18696 gcov_ctr_summary.
18697 (compute_working_sets): Use gcov_summary struct.
18698 * gcov.c (read_count_file): Do not use ctrs fields.
18699 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
18700 struct.
18701 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
18702 struct.
18703 * profile.c: Likewise.
18704 * profile.h: Likewise.
18705
18706 2018-06-05 Martin Liska <mliska@suse.cz>
18707
18708 PR gcov-profile/84846
18709 * gcov.c (output_lines): Print working directory only
18710 in intermediate format.
18711
18712 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
18713
18714 * config/s390/s390-builtin-types.def: Add void function type.
18715 * config/s390/s390-builtins.def: Use the function type for the
18716 tbeginc builtin.
18717
18718 2018-06-04 Jim Wilson <jimw@sifive.com>
18719
18720 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
18721 to int.
18722 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
18723 and maybe_eh_return. Change regno to unsigned int. Use new args to
18724 handle EH_RETURN_DATA_REGNO registers properly.
18725 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
18726 (riscv_expand_epilogue): Update comment. Change argument name and
18727 type. Update code to use new name and type. Pass new args to
18728 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
18729 EXCEPTION_RETURN.
18730 * config/riscv/riscv.md (NORMAL_RETURN): New.
18731 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
18732 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
18733 (eh_return): Call gen_eh_return_internal and emit barrier.
18734 (eh_return_internal): Call riscv_expand_epilogue.
18735
18736 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
18737
18738 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
18739 bit_insertion field and declare can_be_merged_into method.
18740 (merged_store_group::can_be_merged_into): New method.
18741 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
18742 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
18743 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
18744
18745 2018-06-04 Richard Biener <rguenther@suse.de>
18746
18747 PR tree-optimization/85955
18748 * builtins.c (fold_builtin_sincos): Convert pointers to
18749 destination to appropriate type before dereferencing.
18750
18751 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
18752
18753 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
18754
18755 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
18756
18757 * expr.c (expand_expr_real_1): Force the operand into memory if
18758 its TYPE_MODE is BLKmode and if there is no integer mode for
18759 the number of bits being extracted.
18760
18761 2018-06-04 Jakub Jelinek <jakub@redhat.com>
18762
18763 PR target/85832
18764 PR target/86036
18765 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18766 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
18767
18768 2018-06-04 Richard Biener <rguenther@suse.de>
18769
18770 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
18771 (cleanup_tree_cfg_noloop): ... single caller. Do
18772 start_recording_case_labels later.
18773
18774 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
18775
18776 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
18777 to _IMMINTRIN_H_INCLUDED.
18778 * config/i386/pconfigintrin.h: Ditto.
18779 * config/i386/waitpkgintrin.h: Ditto.
18780 * config/i386/immintrin.h: Add includes for sgxintrin.h,
18781 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
18782 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
18783 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
18784 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
18785 waitpkgintrin.h and cldemoteintrin.h.
18786
18787 2018-06-04 Richard Biener <rguenther@suse.de>
18788
18789 PR tree-optimization/86038
18790 * tracer.c (find_best_successor): Check probability for
18791 being initialized, bail out if not.
18792
18793 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
18794
18795 PR target/86003
18796 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
18797 of bits to ignore when comparing architectures.
18798
18799 2018-06-04 Jakub Jelinek <jakub@redhat.com>
18800
18801 PR tree-optimization/69615
18802 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
18803 maximum or minimum of the type, try to merge it also as if
18804 range1 is + [-, x - 1] or + [x + 1, -].
18805
18806 PR c++/86025
18807 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
18808
18809 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
18810
18811 PR tree-optimization/86034
18812 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
18813 the unsigned bitfield type in a bit insertion sequence if it does not
18814 have a larger precision than the bitfield size.
18815 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
18816
18817 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
18818
18819 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
18820
18821 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
18822
18823 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
18824 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
18825 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
18826 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
18827
18828 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
18829
18830 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
18831 Disable -fdelete-null-pointer-checks for ELF toolchain.
18832
18833 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
18834 Kito Cheng <kito.cheng@gmail.com>
18835
18836 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
18837 (nds32le-*-*, nds32be-*-*): Integrate checking process.
18838 (nds32*-*-*): Add glibc and uclibc conditions.
18839 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
18840 (TARGET_EXCEPT_UNWIND_INFO): Define.
18841 * config/nds32/elf.h: New file.
18842 * config/nds32/linux.h: New file.
18843 * config/nds32/nds32-elf.opt: New file.
18844 * config/nds32/nds32-linux.opt: New file.
18845 * config/nds32/nds32-fp-as-gp.c
18846 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
18847 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
18848 TARGET_LINUX_ABI.
18849 (nds32_asm_file_end): Ditto.
18850 (nds32_print_operand): Ditto.
18851 (nds32_insert_attributes): Ditto.
18852 (nds32_init_libfuncs): New function.
18853 (TARGET_HAVE_TLS): Define.
18854 (TARGET_INIT_LIBFUNCS): Define.
18855 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
18856 spec content.
18857 (TARGET_ELF): Apply different mcmodel setting.
18858 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
18859 been migrated into elf.h and linux.h files.
18860 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
18861 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
18862 (mcmodel): The content has been migrated into nds32-elf.opt and
18863 nds32-linux.opt files.
18864 * config/nds32/t-elf: New file.
18865 * config/nds32/t-linux: New file.
18866
18867 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
18868 Shiva Chen <shiva0217@gmail.com>
18869
18870 * config/nds32/constants.md (unspec_volatile_element): Add
18871 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
18872 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
18873 optimization.
18874 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
18875 (make_pass_nds32_fp_as_gp): Declare.
18876 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
18877 optmization pass.
18878 (nds32_asm_function_end_prologue): Remove unused asm output.
18879 (nds32_asm_function_begin_epilogue): Remove unused asm output.
18880 (nds32_asm_file_start): Output necessary fp_as_gp information.
18881 (nds32_option_override): Adjust register usage.
18882 (nds32_expand_prologue): Consider fp_as_gp situation.
18883 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
18884 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
18885 (epilogue): Ditto.
18886 (return): Ditto.
18887 (simple_return): Ditto.
18888 (omit_fp_begin): Output special directive for fp_as_gp.
18889 (omit_fp_end): Output special directive for fp_as_gp.
18890 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
18891 mforbid-fp-as-gp): New options.
18892
18893 2018-06-01 Mark Wielaard <mark@klomp.org>
18894
18895 * dwarf2out.c (dwarf2out_finish): Remove generation of
18896 DW_AT_loclists_base.
18897
18898 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
18899
18900 * gimple-ssa-store-merging.c: Include gimple-fold.h.
18901 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
18902 (struct merged_store_group): Add bit_insertion field.
18903 (dump_char_array): Use standard hexadecimal format.
18904 (merged_store_group::merged_store_group): Set bit_insertion to false.
18905 (merged_store_group::apply_stores): Use optimal buffer size. Deal
18906 with BIT_INSERT_EXPR stores. Move up code updating the mask and
18907 also print the mask in the dump file.
18908 (pass_store_merging::gate): Minor tweak.
18909 (imm_store_chain_info::coalesce_immediate): Fix wrong association
18910 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
18911 stores with INTEGER_CST stores.
18912 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
18913 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
18914 and use it throughout. Generate bit insertion sequences if need be.
18915 (pass_store_merging::process_store): Remove redundant condition.
18916 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
18917
18918 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
18919
18920 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
18921 the 128-bit floating point types. Fix function comment.
18922
18923 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18924
18925 * config/aarch64/aarch64-simd.md
18926 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
18927 mnemonics.
18928 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
18929 mnemonics.
18930
18931 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
18932
18933 PR tree-optimization/85989
18934 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
18935 variable.
18936 (backprop::intersect_uses): Check it when deciding whether this
18937 is a backedge reference.
18938 (backprop::process_block): Add each phi to m_visited_phis
18939 after visiting it, then clear it at the end.
18940
18941 2018-06-01 Richard Biener <rguenther@suse.de>
18942
18943 * tree-vectorizer.h (vect_dr_stmt): New function.
18944 (vect_get_load_cost): Adjust.
18945 (vect_get_store_cost): Likewise.
18946 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
18947 Use vect_dr_stmt instead of DR_SMTT.
18948 (vect_record_base_alignments): Likewise.
18949 (vect_calculate_target_alignment): Likewise.
18950 (vect_compute_data_ref_alignment): Likewise and make static.
18951 (vect_update_misalignment_for_peel): Likewise.
18952 (vect_verify_datarefs_alignment): Likewise.
18953 (vector_alignment_reachable_p): Likewise.
18954 (vect_get_data_access_cost): Likewise. Pass down
18955 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
18956 (vect_get_peeling_costs_all_drs): Likewise.
18957 (vect_peeling_hash_get_lowest_cost): Likewise.
18958 (vect_enhance_data_refs_alignment): Likewise.
18959 (vect_find_same_alignment_drs): Likewise.
18960 (vect_analyze_data_refs_alignment): Likewise.
18961 (vect_analyze_group_access_1): Likewise.
18962 (vect_analyze_group_access): Likewise.
18963 (vect_analyze_data_ref_access): Likewise.
18964 (vect_analyze_data_ref_accesses): Likewise.
18965 (vect_vfa_segment_size): Likewise.
18966 (vect_small_gap_p): Likewise.
18967 (vectorizable_with_step_bound_p): Likewise.
18968 (vect_prune_runtime_alias_test_list): Likewise.
18969 (vect_analyze_data_refs): Likewise.
18970 (vect_supportable_dr_alignment): Likewise.
18971 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
18972 (vect_gen_prolog_loop_niters): Likewise.
18973 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
18974 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
18975 modify DR_STMT.
18976 (vect_recog_mask_conversion_pattern): Likewise.
18977 (vect_try_gather_scatter_pattern): Likewise.
18978 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
18979 to vect_get_store_cost.
18980 (vect_get_store_cost): Get stmt_info instead of DR.
18981 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
18982 (vect_get_load_cost): Get stmt_info instead of DR.
18983
18984 2018-06-01 Richard Biener <rguenther@suse.de>
18985
18986 PR middle-end/86017
18987 * gimple-fold.c (var_decl_component_p): Also allow offsetted
18988 vars wrapped in MEM_REFs.
18989
18990 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
18991
18992 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
18993 Fix subreg tests so that we only return a choice between
18994 GENERAL_REGS and FP_REGS if the original classes included both.
18995
18996 2018-06-01 Richard Biener <rguenther@suse.de>
18997
18998 PR ipa/85960
18999 * tree-ssa-structalias.c (get_function_part_constraint):
19000 Handle NULL fi->decl.
19001 (find_func_aliases_for_call): Properly handle indirect
19002 fi from direct call.
19003 (find_func_clobbers): Likewise.
19004 (ipa_pta_execute): Likewise.
19005 (create_variable_info_for): For functions that are ifunc_resolver
19006 resolve to a varinfo that contains the result of the resolver call.
19007 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
19008 aliases.
19009
19010 2018-05-31 Michael Collison <michael.collison@arm.com>
19011
19012 * config/aarch64/aarch64.md:
19013 (*fix_to_zero_extenddfdi2): New pattern.
19014 * gcc.target/aarch64/fix_extend1.c: New testcase.
19015
19016 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
19017
19018 PR middle-end/78809
19019 PR middle-end/83026
19020 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
19021 and BUILT_IN_STRNCMP_EQ.
19022 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
19023 BUILT_IN_STRNCMP_EQ.
19024 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
19025 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19026 (gimple_fold_builtin): Likewise.
19027 * tree-ssa-strlen.c (compute_string_length): New function.
19028 (determine_min_obsize): New function.
19029 (handle_builtin_string_cmp): New function to handle calls to
19030 string compare functions.
19031 (strlen_optimize_stmt): Add handling to builtin string compare
19032 calls.
19033 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
19034 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19035 * tree.c (build_common_builtin_nodes): Add new defines of
19036 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
19037
19038 2018-05-31 Jakub Jelinek <jakub@redhat.com>
19039
19040 PR target/85984
19041 * bb-reorder.c (pass_partition_blocks::gate): Return false for
19042 functions with naked attribute.
19043
19044 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
19045
19046 * config/i386/sse.md (avx_vec_concat<mode>):
19047 Substitute concat_tg_mode mode attribute with xtg_mode.
19048 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
19049 (concat_tg_mode): Remove mode attribute.
19050
19051 2018-05-31 Martin Sebor <msebor@redhat.com>
19052
19053 PR c/82063
19054 * calls.c (alloc_max_size): Correct a logic error/typo.
19055 Treat excessive arguments as infinite. Warn for invalid arguments.
19056 * doc/invoke.texi (-Walloc-size-larger-than): Update.
19057
19058 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
19059
19060 PR target/85829
19061 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
19062 and movx for Haswell.
19063
19064 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
19065 Cesar Philippidis <cesar@codesourcery.com>
19066
19067 PR middle-end/85879
19068 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
19069 when emitting error on private/firstprivate reductions.
19070 * omp-low.c (lower_omp_target): Avoid reference-type processing
19071 on pointers for firstprivate clause.
19072
19073 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
19074
19075 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
19076 (st1x2): Likewise.
19077 (st1x3): Likewise.
19078 * config/aarch64/aarch64-simd.md
19079 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
19080 (aarch64_ld1_x3_<mode>): Likewise
19081 (aarch64_st1x2<VALLDIF:mode>): Likewise
19082 (aarch64_st1_x2_<mode>): Likewise
19083 (aarch64_st1x3<VALLDIF:mode>): Likewise
19084 (aarch64_st1_x3_<mode>): Likewise
19085 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
19086 (vld1_s8_x3): Likewise.
19087 (vld1_u16_x3): Likewise.
19088 (vld1_s16_x3): Likewise.
19089 (vld1_u32_x3): Likewise.
19090 (vld1_s32_x3): Likewise.
19091 (vld1_u64_x3): Likewise.
19092 (vld1_s64_x3): Likewise.
19093 (vld1_f16_x3): Likewise.
19094 (vld1_f32_x3): Likewise.
19095 (vld1_f64_x3): Likewise.
19096 (vld1_p8_x3): Likewise.
19097 (vld1_p16_x3): Likewise.
19098 (vld1_p64_x3): Likewise.
19099 (vld1q_u8_x3): Likewise.
19100 (vld1q_s8_x3): Likewise.
19101 (vld1q_u16_x3): Likewise.
19102 (vld1q_s16_x3): Likewise.
19103 (vld1q_u32_x3): Likewise.
19104 (vld1q_s32_x3): Likewise.
19105 (vld1q_u64_x3): Likewise.
19106 (vld1q_s64_x3): Likewise.
19107 (vld1q_f16_x3): Likewise.
19108 (vld1q_f32_x3): Likewise.
19109 (vld1q_f64_x3): Likewise.
19110 (vld1q_p8_x3): Likewise.
19111 (vld1q_p16_x3): Likewise.
19112 (vld1q_p64_x3): Likewise.
19113 (vst1_s64_x2): Likewise.
19114 (vst1_u64_x2): Likewise.
19115 (vst1_f64_x2): Likewise.
19116 (vst1_s8_x2): Likewise.
19117 (vst1_p8_x2): Likewise.
19118 (vst1_s16_x2): Likewise.
19119 (vst1_p16_x2): Likewise.
19120 (vst1_s32_x2): Likewise.
19121 (vst1_u8_x2): Likewise.
19122 (vst1_u16_x2): Likewise.
19123 (vst1_u32_x2): Likewise.
19124 (vst1_f16_x2): Likewise.
19125 (vst1_f32_x2): Likewise.
19126 (vst1_p64_x2): Likewise.
19127 (vst1q_s8_x2): Likewise.
19128 (vst1q_p8_x2): Likewise.
19129 (vst1q_s16_x2): Likewise.
19130 (vst1q_p16_x2): Likewise.
19131 (vst1q_s32_x2): Likewise.
19132 (vst1q_s64_x2): Likewise.
19133 (vst1q_u8_x2): Likewise.
19134 (vst1q_u16_x2): Likewise.
19135 (vst1q_u32_x2): Likewise.
19136 (vst1q_u64_x2): Likewise.
19137 (vst1q_f16_x2): Likewise.
19138 (vst1q_f32_x2): Likewise.
19139 (vst1q_f64_x2): Likewise.
19140 (vst1q_p64_x2): Likewise.
19141 (vst1_s64_x3): Likewise.
19142 (vst1_u64_x3): Likewise.
19143 (vst1_f64_x3): Likewise.
19144 (vst1_s8_x3): Likewise.
19145 (vst1_p8_x3): Likewise.
19146 (vst1_s16_x3): Likewise.
19147 (vst1_p16_x3): Likewise.
19148 (vst1_s32_x3): Likewise.
19149 (vst1_u8_x3): Likewise.
19150 (vst1_u16_x3): Likewise.
19151 (vst1_u32_x3): Likewise.
19152 (vst1_f16_x3): Likewise.
19153 (vst1_f32_x3): Likewise.
19154 (vst1_p64_x3): Likewise.
19155 (vst1q_s8_x3): Likewise.
19156 (vst1q_p8_x3): Likewise.
19157 (vst1q_s16_x3): Likewise.
19158 (vst1q_p16_x3): Likewise.
19159 (vst1q_s32_x3): Likewise.
19160 (vst1q_s64_x3): Likewise.
19161 (vst1q_u8_x3): Likewise.
19162 (vst1q_u16_x3): Likewise.
19163 (vst1q_u32_x3): Likewise.
19164 (vst1q_u64_x3): Likewise.
19165 (vst1q_f16_x3): Likewise.
19166 (vst1q_f32_x3): Likewise.
19167 (vst1q_f64_x3): Likewise.
19168 (vst1q_p64_x3): Likewise.
19169
19170 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
19171
19172 * config/msp430/msp430.c (msp430_output_labelref): Prepend
19173 user_label_prefix to name.
19174
19175 * tree-core.h: Update comment about the format of NAME string
19176 passed to handler in attribute_spec.
19177
19178 * config/msp430/msp430.md: Remove erroneous subreg expression from
19179 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
19180 zero_extend{q,h}isi2.
19181
19182 2018-05-30 Borislav Petkov <bp@suse.de>
19183
19184 * doc/extend.texi: Document some architecture specific
19185 constraints and sort entries.
19186
19187 2018-05-30 Martin Sebor <msebor@redhat.com>
19188
19189 PR middle-end/85369
19190 * builtins.c (expand_builtin_stpcpy_1): New function.
19191 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
19192 only if the former succeeds.
19193
19194 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
19195
19196 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
19197 in saphira.
19198
19199 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
19200
19201 * doc/invoke.texi (-flinker-output): Document
19202
19203 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
19204
19205 * passes.c (ipa_write_summaries): Only modify statements if body
19206 is in memory.
19207 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
19208 incrementally linking.
19209 (ipa_passes): Likewise.
19210 * lto-cgraph.c (lto_output_node): When incrementally linking do not
19211 pass down resolution info.
19212 * common.opt (flag_incremental_link): Update info.
19213 * gcc.c (plugin specs): Turn flinker-output=* to
19214 -plugin-opt=-linker-output-known
19215 * toplev.c (compile_file): Also cut compilation when doing incremental
19216 link.
19217 * flag-types. (enum lto_partition_model): Add
19218 LTO_LINKER_OUTPUT_NOLTOREL.
19219 (invoke.texi): Add -flinker-output docs.
19220 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
19221 link same way as WPA; do not stream in dead initializers.
19222
19223 * dwarf2out.c (dwarf2out_die_ref_for_decl,
19224 darf2out_register_external_decl): Support incremental link.
19225
19226 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
19227
19228 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
19229
19230 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
19231
19232 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
19233 it down to simple_object_copy_lto_debug_sections.
19234 (run_gcc): Determine incremental LTO link time and configure
19235 lto1 into non-wpa mode, disable renaming of debug sections.
19236
19237 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
19238
19239 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
19240 descriptions of various incorrectly documented functions.
19241
19242 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
19243
19244 Revert:
19245 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
19246 address check not strict.
19247
19248 2018-05-30 Richard Biener <rguenther@suse.de>
19249
19250 PR tree-optimization/85964
19251 * tracer.c (better_p): Drop initialized count check, we only
19252 call the function with initialized counts now.
19253 (find_best_successor): Do find a best edge if one
19254 has uninitialized count.
19255 (find_best_predecessor): Likewise. Do BB frequency check only
19256 if count is initialized.
19257
19258 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
19259
19260 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
19261 (aarch64_ldrstr_offset_compare): New.
19262 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
19263 load/store orderings.
19264 (aarch64_gen_adjusted_ldpstp): Likewise.
19265
19266 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
19267
19268 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
19269 Check for subset of GENERAL_REGS and FP_REGS.
19270 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
19271 r=w alternative.
19272
19273 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
19274
19275 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
19276 and wi::to_poly_offset. Add the current offset and then check
19277 whether the sum fits, rather than using an unchecked addition of
19278 a checked term. Check for a shwi rather than a uhwi.
19279 * expr.c (get_bit_range): Use tree_to_poly_uint64.
19280 (store_constructor): Use poly_int_tree_p.
19281 (expand_expr_real_1): Likewise.
19282 * function.c (assign_temp): Likewise.
19283 * fold-const.c (const_binop): Use poly_int_tree_p and
19284 wi::to_poly_offset.
19285 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
19286 division.
19287 * ipa-icf-gimple.c (func_checker::compare_operand): Use
19288 to_poly_offset for MEM offsets.
19289 * ipa-icf.c (sem_variable::equals): Likewise.
19290 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
19291 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
19292 wi::to_poly_offset for BIT_FIELD_REF offsets.
19293 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
19294 wi::to_poly_offset.
19295 * var-tracking.c (emit_note_insn_var_location): Use
19296 tree_to_poly_uint64.
19297
19298 2018-05-29 Jim Wilson <jimw@sifive.com>
19299
19300 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
19301
19302 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
19303
19304 PR target/85950
19305 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
19306 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
19307 sequence.
19308 (sse4_1_round<mode>2): Use nonimmediate_operand
19309 for operand 1 predicate.
19310
19311 2018-05-29 Martin Sebor <msebor@redhat.com>
19312 Richard Biener <rguenther@suse.de>
19313
19314 PR testsuite/85888
19315 * calls.c (get_size_range): Call determine_value_range instead
19316 of get_value_range..
19317 * tree-vrp.h (determine_value_range): Declared new function.
19318 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
19319
19320 2018-05-29 Richard Biener <rguenther@suse.de>
19321
19322 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
19323 sure to use non-pattern stmts for get_earlier_stmt arguments.
19324 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
19325 called on pattern stmts.
19326 (get_later_stmt): Likewise.
19327
19328 2018-05-29 Martin Liska <mliska@suse.cz>
19329
19330 PR gcov-profile/85759
19331 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
19332 env variables.
19333
19334 2018-05-29 Jakub Jelinek <jakub@redhat.com>
19335
19336 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
19337 VEC_UNPACK_*_EXPR.
19338 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
19339 VEC_PACK_*_EXPR.
19340
19341 PR target/85918
19342 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
19343 VEC_PACK_FLOAT_EXPR): New tree codes.
19344 * tree-pretty-print.c (op_code_prio): Handle
19345 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
19346 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
19347 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
19348 * tree-inline.c (estimate_operator_cost): Likewise.
19349 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
19350 * fold-const.c (const_binop): Likewise.
19351 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
19352 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
19353 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
19354 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
19355 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
19356 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
19357 * expr.c (expand_expr_real_2): Likewise.
19358 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
19359 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
19360 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
19361 optabs.
19362 * optabs.c (expand_widen_pattern_expr): For
19363 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
19364 sign from result type rather than operand's type.
19365 (expand_binop_directly): For vec_packu_float_optab and
19366 vec_packs_float_optab allow result type to be different from operand's
19367 type.
19368 * optabs-tree.c (optab_for_tree_code): Handle
19369 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
19370 VEC_PACK_FLOAT_EXPR. Formatting fixes.
19371 * tree-vect-generic.c (expand_vector_operations_1): Handle
19372 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
19373 VEC_PACK_FLOAT_EXPR.
19374 * tree-vect-stmts.c (supportable_widening_operation): Handle
19375 FIX_TRUNC_EXPR.
19376 (supportable_narrowing_operation): Handle FLOAT_EXPR.
19377 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
19378 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
19379 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
19380 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
19381 mode attributes.
19382 (vec_pack<floatprefix>_float_<mode>): New expander.
19383 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
19384 attributes.
19385 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
19386 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
19387 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
19388 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
19389 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
19390 Document.
19391 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
19392 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
19393 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
19394 VEC_PACK_FLOAT_EXPR): Document.
19395
19396 2018-05-29 Richard Biener <rguenther@suse.de>
19397
19398 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
19399 member.
19400 (stmt_vec_info_vec): Make pointer.
19401 (init_stmt_vec_info_vec): Remove.
19402 (free_stmt_vec_info_vec): Likewise.
19403 (set_stmt_vec_info_vec): New function.
19404 (free_stmt_vec_infos): Likewise.
19405 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
19406 (set_vinfo_for_stmt): Likewise.
19407 (get_earlier_stmt): Likewise.
19408 (get_later_stmt): Likewise.
19409 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
19410 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
19411 (vec_info::~vec_info): Free stmt_vec_infos.
19412 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
19413 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
19414 (pass_slp_vectorize::execute): Likewise.
19415 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
19416 (free_stmt_vec_info_vec): Likewise.
19417 (set_stmt_vec_info_vec): New function.
19418 (free_stmt_vec_infos): Likewise.
19419 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
19420 the global stmt_vec_info_vec.
19421 * tree-parloops.c (gather_scalar_reductions): Use
19422 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
19423 vector.
19424
19425 2018-05-29 Richard Biener <rguenther@suse.de>
19426
19427 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
19428
19429 2018-05-29 Martin Liska <mliska@suse.cz>
19430 David Malcolm <dmalcolm@redhat.com>
19431
19432 * vec.c (test_reverse): New.
19433 (vec_c_tests): Add new test.
19434 * vec.h (vl_ptr>::reverse): New function.
19435
19436 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
19437
19438 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
19439
19440 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
19441 and later.
19442
19443 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
19444
19445 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
19446
19447 2018-05-28 Richard Biener <rguenther@suse.de>
19448
19449 PR tree-optimization/85933
19450 * tree-vect-data-refs.c (vect_record_base_alignments): Only
19451 look at stmts marked as vectorizable.
19452
19453 2018-05-28 Richard Biener <rguenther@suse.de>
19454
19455 PR tree-optimization/85934
19456 * tree-vect-generic.c (expand_vector_operations_1): Hoist
19457 vector boolean check before scalar optimization.
19458
19459 2018-05-28 Jakub Jelinek <jakub@redhat.com>
19460
19461 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
19462 for armv5te.
19463
19464 2018-05-28 Mark Wielaard <mark@klomp.org>
19465
19466 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
19467 if it is an expression containing a minus sign.
19468
19469 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
19470
19471 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
19472
19473 2018-05-27 Paul Koning <ni1d@arrl.net>
19474
19475 * config/pdp11/pdp11.md (truncsihi2): Remove.
19476
19477 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
19478 Chung-Ju Wu <jasonwucj@gmail.com>
19479
19480 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
19481 implementation.
19482 (unaligned_store_dw): Ditto.
19483 * config/nds32/nds32-memory-manipulation.c
19484 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
19485 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
19486 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
19487 (emit_setmem_word_loop): Rename to ...
19488 (emit_setmem_doubleword_loop): ... this.
19489 (nds32_gen_dup_4_byte_to_word_value): New function.
19490 (nds32_gen_dup_8_byte_to_double_word_value): New function.
19491 (nds32_expand_setmem_loop): Refine implementation.
19492 (nds32_expand_setmem_loop_v3m): Ditto.
19493 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
19494 pattern.
19495
19496 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
19497
19498 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
19499
19500 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
19501
19502 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
19503 (nds32_init_machine_status): Initialize machine->attr_naked_p and
19504 machine->attr_no_prologue_p.
19505 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
19506 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
19507 (nds32_expand_epilogue): Consider attr_naked_p.
19508 (nds32_expand_epilogue_v3pop): Likewise.
19509 (nds32_can_use_return_insn): Likewise.
19510 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
19511 attr_no_prologue_p fields.
19512 * config/nds32/nds32.opt (mret-in-naked-func): New option.
19513
19514 2018-05-27 Jakub Jelinek <jakub@redhat.com>
19515
19516 PR target/85918
19517 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
19518 attributes.
19519 * config/i386/sse.md
19520 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
19521 Rename to ...
19522 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
19523 ... this.
19524 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
19525 Rename to ...
19526 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
19527 ... this.
19528 (*<floatsuffix>floatv2div2sf2): Rename to ...
19529 (*float<floatunssuffix>v2div2sf2): ... this.
19530 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
19531 (float<floatunssuffix>v2div2sf2_mask): ... this.
19532 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
19533 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
19534 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
19535 to ...
19536 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
19537 ... this.
19538 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
19539 Rename to ...
19540 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
19541 ... this.
19542 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
19543 Rename to ...
19544 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
19545 ... this.
19546 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
19547 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
19548 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
19549 gen_ufix_truncv8dfv8si2.
19550 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
19551 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
19552 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
19553 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
19554 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
19555 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
19556 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
19557 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
19558
19559 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
19560
19561 PR target/85900
19562 PR target/85345
19563 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
19564
19565 2018-05-25 Jim Wilson <jimw@sifive.com>
19566
19567 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
19568 * config/riscv/riscv.c (struct machine_function): Add
19569 interrupt_handler_p and attribute_checked_p fields.
19570 (riscv_attribute_table): Add interrupt.
19571 (riscv_interrupt_type_p): New.
19572 (riscv_save_reg_p): Save extra regs for interrupt handler.
19573 (riscv_use_save_libcall): Return false for interrupt handler.
19574 (riscv_first_stack_step): Add forward declaration.
19575 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
19576 for interrupt handler with large frame. Use it for saved reg list.
19577 (riscv_expand_prologue): Move flag_stack_usage_info support to
19578 eliminate duplication.
19579 (riscv_expand_epilogue): Generate mret for interrupt handler.
19580 (riscv_epilogue_uses): New.
19581 (riscv_can_use_return_insn): Return false for interrupt handler.
19582 (riscv_function_ok_for_sibcall): Likewise.
19583 (riscv_set_current_function): Add interrupt handler support.
19584 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
19585 * config/riscv/riscv.md (UNSPECV_MRET): New.
19586 (GP_REGNUM): New.
19587 (riscv_frflags, riscv_fsflags): Use tab after opcode.
19588 (riscv_mret): New.
19589 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
19590
19591 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
19592
19593 PR tree-optimization/85712
19594 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
19595 this candidate has already been replaced in-situ by a copy.
19596
19597 2018-05-25 Jason Merrill <jason@redhat.com>
19598
19599 PR c++/80485 - inline function non-zero address.
19600 * symtab.c (nonzero_address): Check DECL_COMDAT.
19601
19602 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
19603
19604 PR target/83628
19605 * config/alpha/alpha.md (ashlsi3): New insn pattern.
19606 (*ashlsi_se): Rename from *ashldi_se. Define as sign
19607 extension of SImode operation. Use const123_operand predicate.
19608 (*saddsi_1): Remove.
19609 (*saddl_se_1): Ditto.
19610 (*ssubsi_1): Ditto.
19611 (*ssubl_se_1): Ditto.
19612 * config/alpha/predicates.md (const123_operand): New predicate.
19613 * config/alpha/constraints.md (P): Use IN_RANGE.
19614
19615 2018-05-25 Richard Biener <rguenther@suse.de>
19616
19617 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
19618 defaulted to true.
19619 (ref_maybe_used_by_stmt_p): Likewise.
19620 (stmt_may_clobber_ref_p): Likewise.
19621 (stmt_may_clobber_ref_p_1): Likewise.
19622 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
19623 and pass it along.
19624 (ref_maybe_used_by_stmt_p): Likewise.
19625 (stmt_may_clobber_ref_p): Likewise.
19626 (stmt_may_clobber_ref_p_1): Likewise.
19627 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
19628 the alias oracle to disambiguate DRs with stmts DR analysis
19629 couldn't handle.
19630 (vect_analyze_data_refs): Do not give up on not analyzable
19631 DRs for BB vectorization. Remove code truncating the dataref
19632 vector.
19633
19634 2018-05-25 Jakub Jelinek <jakub@redhat.com>
19635
19636 PR target/85832
19637 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
19638 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
19639 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
19640
19641 2018-05-25 Richard Biener <rguenther@suse.de>
19642
19643 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
19644 function, combining stmt data ref gathering and fatal analysis
19645 parts.
19646 (vect_analyze_data_refs): Remove now redudnant code and simplify.
19647 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
19648 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
19649 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
19650 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
19651
19652 2018-05-25 Bin Cheng <bin.cheng@arm.com>
19653
19654 PR tree-optimization/85720
19655 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
19656 SCC if all partitions are builtins.
19657 (version_loop_by_alias_check): New parameter. Generate cancelable
19658 runtime alias check if all partitions are builtins.
19659 (distribute_loop): Update call to above function.
19660
19661 2018-05-25 Bin Cheng <bin.cheng@arm.com>
19662
19663 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
19664 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
19665 (parm_default_def_partition_arg): Ditto.
19666 (set_parm_default_def_partition): Ditto.
19667 (get_parm_default_def_partitions): Ditto and make it static.
19668 (get_undefined_value_partitions): Ditto and make it static.
19669 (remove_ssa_form): Refactor call to init_var_map here.
19670 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
19671 computation for loop region.
19672 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
19673 (register_default_def): Delete.
19674 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
19675 (parm_default_def_partition_arg): Ditto.
19676 (set_parm_default_def_partition): Ditto.
19677 (get_parm_default_def_partitions): Ditto and make it static.
19678 (get_undefined_value_partitions): Ditto and make it static.
19679 (coalesce_with_default, coalesce_with_default): Update comment.
19680 (create_coalesce_list_for_region): New func factored out from
19681 create_outofssa_var_map.
19682 (populate_coalesce_list_for_outofssa): New func factored out from
19683 create_outofssa_var_map and coalesce_ssa_name.
19684 (create_outofssa_var_map): Delete.
19685 (coalesce_ssa_name): Refactor to support live range computation.
19686 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
19687 (get_parm_default_def_partitions): Delete.
19688 (get_undefined_value_partitions): Ditto.
19689 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
19690 computation for loop region.
19691 (new_tree_live_info, loe_visit_block): Ditto.
19692 (live_worklist, set_var_live_on_entry): Ditto.
19693 (calculate_live_on_exit, verify_live_on_entry): Ditto.
19694 * tree-ssa-live.h (struct _var_map): New fields.
19695 (init_var_map): Change decl.
19696 (region_contains_p): New.
19697
19698 2018-05-25 Bin Cheng <bin.cheng@arm.com>
19699
19700 * tree-ssa-live.h (live_merge_and_clear): Delete.
19701
19702 2018-05-25 Richard Biener <rguenther@suse.de>
19703
19704 PR c++/85912
19705 * tree-dump.c (dequeue_and_dump): Remove access to removed
19706 operand 2 of a SWITCH_EXPR.
19707
19708 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19709
19710 * doc/sourcebuild.texi (vect_double_cond_arith): Include
19711 multiplication and division.
19712 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
19713 (cond_udiv@var{m}, cond_umod@var{m}): Document.
19714 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
19715 (cond_udiv_optab, cond_umod_optab): New optabs.
19716 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
19717 (IFN_COND_RDIV): New internal functions.
19718 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
19719 TRUNC_MOD_EXPR and RDIV_EXPR.
19720 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
19721 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
19722 New unspecs.
19723 (SVE_INT_BINARY): Include mult.
19724 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
19725 (optab, sve_int_op): Handle mult.
19726 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
19727 UNSPEC_COND_DIV.
19728 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
19729 for SVE_INT_BINARY_SD.
19730
19731 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19732
19733 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
19734 (optab, sve_int_op): Handle div and udiv.
19735 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
19736 for SVE_INT_BINARY_SD.
19737 (*<optab><mode>3): New insn for the same.
19738
19739 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19740
19741 * tree-vect-patterns.c: Include predict.h.
19742 (vect_recog_divmod_pattern): Restrict check for division support
19743 to when optimizing for size.
19744
19745 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19746
19747 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
19748 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
19749 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
19750 (gimple_match_op::set_op): Likewise.
19751 (gimple_resimplify4): Declare.
19752 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
19753 (expr::gen_transform): Likewise.
19754 (decision_tree::gen): Generate a simplification routine for 4 operands.
19755 * gimple-match-head.c (gimple_simplify): Add an overload for
19756 4 operands. In the top-level function, handle up to 4 call
19757 arguments and call gimple_resimplify4.
19758 (gimple_resimplify4): New function.
19759 (build_call_internal): Pass a fourth operand.
19760 (maybe_push_to_seq): Likewise.
19761 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
19762 Fold VEC_COND_EXPRs of an operation and a default value into
19763 an IFN_COND_* function if possible.
19764 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
19765 New unspecs.
19766 (SVE_COND_FP_BINARY): Include them.
19767 (optab, sve_fp_op): Handle them.
19768 (SVE_INT_BINARY_REV): New code iterator.
19769 (SVE_COND_FP_BINARY_REV): New int iterator.
19770 (commutative): New int attribute.
19771 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
19772 Declare.
19773 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
19774 function.
19775 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
19776 (*cond_<optab><mode>): New patterns for reversed operands.
19777
19778 2018-05-25 Richard Biener <rguenther@suse.de>
19779
19780 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
19781 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
19782 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
19783 (STMT_VINFO_GROUPED_ACCESS): Adjust.
19784 * tree-vect-data-refs.c (everywhere): Adjust users.
19785 * tree-vect-loop.c (everywhere): Likewise.
19786 * tree-vect-slp.c (everywhere): Likewise.
19787 * tree-vect-stmts.c (everywhere): Likewise.
19788 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
19789
19790 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19791
19792 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
19793 Rename to...
19794 (gcc_cv_as_section_exclude): ... this.
19795 Try Solaris as #exclude syntax.
19796 * configure: Regenerate.
19797 * config.in: Regenerate.
19798 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
19799 SECTION_EXCLUDE.
19800 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
19801 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
19802
19803 * varasm.c (default_elf_asm_named_section): Don't check if
19804 HAVE_GAS_SECTION_EXCLUDE is defined.
19805
19806 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19807
19808 * doc/md.texi: Update the documentation of the cond_* optabs
19809 to mention the new final operand. Fix GET_MODE_NUNITS call.
19810 Describe the scalar case too.
19811 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
19812 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
19813 instead of 2.
19814 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
19815 (get_conditional_internal_fn): Update comment.
19816 * tree-vect-loop.c (vectorizable_reduction): Pass the original
19817 accumulator value as a final argument to conditional functions.
19818 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
19819 a define_expand and add an "else" operand. Assert for now that
19820 the else operand is equal to operand 2. Use SVE_INT_BINARY and
19821 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
19822 (*cond_<optab><mode>): New patterns.
19823 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
19824 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19825 (UNSPEC_COND_EOR): Delete.
19826 (optab): Remove associated mappings.
19827 (SVE_INT_BINARY): New code iterator.
19828 (sve_int_op): Remove int attribute and add "minus" to the code
19829 attribute.
19830 (SVE_COND_INT_OP): Delete.
19831 (SVE_COND_FP_OP): Rename to...
19832 (SVE_COND_FP_BINARY): ...this.
19833
19834 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19835
19836 * optabs.c (can_reuse_operands_p): New function.
19837 (maybe_legitimize_operands): Try to reuse the results for
19838 earlier operands.
19839
19840 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
19841
19842 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
19843 Add {q} suffix to insn mnemonic.
19844
19845 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
19846
19847 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
19848 (msp430_warn_func_return): New.
19849
19850 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
19851
19852 * fold-const.c (tree_nonzero_bits): New function.
19853 * fold-const.h (tree_nonzero_bits): Likewise.
19854 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
19855 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
19856
19857 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
19858
19859 PR target/85900
19860 PR target/85345
19861 * varasm.c (assemble_alias): Check ifunc_resolver only on
19862 FUNCTION_DECL.
19863
19864 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
19865
19866 PR target/85903
19867 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
19868 when memory input operand is handled.
19869
19870 2018-05-24 Luis Machado <luis.machado@linaro.org>
19871
19872 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
19873 global.
19874 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
19875
19876 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
19877
19878 * match.pd: Delay FMA folds until after vectorization.
19879
19880 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
19881
19882 PR target/83009
19883 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
19884 address check not strict.
19885
19886 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
19887
19888 * gimple-match.h (gimple_match_op): New class.
19889 (mprts_hook): Replace parameters with a gimple_match_op *.
19890 (maybe_build_generic_op): Likewise.
19891 (gimple_simplified_result_is_gimple_val): Replace parameters with
19892 a const gimple_match_op *.
19893 (gimple_simplify): Replace code_helper * and tree * parameters with
19894 a gimple_match_op * parameter.
19895 (gimple_resimplify1): Replace code_helper *, tree and tree *
19896 parameters with a gimple_match_op * parameter.
19897 (gimple_resimplify2): Likewise.
19898 (gimple_resimplify3): Likewise.
19899 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
19900 parameters with a gimple_match_op * parameter.
19901 * gimple-match-head.c (gimple_simplify): Change prototypes of
19902 auto-generated functions to take a gimple_match_op * instead of
19903 separate code_helper * and tree * parameters. Make the same
19904 change in the top-level overload and update calls to the
19905 gimple_resimplify routines. Update calls to the auto-generated
19906 functions and to maybe_push_res_to_seq in the publicly-facing
19907 operation-specific gimple_simplify overloads.
19908 (gimple_match_op::MAX_NUM_OPS): Define.
19909 (gimple_resimplify1): Replace rcode and ops with a single res_op
19910 parameter. Update call to gimple_simplify.
19911 (gimple_resimplify2): Likewise.
19912 (gimple_resimplify3): Likewise.
19913 (mprts_hook): Replace parameters with a gimple_match_op *.
19914 (maybe_build_generic_op): Likewise.
19915 (build_call_internal): Replace type, nargs and ops with
19916 a gimple_match_op *.
19917 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
19918 with a single gimple_match_op *. Update calls to mprts_hook,
19919 build_call_internal and gimple_simplified_result_is_gimple_val.
19920 Factor out code that is common to the tree_code and combined_fn cases.
19921 * genmatch.c (expr::gen_transform): Replace tem_code and
19922 tem_ops with a gimple_match_op called tem_op. Update calls
19923 to the gimple_resimplify functions and maybe_push_res_to_seq.
19924 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
19925 res_ops. Update call to the gimple_resimplify functions.
19926 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
19927 (decision_tree::gen): Make the functions take a gimple_match_op *
19928 called res_op instead of separate res_code and res_ops parameters.
19929 Update call accordingly.
19930 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
19931 and ops with a single res_op parameter. Update calls to
19932 maybe_build_generic_op and maybe_push_res_to_seq.
19933 (fold_stmt_1): Update calls to gimple_simplify and
19934 replace_stmt_with_simplification.
19935 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
19936 and gimple_simplified_result_is_gimple_val.
19937 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
19938 gimple_simplify.
19939 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
19940 with a gimple_match_op *.
19941 (vn_nary_build_or_lookup): Likewise. Update call to
19942 vn_nary_build_or_lookup_1.
19943 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
19944 gimple_match_op *. Update calls to the gimple_resimplify routines
19945 and to gimple_simplified_result_is_gimple_val.
19946 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
19947 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
19948 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
19949 (visit_nary_op): Likewise.
19950 (visit_reference_op_load): Likewise.
19951
19952 2018-05-23 Luis Machado <luis.machado@linaro.org>
19953
19954 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
19955 modifier for printing the step amount.
19956
19957 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
19958
19959 PR target/78849
19960 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
19961 types.
19962
19963 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
19964
19965 * doc/sourcebuild.texi (Endianness): New subsubsection.
19966
19967 2018-05-23 Luis Machado <luis.machado@linaro.org>
19968
19969 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19970 <prefetch_dynamic_strides>: New const bool field.
19971 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19972 prefetch_dynamic_strides.
19973 (exynosm1_prefetch_tune): Likewise.
19974 (thunderxt88_prefetch_tune): Likewise.
19975 (thunderx_prefetch_tune): Likewise.
19976 (thunderx2t99_prefetch_tune): Likewise.
19977 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
19978 false.
19979 (aarch64_override_options_internal): Update to set
19980 PARAM_PREFETCH_DYNAMIC_STRIDES.
19981 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19982 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19983 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19984 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19985 prefetch-dynamic-strides setting.
19986
19987 2018-05-23 Luis Machado <luis.machado@linaro.org>
19988
19989 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19990 <minimum_stride>: New const int field.
19991 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19992 minimum_stride field defaulting to -1.
19993 (exynosm1_prefetch_tune): Likewise.
19994 (thunderxt88_prefetch_tune): Likewise.
19995 (thunderx_prefetch_tune): Likewise.
19996 (thunderx2t99_prefetch_tune): Likewise.
19997 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
19998 <default_opt_level>: Set to 3.
19999 (aarch64_override_options_internal): Update to set
20000 PARAM_PREFETCH_MINIMUM_STRIDE.
20001 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20002 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20003 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20004 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20005 stride is constant and is below the minimum stride threshold.
20006
20007 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20008
20009 * config/arm/arm-cpus.in (mode26): Delete.
20010 (armv4): Delete mode26 reference.
20011 * config/arm/arm.c (arm_configure_build_target): Delete use of
20012 isa_bit_mode26.
20013
20014 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
20015
20016 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
20017 New insn pattern.
20018 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
20019 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
20020 for non-SSE modes.
20021 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
20022 (floatunsdidf2): Ditto.
20023
20024 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
20025
20026 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
20027 (fixuns_trunc<mode>si2_avx512f): Ditto.
20028 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
20029 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
20030 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
20031
20032 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
20033
20034 PR rtl-optimization/79985
20035 * df-scan.c (df_insn_refs_collect): Remove special case for
20036 global registers and asm statements.
20037
20038 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
20039
20040 * extend.texi (Global Register Variables): Rewrite the bullet list.
20041 Note that the register is available for allocation. Note that access
20042 via inline asm must use constraints. Add note about async-signal
20043 handlers. Remove paragraph about automagic register selection.
20044
20045 2018-05-23 Richard Biener <rguenther@suse.de>
20046
20047 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
20048 of fixed offset from memset VN.
20049
20050 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
20051
20052 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
20053 first_interp field.
20054 (alloc_cand_and_find_basis): Initialize first_interp field.
20055 (slsr_process_mul): Modify first_interp field.
20056 (slsr_process_add): Likewise.
20057 (slsr_process_cast): Modify first_interp field for each new
20058 interpretation.
20059 (slsr_process_copy): Likewise.
20060 (dump_candidate): Dump first_interp field.
20061 (replace_mult_candidate): Process all interpretations, not just
20062 subsequent ones.
20063 (replace_rhs_if_not_dup): Likewise.
20064 (replace_one_candidate): Likewise.
20065
20066 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
20067
20068 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
20069 Add new boolean.
20070 (aarch64_needs_frame_chain): New function.
20071 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
20072
20073 2018-05-23 Sudakshina Das <sudi.das@arm.com>
20074
20075 PR target/84882
20076 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
20077 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
20078 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
20079 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
20080 as true for strict-align.
20081 (aarch64_can_inline_p): Perform checks even when callee has no
20082 attributes to check for strict alignment.
20083 * doc/extend.texi (AArch64 Function Attributes): Document
20084 no-strict-align.
20085 * doc/invoke.texi: (AArch64 Options): Likewise.
20086
20087 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
20088
20089 PR tree-optimization/85853
20090 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
20091 the handling of the root of the node to...
20092 (vect_slp_analyze_node_operations_1): ...this new function,
20093 and run the whole thing with the child nodes' def types
20094 set according to their SLP node's def type.
20095
20096 2018-05-23 Richard Biener <rguenther@suse.de>
20097
20098 PR middle-end/85874
20099 * tree-data-ref.c (create_runtime_alias_checks): Defer
20100 and ignore overflow warnings.
20101
20102 2018-05-23 Yury Gribov <tetra2005@gmail.com>
20103
20104 PR tree-optimization/85822
20105 * tree-vrp.c (is_masked_range_test): Fix handling of negative
20106 constants.
20107
20108 2018-05-23 Richard Biener <rguenther@suse.de>
20109
20110 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
20111 memset constants via native_interpret_expr.
20112
20113 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
20114
20115 PR target/85345
20116 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
20117 attribute.
20118 (cgraph_node::create_alias): Likewise.
20119 (cgraph_node::get_availability): Check ifunc_resolver instead
20120 of looking up ifunc attribute.
20121 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
20122 * varasm.c (do_assemble_alias): Likewise.
20123 (assemble_alias): Likewise.
20124 (default_binds_local_p_3): Likewise.
20125 * cgraph.h (cgraph_node): Add ifunc_resolver.
20126 (cgraph_node::only_called_directly_or_aliased_p): Return false
20127 for IFUNC resolver.
20128 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
20129 attribute.
20130 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
20131 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
20132 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
20133 instead of looking up ifunc attribute.
20134
20135 2018-05-22 Luis Machado <luis.machado@linaro.org>
20136
20137 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
20138
20139 2018-05-22 Martin Sebor <msebor@redhat.com>
20140
20141 PR middle-end/85359
20142 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
20143 only when expasion succeeds.
20144 (expand_builtin_strcmp): Same.
20145 (expand_builtin_strncmp): Same.
20146
20147 2018-05-22 Martin Sebor <msebor@redhat.com>
20148
20149 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
20150
20151 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
20152 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20153
20154 * config/aarch64/aarch64-ldpstp.md: Replace uses of
20155 aarch64_mem_pair_operand with memory_operand and delete operand swapping
20156 code.
20157 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
20158 Add check for legitimate_address.
20159 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
20160 (aarch64_swap_ldrstr_operands): New.
20161 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
20162 Define prototype.
20163
20164 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
20165 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20166
20167 * config/aarch64/aarch64.md: New patterns to generate stp
20168 and ldp.
20169 (store_pair_sw, store_pair_dw): New patterns to generate stp for
20170 single words and double words.
20171 (load_pair_sw, load_pair_dw): Likewise.
20172 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
20173 Delete.
20174 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
20175 Delete.
20176 * config/aarch64/aarch64-ldpstp.md: Modify peephole
20177 for different mode ldpstp and add peephole for merged zero stores.
20178 Likewise for loads.
20179 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
20180 Add size check.
20181 (aarch64_gen_store_pair): Rename calls to match new patterns.
20182 (aarch64_gen_load_pair): Rename calls to match new patterns.
20183 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
20184 (load_pair<DREG:mode><DREG2:mode>): ... This.
20185 (store_pair<mode>): Rename to...
20186 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
20187 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
20188 New mode iterators.
20189 (V_INT_EQUIV): Handle SImode.
20190 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
20191 New predicate.
20192
20193 2018-05-22 Martin Sebor <msebor@redhat.com>
20194
20195 PR c/85623
20196 * calls.c (maybe_warn_nonstring_arg): Use string length to set
20197 or ajust the presumed bound on an operation to avoid unnecessary
20198 warnings.
20199
20200 2018-05-22 Martin Sebor <msebor@redhat.com>
20201
20202 PR tree-optimization/85826
20203 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
20204 assuming that a DECL necesarily has a constant size.
20205
20206 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
20207
20208 PR middle-end/85862
20209 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
20210
20211 2018-05-22 Richard Biener <rguenther@suse.de>
20212
20213 PR tree-optimization/85834
20214 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
20215 non-constant and non-zero memset arguments.
20216
20217 2018-05-22 Martin Liska <mliska@suse.cz>
20218
20219 PR ipa/85607
20220 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
20221
20222 2018-05-22 Richard Biener <rguenther@suse.de>
20223
20224 PR tree-optimization/85863
20225 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
20226 comparisons when vectype is specified.
20227 (vectorizable_condition): Do not specify vectype for
20228 vect_is_simple_cond when SLP vectorizing.
20229
20230 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
20231
20232 PR target/85657
20233 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
20234 define __ibm128 as long double.
20235 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
20236 as a distinct type when IEEE 128-bit support is enabled.
20237 (init_float128_ieee): Fix up conversions between IFmode and IEEE
20238 128-bit types to use the correct functions.
20239 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
20240 convert between 128-bit floating point types that have different
20241 modes but the same representation, instead of using gen_lowpart to
20242 makean alias.
20243 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
20244 KFmode.
20245 (IFKF_reg): New attributes to give the register constraints for
20246 IFmode and KFmode.
20247 (extend<mode>tf2_internal): New insns to mark an explicit
20248 conversion between 128-bit floating point types that have a
20249 different mode but share the same representation.
20250
20251 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
20252
20253 PR tree-optimization/85814
20254 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
20255 a null return from get_strinfo when unsharing the next
20256 strinfo in the chain.
20257
20258 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
20259
20260 PR gcc/84923
20261 * varasm.c (weak_finish): Clean up weak_decls.
20262
20263 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20264
20265 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
20266 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
20267 UNSPEC_UADALP values.
20268 * config/aarch64/iterators.md (ABAL): New int iterator.
20269 (ABDL2): Likewise.
20270 (ADALP): Likewise.
20271 (sur): Add mappings for the above.
20272 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
20273 New define_insn.
20274 (aarch64_<sur>abal<mode>_4): Likewise.
20275 (aarch64_<sur>adalp<mode>_3): Likewise.
20276 (<sur>sadv16qi): New define_expand.
20277
20278 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
20279
20280 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
20281 (*movdf_internal): Ditto.
20282 (*rcpsf2_sse): Ditto.
20283 (*rsqrtsf2_sse): Ditto.
20284 (*sqrt<mode>2_sse): Ditto.
20285
20286 2018-05-21 Tamar Christina <tamar.christina@arm.com>
20287
20288 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
20289 eor3q<mode>4.
20290 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
20291 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
20292 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
20293 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
20294 vbcaxq_s64): New.
20295 * config/aarch64/arm_neon.h: Likewise.
20296 * config/aarch64/iterators.md (VQ_I): New.
20297
20298 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
20299
20300 * config.gcc: Add arc/t-multilib-linux to tmake_file for
20301 arc*-*-linux*.
20302 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
20303 MULTILIB_DIRNAMES
20304
20305 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
20306
20307 * config/nds32/constraints.md (S): New constraint.
20308 * config/nds32/nds32.md (call_internal): Use constraint S.
20309 (call_value_internal): Likewise.
20310 (sibcall_internal): Likewise.
20311 (sibcall_value_internal): Likewise.
20312
20313 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
20314 Chung-Ju Wu <jasonwucj@gmail.com>
20315
20316 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
20317 into consideration.
20318
20319 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
20320 Chung-Ju Wu <jasonwucj@gmail.com>
20321
20322 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
20323 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
20324 (nds32_rtx_costs_impl): Simplify.
20325 (nds32_address_cost_impl): Simplify.
20326 (nds32_init_rtx_costs): New function.
20327 (nds32_rtx_costs_speed_prefer): Likewise.
20328 (nds32_rtx_costs_size_prefer): Likewise.
20329 (nds32_address_cost_speed_prefer): Likewise.
20330 (nds32_address_cost_speed_fwprop): Likewise.
20331 (nds32_address_cost_size_prefer): Likewise.
20332 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
20333 * config/nds32/nds32.c (nds32_option_override): Use
20334 nds32_init_rtx_costs function.
20335
20336 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
20337
20338 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
20339 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
20340 (TARGET_PIPELINE_N8): Likewise.
20341 (TARGET_PIPELINE_N10): Likewise.
20342 (TARGET_PIPELINE_N13): Likewise.
20343 (TARGET_PIPELINE_GRAYWOLF): Likewise.
20344
20345 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
20346
20347 * config/nds32/nds32-fpu.md: Update copyright year.
20348
20349 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20350
20351 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
20352
20353 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20354
20355 * config/nds32/nds32.c
20356 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
20357 * config/nds32/nds32.opt (minline-asm-r15): New option.
20358
20359 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20360
20361 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
20362 MASK_HW_ABS.
20363 * config/nds32/nds32.md (abssi2): New pattern.
20364
20365 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
20366
20367 * config/i386/i386.md (rex64namesuffix): New mode attribute.
20368 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
20369 Merge insn pattern from sse_cvtsi2ss<round_name> and
20370 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
20371 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
20372 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
20373 using SWI48 mode iterator.
20374 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
20375 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
20376 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
20377 pattern from sse_cvttss2si<round_saeonly_name>
20378 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
20379 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
20380 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
20381 using SWI48 mode iterator.
20382 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
20383 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
20384 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
20385 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
20386 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
20387 using SWI48 mode iterator.
20388 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
20389 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
20390 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
20391 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
20392 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
20393 SWI48 mode iterator.
20394 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
20395 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
20396 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
20397 pattern from sse_cvttsd2si<round_saeonly_name>
20398 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
20399
20400 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20401
20402 * config/nds32/nds32-md-auxiliary.c
20403 (nds32_valid_smw_lwm_base_p): Refine.
20404 (nds32_output_smw_single_word): Refine.
20405 (nds32_output_smw_double_word): New.
20406 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
20407
20408 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20409
20410 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
20411 (nds32_output_stack_pop): Refine.
20412 (nds32_expand_unaligned_load): Refine.
20413 (nds32_expand_unaligned_store): Refine.
20414
20415 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20416 Chung-Ju Wu <jasonwucj@gmail.com>
20417
20418 * config/nds32/constants.md: Add TP_REGNUM constant.
20419 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
20420 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
20421 UNSPEC_ADD32.
20422 * config/nds32/nds32-doubleword.md: Consider flag_pic.
20423 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
20424 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
20425 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
20426 and PIC code generation.
20427 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
20428 code generation.
20429 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
20430 optimization.
20431 * config/nds32/nds32.md: Support TLS and PIC.
20432 * config/nds32/nds32.c: Support TLS and PIC.
20433 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
20434 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
20435 predicate.
20436
20437 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20438
20439 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
20440 mode with E_ prefix.
20441
20442 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20443 Chung-Ju Wu <jasonwucj@gmail.com>
20444
20445 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
20446 * config/nds32/nds32-md-auxiliary.c
20447 (symbolic_reference_mentioned_p): New.
20448 (nds32_legitimize_ict_address): New.
20449 (nds32_expand_ict_move): New.
20450 (nds32_indirect_call_referenced_p): New.
20451 (nds32_symbol_binds_local_p): Delete.
20452 (nds32_long_call_p): Modify.
20453 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
20454 * config/nds32/nds32-protos.h
20455 (symbolic_reference_mentioned_p): Declare.
20456 (nds32_legitimize_ict_address): Declare.
20457 (nds32_expand_ict_move): Declare.
20458 (nds32_indirect_call_referenced_p): Declare.
20459 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
20460 (nds32_relax_group): Use nds32_ict_const_p as condition.
20461 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
20462 (nds32_asm_file_start): Output ict_model directive in asm code.
20463 (nds32_legitimate_address_p): Consider indirect call.
20464 (nds32_print_operand): Consider indirect call.
20465 (nds32_print_operand_address): Consider indirect call.
20466 (nds32_insert_attributes): Handle "indirect_call" attribute.
20467 (TARGET_LEGITIMATE_ADDRESS_P): Define.
20468 (TARGET_LEGITIMATE_CONSTANT_P): Define.
20469 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
20470 (TARGET_DELEGITIMIZE_ADDRESS): Define.
20471 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
20472 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
20473 (TARGET_ICT_MODEL_SMALL): Define.
20474 (TARGET_ICT_MODEL_LARGE): Define.
20475 * config/nds32/nds32.md (movsi): Consider ict model.
20476 (call, call_value): Consider ict model.
20477 (sibcall, sibcall_value): Consider ict model.
20478 * config/nds32/nds32.opt (mict-model): New option.
20479 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
20480 model.
20481
20482 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
20483 Monk Chiang <sh.chiang04@gmail.com>
20484 Jim Wilson <jimw@sifive.com>
20485
20486 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
20487 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
20488 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
20489 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
20490 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
20491 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
20492 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
20493 compute save_libcall_adjustment properly.
20494 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
20495 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
20496 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
20497 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
20498 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
20499 (ABI_SPEC): Handle mabi=ilp32e.
20500 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
20501 (RVE): Add RVE mask.
20502 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
20503 <-march>: Add rv32e as an example.
20504
20505 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
20506
20507 PR c++/82899
20508 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
20509 (intra_create_variable_infos): Handle C++ constructors.
20510
20511 2018-05-18 Martin Liska <mliska@suse.cz>
20512
20513 * passes.def: Remove a redundant pass.
20514
20515 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
20516
20517 PR bootstrap/85838
20518 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
20519
20520 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20521
20522 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
20523 (ARMv4): Update.
20524 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
20525 (ARMv6m): Update.
20526 (armv2, armv2a, armv3, armv3m): Delete architectures.
20527 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
20528 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
20529 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
20530 Delete cpus.
20531 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
20532 (*mulsidi3adddi): Likewise.
20533 (mulsidi3): Likewise.
20534 (*mulsidi3_nov6): Likewise.
20535 (umulsidi3): Likewise.
20536 (umulsidi3_nov6): Likewise.
20537 (umaddsidi4): Likewise.
20538 (*umulsidi3adddi): Likewise.
20539 (smulsi3_highpart): Likewise.
20540 (*smulsi3_highpart_nov6): Likewise.
20541 (umulsi3_highpart): Likewise.
20542 (*umulsi3_highpart_nov6): Likewise.
20543 * config/arm/arm.h (arm_arch3m): Delete.
20544 * config/arm/arm.c (arm_arch3m): Delete.
20545 (arm_option_override_internal): Update armv3-related comment.
20546 (arm_configure_build_target): Delete use of isa_bit_mode32.
20547 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
20548 (arm_rtx_costs_internal): Delete check of arm_arch3m.
20549 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
20550 (mulsa3): Likewise.
20551 (mulusa3): Likewise.
20552 * config/arm/arm-protos.h (arm_arch3m): Delete.
20553 * config/arm/arm-tables.opt: Regenerate.
20554 * config/arm/arm-tune.md: Likewise.
20555 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
20556 deleted architectures.
20557
20558 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20559
20560 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
20561 (armv5t, armv5te): New features.
20562 (ARMv5, ARMv5e): Delete fgroups.
20563 (ARMv5t, ARMv5te): Adjust for above changes.
20564 (ARMv6m): Likewise.
20565 (armv5, armv5e): Delete arches.
20566 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
20567 arm_arch5.
20568 (*call_reg_arm): Likewise.
20569 (*call_value_reg_armv5): Likewise.
20570 (*call_value_reg_arm): Likewise.
20571 (*call_symbol): Likewise.
20572 (*call_value_symbol): Likewise.
20573 (*sibcall_insn): Likewise.
20574 (*sibcall_value_insn): Likewise.
20575 (clzsi2): Likewise.
20576 (prefetch): Likewise.
20577 (define_split and define_peephole2 dependent on arm_arch5):
20578 Likewise.
20579 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
20580 arm_arch5e.
20581 (TARGET_ARM_QBIT): Likewise.
20582 (TARGET_DSP_MULTIPLY): Likewise.
20583 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
20584 (arm_arch5, arm_arch5e): Delete.
20585 (arm_arch5t, arm_arch5te): Declare.
20586 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
20587 (arm_arch5t): Declare.
20588 (arm_option_reconfigure_globals): Update for the above.
20589 (arm_options_perform_arch_sanity_checks): Update comment, replace
20590 use of arm_arch5 with arm_arch5t.
20591 (use_return_insn): Likewise.
20592 (arm_emit_call_insn): Likewise.
20593 (output_return_instruction): Likewise.
20594 (arm_final_prescan_insn): Likewise.
20595 (arm_coproc_builtin_available): Likewise.
20596 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
20597 arm_arch5e with arm_arch5t and arm_arch5te.
20598 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
20599 (arm_arch5t, arm_arch5te): Declare.
20600 * config/arm/arm-tables.opt: Regenerate.
20601 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
20602 * config/arm/t-multilib: Likewise.
20603 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
20604 instead of arm_arch5.
20605 (*call_reg_thumb1): Likewise.
20606 (*call_value_reg_thumb1_v5): Likewise.
20607 (*call_value_reg_thumb1): Likewise.
20608 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
20609 unreachable path.
20610 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
20611
20612 2018-05-18 Martin Liska <mliska@suse.cz>
20613
20614 PR gcov-profile/84846
20615 * doc/gcov.texi: Document -t option of gcov tool.
20616
20617 2018-05-18 Martin Liska <mliska@suse.cz>
20618
20619 PR gcov-profile/84846
20620 * gcov.c (print_usage): Add new -t option.
20621 (process_args): Handle the option.
20622 (generate_results): Use stdout as output when requested by
20623 the option.
20624
20625 2018-05-18 Martin Liska <mliska@suse.cz>
20626
20627 PR gcov-profile/84846
20628 * coverage.c (coverage_init): Write PWD to .gcno file.
20629 * doc/gcov.texi: Document how working directory is printed.
20630 * gcov-dump.c (dump_gcov_file): Print PWD.
20631 * gcov.c (output_intermediate_file): Likewise.
20632 (read_graph_file): Read PWD string.
20633 (output_lines): Print PWD.
20634
20635 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20636
20637 PR middle-end/85817
20638 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
20639 for retval and return false if all args to phi are zero.
20640
20641 2018-05-18 Richard Biener <rguenther@suse.de>
20642
20643 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
20644 method.
20645 (evrp_dom_walker::before_dom_children): Call it.
20646
20647 2018-05-18 Richard Biener <rguenther@suse.de>
20648
20649 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
20650 results when processing array refs with variable index.
20651
20652 2018-05-18 Toon Moene <toon@moene.org>
20653
20654 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
20655 directly after that of -floop-interchange. Indicate that both
20656 options are enabled by default when specifying -O3.
20657
20658 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20659
20660 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
20661 iterator. Delete separate integer-mode vec_set<mode> expander.
20662 (aarch64_simd_vec_setv2di): Delete.
20663 (vec_setv2di): Delete.
20664 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
20665 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
20666 the "w, r" alternative.
20667
20668 2018-05-18 Martin Liska <mliska@suse.cz>
20669
20670 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
20671 * tree-pass.h (make_pass_lower_switch_O0): New function.
20672 * tree-switch-conversion.c (node_has_low_bound): Remove.
20673 (node_has_high_bound): Likewise.
20674 (node_is_bounded): Likewise.
20675 (class pass_lower_switch): Make it a template type and create
20676 two instances.
20677 (pass_lower_switch::execute): Add template argument.
20678 (make_pass_lower_switch): New function.
20679 (make_pass_lower_switch_O0): New function.
20680 (do_jump_if_equal): Remove.
20681 (emit_case_nodes): Simplify to just handle all 3 cases and leave
20682 all the hard work to tree optimization passes.
20683
20684 2018-05-18 Martin Liska <mliska@suse.cz>
20685
20686 * dbgcnt.c (limit_low): Renamed from limit.
20687 (limit_high): New variable.
20688 (dbg_cnt_is_enabled): Check for upper limit.
20689 (dbg_cnt): Adjust dumping.
20690 (dbg_cnt_set_limit_by_index): Add new argument for high
20691 value.
20692 (dbg_cnt_set_limit_by_name): Likewise.
20693 (dbg_cnt_process_single_pair): Parse new format.
20694 (dbg_cnt_process_opt): Use strtok.
20695 (dbg_cnt_list_all_counters): Remove 'value' and add
20696 'limit_high'.
20697 * doc/invoke.texi: Document changes.
20698
20699 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
20700
20701 * doc/sourcebuild.texi (scalar_all_fma): Document.
20702 * tree.def (FMA_EXPR): Delete.
20703 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
20704 * internal-fn.c (ternary_direct): New macro.
20705 (expand_ternary_optab_fn): Likewise.
20706 (direct_ternary_optab_supported_p): Likewise.
20707 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
20708 * builtins.c (fold_builtin_fma): Delete.
20709 (fold_builtin_3): Don't call it.
20710 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
20711 * expr.c (expand_expr_real_2): Likewise.
20712 * fold-const.c (operand_equal_p): Likewise.
20713 (fold_ternary_loc): Likewise.
20714 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
20715 * gimple.c (DEFTREECODE): Likewise.
20716 * gimplify.c (gimplify_expr): Likewise.
20717 * optabs-tree.c (optab_for_tree_code): Likewise.
20718 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
20719 * tree-eh.c (operation_could_trap_p): Likewise.
20720 (stmt_could_throw_1_p): Likewise.
20721 * tree-inline.c (estimate_operator_cost): Likewise.
20722 * tree-pretty-print.c (dump_generic_node): Likewise.
20723 (op_code_prio): Likewise.
20724 * tree-ssa-loop-im.c (stmt_cost): Likewise.
20725 * tree-ssa-operands.c (get_expr_operands): Likewise.
20726 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
20727 * fold-const-call.h (fold_fma): Delete.
20728 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
20729 CFN_FNMA and CFN_FNMS.
20730 (fold_fma): Delete.
20731 * genmatch.c (combined_fn): New enum.
20732 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
20733 (commutative_op): New function.
20734 (commutate): Use it. Handle more than 2 operands.
20735 (dt_operand::gen_gimple_expr): Use commutative_op.
20736 (parser::parse_expr): Allow :c to be used with non-binary
20737 operators if the commutative operand is known.
20738 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
20739 CFN_FMS, CFN_FNMA and CFN_FNMS.
20740 (backprop::process_assign_use): Remove FMA_EXPR handling.
20741 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
20742 (gen_hsa_fma): New function.
20743 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
20744 IFN_FNMA and IFN_FNMS.
20745 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
20746 * gimple-fold.h (follow_all_ssa_edges): Declare.
20747 * gimple-fold.c (follow_all_ssa_edges): New function.
20748 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
20749 gimple_build interface and use follow_all_ssa_edges to fold the result.
20750 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
20751 instead of checking for optabs directly.
20752 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
20753 rather than FMA_EXPRs.
20754 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
20755 call to IFN_FMA instead of an FMA_EXPR.
20756
20757 2018-05-17 Jim Wilson <jimw@sifive.com>
20758
20759 * expr.c (do_tablejump): When converting index to Pmode, if we have a
20760 sign extended promoted subreg, and the range does not have the sign bit
20761 set, then do a sign extend.
20762
20763 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
20764 test, check for sign extended subreg and/or constant operands, and
20765 do a sign extend in that case.
20766
20767 2018-05-17 Steve Ellcey <sellcey@cavium.com>
20768
20769 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
20770 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
20771 Add untyped.
20772 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
20773 Change logics_shift_reg to logics_shift_imm.
20774 (thunderx2t99_fp_loadpair_basic): Delete.
20775 (thunderx2t99_fp_storepair_basic): Delete.
20776 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
20777 (thunderx2t99_asimd_polynomial): Delete.
20778 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
20779 and neon_fp_mul_d_scalar_q.
20780 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
20781 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
20782 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
20783 (thunderx2t99_asimd_lut): Add missing tbl types.
20784 (thunderx2t99_asimd_ext): Delete.
20785 (thunderx2t99_asimd_load1_1_mult): Delete.
20786 (thunderx2t99_asimd_load1_2_mult): Delete.
20787 (thunderx2t99_asimd_load1_ldp): New.
20788 (thunderx2t99_asimd_load1): New.
20789 (thunderx2t99_asimd_load2): Add missing *load2* types.
20790 (thunderx2t99_asimd_load3): New.
20791 (thunderx2t99_asimd_load4): New.
20792 (thunderx2t99_asimd_store1_1_mult): Delete.
20793 (thunderx2t99_asimd_store1_2_mult): Delete.
20794 (thunderx2t99_asimd_store2_mult): Delete.
20795 (thunderx2t99_asimd_store2_onelane): Delete.
20796 (thunderx2t99_asimd_store_stp): New.
20797 (thunderx2t99_asimd_store1): New.
20798 (thunderx2t99_asimd_store2): New.
20799 (thunderx2t99_asimd_store3): New.
20800 (thunderx2t99_asimd_store4): New.
20801
20802 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
20803
20804 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
20805 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
20806
20807 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
20808 Segher Boessenkool <segher@kernel.crashing.org>
20809
20810 PR target/85698
20811 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
20812 operand.
20813
20814 2018-05-17 Richard Biener <rguenther@suse.de>
20815
20816 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
20817 for pruning loop and prune defs feeding only already visited PHIs.
20818
20819 2018-05-17 Richard Biener <rguenther@suse.de>
20820
20821 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
20822
20823 2018-05-17 Bin Cheng <bin.cheng@arm.com>
20824 Richard Biener <rguenther@suse.de>
20825
20826 PR tree-optimization/85793
20827 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
20828 for VMAT_ELEMENTWISE.
20829
20830 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
20831
20832 * internal-fn.h (lookup_internal_fn): Declare
20833 * internal-fn.c (lookup_internal_fn): New function.
20834 * gimple.c (gimple_build_call_from_tree): Handle calls to
20835 internal functions.
20836 * gimple-pretty-print.c (dump_gimple_call): Print "." before
20837 internal function names.
20838 * tree-pretty-print.c (dump_generic_node): Likewise.
20839 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
20840
20841 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
20842
20843 * gimple-fold.h (gimple_build): Make the function forms take
20844 combined_fn rather than built_in_function.
20845 (gimple_simplify): Likewise.
20846 * gimple-match-head.c (gimple_simplify): Likewise.
20847 * gimple-fold.c (gimple_build): Likewise.
20848 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
20849 rather than gimple_build_call_internal.
20850 (get_initial_defs_for_reduction): Likewise.
20851 (vect_create_epilog_for_reduction): Likewise.
20852 (vectorizable_live_operation): Likewise.
20853
20854 2018-05-17 Martin Liska <mliska@suse.cz>
20855
20856 * gimple-ssa-sprintf.c (format_directive): Do not use
20857 space in between 'G_' and '('.
20858
20859 2018-05-17 Jakub Jelinek <jakub@redhat.com>
20860
20861 PR target/85323
20862 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
20863 even if the mask is not all ones.
20864
20865 PR target/85323
20866 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
20867 vector.
20868 (ix86_gimple_fold_builtin): Likewise.
20869
20870 PR target/85323
20871 * config/i386/i386.c: Include tree-vector-builder.h.
20872 (ix86_vector_shift_count): New function.
20873 (ix86_fold_builtin): Fold shift builtins by scalar count.
20874 (ix86_gimple_fold_builtin): Likewise.
20875
20876 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
20877 _mm512_setzero): New intrinsics.
20878
20879 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
20880 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20881
20882 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
20883 code generation for cases where splatting a value is not useful.
20884 * simplify-rtx.c (simplify_ternary_operation): Simplify
20885 vec_merge across a vec_duplicate and a paradoxical subreg forming
20886 a vector mode to a vec_concat.
20887
20888 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
20889
20890 * config.gcc: Support "goldmont-plus".
20891 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
20892 "goldmont-plus".
20893 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20894 PROCESSOR_GOLDMONT_PLUS.
20895 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
20896 (processor_target_table): Add "goldmont-plus".
20897 (PTA_GOLDMONT_PLUS): Define.
20898 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
20899 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
20900 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
20901 (fold_builtin_cpu): Add "goldmont-plus".
20902 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
20903 (ix86_option_override_internal): Add "goldmont-plus".
20904 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
20905 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
20906 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
20907 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
20908
20909 2018-05-17 Richard Biener <rguenther@suse.de>
20910
20911 PR tree-optimization/85757
20912 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
20913 remove defs that only feed that PHI from further processing.
20914
20915 2018-05-16 Jim Wilson <jimw@sifive.com>
20916
20917 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
20918 asterisk to name.
20919 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
20920
20921 2018-05-16 Mark Wielaard <mark@klomp.org>
20922
20923 * dwarf2out.c (count_index_strings): New function.
20924 (output_indirect_strings): Call count_index_strings and generate
20925 header for dwarf_version >= 5.
20926
20927 2018-05-16 Mark Wielaard <mark@klomp.org>
20928
20929 * dwarf2out.c (dwarf_FORM): New function.
20930 (set_indirect_string): Use dwarf_FORM.
20931 (reset_indirect_string): Likewise.
20932 (size_of_die): Likewise.
20933 (value_format): Likewise.
20934 (output_die): Likewise.
20935 (add_skeleton_AT_string): Likewise.
20936 (output_macinfo_op): Likewise.
20937 (index_string): Likewise.
20938 (output_index_string_offset): Likewise.
20939 (output_index_string): Likewise.
20940 (count_index_strings): Likewise.
20941
20942 2018-05-16 Carl Love <cel@us.ibm.com>
20943
20944 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
20945 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
20946
20947 2018-05-16 Martin Jambor <mjambor@suse.cz>
20948
20949 * ipa-prop.c (ipa_free_all_edge_args): Remove.
20950 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
20951
20952 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
20953
20954 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
20955 (fnma<mode>4): Likewise.
20956 (fms<mode>4): Likewise.
20957 (fnms<mode>4): Likewise.
20958 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
20959 (aarch64_fnma<mode>4): Likewise.
20960 (aarch64_fms<mode>4): Likewise.
20961 (aarch64_fnms<mode>4): Likewise.
20962 (aarch64_fnmadd<mode>4): Likewise.
20963
20964 2018-05-16 Jason Merrill <jason@redhat.com>
20965
20966 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
20967
20968 2018-05-16 Richard Biener <rguenther@suse.de>
20969
20970 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
20971 (dump_stmt_cost): Declare.
20972 (add_stmt_cost): Dump cost we add.
20973 (add_stmt_costs): New function.
20974 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
20975 No longer exported.
20976 (vect_analyze_stmt): Adjust prototype.
20977 (vectorizable_condition): Likewise.
20978 (vectorizable_live_operation): Likewise.
20979 (vectorizable_reduction): Likewise.
20980 (vectorizable_induction): Likewise.
20981 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
20982 cost vector to pass to vectorizable_ and record afterwards.
20983 (vect_model_reduction_cost): Take cost vector argument and adjust.
20984 (vect_model_induction_cost): Likewise.
20985 (vectorizable_reduction): Likewise.
20986 (vectorizable_induction): Likewise.
20987 (vectorizable_live_operation): Likewise.
20988 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
20989 SLP_TREE_NUMBER_OF_VEC_STMTS.
20990 (vect_analyze_slp_cost_1): Remove.
20991 (vect_analyze_slp_cost): Likewise.
20992 (vect_slp_analyze_node_operations): Take visited args and
20993 a target cost vector. Avoid processing already visited stmt sets.
20994 (vect_slp_analyze_operations): Use a local cost vector to gather
20995 costs and register those of non-discarded instances.
20996 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
20997 (vect_schedule_slp_instance): Remove copying of
20998 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
20999 zero.
21000 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
21001 adding cost. Record cost entry location.
21002 (vect_prologue_cost_for_slp_op): Function to compute cost of
21003 a constant or invariant generated for SLP vect in the prologue,
21004 split out from vect_analyze_slp_cost_1.
21005 (vect_model_simple_cost): Make static. Adjust for SLP costing.
21006 (vect_model_promotion_demotion_cost): Likewise.
21007 (vect_model_store_cost): Likewise, make static.
21008 (vect_model_load_cost): Likewise.
21009 (vectorizable_bswap): Add cost vector arg and adjust.
21010 (vectorizable_call): Likewise.
21011 (vectorizable_simd_clone_call): Likewise.
21012 (vectorizable_conversion): Likewise.
21013 (vectorizable_assignment): Likewise.
21014 (vectorizable_shift): Likewise.
21015 (vectorizable_operation): Likewise.
21016 (vectorizable_store): Likewise.
21017 (vectorizable_load): Likewise.
21018 (vectorizable_condition): Likewise.
21019 (vectorizable_comparison): Likewise.
21020 (can_vectorize_live_stmts): Likewise.
21021 (vect_analyze_stmt): Likewise.
21022 (vect_transform_stmt): Adjust calls to vectorizable_*.
21023 * tree-vectorizer.c: Include gimple-pretty-print.h.
21024 (dump_stmt_cost): New function.
21025
21026 2018-05-16 Richard Biener <rguenther@suse.de>
21027
21028 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
21029 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
21030 * tree-ssa-dse.c: Include tree-ssa-loop.h.
21031 (check_name): New callback.
21032 (dse_classify_store): Track cycles via a visited bitmap of PHI
21033 defs and simplify handling of in-loop and across loop dead stores
21034 and properly fail for loop-variant refs. Handle byte-tracking with
21035 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
21036 limiting the walk.
21037
21038 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
21039
21040 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
21041 (vect_get_mask_type_for_stmt): Likewise.
21042 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
21043 split out from...
21044 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
21045 to determine the statement's vector type and the vector type that
21046 should be used for calculating nunits. Deal with cases in which
21047 the type has to be deferred.
21048 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
21049 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
21050 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
21051 (vect_determine_vf_for_stmt): New functions, split out from...
21052 (vect_determine_vectorization_factor): ...here.
21053 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
21054 (vect_get_mask_type_for_stmt): New functions, split out from
21055 vect_determine_vectorization_factor.
21056
21057 2018-05-16 Richard Biener <rguenther@suse.de>
21058
21059 * tree-cfg.c (verify_gimple_assign_ternary): Properly
21060 verify the [VEC_]COND_EXPR embedded comparison.
21061
21062 2018-05-15 Martin Sebor <msebor@redhat.com>
21063
21064 PR tree-optimization/85753
21065 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
21066 RECORD_TYPE in addition to ARRAY_TYPE.
21067
21068 2018-05-15 Martin Sebor <msebor@redhat.com>
21069
21070 PR middle-end/85643
21071 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
21072
21073 2018-05-15 Richard Biener <rguenther@suse.de>
21074
21075 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
21076 add by_clobber_p one. Change algorithm to collect all defs
21077 representing uses we need to walk and try reducing them to
21078 a single one before failing.
21079 (dse_dom_walker::dse_optimize_stmt): Adjust.
21080
21081 2018-05-13 Mark Wielaard <mark@klomp.org>
21082
21083 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
21084 (size_of_loc_descr): Likewise.
21085 (output_loc_operands): Likewise.
21086 (output_loc_operands_raw): Likewise.
21087 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
21088 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
21089 (hash_loc_operands): Likewise.
21090 (compare_loc_operands): Likewise.
21091
21092 2018-05-14 Mark Wielaard <mark@klomp.org>
21093
21094 * dwarf2out.c (count_index_addrs): New function.
21095 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
21096
21097 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21098
21099 PR tree-optimization/83648
21100 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
21101 return value as malloc candidate.
21102
21103 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21104
21105 PR ipa/85734
21106 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
21107 param as true in call to suggest_attribute.
21108
21109 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
21110
21111 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
21112 -mreadonly-in-sdata.
21113
21114 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21115
21116 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
21117 New pattern.
21118 (aarch64_crypto_aesd_fused): Likewise.
21119
21120 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
21121
21122 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
21123 (movsi_aarch64): Likewise.
21124 (load_pairsi): Likewise.
21125 (load_pairdi): Likewise.
21126 (store_pairsi): Likewise.
21127 (store_pairdi): Likewise.
21128 (load_pairsf): Likewise.
21129 (load_pairdf): Likewise.
21130 (store_pairsf): Likewise.
21131 (store_pairdf): Likewise.
21132 (zero_extend): Likewise.
21133 (trunc): Swap alternatives.
21134 (fcvt_target): Add '?' to prefer w over r.
21135
21136 2018-05-14 Jakub Jelinek <jakub@redhat.com>
21137
21138 PR target/85756
21139 * config/i386/i386.md: Disallow non-commutative arithmetics in
21140 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
21141 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
21142 in the peephole2 before it.
21143
21144 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
21145
21146 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
21147 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
21148 (ix86_handle_option): Handle -mcldemote.
21149 * config.gcc: New header.
21150 * config/i386/cldemoteintrin.h: New file.
21151 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
21152 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
21153 -mcldemote.
21154 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21155 OPTION_MASK_ISA_CLDEMOTE.
21156 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
21157 (ix86_valid_target_attribute_inner_p): Ditto.
21158 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
21159 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
21160 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
21161 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
21162 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
21163 (cldemote): New.
21164 * config/i386/i386.opt: Add -mcldemote.
21165 * config/i386/x86intrin.h: New header.
21166 * doc/invoke.texi: Add -mcldemote.
21167
21168 2018-05-14 Richard Biener <rguenther@suse.de>
21169
21170 * doc/match-and-simplify.texi: Adjust :s documentation.
21171
21172 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
21173
21174 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
21175 intended memcpy size.
21176 (REORDER_45): Likewise.
21177
21178 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
21179
21180 * sort.cc: New file.
21181 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
21182 * vec.c (qsort_chk): Use gcc_qsort.
21183 * Makefile.in (OBJS-libcommon): Add sort.o.
21184 (build/sort.o): New target. Use it...
21185 (BUILD_RTL): ... here, and...
21186 (build/gencfn-macros): ... here, and...
21187 (build/genmatch): ... here.
21188
21189 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
21190 Chung-Ju Wu <jasonwucj@gmail.com>
21191
21192 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
21193 * config/nds32/nds32-graywolf.md: New file.
21194 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
21195 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
21196 pipeline.
21197 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
21198 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
21199 * config/nds32/nds32.md (pipeline_model): Add graywolf.
21200 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
21201 * config/nds32/pipelines.md: Include n15 settings.
21202
21203 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
21204 Chung-Ju Wu <jasonwucj@gmail.com>
21205
21206 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
21207 * config/nds32/nds32-n13.md: New file.
21208 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
21209 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
21210 pipeline.
21211 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
21212 * config/nds32/nds32.md (pipeline_model): Add n13.
21213 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
21214 * config/nds32/pipelines.md: Include n13 settings.
21215
21216 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
21217 Chung-Ju Wu <jasonwucj@gmail.com>
21218
21219 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
21220 * config/nds32/nds32-n10.md: New file.
21221 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
21222 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
21223 pipeline.
21224 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
21225 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
21226 * config/nds32/nds32.md (pipeline_model): Add n10.
21227 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
21228 * config/nds32/pipelines.md: Include n10 settings.
21229
21230 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
21231 Kito Cheng <kito.cheng@gmail.com>
21232 Chung-Ju Wu <jasonwucj@gmail.com>
21233
21234 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
21235 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21236 Add enum values for DSP extension instructions.
21237 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
21238 New constraints.
21239 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
21240 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
21241 New code iterators.
21242 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
21243 * config/nds32/nds32-dspext.md: New file for DSP implementation.
21244 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
21245 * config/nds32/nds32-intrinsic.md: Likewise.
21246 * config/nds32/nds32_intrinsic.h: Likewise.
21247 * config/nds32/nds32-md-auxiliary.c: Likewise.
21248 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
21249 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
21250 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
21251 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
21252 * config/nds32/nds32-protos.h: New declarations for DSP extension.
21253 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
21254 TYPE_DMAC in switch statement.
21255 * config/nds32/nds32.c: New checking and implementation for DSP
21256 extension instructions.
21257 * config/nds32/nds32.h: Likewise.
21258 * config/nds32/nds32.md: Likewise.
21259 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
21260 * config/nds32/predicates.md: Implement new predicates for DSP
21261 extension.
21262
21263 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
21264
21265 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
21266 Reformat alternatives and attributes so it is easier to identify
21267 which constraints/attributes go with which instruction.
21268 (mov<mode>_hardfloat32, FMOVE64): Likewise.
21269 (mov<mode>_softfloat32, FMOVE64): Likewise.
21270 (mov<mode>_hardfloat64, FMOVE64): Likewise.
21271 (mov<mode>_softfloat64, FMOVE64): Likewise.
21272
21273 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
21274
21275 * doc/extend.texi (PowerPC Built-in Functions): Rename this
21276 subsection.
21277 (Basic PowerPC Built-in Functions): The new name of the
21278 subsection previously known as "PowerPC Built-in Functions".
21279 (Basic PowerPC Built-in Functions Available on all Configurations):
21280 New subsubsection.
21281 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
21282 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
21283 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
21284 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
21285
21286 2018-05-11 Martin Jambor <mjambor@suse.cz>
21287
21288 PR ipa/85655
21289 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
21290 single const.
21291
21292 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
21293
21294 PR target/85733
21295 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
21296
21297 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
21298
21299 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
21300 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
21301 (ix86_handle_option): Handle -mwaitpkg.
21302 * config.gcc: New header.
21303 * config/i386/cpuid.h (bit_WAITPKG): New bit.
21304 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
21305 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
21306 function type.
21307 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21308 OPTION_MASK_ISA_WAITPKG.
21309 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
21310 (ix86_option_override_internal): Add PTA_WAITPKG.
21311 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
21312 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
21313 IX86_BUILTIN_TPAUSE.
21314 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
21315 __builtin_ia32_umwait and __builtin_ia32_tpause.
21316 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
21317 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
21318 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
21319 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
21320 UNSPECV_TPAUSE): New.
21321 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
21322 * config/i386/i386.opt: Add -mwaitpkg.
21323 * config/i386/waitpkgintrin.h: New file.
21324 * config/i386/x86intrin.h: New header.
21325 * doc/invoke.texi: Add -mwaitpkg.
21326
21327 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
21328
21329 PR target/85606
21330 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
21331 equivalent.
21332 (cortex-m0): Use armv6s-m isa.
21333 (cortex-m0plus): Likewise.
21334 (cortex-m1): Likewise.
21335 (cortex-m0.small-multiply): Likewise.
21336 (cortex-m0plus.small-multiply): Likewise.
21337 (cortex-m1.small-multiply): Likewise.
21338
21339 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
21340 Jakub Jelinek <jakub@redhat.com>
21341
21342 PR tree-optimization/85692
21343 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
21344 source permute as well.
21345
21346 2018-05-11 Martin Liska <mliska@suse.cz>
21347
21348 PR sanitizer/85556
21349 * doc/extend.texi: Document LLVM style format for no_sanitize
21350 attribute.
21351
21352 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
21353
21354 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
21355 mode_supports_vsx_dform_quad to mode_supports_dq_form.
21356 (mode_supports_vsx_dform_quad): Likewise.
21357 (mode_supports_vmx_dform): Move these functions to be next to the
21358 other mode_supports functions.
21359 (mode_supports_dq_form): Likewise.
21360 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
21361 mode_supports_dq_form.
21362 (reg_offset_addressing_ok_p): Likewise.
21363 (offsettable_ok_by_alignment): Likewise.
21364 (rs6000_legitimate_offset_address_p): Likewise.
21365 (legitimate_lo_sum_address_p): Likewise.
21366 (rs6000_legitimize_address): Likewise.
21367 (rs6000_legitimize_reload_address): Likewise.
21368 (rs6000_secondary_reload_inner): Likewise.
21369 (rs6000_preferred_reload_class): Likewise.
21370 (rs6000_output_move_128bit): Likewise.
21371
21372 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
21373
21374 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
21375 Generate SImode target register for null target.
21376 <case IX86_BUILTIN_XGETBV>: Ditto.
21377 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
21378 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
21379
21380 2018-05-10 Carl Love <cel@us.ibm.com>
21381
21382 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
21383 dcbtt and dcbtstt if operands[2] is 0.
21384
21385 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
21386
21387 PR target/85693
21388 * config/i386/sse.md (usadv64qi): New expander.
21389
21390 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
21391
21392 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
21393 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
21394 -maltivec=be support.
21395 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
21396 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
21397 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
21398 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
21399 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
21400 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
21401 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
21402 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
21403 altivec_vsumsws): Adjust.
21404 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
21405 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
21406 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
21407 support.
21408 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
21409 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
21410 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
21411 (altivec_lve<VI_char>x): Delete expand.
21412 (*altivec_lve<VI_char>x_internal): Rename to...
21413 (altivec_lve<VI_char>x): ... this.
21414 (altivec_lvxl_<mode>): Delete expand.
21415 (*altivec_lvxl_<mode>_internal): Rename to ...
21416 (altivec_lvxl_<mode>): ... this.
21417 (altivec_stvxl_<mode>): Delete expand.
21418 (*altivec_stvxl_<mode>_internal): Rename to ...
21419 (altivec_stvxl_<mode>): ... this.
21420 (altivec_stve<VI_char>x): Delete expand.
21421 (*altivec_stve<VI_char>x_internal): Rename to ...
21422 (altivec_stve<VI_char>x): ... this.
21423 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
21424 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
21425 reduc_plus_scal_<mode>): Adjust.
21426 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
21427 comment.
21428 (rs6000_cpu_cpp_builtins): Adjust.
21429 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
21430 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
21431 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
21432 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
21433 -maltivec=be support.
21434 (rs6000_split_vec_extract_var): Adjust.
21435 (rs6000_split_v4si_init): Adjust.
21436 (swap_selector_for_mode): Delete.
21437 (altivec_expand_lvx_be, altivec_expand_stvx_be,
21438 altivec_expand_stvex_be): Delete.
21439 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
21440 -maltivec=be support.
21441 (rs6000_gimple_fold_builtin): Ditto.
21442 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
21443 Adjust.
21444 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
21445 (TARGET_DIRECT_MOVE_64BIT): Adjust.
21446 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
21447 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
21448 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
21449 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
21450 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
21451 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
21452 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
21453 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
21454 anonymous split): Adjust.
21455 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
21456 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
21457
21458 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
21459
21460 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
21461 when --with-gxx-include-dir is also specified.
21462 * configure: Regenerate.
21463
21464 2018-05-09 Jim Wilson <jimw@sifive.com>
21465
21466 PR target/84797
21467 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
21468 * config/riscv/t-withmultilib: New.
21469 * config/riscv/withmultilib.h: New.
21470 * doc/install.texi: Document RISC-V --with-multilib-list support.
21471
21472 2018-05-09 Richard Biener <rguenther@suse.de>
21473
21474 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
21475 vector.
21476 (vect_bb_vectorization_profitable_p): Adjust. Compute
21477 actual scalar cost using the cost vector and the add_stmt_cost
21478 machinery.
21479
21480 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
21481
21482 PR rtl-optimization/85645
21483 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
21484 in the REG_CFA_REGISTER note for LR, don't leave it empty.
21485
21486 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
21487
21488 PR rtl-optimization/85645
21489 * shrink-wrap.c (spread_components): Return a boolean saying if
21490 anything was changed.
21491 (try_shrink_wrapping_separate): Iterate spread_components until
21492 nothing changes anymore.
21493
21494 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
21495
21496 PR rtl-optimization/85645
21497 * regrename.c (build_def_use): Also kill the chains that include the
21498 destination of a REG_CFA_REGISTER note.
21499
21500 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
21501
21502 PR rtl-optimization/85645
21503 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
21504 insn that has a REG_CFA_REGISTER note.
21505
21506 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
21507
21508 * cfgexpand.c (expand_clobber): New function.
21509 (expand_gimple_stmt_1): Use it.
21510 * tree-vect-stmts.c (vect_clobber_variable): New function,
21511 split out from...
21512 (vectorizable_simd_clone_call): ...here.
21513 (vectorizable_store): Emit a clobber either side of an
21514 IFN_STORE_LANES sequence.
21515 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
21516
21517 2018-05-09 Tom de Vries <tom@codesourcery.com>
21518
21519 PR target/85626
21520 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
21521 (define_insn "trap_if_false"): Add exit after trap.
21522
21523 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
21524
21525 PR rtl-optimization/85638
21526 * bb-reorder.c: Include common/common-target.h.
21527 (create_forwarder_block): New function extracted from...
21528 (fix_up_crossing_landing_pad): ...here. Rename into...
21529 (dw2_fix_up_crossing_landing_pad): ...this.
21530 (sjlj_fix_up_crossing_landing_pad): New function.
21531 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
21532 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
21533 from both partitions and exit the loop after one iteration.
21534
21535 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
21536
21537 Revert:
21538 * doc/extend.texi (PowerPC Built-in Functions): Rename this
21539 subsection.
21540 (Basic PowerPC Built-in Functions): The new name of the
21541 subsection previously known as "PowerPC Built-in Functions".
21542 (Basic PowerPC Built-in Functions Available on all Configurations):
21543 New subsubsection.
21544 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
21545 subsubsection.
21546 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
21547 subsubsection.
21548 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
21549 subsubsection.
21550 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
21551 subsubsection.
21552
21553 2018-05-08 Jim Wilson <jimw@sifive.com>
21554
21555 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
21556 (LD_EMUL_SUFFIX): New.
21557 (LINK_SPEC): Use it.
21558
21559 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
21560
21561 * doc/extend.texi (PowerPC Built-in Functions): Rename this
21562 subsection.
21563 (Basic PowerPC Built-in Functions): The new name of the
21564 subsection previously known as "PowerPC Built-in Functions".
21565 (Basic PowerPC Built-in Functions Available on all Configurations):
21566 New subsubsection.
21567 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
21568 subsubsection.
21569 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
21570 subsubsection.
21571 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
21572 subsubsection.
21573 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
21574 subsubsection.
21575
21576 2018-05-08 Jakub Jelinek <jakub@redhat.com>
21577
21578 PR target/85683
21579 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
21580 after cmpelim optimization.
21581
21582 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
21583
21584 * config.gcc: Support "goldmont".
21585 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
21586 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21587 PROCESSOR_GOLDMONT.
21588 * config/i386/i386.c (m_GOLDMONT): Define.
21589 (processor_target_table): Add "goldmont".
21590 (PTA_GOLDMONT): Define.
21591 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
21592 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
21593 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
21594 (fold_builtin_cpu): Add "goldmont".
21595 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
21596 (ix86_option_override_internal): Add "goldmont".
21597 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
21598 (processor_type): Add PROCESSOR_GOLDMONT.
21599 * config/i386/i386.md: Add CPU "glm".
21600 * config/i386/glm.md: New file.
21601 * config/i386/x86-tune.def: Add m_GOLDMONT.
21602 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
21603
21604 2018-05-08 Jakub Jelinek <jakub@redhat.com>
21605
21606 PR target/85572
21607 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
21608 E_V4DImode.
21609 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
21610 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
21611 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
21612
21613 PR target/85317
21614 * config/i386/i386.c (ix86_fold_builtin): Handle
21615 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
21616
21617 PR target/85480
21618 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
21619 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
21620
21621 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
21622
21623 PR target/85658
21624 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
21625 (check_arch): Likewise.
21626 (check_fpu): Return the result rather than printing it.
21627 (end arch): Fix operator precedence.
21628 (end cpu): Likewise.
21629 (END): Print the result from check_fpu.
21630
21631 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
21632 Alan Hayward <alan.hayward@arm.com>
21633 David Sherwood <david.sherwood@arm.com>
21634
21635 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
21636 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
21637 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
21638 (*fcmuo<mode>_and): New patterns.
21639
21640 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
21641
21642 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
21643 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
21644 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
21645 (cmp_op, sve_imm_con): New code attributes.
21646 (SVE_COND_INT_CMP, imm_con): Delete.
21647 (cmp_op): Remove above unspecs from int attribute.
21648 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
21649 to...
21650 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
21651 comparison-specific unspecs.
21652 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
21653 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
21654 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
21655 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
21656 (*vec_fcm<cmp_op><mode>): Rename to...
21657 (*fcm<cmp_op><mode>): ...this and adjust likewise.
21658 (*vec_fcmuo<mode>): Rename to...
21659 (*fcmuo<mode>): ...this and adjust likewise.
21660 (*pred_fcm<cmp_op><mode>): New pattern.
21661 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
21662 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
21663 functions.
21664 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
21665 and UNORDERED.
21666 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
21667 (aarch64_emit_sve_predicated_cond): New function.
21668 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
21669 (aarch64_emit_unspec_cond_or): Replace with...
21670 (aarch64_emit_sve_or_conds): ...this new function. Use
21671 aarch64_emit_sve_ptrue_op for the individual comparisons and
21672 aarch64_emit_binop to OR them together.
21673 (aarch64_emit_inverted_unspec_cond): Replace with...
21674 (aarch64_emit_sve_inverted_cond): ...this new function. Use
21675 aarch64_emit_sve_ptrue_op for the comparison and
21676 aarch64_emit_unop to invert the result.
21677 (aarch64_expand_sve_vec_cmp_float): Update after the above
21678 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
21679
21680 2018-05-07 Nathan Sidwell <nathan@acm.org>
21681
21682 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
21683 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
21684 (Backwards Compatibility): Likewise.
21685
21686 2018-05-07 Luis Machado <luis.machado@linaro.org>
21687
21688 PR bootstrap/85681
21689 Revert:
21690 2018-05-07 Luis Machado <luis.machado@linaro.org>
21691
21692 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21693 <prefetch_dynamic_strides>: New const bool field.
21694 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21695 prefetch_dynamic_strides.
21696 (exynosm1_prefetch_tune): Likewise.
21697 (thunderxt88_prefetch_tune): Likewise.
21698 (thunderx_prefetch_tune): Likewise.
21699 (thunderx2t99_prefetch_tune): Likewise.
21700 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
21701 to false.
21702 (aarch64_override_options_internal): Update to set
21703 PARAM_PREFETCH_DYNAMIC_STRIDES.
21704 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
21705 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
21706 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
21707 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
21708 prefetch-dynamic-strides setting.
21709
21710 2018-05-07 Luis Machado <luis.machado@linaro.org>
21711
21712 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21713 <minimum_stride>: New const int field.
21714 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21715 minimum_stride field.
21716 (exynosm1_prefetch_tune): Likewise.
21717 (thunderxt88_prefetch_tune): Likewise.
21718 (thunderx_prefetch_tune): Likewise.
21719 (thunderx2t99_prefetch_tune): Likewise.
21720 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
21721 (aarch64_override_options_internal): Update to set
21722 PARAM_PREFETCH_MINIMUM_STRIDE.
21723 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
21724 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
21725 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
21726 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
21727 stride is constant and is below the minimum stride threshold.
21728
21729 2018-05-07 Luis Machado <luis.machado@linaro.org>
21730
21731 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
21732 to 512.
21733
21734 2018-05-07 Luis Machado <luis.machado@linaro.org>
21735
21736 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21737 <prefetch_dynamic_strides>: New const bool field.
21738 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21739 prefetch_dynamic_strides.
21740 (exynosm1_prefetch_tune): Likewise.
21741 (thunderxt88_prefetch_tune): Likewise.
21742 (thunderx_prefetch_tune): Likewise.
21743 (thunderx2t99_prefetch_tune): Likewise.
21744 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
21745 to false.
21746 (aarch64_override_options_internal): Update to set
21747 PARAM_PREFETCH_DYNAMIC_STRIDES.
21748 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
21749 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
21750 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
21751 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
21752 prefetch-dynamic-strides setting.
21753
21754 2018-05-07 Luis Machado <luis.machado@linaro.org>
21755
21756 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21757 <minimum_stride>: New const int field.
21758 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21759 minimum_stride field.
21760 (exynosm1_prefetch_tune): Likewise.
21761 (thunderxt88_prefetch_tune): Likewise.
21762 (thunderx_prefetch_tune): Likewise.
21763 (thunderx2t99_prefetch_tune): Likewise.
21764 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
21765 (aarch64_override_options_internal): Update to set
21766 PARAM_PREFETCH_MINIMUM_STRIDE.
21767 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
21768 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
21769 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
21770 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
21771 stride is constant and is below the minimum stride threshold.
21772
21773 2018-05-06 Jakub Jelinek <jakub@redhat.com>
21774
21775 PR c++/85659
21776 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
21777 the type is addressable. Don't force op into register if it has
21778 BLKmode.
21779
21780 2018-05-05 Roland McGrath <mcgrathr@google.com>
21781
21782 PR other/77609
21783 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
21784 any section for which we don't know a specific type it should have,
21785 regardless of name. Previously this was done only for the exact
21786 names ".init_array", ".fini_array", and ".preinit_array".
21787 (default_elf_asm_named_section): Add comment about
21788 relationship with default_section_type_flags and SECTION_NOTYPE.
21789 (get_section): Don't consider it a type conflict if one side has
21790 SECTION_NOTYPE and the other doesn't, as long as neither has the
21791 SECTION_BSS et al used in the default_section_type_flags logic.
21792
21793 2018-05-05 Tom de Vries <tom@codesourcery.com>
21794
21795 PR target/85653
21796 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
21797 (workaround_barsyncs): New function.
21798 (nvptx_reorg): Use workaround_barsyncs.
21799 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
21800 (define_expand "nvptx_membar_cta"): New define_expand.
21801 (define_insn "*nvptx_membar_cta"): New insn.
21802
21803 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
21804
21805 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
21806 To improve optimization opportunities.
21807 * builtin-types.def: The new needed builtin types for the above.
21808
21809 2018-05-04 Richard Biener <rguenther@suse.de>
21810
21811 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
21812 * gimple-ssa-store-merging.c
21813 (imm_store_chain_info::output_merged_store): Remove redundant create,
21814 release split_store vector contents on failure.
21815 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
21816 scalar stmt vector on cache hit.
21817
21818 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
21819
21820 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
21821 Xilinx FP support.
21822 * config.gcc (powerpc-xilinx-eabi*): Remove.
21823 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
21824 support.
21825 (fusion_addis_mem_combo_load): Ditto.
21826 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
21827 FP support.
21828 (rs6000_cpu_cpp_builtins): Ditto.
21829 * config/rs6000/rs6000-linux.c
21830 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
21831 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
21832 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
21833 support.
21834 (rs6000_setup_reg_addr_masks): Ditto.
21835 (rs6000_init_hard_regno_mode_ok): Ditto.
21836 (rs6000_option_override_internal): Ditto.
21837 (legitimate_lo_sum_address_p): Ditto.
21838 (rs6000_legitimize_address): Ditto.
21839 (rs6000_legitimize_reload_address): Ditto.
21840 (rs6000_legitimate_address_p): Ditto.
21841 (abi_v4_pass_in_fpr): Ditto.
21842 (setup_incoming_varargs): Ditto.
21843 (rs6000_gimplify_va_arg): Ditto.
21844 (rs6000_split_multireg_move): Ditto.
21845 (rs6000_savres_strategy): Ditto.
21846 (rs6000_emit_prologue_components): Ditto.
21847 (rs6000_emit_epilogue_components): Ditto.
21848 (rs6000_emit_prologue): Ditto.
21849 (rs6000_emit_epilogue): Ditto.
21850 (rs6000_elf_file_end): Ditto.
21851 (rs6000_function_value): Ditto.
21852 (rs6000_libcall_value): Ditto.
21853 * config/rs6000/rs6000.h: Ditto.
21854 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
21855 (TARGET_MINMAX): ... this. New.
21856 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
21857 * config/rs6000/rs6000.md: Remove Xilinx FP support.
21858 (*movsi_internal1_single): Delete.
21859 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
21860 mfpu=, mxilinx-fpu): Delete.
21861 * config/rs6000/singlefp.h: Delete.
21862 * config/rs6000/sysv4.h: Remove Xilinx FP support.
21863 * config/rs6000/t-rs6000: Ditto.
21864 * config/rs6000/t-xilinx: Delete.
21865 * config/rs6000/titan.md: Adjust for fp_type removal.
21866 * config/rs6000/vsx.md: Remove Xilinx FP support.
21867 (VStype_simple): Delete.
21868 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
21869 * config/rs6000/xfpu.h: Delete.
21870 * config/rs6000/xfpu.md: Delete.
21871 * config/rs6000/xilinx.h: Delete.
21872 * config/rs6000/xilinx.opt: Delete.
21873 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
21874 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
21875
21876 2018-05-04 Tom de Vries <tom@codesourcery.com>
21877
21878 PR libgomp/85639
21879 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
21880 if ignore == 0.
21881
21882 2018-05-04 Richard Biener <rguenther@suse.de>
21883
21884 PR middle-end/85627
21885 * tree-complex.c (update_complex_assignment): We are always in SSA form.
21886 (expand_complex_div_wide): Likewise.
21887 (expand_complex_operations_1): Likewise.
21888 (expand_complex_libcall): Preserve EH info of the original stmt.
21889 (tree_lower_complex): Handle removed blocks.
21890 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
21891 on complex multiplication and division libcall builtins.
21892
21893 2018-05-04 Richard Biener <rguenther@suse.de>
21894
21895 PR middle-end/85574
21896 * fold-const.c (negate_expr_p): Restrict negation of operand
21897 zero of a division to when we know that can happen without
21898 overflow.
21899 (fold_negate_expr_1): Likewise.
21900
21901 2018-05-04 Jakub Jelinek <jakub@redhat.com>
21902
21903 PR libstdc++/85466
21904 * real.h (real_nextafter): Declare.
21905 * real.c (real_nextafter): New function.
21906 * fold-const-call.c (fold_const_nextafter): New function.
21907 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
21908 CASE_CFN_NEXTTOWARD.
21909 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
21910 even when arg1_mode is different from arg0_mode.
21911
21912 2018-05-03 Nathan Sidwell <nathan@acm.org>
21913
21914 * doc/extend.texi (Deprecated Features): Remove
21915 -ffriend-injection.
21916 (Backwards Compatibility): Likewise.
21917 * doc/invoke.texi (C++ Language Options): Likewise.
21918 (C++ Dialect Options): Likewise.
21919
21920 2018-05-03 Jakub Jelinek <jakub@redhat.com>
21921
21922 PR target/85530
21923 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
21924 _mm512_mask_mullox_epi64): New intrinsics.
21925
21926 2018-05-03 Tom de Vries <tom@codesourcery.com>
21927
21928 PR testsuite/85106
21929 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21930 dump files): Add offload-tree.
21931
21932 2018-05-03 Richard Biener <rguenther@suse.de>
21933
21934 PR tree-optimization/85615
21935 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
21936 to loops not nested in BBs loop father to avoid creating multi-entry
21937 loops.
21938
21939 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21940
21941 PR tree-optimization/70291
21942 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
21943 arguments. Change return type to tree. Emit libcall as a new
21944 statement rather than replacing existing one when inplace_p is true.
21945 (expand_complex_multiplication_components): New function.
21946 (expand_complex_multiplication): Expand floating-point complex
21947 multiplication using the above.
21948 (expand_complex_division): Rename inner_type parameter to type.
21949 Update expand_complex_libcall call-site.
21950 (expand_complex_operations_1): Update expand_complex_multiplication
21951 and expand_complex_division call-sites.
21952
21953 2018-05-02 Jakub Jelinek <jakub@redhat.com>
21954
21955 PR target/85582
21956 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
21957 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
21958 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
21959 the highest significant bit of the shift count mask is clear. In
21960 check whether and[sq]i3 is needed verify that all significant bits
21961 of the shift count other than the highest are set.
21962
21963 2018-05-02 Tom de Vries <tom@codesourcery.com>
21964
21965 PR libgomp/82428
21966 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
21967 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
21968 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
21969 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
21970 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
21971 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
21972 __builtin_goacc_parlevel_size.
21973
21974 2018-05-02 Richard Biener <rguenther@suse.de>
21975
21976 PR tree-optimization/85597
21977 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
21978 do not use split vect_get_vec_defs call but call vect_get_slp_defs
21979 directly.
21980
21981 2018-05-02 Tom de Vries <tom@codesourcery.com>
21982
21983 PR testsuite/85106
21984 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21985 dump files): Add ltrans-tree.
21986
21987 2018-05-02 Tom de Vries <tom@codesourcery.com>
21988
21989 PR testsuite/85106
21990 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21991 dump files): Add wpa-ipa.
21992
21993 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
21994
21995 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
21996 powerpc*-*-linux*paired* target.
21997 * config/rs6000/750cl.h: Delete.
21998 * config/rs6000/paired.h: Delete.
21999 * config/rs6000/paired.md: Delete.
22000 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
22001 float support.
22002 * config/rs6000/rs6000-builtin.def: Remove paired float support.
22003 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
22004 comment. Remove paired float support.
22005 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
22006 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
22007 VECTOR_PAIRED.
22008 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
22009 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
22010 declarations.
22011 * config/rs6000/rs6000.c: Remove paired float support.
22012 (paired_expand_vector_init, paired_expand_vector_move,
22013 paired_emit_vector_compare, paired_emit_vector_cond_expr,
22014 (paired_expand_lv_builtin, paired_expand_stv_builtin,
22015 paired_expand_builtin, paired_expand_predicate_builtin,
22016 paired_init_builtins): Delete.
22017 * config/rs6000/rs6000.h: Remove paired float support.
22018 * config/rs6000/rs6000.md: Remove paired float support.
22019 (move_from_CR_ov_bit): Delete.
22020 * config/rs6000/rs6000.opt (mpaired): Delete.
22021 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
22022 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
22023
22024 2018-05-02 Richard Biener <rguenther@suse.de>
22025
22026 PR middle-end/85567
22027 * gimplify.c (gimplify_save_expr): When in SSA form allow
22028 SAVE_EXPRs to compute to SSA vars.
22029
22030 2018-05-02 Jakub Jelinek <jakub@redhat.com>
22031
22032 PR target/85582
22033 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
22034 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
22035 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
22036 clobber operands[2], instead use a new pseudo. Formatting fixes.
22037
22038 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
22039
22040 PR tree-optimization/85586
22041 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
22042 exit early for statements in the same group if the accesses are
22043 not strided.
22044
22045 2018-05-02 Tom de Vries <tom@codesourcery.com>
22046
22047 PR lto/85451
22048 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
22049 error message.
22050
22051 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
22052
22053 PR tree-optimization/85143
22054 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
22055
22056 2018-05-01 Tom de Vries <tom@codesourcery.com>
22057
22058 PR lto/85451
22059 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
22060 not found" error message.
22061
22062 2018-05-01 Tom de Vries <tom@codesourcery.com>
22063
22064 PR other/83786
22065 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
22066 * vec.c (test_ordered_remove_if): New function.
22067 (vec_c_tests): Call test_ordered_remove_if.
22068 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
22069 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
22070 * tree-vect-patterns.c (vect_pattern_recog_1): Use
22071 VEC_ORDERED_REMOVE_IF.
22072
22073 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22074
22075 PR tree-optimization/82665
22076 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
22077 pointer subtraction where arguments come from a memchr call.
22078
22079 2018-05-01 Jakub Jelinek <jakub@redhat.com>
22080
22081 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
22082 --push-state --as-needed and --pop-state instead of --as-needed and
22083 --no-as-needed if ld supports it.
22084 * configure: Regenerated.
22085
22086 PR web/85578
22087 * doc/install.texi2html: Replace _002d with - and _002a with * in
22088 generated html files using sed.
22089
22090 2018-04-30 David Malcolm <dmalcolm@redhat.com>
22091
22092 PR c++/85523
22093 * gcc-rich-location.c (blank_line_before_p): New function.
22094 (use_new_line): New function.
22095 (gcc_rich_location::add_fixit_insert_formatted): New function.
22096 * gcc-rich-location.h
22097 (gcc_rich_location::add_fixit_insert_formatted): New function.
22098
22099 2018-04-30 David Malcolm <dmalcolm@redhat.com>
22100
22101 * selftest.c (assert_streq): Rename "expected" and "actual" to
22102 "val1" and "val2". Extend NULL-handling to cover both inputs
22103 symmetrically, while still requiring both to be non-NULL for a pass.
22104 * selftest.h (assert_streq): Rename "expected" and "actual" to
22105 "val1" and "val2".
22106 (ASSERT_EQ): Likewise.
22107 (ASSERT_EQ_AT): Likewise.
22108 (ASSERT_KNOWN_EQ): Likewise.
22109 (ASSERT_KNOWN_EQ_AT): Likewise.
22110 (ASSERT_NE): Likewise.
22111 (ASSERT_MAYBE_NE): Likewise.
22112 (ASSERT_MAYBE_NE_AT): Likewise.
22113 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
22114 the assertion to pass.
22115 (ASSERT_STREQ_AT): Likewise.
22116
22117 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
22118
22119 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
22120 interaction with -pie.
22121
22122 2018-04-30 David Malcolm <dmalcolm@redhat.com>
22123
22124 * selftest.h: Fix alphabetization of per-source-file selftest
22125 declarations.
22126
22127 2018-04-30 Jason Merrill <jason@redhat.com>
22128
22129 PR c++/61982 - dead stores to destroyed objects.
22130 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
22131 of clobber.
22132
22133 2018-04-30 Jason Merrill <jason@redhat.com>
22134
22135 * tree.c (build_clobber): New.
22136 * tree.h: Declare it.
22137 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
22138
22139 2018-04-30 David Malcolm <dmalcolm@redhat.com>
22140
22141 * diagnostic-show-locus.c (layout::layout): Update for
22142 location_get_source_line returning a char_span.
22143 (struct char_span): Move to input.h.
22144 (struct correction): Update for fields in char_span becoming
22145 private.
22146 (struct source_line): Update for location_get_source_line
22147 returning a char_span.
22148 (layout::print_line): Likewise.
22149 * edit-context.c (edited_file::print_content): Likewise.
22150 (edited_file::print_diff_hunk): Likewise.
22151 (edited_file::print_run_of_changed_lines): Likewise.
22152 (edited_file::get_num_lines): Likewise.
22153 (edited_line::edited_line): Likewise.
22154 * final.c (asm_show_source): Likewise.
22155 * input.c (location_get_source_line): Convert return type
22156 from const char * to char_span, losing the final "line_len"
22157 param.
22158 (dump_location_info): Update for the above.
22159 (get_substring_ranges_for_loc): Likewise. Use a char_span
22160 when handling the literal within the line.
22161 (test_reading_source_line): Update for location_get_source_line
22162 returning a char_span.
22163 * input.h (class char_span): Move here from
22164 diagnostic-show-locus.c, converting from a struct to a class.
22165 Make data members private.
22166 (char_span::operator bool): New.
22167 (char_span::length): New.
22168 (char_span::get_buffer): New.
22169 (char_span::operator[]): New.
22170 (char_span::subspan): Make const.
22171 (char_span::xstrdup): New.
22172 (location_get_source_line): Convert return type from const char *
22173 to char_span, losing the final "line_size" param.
22174
22175 2018-04-30 Jan Hubicka <jh@suse.cz>
22176
22177 * lto-wrapper.c (ltrans_priorities): New static var.
22178 (cmp_priority): New.
22179 (run_gcc): Read priorities and if doing parallel build order
22180 the Makefile by them.
22181
22182 2018-04-30 David Malcolm <dmalcolm@redhat.com>
22183
22184 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
22185
22186 2018-04-30 Richard Biener <rguenther@suse.de>
22187
22188 * tree-cfg.c (verify_address): Remove base argument, add
22189 flag whether to check TREE_ADDRESSABLE and do that.
22190 (verify_expr): Remove.
22191 (verify_types_in_gimple_reference): Add pieces from verify_expr.
22192 (verify_gimple_assign_single): Likewise.
22193 (verify_gimple_switch): Likewise.
22194 (verify_expr_location_1): Dereference tp once. Add (disabled)
22195 piece from verify_expr.
22196 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
22197
22198 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
22199
22200 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
22201
22202 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
22203
22204 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
22205 (small_data_pattern): Likewise.
22206 (arc_rewrite_small_data): Likewise.
22207 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
22208 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
22209 (get_symbol_alignment): New function.
22210 (legitimate_small_data_address_p): Likewise.
22211 (legitimate_scaled_address): Update, call
22212 legitimate_small_data_address_p.
22213 (output_sdata): New static variable.
22214 (arc_print_operand): Update how we handle small data operands.
22215 (arc_print_operand_address): Likewise.
22216 (arc_legitimate_address_p): Update, use
22217 legitimate_small_data_address_p.
22218 (arc_rewrite_small_data_p): Remove.
22219 (arc_rewrite_small_data_1): Likewise.
22220 (arc_rewrite_small_data): Likewise.
22221 (small_data_pattern): Likewise.
22222 (compact_sda_memory_operand): Update to use
22223 legitimate_small_data_address_p and get_symbol_alignment.
22224 (prepare_move_operands): Don't rewite sdata pattern.
22225 (prepare_extend_operands): Remove.
22226 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
22227 pattern.
22228 (zero_extendqisi2): Likewise.
22229 (zero_extendhisi2): Likewise.
22230 (extendqihi2): Likewise.
22231 (extendqisi2): Likewise.
22232 (extendhisi2): Likewise.
22233 (addsi3): Likewise.
22234 (subsi3): Likewise.
22235 (andsi3): Likewise.
22236 * config/arc/constraints.md (Usd): Change it to memory constraint.
22237
22238 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
22239
22240 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
22241 as source of std instructions.
22242 * config/arc/arc.md (movsi_insn): Update pattern predicate to
22243 allow 6-bit constants as source for store instructions.
22244 (movdi_insn): Update instruction pattern to allow 6-bit constants
22245 as source for store instructions.
22246
22247 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
22248
22249 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
22250
22251 2018-04-30 Nathan Sidwell <nathan@acm.org>
22252 Sandra Loosemore <sandra@codesourcery.com>
22253
22254 * dumpfile.c (dump_open): Allow '-' for stdout.
22255 * doc/invoke.texi (Developer Options): Document dump filename
22256 determination early. Document stdin/stdout selection.
22257
22258 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
22259
22260 Microblaze Target: PIC data text relative
22261
22262 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
22263 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
22264 Add declaration.
22265 * config/microblaze/microblaze.h (microblaze_constant_address_p):
22266 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
22267 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
22268 New addressing mode for data-text relative position indepenedent code.
22269 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
22270 'ADDRESS_SYMBOLIC_TXT_REL'.
22271 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
22272 (microblaze_legitimate_pic_operand): Exclude function calls from
22273 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
22274 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
22275 addresses cases.
22276 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
22277 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
22278 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
22279 for 'address + offset'.
22280 (microblaze_expand_prologue): Add new function prologue call for
22281 'r20' assignation.
22282 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
22283 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
22284 table in case of TARGET_PIC_DATA_TEXT_REL.
22285 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
22286 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
22287 Add new macros 'UNSPEC_TEXT',
22288 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
22289 + exclude function calls from 'UNSPEC_PLT' in case of data text
22290 relative mode.
22291 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
22292 new target hook for generating address diff vector tables in case of
22293 flag_pic.
22294 * doc/tm.texi : Regenerate.
22295 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
22296 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
22297 of addr diff vector generation.
22298 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
22299 target hook definition.
22300 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
22301 Add default function for generate_pic_addr_diff_vec -> flag_pic.
22302 * doc/invoke.texi (Add new pic option): Add new microblaze pic
22303 option for data text relative.
22304
22305 2018-04-30 Richard Biener <rguenther@suse.de>
22306
22307 * tree-chrec.h (evolution_function_is_constant_p): Remove
22308 redundant check.
22309 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
22310
22311 2018-04-30 Richard Biener <rguenther@suse.de>
22312
22313 PR bootstrap/85571
22314 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
22315
22316 2018-04-30 Richard Biener <rguenther@suse.de>
22317
22318 PR tree-optimization/28364
22319 PR tree-optimization/85275
22320 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
22321 copying first exit test.
22322
22323 2018-04-28 Mark Wielaard <mark@klomp.org>
22324
22325 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
22326 dwarf_version >= 5.
22327 (dwarf_AT): Handle DW_AT_addr_base.
22328 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
22329
22330 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
22331
22332 PR target/84431
22333 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
22334 (*ashl<dwi>3_doubleword_mask_1): Ditto.
22335 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
22336 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
22337
22338 2018-04-28 Richard Biener <rguenther@suse.de>
22339
22340 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
22341 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
22342 to reflect use. Only add interesting stmts.
22343
22344 2018-04-27 Martin Jambor <mjambor@suse.cz>
22345
22346 PR ipa/85549
22347 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
22348 the jump function allows for passing through aggregate values.
22349
22350 2018-04-27 David Malcolm <dmalcolm@redhat.com>
22351
22352 * input.h (in_system_header_at): Convert from macro to inline
22353 function.
22354 (from_macro_expansion_at): Likewise.
22355 (from_macro_definition_at): Likewise.
22356
22357 2018-04-27 Jeff Law <law@redhat.com>
22358
22359 * config.gcc: Mark tile* targets as deprecated/obsolete.
22360
22361 2018-04-27 Richard Biener <rguenther@suse.de>
22362
22363 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
22364 fix for ILP32.
22365
22366 2018-04-27 Richard Biener <rguenther@suse.de>
22367
22368 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
22369
22370 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
22371
22372 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
22373 with Yd constraint. Set "preferred_for_speed" attribute from
22374 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
22375 with Yd constraint.
22376 (*movdi_internal): Ditto.
22377 (movti_interunit splitters): Remove
22378 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
22379 (movdi_interunit splitters): Ditto.
22380 * config/i386/constraints.md (Ye): Remove.
22381 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
22382
22383 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22384
22385 PR target/85512
22386 * config/aarch64/constraints.md (Usg): Limit to 31.
22387 (Usj): Limit to 63.
22388
22389 2018-04-27 Jakub Jelinek <jakub@redhat.com>
22390
22391 PR tree-optimization/85529
22392 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
22393 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
22394 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
22395 zero extension or masking of the MSB bit.
22396 (optimize_range_tests): Add FIRST_BB argument, pass it through
22397 to optimize_range_tests_var_bound.
22398 (maybe_optimize_range_tests, reassociate_bb): Adjust
22399 optimize_range_tests callers.
22400
22401 2018-04-26 Richard Biener <rguenther@suse.de>
22402 Jakub Jelinek <jakub@redhat.com>
22403
22404 * cgraph.h (symbol_table): Just declare debug method here.
22405 * symtab.c (symbol_table::debug): Define.
22406
22407 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
22408
22409 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
22410
22411 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
22412
22413 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
22414 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
22415 (*movdi_internal): Substitute Yi and Yj constraint with x
22416 and Ym and Yn constraint with y constraint. Update "isa"
22417 attribute and set "preferred_for_speed" attribute from
22418 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
22419 (*movsi_internal): Ditto.
22420 (*movdf_internal): Ditto.
22421 (*movsf_internal): Ditto.
22422 (*zero_extendsidi2): Ditto.
22423 * config/i386/sse.md (vec_set<mode>_0): Ditto.
22424 (sse2_loadld): Ditto.
22425 (*vec_extract<ssevecmodelower>_0): Ditto.
22426 (*vec_extractv4si_0_zext_sse4): Ditto.
22427 (vec_concatv2di): Ditto.
22428 (*vec_dup<mode>): Ditto.
22429 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
22430 * config/i386/constraints.md (Yi): Remove.
22431 (Yj): Remove.
22432 (Ym): Remove.
22433 (Yn): Remove.
22434
22435 2018-04-26 Nathan Sidwell <nathan@acm.org>
22436
22437 * dumpfile.c (dump_open): New.
22438 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
22439 (dump_finish): Detect stdio/stderr by value not name.
22440
22441 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
22442
22443 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
22444
22445 2018-04-26 Tom de Vries <tom@codesourcery.com>
22446
22447 PR target/84952
22448 * config/nvptx/nvptx.c (verify_neutering_jumps)
22449 (verify_neutering_labels): New function
22450 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
22451
22452 2018-04-26 Tom de Vries <tom@codesourcery.com>
22453
22454 PR target/84025
22455 * config/nvptx/nvptx.c (needs_neutering_p): New function.
22456 (nvptx_single): Use needs_neutering_p to skip over insns that do not
22457 need neutering.
22458
22459 2018-04-26 Richard Biener <rguenther@suse.de>
22460 Tom de Vries <tom@codesourcery.com>
22461
22462 PR lto/85422
22463 * lto-streamer-out.c (output_function): Fixup loops if required to match
22464 discovery done in the reader.
22465
22466 2018-04-26 Richard Biener <rguenther@suse.de>
22467
22468 PR tree-optimization/85116
22469 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
22470 have a loop exit from the single latch predecessor. Remove
22471 case of header with just condition.
22472 (ch_base::copy_headers): Exclude infinite loops from any
22473 processing.
22474 (pass_ch::execute): Record exits.
22475
22476 2018-04-26 Richard Biener <rguenther@suse.de>
22477
22478 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
22479 prologue cost vector and pass it to vect_get_load_cost.
22480 (vect_get_peeling_costs_all_drs): Likewise.
22481 (vect_peeling_hash_get_lowest_cost): Likewise.
22482 (vect_enhance_data_refs_alignment): Likewise.
22483
22484 2018-04-26 Richard Biener <rguenther@suse.de>
22485
22486 PR middle-end/85450
22487 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
22488 checking of integer<->pointer conversions.
22489 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
22490 sign-/zero-extending pointer types.
22491 (expand_omp_for_static_chunk): Likewise.
22492
22493 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
22494 Jean Lee <xiaoyur347@gmail.com>
22495
22496 * config/mips/mips.c (mips_asan_shadow_offset): New function.
22497 (TARGET_ASAN_SHADOW_OFFSET): Define.
22498 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
22499 true for -fsanitize=address.
22500
22501 2018-04-25 Mark Wielaard <mark@klomp.org>
22502
22503 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
22504 shorter ones.
22505
22506 2018-04-25 Jakub Jelinek <jakub@redhat.com>
22507
22508 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
22509 than "alu", remove explicit "memory" and "imm_disp" attributes.
22510 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
22511
22512 PR middle-end/85414
22513 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
22514 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
22515 gen_lowpart_no_emit.
22516
22517 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
22518
22519 PR target/85473
22520 * config/i386/i386.c (ix86_expand_builtin): Change memory
22521 operand to XI, extend p0 to Pmode.
22522 * config/i386/i386.md: Change unspec volatile and operand
22523 1 mode to XI, change operand 0 mode to P.
22524
22525 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
22526
22527 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
22528 GET_MODE_MASK before any checking.
22529 (nds32_can_use_bset_p): Likewise.
22530 (nds32_can_use_btgl_p): Likewise.
22531
22532 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
22533
22534 * config/nds32/nds32-doubleword.md: New define_split pattern for
22535 illegal register number.
22536
22537 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
22538
22539 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
22540
22541 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
22542
22543 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
22544
22545 2018-04-25 Richard Biener <rguenther@suse.de>
22546
22547 * lto-streamer.h (LTO_major_version): Bump to 8.
22548
22549 2018-04-25 Jakub Jelinek <jakub@redhat.com>
22550
22551 * BASE-VER: Set to 9.0.0.
22552
22553 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
22554
22555 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
22556 in __abskf2 and __powikf2.
22557
22558 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22559
22560 PR target/85512
22561 * config/aarch64/constraints.md (Usg, Usj): New constraints.
22562 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
22563 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
22564 Use the above on operand 2. Reindent.
22565 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
22566
22567 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
22568
22569 PR target/85485
22570 * common/config/i386/i386-common.c (ix86_handle_option): Don't
22571 handle OPT_mcet.
22572 * config/i386/i386.opt (mcet): Removed.
22573 * doc/install.texi: Remove -mcet documentation.
22574 * doc/invoke.texi: Likewise.
22575
22576 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
22577
22578 PR target/85485
22579 * doc/install.texi: Remove -mcet from bootstrap-cet.
22580
22581 2018-04-24 Jakub Jelinek <jakub@redhat.com>
22582
22583 PR target/85511
22584 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
22585 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
22586 if TARGET_64BIT.
22587
22588 PR target/85503
22589 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
22590 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
22591 containing a CONST_VECTOR.
22592
22593 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
22594
22595 * doc/install.texi: Update newlib dependency for nvptx.
22596
22597 2018-04-24 Jakub Jelinek <jakub@redhat.com>
22598
22599 PR target/85508
22600 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
22601 instead of INTVAL when shifting x left.
22602
22603 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
22604
22605 PR tree-optimization/85478
22606 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
22607 vect_grouped_store_supported for single element vectors.
22608
22609 2018-04-24 Richard Biener <rguenther@suse.de>
22610
22611 PR target/85491
22612 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
22613 load cost increase to the case of non-constant step.
22614
22615 2018-04-24 Jakub Jelinek <jakub@redhat.com>
22616
22617 PR target/84828
22618 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
22619 destination if any_malformed_asm.
22620
22621 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
22622
22623 PR middle-end/85496
22624 * expr.c (store_field): In the bitfield case, if the value comes from
22625 a function call and is returned in registers by means of a PARALLEL,
22626 do not change the mode of the temporary unless BLKmode and VOIDmode.
22627
22628 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
22629
22630 PR rtl-optimization/85423
22631 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
22632 dependencies to debug insns when the previous insn is non-debug.
22633
22634 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
22635
22636 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
22637 enums into a single definition.
22638 (fls): Fix predicates and printing.
22639 (seti): Likewise.
22640
22641 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
22642
22643 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
22644 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
22645 and short u6 immediate.
22646 (check_if_valid_sleep_operand): Remove.
22647 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
22648
22649 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22650
22651 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
22652 flag_always_save_lp condition.
22653 * config/nds32/nds32.opt (malways-save-lp): New option.
22654
22655 2018-04-22 Shiva Chen <shiva0217@gmail.com>
22656
22657 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
22658 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
22659 * config/nds32/nds32.h
22660 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
22661 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
22662
22663 2018-04-22 Shiva Chen <shiva0217@gmail.com>
22664
22665 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
22666 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
22667
22668 2018-04-22 Shiva Chen <shiva0217@gmail.com>
22669 Chung-Ju Wu <jasonwucj@gmail.com>
22670
22671 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
22672 Declare.
22673 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
22674 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
22675
22676 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22677
22678 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
22679
22680 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22681
22682 * config/nds32/nds32-protos.h (nds32_data_alignment,
22683 nds32_local_alignment): Declare.
22684 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
22685 nds32_local_alignment): New functions.
22686 (TARGET_CONSTANT_ALIGNMENT): Define.
22687 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
22688
22689 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22690
22691 * config/nds32/nds32.c
22692 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
22693 (TARGET_MODES_TIEABLE_P): Likewise.
22694
22695 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22696
22697 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
22698 level Ofast and Og.
22699
22700 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
22701 Chung-Ju Wu <jasonwucj@gmail.com>
22702
22703 * config/nds32/constants.md (unspec_volatile_element): Add enum values
22704 for unaligned access.
22705 * config/nds32/nds32-intrinsic.c: Implementation of expanding
22706 unaligned access.
22707 * config/nds32/nds32-intrinsic.md: Likewise.
22708 * config/nds32/nds32_intrinsic.h: Likewise.
22709 * config/nds32/nds32.h (nds32_builtins): Likewise.
22710 * config/nds32/nds32.opt (munaligned-access): New option.
22711 * config/nds32/nds32.c (nds32_asm_file_start): Display
22712 flag_unaligned_access status.
22713
22714 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
22715
22716 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
22717 -mno-relax is present.
22718 * config/riscv/linux.h (LINK_SPEC): Ditto.
22719
22720 2018-04-20 Martin Sebor <msebor@redhat.com>
22721
22722 PR c/85365
22723 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
22724 for null pointers.
22725 (gimple_fold_builtin_stxcpy_chk): Same.
22726 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
22727
22728 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
22729
22730 PR target/85456
22731 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
22732 __powikf2 when long double is IEEE 128-bit.
22733
22734 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
22735
22736 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
22737 step to make sure stack always aligned.
22738
22739 2018-04-20 Carl Love <cel@us.ibm.com>
22740
22741 PR target/83402
22742 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
22743 size check for arg0.
22744
22745 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
22746 Tom de Vries <tom@codesourcery.com>
22747
22748 PR target/85445
22749 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
22750 Emit insns for calls too.
22751 (nvptx_find_par): Always look for worker-level predecessor insn.
22752 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
22753 calls.
22754 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
22755 (nvptx_process_pars): Propagate frames for calls.
22756
22757 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
22758
22759 PR target/85469
22760 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
22761 Removed.
22762 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
22763 (ix86_handle_option): Don't handle OPT_mibt.
22764 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
22765 __SHSTK__.
22766 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
22767 has_ibt and ibt.
22768 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
22769 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
22770 (ix86_target_macros): Define __CET__ with flag_cf_protection
22771 for -fcf-protection.
22772 * config/i386/i386.c (isa2_opts): Remove -mibt.
22773 * config/i386/i386.h (TARGET_IBT): Removed.
22774 (TARGET_IBT_P): Likewise.
22775 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
22776 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
22777 * config/i386/i386.opt (mcet): Update help message.
22778 (mshstk): Likewise.
22779 (mibt): Removed.
22780 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
22781 -mcet as an alias for -mshstk.
22782
22783 2018-04-20 Richard Biener <rguenther@suse.de>
22784
22785 PR middle-end/85475
22786 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
22787 complexity by forcing a single use of the multiply operand.
22788
22789 2018-04-20 Martin Jambor <mjambor@suse.cz>
22790
22791 ipa/85449
22792 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
22793 recursion dependency to only apply to non-clones.
22794
22795 2018-04-20 Martin Jambor <mjambor@suse.cz>
22796
22797 ipa/85447
22798 * ipa-cp.c (create_specialized_node): Check that clones of
22799 self-recursive edges exist during IPA-CP.
22800
22801 2018-04-19 Toon Moene <toon@moene.org>
22802
22803 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
22804 by -O3.
22805
22806 2018-04-19 Jakub Jelinek <jakub@redhat.com>
22807
22808 PR tree-optimization/85467
22809 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
22810 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
22811 VECTOR_CST element to type.
22812
22813 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
22814
22815 PR target/85397
22816 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
22817 * config/i386/i386.md (builtin_setjmp_setup): Removed.
22818 (builtin_longjmp): Likewise.
22819 (save_stack_nonlocal): New pattern.
22820 (restore_stack_nonlocal): Likewise.
22821
22822 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
22823
22824 PR target/85404
22825 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
22826 Replace ASM_OUTPUT_LABEL with fprintf.
22827
22828 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
22829
22830 PR target/85417
22831 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
22832 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
22833 * config/i386/i386-c.c (ix86_target_macros_internal): Also
22834 define __IBT__ and __SHSTK__ for -fcf-protection.
22835 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
22836 TARGET_IBT.
22837 (ix86_trampoline_init): Likewise.
22838 (x86_output_mi_thunk): Likewise.
22839 (ix86_notrack_prefixed_insn_p): Likewise.
22840 (ix86_option_override_internal): Don't disallow -fcf-protection.
22841 * config/i386/i386.md (rdssp<mode>): Also enable for
22842 -fcf-protection.
22843 (incssp<mode>): Likewise.
22844 (nop_endbr): Likewise.
22845 * config/i386/i386.opt (mcet): Change help message to built-in
22846 functions only.
22847 (mibt): Likewise.
22848 (mshstk): Likewise.
22849 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
22850 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
22851 enable CET built-in functions.
22852
22853 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
22854
22855 * common/config/i386/i386-common.c
22856 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
22857 OPTION_MASK_ISA_MOVDIRI_UNSET,
22858 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
22859 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
22860 * config.gcc (movdirintrin.h): New header.
22861 * config/i386/cpuid.h (bit_MOVDIRI,
22862 bit_MOVDIR64B): New bits.
22863 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
22864 and -mmvodir64b.
22865 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
22866 (VOID, PVOID, PCVOID)): New function types.
22867 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
22868 __builtin_ia32_directstoreu_u64,
22869 __builtin_ia32_movdir64b): New builtins.
22870 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
22871 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
22872 and -mmovdiri.
22873 (ix86_valid_target_attribute_inner_p): Ditto.
22874 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
22875 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
22876 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
22877 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
22878 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
22879 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
22880 (movdiri<mode>, movdir64b_<mode>): New.
22881 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
22882 * config/i386/immintrin.h: Include movdirintrin.h.
22883 * config/i386/movdirintrin.h: New file.
22884 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
22885
22886 2018-04-19 Richard Biener <rguenther@suse.de>
22887
22888 PR middle-end/85455
22889 * cfg.c (clear_bb_flags): When loop state says we have
22890 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
22891
22892 2018-04-19 Richard Biener <rguenther@suse.de>
22893
22894 PR tree-optimization/84737
22895 * tree-vect-data-refs.c (vect_copy_ref_info): New function
22896 copying restrict info.
22897 (vect_setup_realignment): Use it.
22898 * tree-vectorizer.h (vect_copy_ref_info): Declare.
22899 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
22900 the first DR to all generated stores.
22901 (vectorizable_load): Likewise for loads.
22902
22903 2018-04-19 Jakub Jelinek <jakub@redhat.com>
22904
22905 PR tree-optimization/85446
22906 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
22907 the integral and pointer types to have the same precision.
22908
22909 * doc/install.texi: Document --disable-cet being the default and
22910 --enable-cet=auto.
22911
22912 2018-04-18 Martin Liska <mliska@suse.cz>
22913
22914 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
22915 style.
22916
22917 2018-04-18 Martin Liska <mliska@suse.cz>
22918
22919 Revert
22920 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
22921
22922 PR ipa/83983
22923 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22924 arguments if they are comparable.
22925
22926 2018-04-18 Martin Liska <mliska@suse.cz>
22927
22928 Revert
22929 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
22930
22931 PR lto/84805
22932 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
22933 incomplete types.
22934
22935 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
22936
22937 PR target/85388
22938 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
22939 ENDBR after calling __morestack.
22940
22941 2018-04-18 David Malcolm <dmalcolm@redhat.com>
22942
22943 PR jit/85384
22944 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
22945 by using gcc_base_ver to generate a gcc_driver_version, and use
22946 it when generating GCC_DRIVER_NAME.
22947 * configure: Regenerate.
22948
22949 2018-04-18 Jakub Jelinek <jakub@redhat.com>
22950
22951 PR target/81084
22952 * config.gcc: Obsolete powerpc*-*-*spe*.
22953
22954 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22955
22956 PR debug/84637
22957 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
22958 (stabstr_D): Change type of unum from unsigned int to
22959 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
22960 type.
22961
22962 2018-04-17 Jim Wilson <jimw@sifive.com>
22963
22964 PR 84856
22965 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
22966 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
22967 Set arg_pointer_offset after using pretend_args_size.
22968
22969 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22970
22971 PR rtl-optimization/85431
22972 * dse.c (record_store): Ignore zero width stores.
22973
22974 PR sanitizer/85230
22975 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
22976 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
22977 __builtin_stack_restore rather than after it.
22978 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
22979 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
22980 argument instead of virtual_dynamic_stack_rtx.
22981
22982 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
22983
22984 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
22985 New prototype.
22986 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
22987 Add note to error message to explain internal mapping of overloaded
22988 built-in function name to non-overloaded built-in function name.
22989 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
22990 function.
22991
22992 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
22993
22994 PR target/85424
22995 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
22996 where the inputs overlap with the output.
22997
22998 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22999
23000 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
23001 (=v, v) alternative and explicit "memory" attribute.
23002 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
23003 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23004 attributes.
23005 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
23006 "sselog1" type instead of "sselog".
23007 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
23008 "sselog". Remove explicit "memory" attribute.
23009 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
23010 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23011 attributes.
23012 (vec_extract_hi_v32hi): Merge all alternatives into one, use
23013 "sselog1" type instead of "sselog". Remove explicit "memory"
23014 attribute.
23015 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
23016 use "sselog1" type instead of "sselog". Remove explicit "memory"
23017 attribute.
23018 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
23019 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23020 attributes.
23021 (vec_extract_hi_v64qi): Merge all alternatives into one, use
23022 "sselog1" type instead of "sselog". Remove explicit "memory"
23023 attribute.
23024 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
23025 use "sselog1" type instead of "sselog". Remove explicit "memory"
23026 attribute.
23027
23028 PR target/85430
23029 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
23030
23031 PR middle-end/85414
23032 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
23033 on a SUBREG.
23034
23035 2018-04-17 Martin Jambor <mjambor@suse.cz>
23036
23037 PR ipa/85421
23038 * ipa-cp.c (create_specialized_node): Call
23039 expand_all_artificial_thunks if necessary.
23040
23041 2018-04-17 Martin Liska <mliska@suse.cz>
23042
23043 PR lto/85405
23044 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
23045 in message, remote space in between '_G' and '('.
23046
23047 2018-04-17 Jakub Jelinek <jakub@redhat.com>
23048
23049 PR target/85281
23050 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
23051 avx512f_vmcmp<mode>3<round_saeonly_name>,
23052 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
23053 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
23054 avx512f_rndscale<mode><round_saeonly_name>,
23055 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
23056 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
23057 Use %<iptr>2 instead of %2 for -masm=intel.
23058 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
23059 avx512f_vcvttss2usi<round_saeonly_name>,
23060 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
23061 -masm=intel.
23062 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
23063 avx512f_vcvttsd2usi<round_saeonly_name>,
23064 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
23065 Use %q1 instead of %1 for -masm=intel.
23066 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
23067 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
23068 of %3 for -masm=intel.
23069 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
23070 -masm=intel.
23071 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
23072 -masm=intel.
23073 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
23074 -masm=intel.
23075 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
23076 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
23077 %g1.
23078 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
23079 -masm=intel.
23080 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
23081 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
23082 %g1 and one with %0 and %1.
23083 (avx512er_vmrcp28<mode><round_saeonly_name>,
23084 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
23085 %1 for -masm=intel.
23086 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
23087 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
23088 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
23089 of %0 and %{%4%} for -masm=intel.
23090 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
23091 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
23092 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
23093 order of %0 and %{%5%}%{z%} for -masm=intel.
23094
23095 2018-04-17 Jan Hubicka <jh@suse.cz>
23096
23097 PR lto/85405
23098 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
23099
23100 2018-04-17 Martin Liska <mliska@suse.cz>
23101
23102 PR ipa/85329
23103 * multiple_target.c (create_dispatcher_calls): Set apostrophes
23104 for target_clone error message. Make default implementation
23105 clone to be a local declaration.
23106 (separate_attrs): Add new argument and check for an empty
23107 string.
23108 (expand_target_clones): Handle it.
23109 (ipa_target_clone): Make redirection just for target_clones
23110 functions.
23111
23112 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
23113 Tom de Vries <tom@codesourcery.com>
23114
23115 PR middle-end/84955
23116 * omp-expand.c (expand_oacc_for): Add dummy false branch for
23117 tiled basic blocks without omp continue statements.
23118
23119 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
23120
23121 PR target/83660
23122 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
23123 vec_extract expression as having side effects to make sure it gets
23124 a cleanup point.
23125
23126 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
23127
23128 PR target/85403
23129 * config/i386/i386.c (get_builtin_code_for_version): Check
23130 error_mark_node.
23131
23132 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
23133
23134 PR target/84331
23135 * config.gcc: Support "skylake".
23136 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23137 PROCESSOR_SKYLAKE.
23138 * config/i386/i386.c (m_SKYLAKE): Define.
23139 (processor_target_table): Add "skylake".
23140 (ix86_option_override_internal): Add "skylake".
23141 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
23142 PROCESSOR_CANNONLAKE.
23143 (get_builtin_code_for_version): Fix priority for
23144 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
23145 PROCESSOR_SKYLAKE-AVX512.
23146 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
23147 (processor_type): Add PROCESSOR_SKYLAKE.
23148
23149 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
23150 Jason Merrill <jason@redhat.com>
23151
23152 PR c++/85112
23153 * convert.c (convert_to_integer_1): Use direct recursion for
23154 enumeral types and types with a precision less than the number
23155 of bits in their mode.
23156
23157 2018-04-16 Julia Koval <julia.koval@intel.com>
23158
23159 PR target/84413
23160 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
23161 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
23162
23163 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
23164
23165 PR target/85293
23166 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
23167 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
23168 and -mno-direct-move.
23169
23170 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
23171
23172 PR target/83402
23173 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
23174 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
23175 Ensure negative shifts result in {0}.
23176
23177 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
23178
23179 PR rtl-optimization/79916
23180 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
23181 regs (if any) to define how to gnerate SD moves when LRA is in
23182 progress.
23183
23184 2018-04-13 Jakub Jelinek <jakub@redhat.com>
23185
23186 PR rtl-optimization/85393
23187 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
23188 * except.c (expand_dw2_landing_pad_for_region): Make static.
23189 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
23190 a label and unconditional jump to old_bb, rather than
23191 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
23192 basic block.
23193
23194 PR rtl-optimization/85376
23195 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
23196 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
23197 instead of a specific value.
23198
23199 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
23200 Bin Cheng <bin.cheng@arm.com>
23201
23202 PR tree-optimization/82965
23203 PR tree-optimization/83991
23204 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
23205 by_profile_only parameter.
23206 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
23207 information if the loop was predicted to iterate too many times.
23208 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
23209
23210 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
23211
23212 PR lto/71991
23213 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
23214 always inline.
23215
23216 2018-04-13 Martin Liska <mliska@suse.cz>
23217 Jakub Jelinek <jakub@redhat.com>
23218
23219 PR middle-end/81657
23220 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
23221 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
23222 * builtins.c (expand_builtin_memory_copy_args): Use
23223 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
23224 handle dest_addr == pc_rtx.
23225
23226 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
23227
23228 PR target/85291
23229 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
23230 asked to not generate direct moves.
23231 (fix_trunc<mode>si2_stfiwx): Similar.
23232 (fix_trunc<mode>si2_internal): Similar.
23233
23234 2018-04-12 Jakub Jelinek <jakub@redhat.com>
23235
23236 PR debug/83157
23237 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
23238 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
23239 lookup if dest in some wider mode is known to be const0_rtx and
23240 if so, record permanent equivalence for it to be ZERO_EXTEND of
23241 the narrower mode destination.
23242
23243 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
23244
23245 * lto-streamer-out.c (output_function): Revert 259346.
23246 * omp-expand.c (expand_oacc_for): Likewise.
23247
23248 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
23249
23250 PR rtl-optimization/85354
23251 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
23252 * sel-sched.c (sel_global_init): ... here.
23253
23254 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
23255
23256 PR target/85238
23257 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
23258 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
23259 mode for PE-COFF targets.
23260 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
23261 (i386_pe_asm_lto_end): Likewise.
23262 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
23263 (TARGET_ASM_LTO_END): Likewise.
23264 * config/i386/winnt.c (saved_debug_info_level): New static variable.
23265 (i386_pe_asm_lto_start): New function.
23266 (i386_pe_asm_lto_end): Likewise.
23267
23268 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
23269 Richard Biener <rguenther@suse.de>
23270
23271 PR middle-end/84955
23272 * lto-streamer-out.c (output_function): Fix CFG loop state before
23273 streaming out.
23274 * omp-expand.c (expand_oacc_for): Handle calls to internal
23275 functions like regular functions.
23276
23277 2018-04-12 Richard Biener <rguenther@suse.de>
23278
23279 PR lto/85371
23280 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
23281 for the early LTO debug to properly generate references to it
23282 during DIE emission. Do not re-use that for the skeleton for
23283 split-dwarf.
23284 (dwarf2out_early_finish): Likewise.
23285
23286 2018-04-12 Jakub Jelinek <jakub@redhat.com>
23287
23288 PR target/85328
23289 * config/i386/sse.md
23290 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
23291 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
23292 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
23293 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
23294 and output is a reg, avoid creating invalid lowpart subreg, but
23295 instead split into a 512-bit move. Don't split if not AVX512VL,
23296 input is xmm16+ reg and output is a mem.
23297 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
23298 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
23299 xmm16+ reg and output is a mem.
23300
23301 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23302
23303 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
23304 also for flag_dwarf2_cfi_asm.
23305
23306 2018-04-12 Jakub Jelinek <jakub@redhat.com>
23307
23308 PR rtl-optimization/85342
23309 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
23310 a bool scalar var inside of the loop instead. Don't try to update
23311 recog_data.operand after failed apply_change_group.
23312
23313 2018-04-12 Tom de Vries <tom@codesourcery.com>
23314
23315 PR target/85296
23316 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
23317 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
23318 array with flexible array member as array without given dimension.
23319 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
23320 argument for undefined param to true.
23321
23322 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
23323
23324 PR target/85321
23325 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
23326 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
23327 from PowerPC section.
23328 * config/rs6000/sysv4.opt (mcall-): Improve help text.
23329 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
23330 help text that is too long.
23331 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
23332 help text that is too long.
23333 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
23334 help text that is too long.
23335
23336 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
23337
23338 * config/alpha/alpha.md (stack_probe_internal): Rename
23339 from "probe_stack". Update all callers.
23340
23341 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
23342
23343 PR rtl-optimization/84566
23344 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
23345 sched_macro_fuse_insns.
23346
23347 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
23348
23349 PR target/84301
23350 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
23351 (compute_block_dependences): ... from here.
23352
23353 2018-04-11 Jakub Jelinek <jakub@redhat.com>
23354
23355 PR tree-optimization/85331
23356 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
23357 from int to HOST_WIDE_INT.
23358
23359 2018-04-11 Martin Jambor <mjambor@suse.cz>
23360
23361 PR ipa/84149
23362 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
23363 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
23364 not the same as the source val.
23365 (cgraph_edge_brings_value_p): New parameter.
23366 (gather_edges_for_value): Pass destination value to
23367 cgraph_edge_brings_value_p.
23368 (perhaps_add_new_callers): Likewise.
23369 (get_info_about_necessary_edges): Likewise and exclude values brought
23370 only by self-recursive edges.
23371 (create_specialized_node): Redirect only clones of self-calling edges.
23372 (+self_recursive_pass_through_p): New function.
23373 (find_more_scalar_values_for_callers_subset): Use it.
23374 (find_aggregate_values_for_callers_subset): Likewise.
23375 (known_aggs_to_agg_replacement_list): Removed.
23376 (decide_whether_version_node): Re-calculate known constants for all
23377 remaining context clones.
23378
23379 2018-04-11 Richard Biener <rguenther@suse.de>
23380
23381 PR lto/85339
23382 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
23383 from early DWARF output.
23384 (dwarf2out_early_finish): Output line info unconditionally into
23385 early DWARF and add reference to it.
23386
23387 2018-04-11 Jakub Jelinek <jakub@redhat.com>
23388
23389 PR target/85281
23390 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
23391 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
23392 other than V2DFmode using iptr mode attribute.
23393 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
23394
23395 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
23396
23397 PR rtl-optimization/84659
23398 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
23399
23400 2018-04-11 Jakub Jelinek <jakub@redhat.com>
23401
23402 PR debug/85302
23403 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
23404 SIZEP is NULL.
23405 (output_loc_list): Pass address of a dummy size variable even in the
23406 locview handling loop.
23407 (index_location_lists): Add comment on why skip_loc_list_entry can't
23408 call size_of_locs.
23409
23410 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
23411
23412 PR target/85261
23413 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
23414 into register.
23415
23416 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
23417
23418 PR target/85321
23419 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
23420 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
23421 and -mstring-compare-inline-limit.
23422
23423 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
23424
23425 PR target/85287
23426 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
23427 for stack clash protection in a register whenever we need it to be in
23428 a register.
23429
23430 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
23431
23432 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
23433 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
23434
23435 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
23436
23437 PR target/85321
23438 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
23439 the help text.
23440 (mlong-double-): Ditto.
23441 * config/rs6000/sysv4.opt (msdata=): Ditto.
23442 (mtls-size=): Ditto.
23443
23444 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
23445
23446 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
23447 erroneous entries for
23448 "vector int vec_ldl (int, long int *)", and
23449 "vector unsigned int vec_ldl (int, unsigned long int *)".
23450 Add comments and entries for
23451 "vector bool char vec_ldl (int, bool char *)",
23452 "vector bool short vec_ldl (int, bool short *)",
23453 "vector bool int vec_ldl (int, bool int *)",
23454 "vector bool long long vec_ldl (int, bool long long *)",
23455 "vector pixel vec_ldl (int, pixel *)",
23456 "vector long long vec_ldl (int, long long *)",
23457 "vector unsigned long long vec_ldl (int, unsigned long long *)".
23458 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
23459 type tree bool_long_long_type_node and correct definition of
23460 bool_V2DI_type_node to make reference to this new type tree.
23461 (rs6000_mangle_type): Replace erroneous reference to
23462 bool_long_type_node with bool_long_long_type_node.
23463 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
23464 comments to emphasize sign distinctions for char and int types and
23465 replace RS6000_BTI_bool_long constant with
23466 RS6000_BTI_bool_long_long constant. Also add comment to restrict
23467 use of RS6000_BTI_pixel.
23468 (bool_long_type_node): Remove this macro definition.
23469 (bool_long_long_type_node): New macro definition
23470
23471 2018-04-10 Jakub Jelinek <jakub@redhat.com>
23472
23473 PR rtl-optimization/85300
23474 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
23475 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
23476 simplify_unary_operation fails.
23477
23478 2018-04-10 Martin Liska <mliska@suse.cz>
23479
23480 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
23481 cgraph_edge and ipa_ref.
23482
23483 2018-04-10 Jakub Jelinek <jakub@redhat.com>
23484
23485 PR target/85177
23486 PR target/85255
23487 * config/i386/sse.md
23488 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
23489 computation of the VEC_MERGE selector from mask.
23490 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
23491 Fix decoding of the VEC_MERGE selector into mask.
23492
23493 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
23494
23495 PR tree-optimization/85286
23496 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
23497
23498 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
23499
23500 * final.c (final_1): Set insn_last_address as well as
23501 insn_current_address.
23502
23503 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23504
23505 PR target/85173
23506 * explow.c (emit_stack_probe): Call validize_mem on memory location
23507 before passing it to gen_probe_stack. Create address operand and
23508 legitimize it for the probe_stack_address case.
23509
23510 2018-04-09 Jan Hubicka <jh@suse.cz>
23511
23512 PR lto/85078
23513 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
23514 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
23515 * tree.c (free_lang_data_in_type): Fix handling of binfos;
23516 walk basetypes.
23517 (free_lang_data): Rebuild type inheritance graph.
23518
23519 2018-04-09 Martin Sebor <msebor@redhat.com>
23520
23521 * invoke.texi (-finline-small-functions): Mention other optimization
23522 options.
23523 (-findirect-inlining, -fpartial-inlining): Same.
23524 (-finline-functions-called-once): Same.
23525 (-freorder-blocks-and-partition): Same.
23526
23527 2018-04-09 Jan Hubicka <jh@suse.cz>
23528
23529 PR rtl/84058
23530 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
23531 jumps; choose last target that matches the criteria (i.e.
23532 no partition changes for non-crossing jumps).
23533 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
23534 support for redirecting crossing jumps to non-crossing.
23535
23536 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
23537
23538 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
23539 also for naked functions.
23540
23541 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
23542
23543 * config/arc/arc.md (add_shift): New pattern.
23544 (add_shift2): Likewise.
23545 (sub_shift): Likewise.
23546 (sub_shift_cmp0_noout): Likewise.
23547 (compare_si_ashiftsi): Likewise.
23548 (xbfu_cmp0_noout): New combine pattern.
23549 (xbfu_cmp0"): Likewise.
23550 (movsi_set_cc_insn): Place the predicable variant first.
23551 (commutative_binary_cmp0_noout): Remove clobber.
23552 (commutative_binary_cmp0): New pattern.
23553 (noncommutative_binary_cmp0): Likewise.
23554 (noncommutative_binary_cmp0_noout): Likewise.
23555 (noncommutative_binary_comparison_result_used): Removed.
23556 (rsub_cmp0): New pattern.
23557 (rsub_cmp0_noout): Likewise.
23558 (extzvsi): Changed, keep only meaningful variants.
23559 (SQH, SEZ): New iterators.
23560 (SQH_postfix): New mode attribute.
23561 (SEZ_prefix): New code attribute.
23562 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
23563 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
23564 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
23565 of numerical value.
23566 (noncommutative_operator): Check the availability of barrel
23567 shifter option.
23568
23569 2018-04-09 Richard Biener <rguenther@suse.de>
23570
23571 PR tree-optimization/85284
23572 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
23573 Only use the niter constraining form of simple_iv when the exit
23574 is always executed.
23575
23576 2018-04-09 Tom de Vries <tom@codesourcery.com>
23577
23578 PR target/84041
23579 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
23580 (define_expand "*memory_barrier"): New define_expand.
23581 (define_insn "memory_barrier"): New insn.
23582
23583 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
23584
23585 PR rtl-optimization/80463
23586 PR rtl-optimization/83972
23587 PR rtl-optimization/83480
23588
23589 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
23590 correct producer for the insn.
23591 (tidy_control_flow): Fixup seqnos in case of debug insns.
23592
23593 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
23594
23595 PR rtl-optimization/83913
23596
23597 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
23598 different sched-times when merging exprs.
23599
23600 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
23601
23602 PR rtl-optimization/83962
23603
23604 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
23605 tidy_fallthru_edge and tidy_control_flow.
23606
23607 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
23608
23609 PR rtl-optimization/83530
23610
23611 * sel-sched.c (force_next_insn): New global variable.
23612 (remove_insn_for_debug): When force_next_insn is true, also leave only
23613 next insn in the ready list.
23614 (sel_sched_region): When the region wasn't scheduled, make another pass
23615 over it with force_next_insn set to 1.
23616
23617 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
23618
23619 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
23620 into tm_file.
23621 * config/nds32/constants.md (unspec_volatile_element): Add enum values
23622 for interrupt control.
23623 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
23624 functions for interrupt control.
23625 * config/nds32/nds32-intrinsic.md: Likewise.
23626 * config/nds32/nds32_intrinsic.h: Likewise.
23627 * config/nds32/nds32.h (nds32_builtins): Likewise.
23628
23629 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
23630
23631 * config/nds32/nds32.c (nds32_init_machine_status,
23632 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
23633 strict_aligned_p field.
23634 (nds32_expand_to_rtl_hook): New function.
23635 (TARGET_EXPAND_TO_RTL_HOOK): Define.
23636 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
23637
23638 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
23639 Chung-Ju Wu <jasonwucj@gmail.com>
23640
23641 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
23642 * config/nds32/nds32-n7.md: New file.
23643 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
23644 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
23645 pipeline.
23646 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
23647 * config/nds32/nds32.md (pipeline_model): Add n7.
23648 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
23649 * config/nds32/pipelines.md: Include n7 settings.
23650
23651 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
23652 Chung-Ju Wu <jasonwucj@gmail.com>
23653
23654 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
23655 * config/nds32/nds32-e8.md: New file.
23656 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
23657 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
23658 pipeline.
23659 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
23660 * config/nds32/nds32.md (pipeline_model): Add e8.
23661 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
23662 * config/nds32/pipelines.md: Include e8 settings.
23663
23664 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
23665 Chung-Ju Wu <jasonwucj@gmail.com>
23666
23667 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
23668 * config/nds32/nds32-n8.md: New file.
23669 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
23670 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
23671 pipeline.
23672 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
23673 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
23674 * config/nds32/nds32.md (pipeline_model): Add n8.
23675 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
23676 * config/nds32/pipelines.md: Include n8 settings.
23677
23678 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
23679 Chung-Ju Wu <jasonwucj@gmail.com>
23680
23681 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
23682 * config/nds32/nds32-n9-2r1w.md: New file.
23683 * config/nds32/nds32-n9-3r2w.md: New file.
23684 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
23685 nds32_register_ports): New or modify for cpu n9.
23686 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
23687 pipeline.
23688 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
23689 * config/nds32/nds32-utils.c: New file.
23690 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
23691 TARGET_MUL_SLOW): Define.
23692 * config/nds32/nds32.md (pipeline_model): New attribute.
23693 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
23694 New options that support cpu n9.
23695 * config/nds32/pipelines.md: Include n9 settings.
23696 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
23697
23698 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
23699
23700 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
23701 information if necessary.
23702 (output_cond_branch_compare_zero): Likewise.
23703 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
23704 (nds32_target_alignment): Refine for alignment.
23705 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
23706 (FUNCTION_BOUNDARY): Modify.
23707 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
23708 align case.
23709 * config/nds32/nds32.opt (malways-align, malign-functions): New.
23710
23711 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
23712
23713 * config/nds32/constants.md (unspec_volatile_element): Add values for
23714 TLB operation and data prefetch.
23715 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
23716 functions for TLB operation and data prefetch.
23717 * config/nds32/nds32-intrinsic.md: Likewise.
23718 * config/nds32/nds32_intrinsic.h: Likewise.
23719 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
23720 (nds32_print_operand): Likewise.
23721 * config/nds32/nds32.h (nds32_builtins): Likewise.
23722
23723 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
23724 Andrew Pinski <pinsika@gcc.gnu.org>
23725
23726 PR middle-end/82976
23727 * match.pd: Use constant_boolean_node of correct type instead of
23728 boolean_true_node or boolean_false_node for simplifying
23729 pointer comparisons to zero.
23730
23731 2018-04-07 Jakub Jelinek <jakub@redhat.com>
23732
23733 PR tree-optimization/80021
23734 * tree.c (verify_type_variant): Make error call in verify_variant_match
23735 translatable and remove final full stop.
23736
23737 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
23738
23739 * config/nds32/constants.md (unspec_volatile_element): Add
23740 UNSPEC_VOLATILE_EH_RETURN.
23741 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
23742 nds32_output_stack_pop): Support dwarf exception handling process.
23743 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
23744 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
23745 exception handling process.
23746 (nds32_compute_stack_frame): Likewise.
23747 (nds32_return_addr_rtx): Likewise.
23748 (nds32_initial_elimination_offset): Likewise.
23749 (nds32_expand_prologue): Likewise.
23750 (nds32_expand_epilogue): Likewise.
23751 (nds32_dynamic_chain_address): New function.
23752 * config/nds32/nds32.h (machine_function): Add fields for dwarf
23753 exception handling.
23754 (DYNAMIC_CHAIN_ADDRESS): Define.
23755 (EH_RETURN_DATA_REGNO): Define.
23756 (EH_RETURN_STACKADJ_RTX): Define.
23757 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
23758 patterns for dwarf exception handling.
23759
23760 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
23761
23762 * config/nds32/nds32.h: Clean up obsolete macros.
23763
23764 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23765
23766 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23767 Add enum values for particular instructions.
23768 * config/nds32/nds32-intrinsic.c: Implementation of expanding
23769 particular intrinsic functions.
23770 * config/nds32/nds32-intrinsic.md: Likewise.
23771 * config/nds32/nds32_intrinsic.h: Likewise.
23772 * config/nds32/nds32.h (nds32_builtins): Likewise.
23773 * config/nds32/nds32.md (type): Add pbsad and pbsada.
23774 (btst, ave): New patterns for particular instructions.
23775
23776 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23777
23778 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23779 Add enum values for atomic load/store and memory sync.
23780 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
23781 and memory sync.
23782 * config/nds32/nds32-intrinsic.md: Likewise.
23783 * config/nds32/nds32_intrinsic.h: Likewise.
23784 * config/nds32/nds32.h (nds32_builtins): Likewise.
23785
23786 2018-04-07 Jakub Jelinek <jakub@redhat.com>
23787
23788 PR tree-optimization/85257
23789 * fold-const.c (native_encode_vector): If not all elts could fit
23790 and off is -1, return 0 rather than offset.
23791 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
23792 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
23793 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
23794 adjust buffer in native_interpret_expr call.
23795
23796 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23797
23798 * config/nds32/constants.md (unspec_volatile_element): Add cache
23799 control enum values.
23800 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
23801 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
23802 * config/nds32/nds32.c (nds32_cctl_names): New.
23803 (nds32_print_operand): Handle cache control register names.
23804 * config/nds32/nds32.h (nds32_builtins): New enum values.
23805 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
23806 macros.
23807 * config/nds32/nds32.md (type): Add mmu.
23808 * config/nds32/pipelines.md (simple_insn): Add mmu.
23809
23810 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
23811
23812 * config/nds32/nds32.md (type): Remove call.
23813 * config/nds32/pipelines.md (simple_insn): Likewise.
23814
23815 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23816
23817 * config/nds32/constants.md (unspec_volatile_element): Add
23818 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
23819 UNSPEC_VOLATILE_FMFCFG.
23820 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
23821 description for fmfcfg and fmfcsr.
23822 (bdesc_1arg): Add fmtcsr.
23823 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
23824 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
23825 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
23826 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
23827 unspec_fmfcfg): New patterns.
23828 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
23829 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
23830 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
23831 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
23832 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
23833 __nds32__fmfcfg): Define.
23834
23835 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23836
23837 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
23838 intrinsic register names.
23839 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
23840 intrinsic register enum values and macros.
23841
23842 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
23843
23844 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
23845 for load/store addressing form.
23846 (nds32_print_operand_address): Likewise.
23847
23848 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
23849
23850 PR target/85196
23851 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
23852 based on LABEL_REF. Remove useless assertion.
23853 (pic_address_needs_scratch): Fix formatting.
23854 (sparc_legitimize_pic_address): Minor tweaks.
23855 (sparc_delegitimize_address): Adjust assertion accordingly.
23856 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
23857 into symbolic_operand.
23858 (movsi_high_pic_label_ref): Likewise.
23859 (movsi_lo_sum_pic_label_ref): Likewise.
23860 (movdi_pic_label_ref): Likewise.
23861 (movdi_high_pic_label_ref): Likewise.
23862 (movdi_lo_sum_pic_label_ref): Likewise.
23863
23864 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
23865
23866 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
23867 custom LIB_SPEC setup.
23868
23869 2018-04-06 Ruslan Bukin <br@bsdpad.com>
23870 Kito Cheng <kito.cheng@gmail.com>
23871
23872 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
23873 * config/riscv/freebsd.h: New.
23874
23875 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
23876
23877 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
23878 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
23879 file.
23880
23881 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
23882 Kito Cheng <kito.cheng@gmail.com>
23883
23884 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
23885 nds32_output_call, nds32_symbol_binds_local_p): New functions.
23886 * config/nds32/nds32-protos.h (nds32_output_call,
23887 nds32_output_return): Declare.
23888 * config/nds32/nds32.md: Refine all the call and return patterns.
23889
23890 2018-04-06 Jakub Jelinek <jakub@redhat.com>
23891
23892 PR debug/85252
23893 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
23894 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
23895
23896 PR rtl-optimization/84872
23897 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
23898 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
23899 EDGE_CROSSING edge.
23900
23901 2018-04-06 Tamar Christina <tamar.christina@arm.com>
23902
23903 * expr.c (copy_blkmode_to_reg): Revert 254862.
23904 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
23905
23906 2018-04-06 Richard Biener <rguenther@suse.de>
23907
23908 PR middle-end/85244
23909 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
23910 after seeing a component reference with an adjacent field. Treat
23911 refs to arrays at struct end of external decls similar to
23912 refs to unconstrained commons.
23913
23914 2018-04-06 Jakub Jelinek <jakub@redhat.com>
23915
23916 PR sanitizer/85213
23917 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
23918 look through SAVE_EXPRs with non-side-effects argument. Adjust
23919 recursive calls.
23920 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
23921 save_p here.
23922
23923 2018-04-06 Richard Biener <rguenther@suse.de>
23924
23925 PR middle-end/85180
23926 * alias.c (find_base_term): New wrapper around find_base_term
23927 unwinding CSELIB_VAL_PTR changes.
23928 (find_base_term): Do not restore CSELIB_VAL_PTR during the
23929 recursion.
23930
23931 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23932
23933 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
23934 instructions.
23935 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
23936 constant definitions.
23937 ("nop"): lr 0,0 -> nopr r0
23938 ("nop_lr0", "nop_lr1"): New insn definitions.
23939
23940 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
23941
23942 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
23943 NDS32_V3PUSH_AVAILABLE_P macro.
23944
23945 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
23946 Chung-Ju Wu <jasonwucj@gmail.com>
23947
23948 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
23949 (nds32*-*-*): Add float and fpu_config into supported_defaults.
23950 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
23951 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
23952 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
23953 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
23954 * config/nds32/constraints.md: New constraints and checking for hard
23955 float configuration.
23956 * config/nds32/iterators.md: New mode iterator and attribute for hard
23957 float configuration.
23958 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
23959 patterns.
23960 * config/nds32/nds32-fpu.md: New file.
23961 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
23962 deal with hard float code generation.
23963 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
23964 ARCH_V3S.
23965 (abi_type, float_reg_number): New enum type.
23966 * config/nds32/nds32-predicates.c: New predicates for hard float.
23967 * config/nds32/nds32-protos.h: Declare functions for hard float.
23968 * config/nds32/nds32.c: Implementation for hard float configuration.
23969 * config/nds32/nds32.h: Definitions for hard float configuration.
23970 * config/nds32/nds32.md: Include hard float machine description and
23971 modify patterns for hard float configuration.
23972 * config/nds32/nds32.opt: New options for hard float configuration.
23973 * config/nds32/predicates.md: New predicates for hard float
23974 configuration.
23975
23976 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
23977
23978 * common/config/nds32/nds32-common.c
23979 (nds32_option_optimization_table): Enable -mreleax-hint by default.
23980
23981 2018-04-05 Jakub Jelinek <jakub@redhat.com>
23982
23983 PR middle-end/85195
23984 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
23985 CONSTRUCTOR_ELT (ctor, ...)->value.
23986
23987 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
23988
23989 PR target/85193
23990 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
23991
23992 2018-04-05 Tom de Vries <tom@codesourcery.com>
23993
23994 PR target/85204
23995 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
23996 cond jump.
23997
23998 2018-04-05 Shiva Chen <shiva0217@gmail.com>
23999 Kito Cheng <kito.cheng@gmail.com>
24000
24001 * config/nds32/constraints.md (U33): Fine-tune checking condition.
24002 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
24003 * config/nds32/nds32.h (nds32_16bit_address_type): Add
24004 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
24005
24006 2018-04-05 Shiva Chen <shiva0217@gmail.com>
24007 Kito Cheng <kito.cheng@gmail.com>
24008
24009 * config/nds32/constraints.md (Ufe): New memory constraint.
24010 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
24011 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
24012 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
24013 operands.
24014 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
24015 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
24016
24017 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24018
24019 * config/nds32/nds32.md: Use optimize_size in the condition for
24020 alu-shift instructions.
24021
24022 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24023
24024 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
24025
24026 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24027
24028 * config/nds32/nds32.md (negsi2): Refine pattern.
24029
24030 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
24031 Chung-Ju Wu <jasonwucj@gmail.com>
24032
24033 * config/nds32/iterators.md (shift_rotate): New code iterator.
24034 (shift): New code attribute.
24035 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
24036 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
24037 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
24038 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
24039 bit-wise operations.
24040 (andsi3, *andsi3): Ditto.
24041 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
24042 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
24043 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
24044 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
24045 nds32_ior_operand, nds32_xor_operand): New predicates.
24046
24047 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24048
24049 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
24050 (addsi3, subsi3): ... this.
24051
24052 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24053
24054 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
24055
24056 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24057
24058 * config/nds32/nds32.md: Adjust indention.
24059
24060 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
24061
24062 * config/nds32/nds32.md (feature): New attribute.
24063
24064 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24065
24066 * config/nds32/nds32.md (subtype): New attribute.
24067
24068 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
24069
24070 PR target/85203
24071 * config/arm/arm-builtins.c (arm_expand_builtin): Change
24072 expansion to perform a bitwise AND of the argument followed by a
24073 boolean negation of the result.
24074
24075 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
24076
24077 PR rtl-optimization/84878
24078 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
24079 the basic block. Assert the use reference is not artificial and that
24080 it has an associated insn.
24081
24082 2018-04-04 Michael Matz <matz@suse.de>
24083
24084 * builtins.c (compute_objsize): Pass correct operand
24085 to array_at_struct_end_p.
24086
24087 2018-04-04 Richard Biener <rguenther@suse.de>
24088
24089 PR lto/85176
24090 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
24091 from contexts for DINFO_LEVEL_TERSE and below.
24092
24093 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
24094
24095 * config/nds32/nds32-doubleword.md (move_<mode>): Require
24096 resiter_operand condition.
24097 * config/nds32/nds32.md (*move<mode>): Ditto.
24098
24099 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
24100 Monk Chiang <sh.chiang04@gmail.com>
24101
24102 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
24103
24104 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
24105
24106 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
24107
24108 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
24109 Kito Cheng <kito.cheng@gmail.com>
24110
24111 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
24112 nds32_cond_code_str, output_cond_branch,
24113 output_cond_branch_compare_zero, nds32_expand_cbranch,
24114 nds32_expand_cstore, nds32_expand_movcc,
24115 nds32_output_cbranchsi4_equality_zero,
24116 nds32_output_cbranchsi4_equality_reg,
24117 nds32_output_cbranchsi4_equality_reg_or_const_int,
24118 nds32_output_cbranchsi4_greater_less_zero: New functions.
24119 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
24120 nds32_expand_cstore, nds32_expand_movcc,
24121 nds32_output_cbranchsi4_equality_zero,
24122 nds32_output_cbranchsi4_equality_reg,
24123 nds32_output_cbranchsi4_equality_reg_or_const_int,
24124 nds32_output_cbranchsi4_greater_less_zero): Declare.
24125 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
24126 nds32_rimm11s_operand): New predicates.
24127 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
24128 * config/nds32/nds32.md: Rewrite all the branch and conditional move
24129 patterns.
24130
24131 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
24132
24133 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
24134 * config/nds32/nds32.md: Ditto.
24135 * config/nds32/pipelines.md: Ditto.
24136
24137 2018-04-04 Richard Biener <rguenther@suse.de>
24138
24139 PR tree-optimization/85168
24140 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
24141 propagating abnormals.
24142
24143 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
24144
24145 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
24146
24147 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
24148 Kito Cheng <kito.cheng@gmail.com>
24149
24150 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
24151 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
24152 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
24153 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
24154 * config/nds32/nds32.md (sibcall_internal): New.
24155 (sibcall_register): Remove.
24156 (sibcall_immediate): Remove.
24157 (sibcall_value_internal): New.
24158 (sibcall_value_register): Remove.
24159 (sibcall_value_immediate): Remove.
24160 * config/nds32/predicates.md (nds32_general_register_operand): New.
24161 (nds32_call_address_operand): New.
24162
24163 2018-04-03 Jakub Jelinek <jakub@redhat.com>
24164
24165 PR rtl-optimization/85167
24166 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
24167 bb_defs if *split_p, instead preinitialize it to NULL.
24168
24169 PR tree-optimization/85156
24170 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
24171 evaluating the argument multiple times.
24172
24173 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
24174
24175 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
24176 than vector.
24177 (_mm_cvtpd_ps): Likewise.
24178 (_mm_cvttpd_epi32): Likewise.
24179 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
24180 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
24181 vector, pixel, and bool following altivec.h include.
24182
24183 2018-04-03 Martin Sebor <msebor@redhat.com>
24184
24185 * doc/extend.texi (Common Function Attributes): Clarify.
24186 (const attribute): Likewise.
24187 (pure attribute): Likewise.
24188
24189 2018-04-03 Jakub Jelinek <jakub@redhat.com>
24190
24191 PR target/85169
24192 * config/i386/i386.c (ix86_expand_vector_set): Use
24193 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
24194
24195 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
24196
24197 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
24198 instructions when changing rounding bits to preserve precision bits
24199 in the x87 control word.
24200
24201 2018-04-03 Martin Liska <mliska@suse.cz>
24202
24203 PR tree-optimization/82491
24204 * rtl.h (strip_offset_and_add): Replace += suboffset with
24205 poly_uint64 () + suboffset.
24206
24207 2018-03-29 Martin Liska <mliska@suse.cz>
24208 Martin Jambor <mjambor@suse.cz>
24209
24210 PR ipa/84947
24211 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
24212 param_type is not an integral or pointer type.
24213
24214 2018-04-03 Richard Biener <rguenther@suse.de>
24215
24216 * sese.h (recompute_all_dominators): Remove.
24217
24218 2018-04-02 Martin Sebor <msebor@redhat.com>
24219
24220 * doc/invoke.texi (-Wrestrict): Fix typos.
24221
24222 2018-04-02 Jim Wilson <jimw@sifive.com>
24223
24224 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
24225 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
24226 (<optab>di3, <optab>si3_extend): Likewise.
24227 (<optab>si3_mask, <optab>si3_mask_1): New.
24228 (<optab>di3_mask, <optab>di3_mask_1): New.
24229 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
24230 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
24231 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
24232
24233 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
24234
24235 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
24236 example.
24237
24238 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
24239
24240 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
24241 (nds32_canonicalize_comparison): New function.
24242
24243 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
24244 Kito Cheng <kito.cheng@gmail.com>
24245 Kuan-Lin Chen <kuanlinchentw@gmail.com>
24246
24247 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
24248 * config/nds32/constants.md (unspec_volatile_element): Add
24249 UNSPEC_VOLATILE_RELAX_GROUP.
24250 * config/nds32/nds32-relax-opt.c: New file.
24251 * config/nds32/nds32-predicates.c
24252 (nds32_symbol_load_store_p): New function.
24253 * config/nds32/nds32-protos.h
24254 (nds32_symbol_load_store_p): Declare function.
24255 (make_pass_nds32_relax_opt): Declare new rtl pass function.
24256 * config/nds32/nds32.c
24257 (nds32_register_pass): New function to register pass.
24258 (nds32_register_passes): New function to register passes.
24259 * config/nds32/nds32.md (relax_group): New pattern.
24260 * config/nds32/nds32.opt (mrelax-hint): New option.
24261 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
24262
24263 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
24264
24265 * config/nds32/t-nds32: Modify files dependency.
24266
24267 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
24268
24269 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
24270 (PROFILE_HOOK): Define its implementation.
24271
24272 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
24273
24274 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
24275 type and 32-bit size.
24276
24277 2018-04-01 Jakub Jelinek <jakub@redhat.com>
24278
24279 PR middle-end/85090
24280 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
24281 (V_128_256): New mode iterator.
24282 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
24283 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
24284 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
24285 of V.
24286 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
24287 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
24288
24289 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
24290
24291 PR target/83315
24292 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
24293 NaN inputs correctly.
24294
24295 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
24296
24297 PR target/80546
24298 * config/rs6000/vsx.md (??r): New mode attribute.
24299 (*vsx_mov<mode>_64bit): Use it.
24300 (*vsx_mov<mode>_32bit): Likewise.
24301
24302 2018-03-30 Martin Sebor <msebor@redhat.com>
24303
24304 PR tree-optimization/84818
24305 * builtins.c (check_access): Use warning_n.
24306
24307 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24308
24309 PR target/83822
24310 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
24311 condition.
24312 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
24313 condition.
24314
24315 2018-03-30 Julia Koval <julia.koval@intel.com>
24316
24317 PR target/84413
24318 * x86-tune.def (movx, partial_reg_dependency): Enable for
24319 m_SKYLAKE_AVX512.
24320
24321 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
24322
24323 PR inline-asm/84985
24324 * lra-constraints.c (process_alt_operands): Move setting
24325 this_alternative_matches below.
24326
24327 2018-03-29 Martin Liska <mliska@suse.cz>
24328
24329 PR lto/84995.
24330 * doc/invoke.texi: Document how LTO works with debug info.
24331 Describe auto-load support of binutils. Mention 'x86-64'
24332 as valid option value of -march option.
24333
24334 2018-03-29 Jakub Jelinek <jakub@redhat.com>
24335
24336 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
24337
24338 PR c/85094
24339 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
24340 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
24341 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
24342 checking.
24343
24344 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
24345
24346 PR target/84912
24347 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
24348 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
24349 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
24350 for RS6000_BTM_POWERPC64.
24351 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
24352 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
24353 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
24354 definition.
24355 (DIVDE): Use it.
24356 (DIVDEU): Likewise.
24357
24358 2018-03-28 Carl Love <cel@us.ibm.com>
24359
24360 Revert
24361 2017-09-27 Carl Love <cel@us.ibm.com>
24362
24363 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
24364 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
24365 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
24366 fctiw instruction.
24367
24368 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24369
24370 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
24371 instead of __vector bool.
24372 (_mm_max_pu8): Likewise.
24373 (_mm_min_pi16): Likewise.
24374
24375 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
24376
24377 PR target/84912
24378 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
24379 (DIVWEUO): Likewise.
24380 (DIVDEO): Likewise.
24381 (DIVDEUO): Likewise.
24382 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
24383 DIVWEUO and DIVDEUO.
24384 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
24385 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
24386 (div_extend): Likewise.
24387 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
24388 builtin function.
24389 (__builtin_divweuo): Likewise.
24390 (__builtin_divdeo): Likewise.
24391 (__builtin_divdeuo): Likewise.
24392
24393 2018-03-28 Jakub Jelinek <jakub@redhat.com>
24394
24395 PR target/85095
24396 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
24397 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
24398
24399 PR tree-optimization/82004
24400 * gimple-match-head.c (optimize_pow_to_exp): New function.
24401 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
24402 Don't fold to exp if optimize_pow_to_exp is false.
24403
24404 2018-03-28 Martin Liska <mliska@suse.cz>
24405
24406 PR other/84819
24407 * calls.c (initialize_argument_information): Fix trailing space.
24408 * common.opt: Fix typo and provide better explanation for
24409 -fsanitize-coverage option.
24410 * config/i386/i386.opt: Fix typo.
24411
24412 2018-03-28 Jakub Jelinek <jakub@redhat.com>
24413 Martin Liska <mliska@suse.cz>
24414
24415 PR sanitizer/85081
24416 * gimplify.c (asan_poison_variable): Don't do the check for
24417 gimplify_omp_ctxp here.
24418 (gimplify_decl_expr): Do it here.
24419 (gimplify_target_expr): Likewise.
24420
24421 2018-03-28 Martin Liska <mliska@suse.cz>
24422
24423 PR target/84988
24424 * config/i386/i386.c (ix86_function_arg_advance): Do not call
24425 chkp_type_bounds_count if MPX is not enabled.
24426
24427 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
24428
24429 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
24430
24431 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
24432
24433 PR target/84914
24434 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
24435 function to create the function decl for complex long double
24436 multiply and divide for -mabi=ieeelongdouble.
24437 (init_float128_ieee): Call it.
24438
24439 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
24440
24441 PR target/85044
24442 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
24443 -fcf-protection=branch -mibt.
24444 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
24445
24446 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
24447
24448 PR target/81863
24449 * config/arm/arm.c (arm_valid_symbolic_address): Handle
24450 arm_word_relocations.
24451
24452 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
24453
24454 PR target/85056
24455 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
24456 extern array declarations.
24457
24458 2018-03-27 Richard Biener <rguenther@suse.de>
24459
24460 PR middle-end/84067
24461 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
24462 explicit single_use checks.
24463
24464 2018-03-27 Richard Biener <rguenther@suse.de>
24465
24466 PR tree-optimization/85082
24467 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
24468 Valueize the VUSE.
24469
24470 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
24471
24472 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
24473 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
24474 Turn on fasynchronous-unwind-tables and funwind-tables.
24475
24476 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
24477
24478 PR target/85073
24479 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
24480 (*bmi_blsr_<mode>_ccz): Ditto.
24481
24482 2018-03-26 Tom de Vries <tom@codesourcery.com>
24483
24484 PR tree-optimization/85063
24485 * omp-general.c (offloading_function_p): New function. Factor out
24486 of ...
24487 * omp-offload.c (pass_omp_target_link::gate): ... here.
24488 * omp-general.h (offloading_function_p): Declare.
24489 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
24490 with attribute omp declare target for offloading functions.
24491
24492 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
24493
24494 PR tree-optimization/84005
24495 * tree-data-ref.h (get_base_for_alignment): Declare.
24496 * tree-data-ref.c (get_base_for_alignment_1): New function.
24497 (get_base_for_alignment): Likewise.
24498 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
24499 get_base_for_alignment to find a suitable base object, instead
24500 of always using drb->base_address.
24501
24502 2018-03-23 Jakub Jelinek <jakub@redhat.com>
24503
24504 PR inline-asm/85022
24505 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
24506 known size by default.
24507
24508 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
24509
24510 PR inline-asm/85030
24511 * lra-constraints.c (process_alt_operands): Don't match BLKmode
24512 and non BLKmode operands.
24513
24514 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24515
24516 PR target/85026
24517 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
24518 Clean up attributes.
24519
24520 2018-03-23 Richard Biener <rguenther@suse.de>
24521
24522 PR debug/85020
24523 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
24524 we are going to emit early debug for LTO.
24525
24526 2018-03-23 Jakub Jelinek <jakub@redhat.com>
24527
24528 PR inline-asm/85034
24529 * function.c (match_asm_constraints_1): Don't optimize if input
24530 doesn't satisfy general_operand predicate for output's mode.
24531
24532 PR inline-asm/85022
24533 * alias.c (write_dependence_p): Don't require for x_canonicalized
24534 non-VOIDmode if x has VOIDmode.
24535
24536 PR sanitizer/85029
24537 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
24538 just don't try to optimize it rather than assert it never happens.
24539
24540 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
24541
24542 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
24543 macro expansions for definition of ST_INTERNAL_<mode> and
24544 LD_INTERNAL_<mode> builtins.
24545 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
24546 Remove prototype.
24547 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
24548 function.
24549 (altivec_expand_st_builtin): Likewise.
24550 (altivec_expand_builtin): Remove calls to deleted functions.
24551 (rs6000_address_for_altivec): Delete this function.
24552 * config/rs6000/vector.md: Remove expands for
24553 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
24554
24555 2018-03-22 Sudakshina Das <sudi.das@arm.com>
24556
24557 PR target/84826
24558 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
24559 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
24560 re-computing once computed.
24561 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
24562 (arm_init_machine_status): Initialize
24563 machine->static_chain_stack_bytes.
24564
24565 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
24566
24567 PR target/84760
24568 * doc/extend.texi: Add four new prototypes for vec_ld.
24569 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
24570 definitions for more logical presentation.
24571 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
24572 entries for V1TI variants of __builtin_altivec_ld builtin.
24573 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
24574 handling of V1TI variant of LVX icode pattern.
24575 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
24576 (rs6000_gimple_fold_builtin): Likewise.
24577 (altivec_init_builtins): Add code to define
24578 __builtin_altivec_lvx_v1ti function.
24579
24580 2018-03-22 Jakub Jelinek <jakub@redhat.com>
24581
24582 PR inline-asm/84941
24583 * function.c (match_asm_constraints_1): Don't do the optimization
24584 if input isn't a REG, SUBREG, MEM or constant.
24585
24586 2018-03-22 Tom de Vries <tom@codesourcery.com>
24587
24588 PR tree-optimization/84956
24589 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
24590 bb_has_abnormal_pred.
24591
24592 2018-03-22 Jakub Jelinek <jakub@redhat.com>
24593
24594 PR sanitizer/85018
24595 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
24596 DECL_INITIAL (decl) to decl at the end.
24597 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
24598 adjust the comment.
24599
24600 2018-03-21 Joseph Myers <joseph@codesourcery.com>
24601
24602 * doc/extend.texi (__builtin_tgmath): Document when complex
24603 integer types are treated as _Complex _Float64.
24604
24605 2018-03-21 Tom de Vries <tom@codesourcery.com>
24606
24607 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
24608
24609 2018-03-21 Jakub Jelinek <jakub@redhat.com>
24610
24611 PR tree-optimization/84960
24612 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
24613 if it is ENTRY block, move them into single succ of ENTRY in that case.
24614
24615 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
24616
24617 PR tree-optimization/84811
24618 * poly-int.h (poly_span_traits): Remove the T3 parameter and
24619 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
24620 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
24621 (known_subrange_p): Update accordingly. Cast each value involved
24622 in the size comparison, rather than casting the result of the
24623 subtraction.
24624
24625 2018-03-21 Jakub Jelinek <jakub@redhat.com>
24626
24627 PR tree-optimization/84982
24628 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
24629 by flipping the least significant bit rather than all bits from
24630 bitpos to bitpos + bitsize - 1.
24631
24632 2018-03-21 Nathan Sidwell <nathan@acm.org>
24633
24634 * doc/extend.texi (Deprecated Features): Remove mention of
24635 long-deleted deprecations.
24636
24637 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24638
24639 PR jit/84288
24640 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
24641 * configure: Regenerate.
24642
24643 2018-03-21 Tom de Vries <tom@codesourcery.com>
24644
24645 PR tree-optimization/83126
24646 * tree-parloops.c (num_phis): New function.
24647 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
24648
24649 2018-03-21 Nathan Sidwell <nathan@acm.org>
24650
24651 * doc/extend.texi (Deprecated Features): Update deprecated flags,
24652 mention anon-struct/union members and trailing attributes.
24653
24654 2018-03-21 Bin Cheng <bin.cheng@arm.com>
24655
24656 PR tree-optimization/84969
24657 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
24658 builtin memset partitions if they set different rhs values.
24659
24660 2018-03-21 Jakub Jelinek <jakub@redhat.com>
24661
24662 PR rtl-optimization/84989
24663 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
24664 VEC_DUPLICATE with scalar result mode.
24665
24666 2018-03-21 Martin Liska <mliska@suse.cz>
24667
24668 PR ipa/84963
24669 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
24670 not intended return statement.
24671
24672 2018-03-21 Martin Liska <mliska@suse.cz>
24673
24674 PR target/84988
24675 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
24676 (chkp_find_bound_slots_1): Limit number of iterations.
24677
24678 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
24679
24680 PR target/84838
24681 * Minor grammar fixes for x86 options.
24682
24683 2018-03-20 Jakub Jelinek <jakub@redhat.com>
24684
24685 PR debug/84875
24686 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
24687 holding REG_CFA_RESTORE notes, instead turn them into a USE.
24688
24689 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
24690
24691 PR target/83789
24692 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
24693 (altivec_lvx_<mode>_1op): Likewise.
24694 (altivec_stvx_<mode>_2op): Likewise.
24695 (altivec_stvx_<mode>_1op): Likewise.
24696 (altivec_lvx_<VM2:mode>): New define_expand.
24697 (altivec_stvx_<VM2:mode>): Likewise.
24698 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
24699 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
24700 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
24701 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
24702 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
24703 (rs6000_gen_lvx): Likewise.
24704 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
24705 (altivec_expand_stv_builtin): Likewise.
24706 (altivec_expand_builtin): Likewise.
24707 * config/rs6000/vector.md: Likewise.
24708
24709 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24710
24711 PR target/82518
24712 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
24713 BYTES_BIG_ENDIAN.
24714
24715 2018-03-20 Richard Biener <rguenther@suse.de>
24716
24717 PR target/84986
24718 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
24719 sign-conversions as zero, fall back to standard scalar_stmt
24720 cost for the rest.
24721
24722 2018-03-20 Martin Liska <mliska@suse.cz>
24723
24724 PR ipa/84825
24725 * predict.c (rebuild_frequencies): Handle case when we have
24726 PROFILE_ABSENT, but flag_guess_branch_prob is false.
24727
24728 2018-03-20 Jakub Jelinek <jakub@redhat.com>
24729
24730 PR target/84990
24731 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
24732 flag_section_anchors.
24733 * varasm.c (use_blocks_for_decl_p): Remove hack for
24734 dw2_force_const_mem.
24735
24736 PR target/84845
24737 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
24738 to ...
24739 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
24740 be created, use lowpart_subreg of operands[0] rather than operands[0]
24741 itself.
24742 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
24743 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
24744 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
24745 and n constraint instead of aarch64_shift_imm_di and Usd.
24746 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
24747 (*aarch64_<optab>_reg_minus<mode>3): ... this.
24748
24749 2018-03-20 Sudakshina Das <sudi.das@arm.com>
24750
24751 PR target/82989
24752 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
24753 to favor GPR over NEON registers.
24754 (<shift>di3_neon): Likewise.
24755
24756 2018-03-20 Tom de Vries <tom@codesourcery.com>
24757
24758 PR target/84952
24759 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
24760 (nvptx_process_pars): Emit bar.sync asap and alap.
24761
24762 2018-03-20 Tom de Vries <tom@codesourcery.com>
24763
24764 PR target/84954
24765 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
24766 seen_label if seen_label is already set.
24767
24768 2018-03-20 Jakub Jelinek <jakub@redhat.com>
24769
24770 PR target/84945
24771 * config/i386/i386.c (fold_builtin_cpu): For features above 31
24772 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
24773 Use 1U instead of 1. Formatting fixes.
24774
24775 PR c/84953
24776 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
24777 instead of TREE_TYPE (s1) for the return value.
24778
24779 2018-03-19 Jakub Jelinek <jakub@redhat.com>
24780
24781 PR tree-optimization/84946
24782 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
24783 bitsize + bitsize in poly_uint64 rather than poly_int64.
24784
24785 PR sanitizer/78651
24786 * dwarf2asm.c: Include fold-const.c.
24787 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
24788 of decl rather than decl itself.
24789
24790 PR rtl-optimization/84643
24791 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
24792
24793 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
24794
24795 PR sanitizer/78651
24796 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
24797 calling assemble_variable.
24798
24799 2018-03-19 Sudakshina Das <sudi.das@arm.com>
24800
24801 PR target/81647
24802 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
24803 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
24804
24805 2018-03-19 Jim Wilson <jimw@sifive.com>
24806
24807 PR bootstrap/84856
24808 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
24809 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
24810 (riscv_first_stack_step): Likewise.
24811 (riscv_option_override): Use STACK_BOUNDARY instead of
24812 MIN_STACK_BOUNDARY.
24813 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
24814 MIN_STACK_BOUNDARY.
24815 (BIGGEST_ALIGNMENT): Set to 128.
24816 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
24817 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
24818 STACK_BOUNDARY.
24819
24820 2018-03-19 Richard Biener <rguenther@suse.de>
24821
24822 PR tree-optimization/84933
24823 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
24824 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
24825
24826 2018-03-19 Richard Biener <rguenther@suse.de>
24827
24828 PR tree-optimization/84859
24829 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
24830 (cond_if_else_store_replacement): Perform sinking operation on
24831 single-store BBs regardless of MAX_STORES_TO_SINK setting.
24832 Generalize what a BB with a single eligible store is.
24833
24834 2018-03-19 Richard Biener <rguenther@suse.de>
24835
24836 PR tree-optimization/84929
24837 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
24838 chrec_is_positive against non-chrec arg.
24839
24840 2018-03-19 Tamar Christina <tamar.christina@arm.com>
24841
24842 PR target/84711
24843 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
24844
24845 2018-03-18 Martin Liska <mliska@suse.cz>
24846
24847 PR rtl-optimization/84635
24848 * regrename.c (build_def_use): Use matches_mode only when
24849 matches >= 0.
24850
24851 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
24852
24853 PR tree-optimization/84913
24854 * tree-vect-loop.c (vectorizable_reduction): Don't try to
24855 vectorize chains of COND_EXPRs.
24856
24857 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
24858
24859 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
24860
24861 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
24862
24863 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
24864
24865 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
24866
24867 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
24868
24869 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
24870 Kito Cheng <kito.cheng@gmail.com>
24871
24872 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
24873 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
24874 (nds32_adjust_reg_alloc_order): New function.
24875 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
24876
24877 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
24878
24879 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
24880 nds32_print_operand, nds32_print_operand_address): Use
24881 HOST_WIDE_INT_PRINT_DEC instead.
24882
24883 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
24884
24885 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
24886
24887 2018-03-17 Jakub Jelinek <jakub@redhat.com>
24888
24889 PR target/84902
24890 * config/i386/i386.c (initial_ix86_tune_features,
24891 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
24892 unsigned long long.
24893 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
24894 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
24895 rather than 1u << ix86_tune. Formatting fix.
24896 (ix86_option_override_internal): Change ix86_arch_mask from
24897 unsigned int to unsigned HOST_WIDE_INT, initialize to
24898 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
24899 (ix86_function_specific_restore): Likewise.
24900
24901 2018-03-16 Jakub Jelinek <jakub@redhat.com>
24902
24903 PR target/84899
24904 * postreload.c (reload_combine_recognize_pattern): Perform
24905 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
24906 truncate_int_for_mode the result for the destination's mode.
24907
24908 PR c/84909
24909 * hsa-gen.c (mem_type_for_type): Fix comment typo.
24910 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
24911 Likewise.
24912 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
24913 Likewise.
24914
24915 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
24916
24917 PR target/84876
24918 * lra-assigns.c (lra_split_hard_reg_for): Don't use
24919 regno_allocno_class_array and sorted_pseudos.
24920 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
24921 insns where regno is used.
24922
24923 2018-03-16 Martin Liska <mliska@suse.cz>
24924
24925 PR ipa/84833
24926 * multiple_target.c (create_dispatcher_calls): Redirect
24927 reference in the symbol table.
24928
24929 2018-03-16 Martin Liska <mliska@suse.cz>
24930
24931 PR ipa/84722
24932 * multiple_target.c (create_dispatcher_calls): Redirect also
24933 an alias.
24934
24935 2018-03-16 Jakub Jelinek <jakub@redhat.com>
24936
24937 PR c++/79937
24938 PR c++/82410
24939 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
24940 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
24941 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
24942
24943 2018-03-16 Julia Koval <julia.koval@intel.com>
24944
24945 * doc/invoke.texi (Skylake Server): Add CLWB.
24946 Cannonlake): Remove CLWB.
24947
24948 2018-03-16 Jakub Jelinek <jakub@redhat.com>
24949
24950 PR tree-optimization/84841
24951 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
24952 1 << 3.
24953 (FLOAT_ONE_CONST_TYPE): Define.
24954 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
24955 (sort_by_operand_rank): Put entries with higher constant_type last
24956 rather than first to match comments.
24957
24958 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
24959
24960 * config/nios2/nios2.md (movsi_internal): Fix thinko in
24961 split predicate.
24962
24963 2018-03-15 Jakub Jelinek <jakub@redhat.com>
24964
24965 PR c++/79085
24966 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
24967 check and use address of target always.
24968
24969 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
24970
24971 PR target/84574
24972 * config/i386/i386.c (indirect_thunk_needed): Update comments.
24973 (indirect_thunk_bnd_needed): Likewise.
24974 (indirect_thunks_used): Likewise.
24975 (indirect_thunks_bnd_used): Likewise.
24976 (indirect_return_needed): New.
24977 (indirect_return_bnd_needed): Likewise.
24978 (output_indirect_thunk_function): Add a bool argument for
24979 function return.
24980 (output_indirect_thunk_function): Don't generate alias for
24981 function return thunk.
24982 (ix86_code_end): Call output_indirect_thunk_function to generate
24983 function return thunks.
24984 (ix86_output_function_return): Set indirect_return_bnd_needed
24985 and indirect_return_needed instead of indirect_thunk_bnd_needed
24986 and indirect_thunk_needed.
24987
24988 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
24989
24990 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
24991 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
24992 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
24993
24994 2018-03-15 David Malcolm <dmalcolm@redhat.com>
24995 Paul Hua <paul.hua.gm@gmail.com>
24996
24997 PR c/84852
24998 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
24999
25000 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
25001
25002 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
25003 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
25004 resp. SFmode cases.
25005
25006 2018-03-15 Tamar Christina <tamar.christina@arm.com>
25007
25008 PR target/84711
25009 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
25010 instead of GET_MODE_SIZE when comparing Units.
25011
25012 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
25013
25014 PR target/68256
25015 * varasm.c (hash_section): Return an unchangeble hash value
25016 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
25017 Return !aarch64_can_use_per_function_literal_pools_p ().
25018
25019 2018-03-15 Jakub Jelinek <jakub@redhat.com>
25020
25021 PR target/84860
25022 * optabs.c (emit_conditional_move): Pass address of cmode's copy
25023 rather than address of cmode as last argument to prepare_cmp_insn.
25024
25025 2018-03-15 Julia Koval <julia.koval@intel.com>
25026
25027 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
25028 F_AVX512VNNI, F_AVX512BITALG): New.
25029
25030 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
25031
25032 PR target/83451
25033 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
25034 insn for floating-point loads and stores.
25035
25036 2018-03-14 Carl Love <cel@us.ibm.com>
25037
25038 * config/rs6000/rs6000-c.c: Add macro definitions for
25039 ALTIVEC_BUILTIN_VEC_PERMXOR.
25040 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
25041 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
25042 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
25043 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
25044 UNSPEC_VPERMXOR.
25045 * config/doc/extend.texi: Add prototypes for vec_permxor.
25046
25047 2018-03-14 David Malcolm <dmalcolm@redhat.com>
25048
25049 PR c/84852
25050 * diagnostic-show-locus.c (class layout_point): Convert m_line
25051 from int to linenum_type.
25052 (line_span::comparator): Use linenum "compare" function when
25053 comparing line numbers.
25054 (test_line_span): New function.
25055 (layout_range::contains_point): Convert param "row" from int to
25056 linenum_type.
25057 (layout_range::intersects_line_p): Likewise.
25058 (layout::will_show_line_p): Likewise.
25059 (layout::print_source_line): Likewise.
25060 (layout::should_print_annotation_line_p): Likewise.
25061 (layout::print_annotation_line): Likewise.
25062 (layout::print_leading_fixits): Likewise.
25063 (layout::annotation_line_showed_range_p): Likewise.
25064 (struct line_corrections): Likewise for field m_row.
25065 (line_corrections::line_corrections): Likewise for param "row".
25066 (layout::print_trailing_fixits): Likewise.
25067 (layout::get_state_at_point): Likewise.
25068 (layout::get_x_bound_for_row): Likewise.
25069 (layout::print_line): Likewise.
25070 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
25071 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
25072 * input.c (selftest::test_linenum_comparisons): New function.
25073 (selftest::input_c_tests): Call it.
25074 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
25075 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
25076 * selftest.h (ASSERT_GT): New macro.
25077 (ASSERT_GT_AT): New macro.
25078 (ASSERT_LT): New macro.
25079 (ASSERT_LT_AT): New macro.
25080
25081 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
25082
25083 PR rtl-optimization/84780
25084 * combine.c (distribute_links): Don't make a link based on pc_rtx.
25085
25086 2018-03-14 Martin Liska <mliska@suse.cz>
25087
25088 * tree.c (record_node_allocation_statistics): Use
25089 get_stats_node_kind.
25090 (get_stats_node_kind): New function extracted from
25091 record_node_allocation_statistics.
25092 (free_node): Use get_stats_node_kind.
25093
25094 2018-03-14 Richard Biener <rguenther@suse.de>
25095
25096 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
25097 that the value-set of ANTIC_IN doesn't grow.
25098
25099 Revert
25100 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
25101 member.
25102 (BB_VISITED_WITH_VISITED_SUCCS): New define.
25103 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
25104
25105 2018-03-14 Julia Koval <julia.koval@intel.com>
25106
25107 * config.gcc (icelake-client, icelake-server): New.
25108 (icelake): Remove.
25109 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
25110 (initial_ix86_arch_features): Ditto.
25111 (PTA_SKYLAKE): Add SGX.
25112 (PTA_ICELAKE): Remove.
25113 (PTA_ICELAKE_CLIENT): New.
25114 (PTA_ICELAKE_SERVER): New.
25115 (ix86_option_override_internal): Split up icelake on icelake client and
25116 icelake server.
25117 (get_builtin_code_for_version): Ditto.
25118 (fold_builtin_cpu): Ditto.
25119 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
25120 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
25121 * config/i386/i386.h (processor_type): Ditto.
25122 * doc/invoke.texi: Ditto.
25123
25124 2018-03-14 Jakub Jelinek <jakub@redhat.com>
25125
25126 PR sanitizer/83392
25127 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
25128 INTEGER_CST offset, add it together with bitpos / 8 and
25129 sign extend based on POINTER_SIZE.
25130
25131 PR target/84844
25132 Revert
25133 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
25134
25135 PR target/78090
25136 * config/i386/constraints.md (Yc): New register constraint.
25137 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
25138 Use Yc constraint for alternative 2 of operand 0. Remove
25139 preferred_for_speed attribute.
25140
25141 2018-03-14 Richard Biener <rguenther@suse.de>
25142
25143 PR tree-optimization/84830
25144 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
25145 with the old one to avoid oscillations.
25146
25147 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
25148
25149 PR target/83712
25150 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
25151 pseudos.
25152 (assign_by_spills): Return a flag of reload assignment failure.
25153 Do not process the reload assignment failures. Do not spill other
25154 reload pseudos if they has the same reg class. Update n if
25155 necessary.
25156 (lra_assign): Add a return arg. Set up from the result of
25157 assign_by_spills call.
25158 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
25159 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
25160 usage_insns if it is not NULL.
25161 (spill_hard_reg_in_range): New function.
25162 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
25163 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
25164 function prototypes.
25165 (lra_assign): Change prototype.
25166 * lra.c (lra): Add code to deal with fails by splitting hard reg
25167 live ranges.
25168
25169 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
25170
25171 * config/riscv/riscv.opt (mrelax): New option.
25172 * config/riscv/riscv.c (riscv_file_start): Emit ".option
25173 "norelax" when riscv_mrelax is disabled.
25174 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
25175
25176 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25177
25178 PR target/84743
25179 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
25180 reassociation for int modes.
25181
25182 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
25183
25184 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
25185 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
25186 for big-endian.
25187 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
25188 * config/aarch64/aarch64-sve.md
25189 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
25190 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
25191 (*extend<mode><Vwide>2): Rename to...
25192 (aarch64_sve_extend<mode><Vwide>2): ...this.
25193 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
25194 renaming the old pattern to...
25195 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
25196 unsigned packs.
25197 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
25198 define_expand, renaming the old pattern to...
25199 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
25200 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
25201 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
25202 account when deciding which SVE instruction the optab should use.
25203 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
25204
25205 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
25206
25207 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
25208 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
25209 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
25210 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
25211 (tlsdesc_small_<mode>): Turn a define_expand and use
25212 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
25213 (tlsdesc_small_advsimd_<mode>): ...this.
25214 (tlsdesc_small_sve_<mode>): New pattern.
25215
25216 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
25217
25218 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
25219 (UNSPEC_UMUL_HIGHPART): New constants.
25220 (MUL_HIGHPART): New int iteraor.
25221 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
25222 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
25223 define_expand.
25224 (*<su>mul<mode>3_highpart): New define_insn.
25225
25226 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
25227
25228 PR lto/84805
25229 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
25230 incomplete types.
25231
25232 2018-03-13 Martin Liska <mliska@suse.cz>
25233
25234 PR ipa/84658.
25235 * (sem_item_optimizer::sem_item_optimizer): Initialize new
25236 vector.
25237 (sem_item_optimizer::~sem_item_optimizer): Release it.
25238 (sem_item_optimizer::merge_classes): Register variable aliases.
25239 (sem_item_optimizer::fixup_pt_set): New function.
25240 (sem_item_optimizer::fixup_points_to_sets): Likewise.
25241 * ipa-icf.h: Declare new variables and functions.
25242
25243 2018-03-13 Jakub Jelinek <jakub@redhat.com>
25244
25245 PR middle-end/84834
25246 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
25247 integer_pow2p@2 and test integer_pow2p in condition.
25248 (A < 0 ? C : 0): Similarly for @1.
25249
25250 PR middle-end/84831
25251 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
25252 characters starting at p contain '\0' character, don't look beyond
25253 that.
25254
25255 PR target/84827
25256 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
25257 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
25258
25259 PR target/84828
25260 * reg-stack.c (change_stack): Change update_end var from int to
25261 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
25262 also call set_block_for_insn on the newly added insns and rescan.
25263
25264 PR target/84786
25265 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
25266 on the last operand.
25267
25268 PR c++/84704
25269 * tree.c (stabilize_reference_1): Return save_expr (e) for
25270 STATEMENT_LIST even if it doesn't have side-effects.
25271
25272 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
25273
25274 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
25275
25276 2018-03-12 Renlin Li <renlin.li@arm.com>
25277
25278 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
25279 aarch64_output_scalar_simd_mov_immediate.
25280
25281 2018-03-12 Martin Sebor <msebor@redhat.com>
25282
25283 PR tree-optimization/83456
25284 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
25285 for perfectly overlapping calls to memcpy.
25286 (gimple_fold_builtin_memory_chk): Same.
25287 (gimple_fold_builtin_strcpy): Handle no-warning.
25288 (gimple_fold_builtin_stxcpy_chk): Same.
25289 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
25290
25291 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
25292
25293 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
25294 parameter. Use it for SFmode.
25295 (rs6000_function_arg_advance_1): Adjust.
25296 (rs6000_function_arg): Adjust.
25297 (rs6000_gimplify_va_arg): Pass false for that new parameter.
25298
25299 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
25300
25301 PR rtl-optimization/84169
25302 PR rtl-optimization/84780
25303 * combine.c (can_combine_p): Check for a 2-insn combination whether
25304 the destination register is used between the two insns, too.
25305
25306 2018-03-12 Richard Biener <rguenther@suse.de>
25307
25308 PR tree-optimization/84803
25309 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
25310 for refs DR analysis didn't process.
25311
25312 2018-03-12 Richard Biener <rguenther@suse.de>
25313
25314 PR tree-optimization/84777
25315 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
25316 force-vectorize loops ignore whether we are optimizing for size.
25317
25318 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
25319
25320 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
25321 (TARGET_MD_ASM_ADJUST): Define.
25322
25323 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
25324 Kito Cheng <kito.cheng@gmail.com>
25325 Chung-Ju Wu <jasonwucj@gmail.com>
25326
25327 * config/nds32/nds32.c (nds32_compute_stack_frame,
25328 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
25329 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
25330 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
25331 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
25332 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
25333 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
25334 * config/nds32/nds32.md (prologue, epilogue): Use macro
25335 NDS32_V3PUSH_AVAILABLE_P to do checking.
25336
25337 2018-03-11 Jakub Jelinek <jakub@redhat.com>
25338
25339 PR debug/58150
25340 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
25341 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
25342 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
25343 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
25344 addition of most attributes on !orig_type_die or the attribute not
25345 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
25346
25347 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
25348 Chung-Ju Wu <jasonwucj@gmail.com>
25349
25350 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
25351 __NDS32_VH__ macro.
25352 * config/nds32/nds32.opt (mvh): New option.
25353
25354 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
25355 Chung-Ju Wu <jasonwucj@gmail.com>
25356
25357 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
25358 function.
25359 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
25360 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
25361 definition.
25362
25363 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
25364 Chung-Ju Wu <jasonwucj@gmail.com>
25365
25366 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
25367 function.
25368 * config/nds32/nds32-multiple.md (strlensi): New pattern.
25369 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
25370
25371 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
25372 Kito Cheng <kito.cheng@gmail.com>
25373 Chung-Ju Wu <jasonwucj@gmail.com>
25374
25375 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
25376 UNSPEC_FFMISM and UNSPEC_FLMISM.
25377 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
25378 for ffb, ffmism and flmism.
25379 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
25380 (unspec_ffmism): Ditto.
25381 (unspec_flmism): Ditto.
25382 (nds32_expand_builtin_impl): Check if string extension is available.
25383 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
25384 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
25385
25386 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
25387
25388 Reverting patch:
25389 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
25390
25391 PR target/83712
25392 * lra-assigns.c (assign_by_spills): Return a flag of reload
25393 assignment failure. Do not process the reload assignment
25394 failures. Do not spill other reload pseudos if they has the same
25395 reg class.
25396 (lra_assign): Add a return arg. Set up from the result of
25397 assign_by_spills call.
25398 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
25399 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
25400 usage_insns if it is not NULL.
25401 (spill_hard_reg_in_range): New function.
25402 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
25403 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
25404 function prototypes.
25405 (lra_assign): Change prototype.
25406 * lra.c (lra): Add code to deal with fails by splitting hard reg
25407 live ranges.
25408
25409 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
25410
25411 PR target/84807
25412 * config/i386/i386.opt: Replace Enforcment with Enforcement.
25413
25414 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
25415
25416 PR debug/84620
25417 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
25418 (dw_val_node): Add val_symbolic_view.
25419 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
25420 (symview_upper_bound): New.
25421 (new_line_info_table): Initialize symviews_since_reset.
25422 (dwarf2out_source_line): Count symviews_since_reset and set
25423 symview_upper_bound.
25424 (dw_val_equal_p): Handle symview.
25425 (add_AT_symview): New.
25426 (print_dw_val): Handle symview.
25427 (attr_checksum, attr_checksum_ordered): Likewise.
25428 (same_dw_val_p, size_of_die): Likewise.
25429 (value_format, output_die): Likewise.
25430 (add_high_low_attributes): Use add_AT_symview for entry_view.
25431 (dwarf2out_finish): Reset symview_upper_bound, clear
25432 zero_view_p.
25433
25434 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
25435
25436 PR target/83969
25437 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
25438 Add strict argument and use it.
25439 (rs6000_split_multireg_move): Update for new strict argument.
25440 (mem_operand_gpr): Disallow all non-offsettable addresses.
25441 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
25442
25443 2018-03-09 Jakub Jelinek <jakub@redhat.com>
25444
25445 PR target/84772
25446 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
25447 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
25448 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
25449
25450 PR c++/84767
25451 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
25452 decl, use remap_type if we want to use the type.
25453
25454 2018-03-09 Martin Sebor <msebor@redhat.com>
25455
25456 PR tree-optimization/84526
25457 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
25458 Remove dead code.
25459 (builtin_access::generic_overlap): Be prepared to handle non-array
25460 base objects.
25461
25462 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
25463
25464 PR rtl-optimization/84682
25465 * lra-constraints.c (process_address_1): Check is_address flag
25466 for address constraints.
25467 (process_alt_operands): Likewise.
25468 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
25469 preprocess_constraints.
25470 * recog.h (preprocess_constraints): Add oploc parameter.
25471 Adjust callers.
25472 * recog.c (preprocess_constraints): Test address_operand for
25473 CT_ADDRESS constraints.
25474
25475 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
25476
25477 PR target/83712
25478 * lra-assigns.c (assign_by_spills): Return a flag of reload
25479 assignment failure. Do not process the reload assignment
25480 failures. Do not spill other reload pseudos if they has the same
25481 reg class.
25482 (lra_assign): Add a return arg. Set up from the result of
25483 assign_by_spills call.
25484 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
25485 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
25486 usage_insns if it is not NULL.
25487 (spill_hard_reg_in_range): New function.
25488 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
25489 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
25490 function prototypes.
25491 (lra_assign): Change prototype.
25492 * lra.c (lra): Add code to deal with fails by splitting hard reg
25493 live ranges.
25494
25495 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25496
25497 PR target/83193
25498 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
25499 Accept complain bool parameter. Only emit errors if it is true.
25500 (arm_parse_cpu_option_name): Likewise.
25501 (arm_target_thumb_only): Adjust callers of the above.
25502 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
25503 prototype to take a default true bool parameter.
25504 (arm_parse_arch_option_name): Likewise.
25505
25506 2018-03-09 David Malcolm <dmalcolm@redhat.com>
25507 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
25508
25509 PR jit/64089
25510 PR jit/84288
25511 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
25512 * configure: Regenerate.
25513 * configure.ac ("linker --version-script option"): New.
25514 ("linker soname option"): New.
25515
25516 2018-03-09 Richard Biener <rguenther@suse.de>
25517
25518 PR tree-optimization/84775
25519 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
25520 immediate uses of predicate stmts and mark them modified.
25521
25522 Revert
25523 PR tree-optimization/84178
25524 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
25525 to caller.
25526 (version_loop_for_if_conversion): Delay update_ssa call.
25527 (tree_if_conversion): Delay update_ssa until after predicate
25528 insertion.
25529
25530 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
25531
25532 PR target/84763
25533 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
25534 when the function accesses prior frames.
25535
25536 2018-03-08 Jakub Jelinek <jakub@redhat.com>
25537
25538 PR debug/84456
25539 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
25540 gen_llsym, otherwise call maybe_gen_llsym.
25541
25542 PR inline-asm/84742
25543 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
25544 has ',' character inside of it.
25545
25546 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25547
25548 PR target/84748
25549 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
25550 as clobbering CC_REGNUM.
25551
25552 2018-03-08 Richard Biener <rguenther@suse.de>
25553
25554 PR middle-end/84552
25555 * tree-scalar-evolution.c: Include tree-into-ssa.h.
25556 (follow_copies_to_constant): Do not follow SSA names registered
25557 for update.
25558
25559 2018-03-08 Richard Biener <rguenther@suse.de>
25560
25561 PR tree-optimization/84178
25562 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
25563 to caller.
25564 (version_loop_for_if_conversion): Delay update_ssa call.
25565 (tree_if_conversion): Delay update_ssa until after predicate
25566 insertion.
25567
25568 2018-03-08 David Malcolm <dmalcolm@redhat.com>
25569
25570 PR tree-optimization/84178
25571 * tree-if-conv.c (release_bb_predicate): Remove the
25572 the assertion that the stmts have NULL use_ops.
25573 Discard the statements, asserting that they haven't
25574 yet been added to a BB.
25575
25576 2018-03-08 Richard Biener <rguenther@suse.de>
25577
25578 PR tree-optimization/84746
25579 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
25580 (phi_translate): Pass in destination ANTIC_OUT set.
25581 (phi_translate_1): Likewise. For a simplified result lookup
25582 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
25583 (phi_translate_set): Adjust.
25584 (do_pre_regular_insertion): Likewise.
25585 (do_pre_partial_partial_insertion): Likewise.
25586
25587 2018-03-08 Martin Liska <mliska@suse.cz>
25588
25589 PR gcov-profile/84735
25590 * doc/gcov.texi: Document usage of profile files.
25591 * gcov-io.h: Document changes in the format.
25592
25593 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
25594
25595 PR debug/84404
25596 PR debug/84408
25597 * dwarf2out.c (struct dw_line_info_table): Update comments for
25598 view == -1.
25599 (FORCE_RESET_NEXT_VIEW): New.
25600 (FORCE_RESETTING_VIEW_P): New.
25601 (RESETTING_VIEW_P): Check for -1 too.
25602 (ZERO_VIEW_P): Likewise.
25603 (new_line_info_table): Force-reset next view.
25604 (dwarf2out_begin_function): Likewise.
25605 (dwarf2out_source_line): Simplify zero_view_p initialization.
25606 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
25607 view directly. Omit view when omitting .loc at line 0.
25608
25609 2018-03-08 Jakub Jelinek <jakub@redhat.com>
25610
25611 PR tree-optimization/84740
25612 * tree-switch-conversion.c (process_switch): Call build_constructors
25613 only if info.phi_count is non-zero.
25614
25615 PR tree-optimization/84739
25616 * tree-tailcall.c (find_tail_calls): Check call arguments against
25617 DECL_ARGUMENTS (current_function_decl) rather than
25618 DECL_ARGUMENTS (func) when checking for tail recursion.
25619
25620 2018-03-07 Jakub Jelinek <jakub@redhat.com>
25621
25622 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
25623 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
25624 Volker Reichelt's entry and add entries for people that perform
25625 GCC fuzzy testing and report numerous bugs.
25626
25627 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
25628
25629 PR target/82411
25630 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
25631 readonly data in sdata, if that is disabled.
25632 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
25633 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
25634 -mreadonly-in-sdata option.
25635
25636 2018-03-07 Martin Sebor <msebor@redhat.com>
25637
25638 PR tree-optimization/84468
25639 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
25640 basic block when looking for nul assignment.
25641
25642 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
25643
25644 PR target/84277
25645 * except.h (output_function_exception_table): Adjust prototype.
25646 * except.c (output_function_exception_table): Remove FNNAME parameter
25647 and add SECTION parameter. Ouput one part of the table at a time.
25648 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
25649 the first part of the exception table and emit unwind directives.
25650 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
25651 (i386_pe_seh_cold_init): Likewise.
25652 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
25653 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
25654 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
25655 (ix86_output_call_insn): Emit a nop in one more case for SEH.
25656 * config/i386/winnt.c: Include except.h.
25657 (struct seh_frame_state): Add reg_offset, after_prologue and
25658 in_cold_section fields.
25659 (i386_pe_seh_end_prologue): Set seh->after_prologue.
25660 (i386_pe_seh_cold_init): New function.
25661 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
25662 to seh->in_cold_section.
25663 (seh_emit_push): Record the offset of the push.
25664 (seh_emit_save): Record the offet of the save.
25665 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
25666 Test seh->after_prologue to disregard the epilogue.
25667 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
25668 (i386_pe_end_cold_function): New function.
25669
25670 2018-03-07 Jakub Jelinek <jakub@redhat.com>
25671
25672 PR fortran/84565
25673 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
25674 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
25675
25676 PR c++/84704
25677 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
25678 on tmp_var.
25679 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
25680 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
25681
25682 PR middle-end/84723
25683 * multiple_target.c: Include tree-inline.h and intl.h.
25684 (expand_target_clones): Diagnose and fail if node->definition and
25685 !tree_versionable_function_p (node->decl).
25686
25687 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
25688
25689 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
25690 sprint_ul.
25691 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
25692 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
25693 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
25694
25695 2018-03-06 Jakub Jelinek <jakub@redhat.com>
25696
25697 PR target/84710
25698 * combine.c (try_combine): Use reg_or_subregno instead of handling
25699 just paradoxical SUBREGs and REGs.
25700
25701 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
25702
25703 * config/arc/arc.c (arc_finalize_pic): Remove function.
25704 (arc_must_save_register): We use single base PIC register, remove
25705 checks to save/restore the PIC register.
25706 (arc_expand_prologue): Likewise.
25707 * config/arc/arc-protos.h (arc_set_default_type_attributes):
25708 Remove.
25709 (arc_verify_short): Likewise.
25710 (arc_attr_type): Likewise.
25711 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
25712 (walk_stores): Likewise.
25713 (arc_address_cost): Make it static.
25714 (arc_verify_short): Likewise.
25715 (branch_dest): Likewise.
25716 (arc_attr_type): Likewise.
25717 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
25718 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
25719 (arc_final_prescan_insn): Remove inserting the nops due to
25720 hardware hazards. It is done in reorg step.
25721 (insn_length_variant_t): Remove.
25722 (insn_length_parameters_t): Likewise.
25723 (arc_insn_length_parameters): Likewise.
25724 (arc_get_insn_variants): Likewise.
25725 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
25726
25727 2018-03-06 Jakub Jelinek <jakub@redhat.com>
25728
25729 PR inline-asm/84683
25730 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
25731 assertion failure.
25732
25733 PR tree-optimization/84687
25734 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
25735 on new_node->decl.
25736 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
25737
25738 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25739
25740 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
25741 Rename to ppc_speculation_barrier.
25742 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
25743 __builtin_ppc_speculation_barrier.
25744
25745 2018-03-05 Jakub Jelinek <jakub@redhat.com>
25746
25747 PR target/84700
25748 * combine.c (combine_simplify_rtx): Don't try to simplify if
25749 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
25750 are equal to x.
25751
25752 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
25753
25754 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
25755 to 32 bytes when compiling for POWER9.
25756
25757 2018-03-05 Jakub Jelinek <jakub@redhat.com>
25758
25759 PR target/84564
25760 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
25761 regparm >= 3 with no arg reg available also for calls with
25762 flag_force_indirect_call. Pass decl to ix86_function_regparm.
25763
25764 PR target/84524
25765 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
25766 orig,vex.
25767 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
25768
25769 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
25770
25771 PR target/84264
25772 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
25773
25774 2018-03-05 Richard Biener <rguenther@suse.de>
25775
25776 PR tree-optimization/84486
25777 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
25778 When inserting a __builtin_assume_aligned call set the LHS
25779 SSA name alignment info accordingly.
25780
25781 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
25782
25783 PR tree-optimization/84114
25784 * config/aarch64/aarch64.c (aarch64_reassociation_width)
25785 Avoid reassociation of FLOAT_MODE addition.
25786
25787 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
25788
25789 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
25790 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
25791 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
25792 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
25793 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
25794 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
25795 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
25796 and -mwbnoinvd.
25797 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
25798 __builtin_ia32_wbinvd): New builtins.
25799 (SPECIAL_ARGS2): New.
25800 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
25801 (SPECIAL_ARGS2): New.
25802 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
25803 (ix86_valid_target_attribute_inner_p): Ditto.
25804 (ix86_init_mmx_sse_builtins): Add special_args2.
25805 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
25806 TARGET_WBNOINVD_P): New.
25807 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
25808 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
25809 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
25810 * config/i386/immintrin.h (_wbinvd): New intrinsic.
25811 * config/i386/pconfigintrin.h: New file.
25812 * config/i386/wbnoinvdintrin.h: Ditto.
25813 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
25814 wbnoinvdintrin.h.
25815 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
25816
25817 2018-03-05 Richard Biener <rguenther@suse.de>
25818
25819 PR tree-optimization/84670
25820 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
25821 member.
25822 (BB_VISITED_WITH_VISITED_SUCCS): New define.
25823 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
25824 (compute_antic_aux): Only assert the number of values in ANTIC_IN
25825 doesn't grow if all successors (recursively) were visited at least
25826 once.
25827
25828 2018-03-05 Richard Biener <rguenther@suse.de>
25829
25830 PR tree-optimization/84650
25831 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
25832 if executed in the loop pipeline.
25833
25834 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
25835
25836 * doc/configfiles.texi (Configuration Files): Move info about
25837 conditionalizing $target-protos.h to...
25838 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
25839 differs from $target-protos.h.
25840
25841 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
25842 Chung-Ju Wu <jasonwucj@gmail.com>
25843
25844 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
25845 * config/nds32/nds32-multiple.md (setmemsi): Define.
25846 * config/nds32/nds32-memory-manipulation.c
25847 (nds32_gen_dup_4_byte_to_word_value): New.
25848 (emit_setmem_word_loop): New.
25849 (emit_setmem_byte_loop): New.
25850 (nds32_expand_setmem_loop): New.
25851 (nds32_expand_setmem_loop_v3m): New.
25852 (nds32_expand_setmem_unroll): New.
25853 (nds32_expand_setmem): New.
25854
25855 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
25856 Chung-Ju Wu <jasonwucj@gmail.com>
25857
25858 * config/nds32/nds32-memory-manipulation.c
25859 (nds32_emit_load_store): New.
25860 (nds32_emit_post_inc_load_store): New.
25861 (nds32_emit_mem_move): New.
25862 (nds32_emit_mem_move_block): New.
25863 (nds32_expand_movmemsi_loop_unknown_size): New.
25864 (nds32_expand_movmemsi_loop_known_size): New.
25865 (nds32_expand_movmemsi_loop): New.
25866 (nds32_expand_movmemsi_unroll): New.
25867 (nds32_expand_movmemqi): Rename ...
25868 (nds32_expand_movmemsi): ... to this.
25869 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
25870 (movmemsi): ... to this.
25871 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
25872 (nds32_expand_movmemsi): ... to this.
25873
25874 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
25875 Monk Chiang <sh.chiang04@gmail.com>
25876 Chung-Ju Wu <jasonwucj@gmail.com>
25877
25878 * config/nds32/nds32-protos.h
25879 (nds32_expand_load_multiple): New arguments.
25880 (nds32_expand_store_multiple): Ditto.
25881 (nds32_valid_multiple_load_store): Rename ...
25882 (nds32_valid_multiple_load_store_p): ... to this.
25883 * config/nds32/nds32-memory-manipulation.c
25884 (nds32_expand_load_multiple): Refine implementation.
25885 (nds32_expand_store_multiple): Ditto.
25886 * config/nds32/nds32-multiple.md
25887 (load_multiple): Update nds32_expand_load_multiple interface.
25888 (store_multiple): Update nds32_expand_store_multiple interface.
25889 * config/nds32/nds32-predicates.c
25890 (nds32_valid_multiple_load_store): Rename ...
25891 (nds32_valid_multiple_load_store_p): ... to this and refine
25892 implementation.
25893 * config/nds32/predicates.md
25894 (nds32_load_multiple_and_update_address_operation): New predicate.
25895 (nds32_store_multiple_and_update_address_operation): New predicate.
25896
25897 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
25898 Chung-Ju Wu <jasonwucj@gmail.com>
25899
25900 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
25901 (combo): New attribute.
25902 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
25903
25904 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
25905
25906 * config/nds32/nds32.opt: Change -mcmodel= default value.
25907
25908 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
25909 Monk Chiang <sh.chiang04@gmail.com>
25910 Chung-Ju Wu <jasonwucj@gmail.com>
25911
25912 * config/nds32/constants.md (unspec_element): New enum.
25913 * config/nds32/constraints.md (Umw): New constraint.
25914 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
25915 * config/nds32/nds32-intrinsic.md: Likewise.
25916 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
25917 (nds32_valid_smw_lwm_base_p): New.
25918 (nds32_output_smw_single_word): New.
25919 (nds32_output_lmw_single_word): New.
25920 (nds32_expand_unaligned_load): New.
25921 (nds32_expand_unaligned_store): New.
25922 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
25923 (nds32_output_smw_single_word): Declare.
25924 (nds32_output_lmw_single_word): Declare.
25925 (nds32_expand_unaligned_load): Declare.
25926 (nds32_expand_unaligned_store): Declare.
25927 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
25928 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
25929 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
25930 NDS32_BUILTIN_UASTORE_DW.
25931 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
25932 predicate.
25933
25934 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
25935 Kito Cheng <kito.cheng@gmail.com>
25936 Chung-Ju Wu <jasonwucj@gmail.com>
25937
25938 * config/nds32/nds32-intrinsic.c
25939 (nds32_expand_builtin_null_ftype_reg): Delete.
25940 (nds32_expand_builtin_reg_ftype_imm): Ditto.
25941 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
25942 (nds32_read_argument): New.
25943 (nds32_legitimize_target): Ditto.
25944 (nds32_legitimize_argument): Ditto.
25945 (nds32_check_constant_argument): Ditto.
25946 (nds32_expand_unop_builtin): Ditto.
25947 (nds32_expand_unopimm_builtin): Ditto.
25948 (nds32_expand_binop_builtin): Ditto.
25949 (nds32_builtin_decl_impl): Ditto.
25950 (builtin_description): Ditto.
25951 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
25952 (nds32_init_builtins_impl): Ditto.
25953 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
25954 (nds32_builtin_decl): New.
25955 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
25956 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
25957
25958 2018-03-02 Jeff Law <law@redhat.com>
25959
25960 * reorg.c (stop_search_p): Handle DEBUG_INSN.
25961 (redundant_insn, fill_simple_delay_slots): Likewise.
25962 (fill_slots_from_thread): Likewise.
25963 * resource.c (mark_referenced_resources): Likewise.
25964 (mark_set_resources, find_dead_or_set_registers): Likewise.
25965
25966 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25967
25968 * substring-locations.h (format_warning_va): Formatting fix for
25969 ATTRIBUTE_GCC_DIAG.
25970 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
25971 argument.
25972 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
25973 * substring-locations.c: Include intl.h.
25974 (format_warning_va): Turned into small wrapper around
25975 format_warning_n_va, renamed to ...
25976 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
25977 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
25978 use ngettext.
25979 (format_warning_at_substring_n): New function.
25980 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
25981 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
25982 format_warning_at_substring with just a shorter name instead of
25983 const function pointer.
25984 (fmtwarn_n): New function.
25985 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
25986 appropriate, get rid of all the fmtstr temporaries, move conditionals
25987 with G_() wrapped string literals directly into fmtwarn arguments,
25988 cast dir.len to (int), formatting fixes.
25989
25990 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
25991
25992 * doc/invoke.texi: Remove "Cilk Plus" references.
25993
25994 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25995 Richard Biener <rguenther@suse.de>
25996
25997 PR ipa/84628
25998 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
25999 for error or warning attributes if CALL_FROM_THUNK_P is set.
26000 Formatting fixes.
26001
26002 2018-03-02 Jakub Jelinek <jakub@redhat.com>
26003
26004 PR target/56540
26005 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
26006 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
26007
26008 PR target/56540
26009 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
26010 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
26011
26012 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
26013 instead of -1U in last predictors element's probability member.
26014
26015 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
26016
26017 PR ipa/83983
26018 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
26019 arguments if they are comparable.
26020
26021 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
26022
26023 PR tree-optimization/84634
26024 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
26025 masks and masked_loop_p with a single loop_masks, making sure it's
26026 null for bb vectorization.
26027
26028 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
26029
26030 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
26031 (vect_analyze_data_ref_access): Use loop->safe_len rather than
26032 loop->force_vectorize to check whether there is no alias.
26033
26034 2018-03-02 Jakub Jelinek <jakub@redhat.com>
26035
26036 PR target/84614
26037 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
26038 prototypes.
26039 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
26040 comments.
26041 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
26042 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
26043 instead of a loop around prev_real_insn.
26044 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
26045 prev_real_insn.
26046
26047 PR inline-asm/84625
26048 * config/i386/i386.c (ix86_print_operand): Use conditional
26049 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
26050 zero vector.
26051
26052 2018-03-02 Richard Biener <rguenther@suse.de>
26053
26054 PR tree-optimization/84427
26055 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
26056 (bitmap_set_subtract_values): Rewrite to handle multiple
26057 exprs per value.
26058 (clean): Likewise.
26059 (prune_clobbered_mems): Likewise.
26060 (phi_translate): Take edge instead of pred/phiblock.
26061 (phi_translate_1): Likewise.
26062 (phi_translate_set): Likewise. Insert all translated
26063 exprs for a value into the set, keeping possibly multiple
26064 expressions per value.
26065 (compute_antic_aux): Adjust for phi_translate changes.
26066 When intersecting union the expressions and prune those
26067 not in the final value set, keeping possibly multiple
26068 expressions per value. Do not use value-insertion
26069 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
26070 all expressions. Add verification that the value-sets
26071 only shrink during iteration.
26072 (compute_partial_antic_aux): Adjust for the phi_translate changes.
26073 (do_pre_regular_insertion): Likewise.
26074 (do_pre_partial_partial_insertion): Likewise.
26075
26076 2018-03-02 Richard Biener <rguenther@suse.de>
26077
26078 PR target/82005
26079 * config/darwin.c (saved_debug_info_level): New static global.
26080 (darwin_asm_lto_start): Disable debug info generation for LTO out.
26081 (darwin_asm_lto_end): Restore debug info generation settings.
26082
26083 2018-03-01 Martin Liska <mliska@suse.cz>
26084
26085 PR sanitizer/82484
26086 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
26087 volatile arguments.
26088
26089 2018-03-01 Richard Biener <rguenther@suse.de>
26090
26091 PR debug/84645
26092 * dwarf2out.c (gen_variable_die): Properly handle late VLA
26093 type annotation with LTO when debug was disabled at compile-time.
26094
26095 2018-03-01 Matthew Fortune <mfortune@gmail.com>
26096
26097 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
26098 XINT with INTVAL.
26099 (mips_final_postscan_insn): Likewise.
26100
26101 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
26102
26103 PR rtl-optimization/84528
26104 * alias.c (init_alias_target): Add commentary.
26105 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
26106 a unique base value if the frame pointer is not eliminated
26107 to the stack pointer.
26108
26109 2018-03-01 Tom de Vries <tom@codesourcery.com>
26110
26111 PR rtl-optimization/83327
26112 * lra-int.h (hard_regs_spilled_into): Declare.
26113 * lra.c (hard_regs_spilled_into): Define.
26114 (init_reg_info): Init hard_regs_spilled_into.
26115 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
26116 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
26117 (process_bb_lives): Handle hard_regs_spilled_into.
26118 (lra_create_live_ranges_1): Before doing liveness propagation, clear
26119 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
26120
26121 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
26122
26123 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
26124 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
26125 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
26126 * config/rs6000/aix72.h: New file.
26127
26128 2018-02-28 Jakub Jelinek <jakub@redhat.com>
26129
26130 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
26131 instead of warning_at with conditional singular and plural messages
26132 where possible.
26133
26134 PR target/52991
26135 * stor-layout.c (update_alignment_for_field): For
26136 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
26137 && !DECL_PACKED (field), do the alignment update, just use
26138 only desired_align instead of MAX (type_align, desired_align)
26139 as the alignment.
26140 (place_field): Don't do known_align < desired_align handling
26141 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
26142 is non-NULL, instead do it after rli->prev_field handling and
26143 only if not within a bitfield word. For DECL_PACKED (field)
26144 use type_align of BITS_PER_UNIT.
26145
26146 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
26147
26148 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
26149 superfluous parentheses and trailing spaces.
26150
26151 2018-02-28 Richard Biener <rguenther@suse.de>
26152
26153 PR tree-optimization/84584
26154 * graphite-scop-detection.c (scop_detection::add_scop): Discard
26155 SCoPs with fake exit edge.
26156
26157 2018-02-28 Martin Liska <mliska@suse.cz>
26158
26159 PR testsuite/84597
26160 * timevar.c (timer::print): Fix format to properly print 100%
26161 values.
26162
26163 2018-02-28 Richard Biener <rguenther@suse.de>
26164
26165 PR middle-end/84607
26166 * genmatch.c (capture_info::walk_match): Do not mark
26167 captured expressions without operands as expr_p given
26168 they act more like predicates and should be subject to
26169 "lost tail" side-effect preserving.
26170
26171 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
26172
26173 PR rtl-optimization/81611
26174 * auto-inc-dec.c (attempt_change): Move dead note from
26175 mem_insn if it's the next use of regno
26176 (find_address): Take address use of reg holding
26177 non-incremented value. Add parm to limit search to the named
26178 reg only.
26179 (merge_in_block): Attempt to use a mem insn that is the next
26180 use of the original regno.
26181
26182 2018-02-27 Martin Sebor <msebor@redhat.com>
26183
26184 PR c++/83871
26185 * doc/invoke.texi (-Wmissing-attributes): New option.
26186 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
26187
26188 2018-02-27 Martin Sebor <msebor@redhat.com>
26189
26190 PR translation/84207
26191 * diagnostic-core.h (warning_n, error_n, inform_n): Change
26192 n argument to unsigned HOST_WIDE_INT.
26193 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
26194 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
26195 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
26196 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
26197
26198 2018-02-27 Richard Biener <rguenther@suse.de>
26199
26200 PR tree-optimization/84512
26201 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
26202 Do not use the estimate returned from record_stmt_cost for
26203 the scalar iteration cost but sum properly using add_stmt_cost.
26204
26205 2018-02-27 Richard Biener <rguenther@suse.de>
26206
26207 PR tree-optimization/84466
26208 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
26209 Adjust last change to less strictly validate use operands.
26210
26211 2018-02-27 Martin Liska <mliska@suse.cz>
26212
26213 PR gcov-profile/84548
26214 * gcov.c (process_file): Allow partial overlap and consider it
26215 also as group functions.
26216 (output_lines): Properly calculate range of lines for a group.
26217
26218 2018-02-27 Martin Liska <mliska@suse.cz>
26219
26220 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
26221 'ggc' suffixes. Change first column width.
26222 (timer::print): Fix formatting of the column.
26223
26224 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
26225
26226 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
26227 preserve inline entry blocks for the sake of debug inline
26228 entry point markers alone.
26229 (remove_unused_locals): Suggest in comments a better place to
26230 force the preservation of inline entry blocks that are
26231 otherwise unused, but do not preserve them.
26232
26233 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
26234
26235 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
26236
26237 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
26238
26239 PR target/84039
26240 * config/i386/constraints.md (Bs): Replace
26241 ix86_indirect_branch_register with
26242 TARGET_INDIRECT_BRANCH_REGISTER.
26243 (Bw): Likewise.
26244 * config/i386/i386.md (indirect_jump): Likewise.
26245 (tablejump): Likewise.
26246 (*sibcall_memory): Likewise.
26247 (*sibcall_value_memory): Likewise.
26248 Peepholes of indirect call and jump via memory: Likewise.
26249 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
26250 (*sibcall_value_GOT_32): Likewise.
26251 * config/i386/predicates.md (indirect_branch_operand): Likewise.
26252 (GOT_memory_operand): Likewise.
26253 (call_insn_operand): Likewise.
26254 (sibcall_insn_operand): Likewise.
26255 (GOT32_symbol_operand): Likewise.
26256 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
26257
26258 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
26259
26260 PR rtl-optimization/83496
26261 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
26262 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
26263 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
26264 redundant insn, if any.
26265 (relax_delay_slots): Likewise.
26266 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
26267
26268 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
26269
26270 PR tree-optimization/83965
26271 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
26272 that grouped statements are part of a reduction chain. Return
26273 true if the statement is not marked as a reduction itself but
26274 is part of a group.
26275 (vect_recog_dot_prod_pattern): Don't check whether the statement
26276 is part of a group here.
26277 (vect_recog_sad_pattern): Likewise.
26278 (vect_recog_widen_sum_pattern): Likewise.
26279
26280 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
26281
26282 PR debug/84545
26283 * final.c (rest_of_clean_state): Also look for calls inside sequences.
26284
26285 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
26286
26287 PR target/84530
26288 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
26289 the bool argument.
26290 (ix86_output_indirect_function_return): New prototype.
26291 (ix86_split_simple_return_pop_internal): Likewise.
26292 * config/i386/i386.c (indirect_return_via_cx): New.
26293 (indirect_return_via_cx_bnd): Likewise.
26294 (indirect_thunk_name): Handle return va CX_REG.
26295 (output_indirect_thunk_function): Create alias for
26296 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
26297 (ix86_output_indirect_jmp): Remove the bool argument.
26298 (ix86_output_indirect_function_return): New function.
26299 (ix86_split_simple_return_pop_internal): Likewise.
26300 * config/i386/i386.md (*indirect_jump): Don't pass false
26301 to ix86_output_indirect_jmp.
26302 (*tablejump_1): Likewise.
26303 (simple_return_pop_internal): Change it to define_insn_and_split.
26304 Call ix86_split_simple_return_pop_internal to split it for
26305 -mfunction-return=.
26306 (simple_return_indirect_internal): Call
26307 ix86_output_indirect_function_return instead of
26308 ix86_output_indirect_jmp.
26309
26310 2018-02-26 Jakub Jelinek <jakub@redhat.com>
26311
26312 PR bootstrap/84405
26313 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
26314 memset and value initialization afterwards.
26315
26316 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
26317
26318 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
26319
26320 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
26321
26322 PR target/84521
26323 * common/config/aarch64/aarch64-common.c
26324 (aarch_option_optimization_table[]): Switch
26325 off fomit-frame-pointer
26326
26327 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
26328 Chung-Ju Wu <jasonwucj@gmail.com>
26329
26330 * config/nds32/nds32-multiple.md (load_multiple): Disallow
26331 volatile memory.
26332 (store_multiple): Ditto.
26333
26334 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
26335
26336 * config.gcc: Add --with-cpu support for nds32 target.
26337 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
26338 * config/nds32/nds32.opt: Add -mcpu= option.
26339
26340 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
26341
26342 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
26343 isel=yes): Warn for these deprecated options.
26344
26345 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
26346
26347 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
26348 ISA_2_5_MASKS_EMBEDDED.
26349
26350 2018-02-23 Jakub Jelinek <jakub@redhat.com>
26351
26352 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
26353 p->max as pointers rather than using iterative_hash_expr.
26354
26355 2018-02-23 Carl Love <cel@us.ibm.com>
26356
26357 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
26358 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
26359 BU_P8V_OVERLOAD_2.
26360 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
26361 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
26362 P8V_BUILTIN_VEC_VUNSIGNED2.
26363
26364 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
26365
26366 PR target/81572
26367 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
26368 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
26369 LRA_UNKNOWN_ALT.
26370 * lra-constraints.c (curr_insn_transform): Set up
26371 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
26372 LRA_UNKNOWN_ALT.
26373 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
26374 * lra-eliminations.c (spill_pseudos): Ditto.
26375 (process_insn_for_elimination): Ditto.
26376 * lra-lives.c (reg_early_clobber_p): Use the new macros.
26377 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
26378 LRA_NON_CLOBBERED_ALT.
26379
26380 2018-02-22 Martin Sebor <msebor@redhat.com>
26381
26382 PR tree-optimization/84480
26383 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
26384 to maybe_diag_stxncpy_trunc. Call it.
26385 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
26386 from gimple_fold_builtin_strcpy. Print inlining stack.
26387 (handle_builtin_stxncpy): Print inlining stack.
26388 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
26389
26390 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
26391
26392 PR target/84176
26393 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
26394 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
26395 and -fcheck-pointer-bounds are used together.
26396 (indirect_thunk_prefix): New enum.
26397 (indirect_thunk_need_prefix): New function.
26398 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
26399 "_nt" instead of "_bnd" for NOTRACK prefix.
26400 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
26401 (output_indirect_thunk_function): Likewise.
26402 (): Likewise.
26403 (ix86_code_end): Update output_indirect_thunk_function calls.
26404 (ix86_output_indirect_branch_via_reg): Replace
26405 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
26406 (ix86_output_indirect_branch_via_push): Likewise.
26407 (ix86_output_function_return): Likewise.
26408 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
26409 incompatible with -fcf-protection=branch and
26410 -fcheck-pointer-bounds.
26411
26412 2018-02-22 Steve Ellcey <sellcey@cavium.com>
26413
26414 PR target/83335
26415 * config/aarch64/aarch64.c (aarch64_print_address_internal):
26416 Change gcc_assert call to output_operand_lossage.
26417
26418 2018-02-22 Steve Ellcey <sellcey@cavium.com>
26419
26420 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
26421
26422 2018-02-22 DJ Delorie <dj@redhat.com>
26423 Sebastian Perta <sebastian.perta@renesas.com>
26424 Oleg Endo <olegendo@gcc.gnu.org>
26425
26426 * config/rx/rx.c (rx_rtx_costs): New function.
26427 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
26428
26429 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
26430
26431 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
26432
26433 2018-02-22 Martin Liska <mliska@suse.cz>
26434
26435 PR driver/83193
26436 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
26437 Add "native" as a possible value.
26438
26439 2018-02-22 Martin Liska <mliska@suse.cz>
26440
26441 PR driver/83193
26442 * config/i386/i386.c (ix86_option_override_internal):
26443 Add "native" as a possible value for -march and -mtune.
26444
26445 2018-02-22 Jakub Jelinek <jakub@redhat.com>
26446
26447 PR target/84502
26448 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
26449 to all type variants.
26450
26451 PR tree-optimization/84503
26452 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
26453 width as info->bitpos + info->bitsize - start.
26454 (merged_store_group::merge_overlapping): Simplify width computation.
26455 (check_no_overlap): New function.
26456 (imm_store_chain_info::try_coalesce_bswap): Compute expected
26457 start + width and last_order of the group, fail if check_no_overlap
26458 fails.
26459 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
26460 to group if check_no_overlap fails.
26461
26462 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
26463
26464 * config/rs6000/altivec.md: Delete contraint arguments to
26465 define_expand, define_split, and define_peephole2, and in
26466 define_insn_and_split if always unused.
26467 * config/rs6000/darwin.md: Ditto.
26468 * config/rs6000/dfp.md: Ditto.
26469 * config/rs6000/rs6000.md: Ditto.
26470 * config/rs6000/sync.md: Ditto.
26471 * config/rs6000/vector.md: Ditto.
26472 * config/rs6000/vsx.md: Ditto.
26473
26474 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
26475
26476 * config/rs6000/altivec.md: Write output control strings as braced
26477 blocks instead of double-quoted strings.
26478 * config/rs6000/darwin.md: Ditto.
26479 * config/rs6000/rs6000.md: Ditto.
26480 * config/rs6000/vector.md: Ditto.
26481 * config/rs6000/vsx.md: Ditto.
26482
26483 2018-02-21 Jason Merrill <jason@redhat.com>
26484
26485 PR c++/84314 - ICE with templates and fastcall attribute.
26486 * attribs.c (build_type_attribute_qual_variant): Remove assert.
26487
26488 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
26489
26490 * ipa-cp.c (determine_versionability): Fix comment typos.
26491
26492 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
26493
26494 PR c/84229
26495 * ipa-cp.c (determine_versionability): Do not version functions caling
26496 va_arg_pack.
26497
26498 2018-02-21 Martin Liska <mliska@suse.cz>
26499
26500 PR driver/83193
26501 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
26502 Add "native" as a possible value.
26503 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
26504 the macro when native cpu detection is available.
26505
26506 2018-02-21 Martin Liska <mliska@suse.cz>
26507
26508 PR driver/83193
26509 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
26510 Add "native" as a possible value.
26511 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
26512 when native cpu detection is available.
26513
26514 2018-02-21 Jakub Jelinek <jakub@redhat.com>
26515 Martin Sebor <msebor@redhat.com>
26516
26517 PR tree-optimization/84478
26518 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
26519 false.
26520 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
26521 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
26522 support which is conservatively correct, for 2 only stay conservative
26523 for maxlen. Formatting and comment capitalization fixes. Add STRICT
26524 argument to the 2 argument get_range_strlen, adjust 6 arg
26525 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
26526 false.
26527 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
26528 (gimple_fold_builtin_strlen): Pass true as last argument to
26529 get_range_strlen.
26530
26531 2018-02-20 Martin Sebor <msebor@redhat.com>
26532
26533 PR middle-end/84095
26534 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
26535 (builtin_memref::set_base_and_offset): Same. Handle inner references.
26536 (builtin_memref::builtin_memref): Factor out parts into
26537 set_base_and_offset and call it.
26538
26539 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
26540
26541 PR middle-end/84406
26542 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
26543 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
26544 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
26545 search at the associated MODE_INT.
26546
26547 2018-02-20 Jeff Law <law@redhat.com>
26548
26549 PR middle-end/82123
26550 PR tree-optimization/81592
26551 PR middle-end/79257
26552 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
26553 for range data rather than using global data.
26554 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
26555 range data rather than using global data.
26556 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
26557 pass it to children as needed.
26558 (struct directive::fmtresult): Similarly.
26559 (struct directive::set_width): Similarly.
26560 (struct directive::set_precision): Similarly.
26561 (format_integer, format_directive, parse_directive): Similarly.
26562 (format_none): Accept unnamed vr_values parameter.
26563 (format_percent, format_floating, format_character): Similarly.
26564 (format_string, format_plain): Similarly.
26565 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
26566 the EVRP range analyzer for range data rather than using global data.
26567 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
26568 gimple-ssa-evrp-analyze.h
26569 (class sprintf_dom_walker): Add after_dom_children member function.
26570 Add evrp_range_analyzer member.
26571 (sprintf_dom_walker::before_dom_children): Call into the EVRP
26572 range analyzer as needed.
26573 (sprintf_dom_walker::after_dom_children): New member function.
26574 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
26575 if not optimizing.
26576 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
26577 (evrp_range_analyzer::pop_to_marker): Likewise.
26578
26579 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
26580
26581 PR tree-optimization/84419
26582 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
26583 with the required type if its current type is compatible but
26584 different.
26585
26586 2018-02-20 Jakub Jelinek <jakub@redhat.com>
26587
26588 PR middle-end/82004
26589 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
26590 after vectorization.
26591
26592 2018-02-20 Martin Liska <mliska@suse.cz>
26593
26594 PR driver/83193
26595 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
26596 possible values if we don't have a hint.
26597
26598 2018-02-20 Martin Liska <mliska@suse.cz>
26599
26600 PR c/84310
26601 PR target/79747
26602 * final.c (shorten_branches): Build align_tab array with one
26603 more element.
26604 * opts.c (finish_options): Add alignment option limit check.
26605 (MAX_CODE_ALIGN): Likewise.
26606 (MAX_CODE_ALIGN_VALUE): Likewise.
26607 * doc/invoke.texi: Document maximum allowed option value for
26608 all -falign-* options.
26609
26610 2018-02-19 Jakub Jelinek <jakub@redhat.com>
26611
26612 PR target/84146
26613 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
26614 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
26615 * var-tracking.c (emit_note_insn_var_location): Remove all references
26616 to NOTE_INSN_CALL_ARG_LOCATION.
26617 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
26618 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
26619 Use copy_rtx_if_shared.
26620 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
26621 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
26622 (dwarf2out_var_location): Remove handling of
26623 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
26624 on call_insn.
26625 * final.c (final_scan_insn): Remove all references to
26626 NOTE_INSN_CALL_ARG_LOCATION.
26627 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
26628 before dumping final insns.
26629 * except.c (emit_note_eh_region_end): Remove all references to
26630 NOTE_INSN_CALL_ARG_LOCATION.
26631 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
26632 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
26633 * config/arc/arc.c (hwloop_optimize): Likewise.
26634 * config/arm/arm.c (create_fix_barrier): Likewise.
26635 * config/s390/s390.c (s390_chunkify_start): Likewise.
26636 * config/sh/sh.c (find_barrier): Likewise.
26637 * config/i386/i386.c (rest_of_insert_endbranch,
26638 ix86_seh_fixup_eh_fallthru): Likewise.
26639 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
26640 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
26641 * config/frv/frv.c (frv_function_prologue): Likewise.
26642 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
26643 reg note.
26644 (note_outside_basic_block_p): Remove all references to
26645 NOTE_INSN_CALL_ARG_LOCATION.
26646 * gengtype.c (adjust_field_rtx_def): Likewise.
26647 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
26648 Likewise.
26649 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
26650 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
26651
26652 PR c++/84444
26653 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
26654 is ADDR_EXPR.
26655
26656 PR tree-optimization/84452
26657 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
26658 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
26659 is NULL.
26660
26661 2018-02-19 Martin Liska <mliska@suse.cz>
26662
26663 PR sanitizer/82183
26664 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
26665
26666 2018-02-19 Martin Liska <mliska@suse.cz>
26667 Richard Sandiford <richard.sandiford@linaro.org>
26668
26669 PR tree-optimization/82491
26670 * gimple-fold.c (get_base_constructor): Make earlier bail out
26671 to prevent ubsan.
26672
26673 2018-02-19 Carl Love <cel@us.ibm.com>
26674
26675 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
26676 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
26677 BU_P8V_OVERLOAD_1.
26678 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
26679 P8V_BUILTIN_VEC_NEG.
26680
26681 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
26682
26683 * config/rl78/rl78.md (movdf): New define expand.
26684
26685 2018-02-19 Martin Liska <mliska@suse.cz>
26686
26687 PR other/80589
26688 * doc/invoke.texi: Fix typo.
26689 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
26690
26691 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
26692
26693 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
26694 handle rs6000_single_float and rs6000_double_float specially for
26695 e500 family CPUs.
26696
26697 2018-02-16 Jeff Law <law@redhat.com>
26698
26699 * config/rx/rx.c (add_pop_cfi_notes): New function.;
26700 (pop_regs): Use it.
26701
26702 2018-02-16 Jakub Jelinek <jakub@redhat.com>
26703
26704 PR ipa/84425
26705 * ipa-inline.c (inline_small_functions): Fix a typo.
26706
26707 2018-02-16 Nathan Sidwell <nathan@acm.org>
26708
26709 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
26710
26711 2018-02-16 Carl Love <cel@us.ibm.com>
26712
26713 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
26714 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
26715 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
26716 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
26717 expansion to P8V_BUILTIN_VEC_FLOAT2.
26718
26719 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
26720
26721 PR rtl-optimization/70023
26722 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
26723 src_regno into account.
26724
26725 2018-02-16 Carl Love <cel@us.ibm.com>
26726
26727 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
26728 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
26729 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
26730 * config/rs6000/rs6000.c: Remove case statements for
26731 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
26732 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
26733 and P9V_BUILTIN_VEC_VINSERT4B.
26734 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
26735 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
26736 * config/rs6000/vsx.md:
26737 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
26738 vec_insert4b.
26739
26740 2018-02-16 Carl Love <cel@us.ibm.com>
26741
26742 * config/rs6000/altivec.h: Add builtin names vec_extract4b
26743 vec_insert4b.
26744 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
26745 definitions.
26746 * config/rs6000/rs6000-c.c: Add the definitions for
26747 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
26748 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
26749 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
26750 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
26751 definition for insert4b and define insn *insert3b_internal.
26752 * doc/extend.texi: Add documentation for vec_extract4b.
26753
26754 2018-02-16 Nathan Sidwell <nathan@acm.org>
26755
26756 * doc/extend.texi (Backwards Compatibility): Mention friend
26757 injection. Note for-scope is deprecated.
26758 * doc/invoke.texi (-ffriend-injection): Deprecate.
26759
26760 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
26761
26762 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
26763 that moved to I2, also allow destinations that are a paradoxical
26764 subreg (instead of a normal reg).
26765
26766 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
26767
26768 PR target/83831
26769 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
26770 to QImode.
26771
26772 2018-02-16 Richard Biener <rguenther@suse.de>
26773
26774 PR tree-optimization/84037
26775 PR tree-optimization/84016
26776 PR target/82862
26777 * config/i386/i386.c (ix86_builtin_vectorization_cost):
26778 Adjust vec_construct for the fact we need additional higher latency
26779 128bit inserts for AVX256 and AVX512 vector builds.
26780 (ix86_add_stmt_cost): Scale vector construction cost for
26781 elementwise loads.
26782
26783 2018-02-16 Richard Biener <rguenther@suse.de>
26784
26785 PR tree-optimization/84417
26786 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
26787 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
26788 (non_rewritable_lvalue_p): Likewise, use poly-ints.
26789
26790 2018-02-16 Martin Liska <mliska@suse.cz>
26791
26792 PR sanitizer/84307
26793 * internal-fn.def (ASAN_CHECK): Set proper flags.
26794 (ASAN_MARK): Likewise.
26795
26796 2018-02-16 Julia Koval <julia.koval@intel.com>
26797
26798 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
26799 from PTA_CANNONLAKE.
26800
26801 2018-02-16 Jakub Jelinek <jakub@redhat.com>
26802
26803 PR target/84272
26804 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
26805 Use ++iter rather than iter++ for std::list iterators.
26806 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
26807 defer deleting them until all nodes in the forest are processed. Do
26808 free even leaf nodes. Change to_process into auto_vec.
26809
26810 PR bootstrap/84405
26811 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
26812 * vec.h (vec_default_construct): Use memset instead of placement new
26813 if BROKEN_VALUE_INITIALIZATION is defined.
26814 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
26815 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
26816 is defined.
26817
26818 PR rtl-optimization/83723
26819 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
26820 * lra.c (lra_substitute_pseudo): Likewise. If true, use
26821 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
26822 recursive calls.
26823 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
26824 callers.
26825 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
26826
26827 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
26828
26829 PR rtl-optimization/81443
26830 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
26831 from inner REGs to paradoxical SUBREGs.
26832
26833 2018-02-16 Richard Biener <rguenther@suse.de>
26834
26835 PR tree-optimization/84399
26836 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
26837 For operands we can analyze at their definition make sure we can
26838 analyze them at each use as well.
26839
26840 2018-02-16 Richard Biener <rguenther@suse.de>
26841
26842 PR tree-optimization/84190
26843 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
26844 volatile accesses if the decl isn't volatile.
26845
26846 2018-02-15 Jason Merrill <jason@redhat.com>
26847
26848 PR c++/84314 - ICE with templates and fastcall attribute.
26849 * attribs.c (build_type_attribute_qual_variant): Don't clobber
26850 TYPE_CANONICAL on an existing type.
26851
26852 2018-02-15 Jakub Jelinek <jakub@redhat.com>
26853
26854 PR tree-optimization/84383
26855 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
26856 dstoff nor call operand_equal_p if dstbase is NULL.
26857
26858 PR tree-optimization/84334
26859 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
26860 also a CONSTANT_CLASS_P, punt.
26861
26862 2018-02-14 Jim Wilson <jimw@sifive.com>
26863
26864 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
26865 first SMALL_OPERAND check. New local min_second_step. Move assert
26866 to where locals are set. Add TARGET_RVC support.
26867 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
26868
26869 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
26870
26871 * doc/invoke.texi: Correct -Wformat-overflow code sample.
26872
26873 2018-02-14 Martin Sebor <msebor@redhat.com>
26874
26875 PR tree-optimization/83698
26876 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
26877 arrays constrain the offset range to their bounds.
26878 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
26879 (builtin_access::overlap): Avoid setting the size of overlap if it's
26880 already been set.
26881 (maybe_diag_overlap): Also consider arrays when deciding what values
26882 of offsets to include in diagnostics.
26883
26884 2018-02-14 Martin Sebor <msebor@redhat.com>
26885
26886 PR c/84108
26887 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
26888 that correspond to the kind of a declaration.
26889
26890 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
26891
26892 PR target/83984
26893 * config/pa/pa.md: Load address of PIC label using the linkage table
26894 if the label is nonlocal.
26895
26896 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
26897
26898 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
26899 warning message if user requests -maltivec=be.
26900 * doc/invoke.texi: Document deprecation of -maltivec=be.
26901
26902 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
26903
26904 PR target/84220
26905 * config/rs6000/rs6000-c.c: Update definitions for
26906 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
26907 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
26908
26909 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26910
26911 PR target/84239
26912 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
26913 add _get_ssp intrinsics. Remove argument from
26914 __builtin_ia32_rdssp[d|q].
26915 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
26916 * config/i386/i386-builtin.def: Remove argument from
26917 __builtin_ia32_rdssp[d|q].
26918 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
26919 ix86_expand_special_args_builtin for _rdssp[d|q].
26920 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
26921 Clear register before usage.
26922 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
26923 Add documentation for new _get_ssp and _inc_ssp intrinsics.
26924
26925 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
26926
26927 PR tree-optimization/84357
26928 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
26929 operand 1 of an ARRAY_REF too.
26930
26931 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
26932
26933 PR target/83831
26934 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
26935 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
26936 declarations.
26937 (set_of_reg): New struct.
26938 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
26939 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
26940 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
26941 functions.
26942 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
26943 Split into bitclr, bitset, bitinvert patterns if appropriate.
26944 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
26945 use rx_fuse_in_memory_bitop.
26946 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
26947 to named insn, correct maximum insn length.
26948
26949 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
26950
26951 PR target/79242
26952 * machmode.def: Define a complex mode for PARTIAL_INT.
26953 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
26954 MODE_PARTIAL_INT.
26955 * doc/rtl.texi: Document CSPImode.
26956 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
26957 handling.
26958 (msp430_hard_regno_nregs_with_padding): Likewise.
26959
26960 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
26961
26962 PR target/84279
26963 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
26964
26965 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
26966
26967 PR rtl-optimization/84169
26968 * combine.c (try_combine): New variable split_i2i3. Set it to true if
26969 we generated a parallel as new i3 and we split that to new i2 and i3
26970 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
26971 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
26972 those to i2, not i1. Partially rewrite this scan code.
26973
26974 2018-02-13 Jakub Jelinek <jakub@redhat.com>
26975
26976 PR c/82210
26977 * stor-layout.c (place_field): For variable length fields, adjust
26978 offset_align afterwards not just based on the field's alignment,
26979 but also on the size.
26980
26981 PR middle-end/84309
26982 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
26983 of exps and logs in the use_exp2 case.
26984
26985 2018-02-13 Jeff Law <law@redhat.com>
26986
26987 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
26988 entry for "vector".
26989
26990 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
26991 ARGS as unused.
26992
26993 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
26994
26995 PR debug/84342
26996 PR debug/84319
26997 * common.opt (gas-loc-support, gas-locview-support): New.
26998 (ginline-points, ginternal-reset-location-views): New.
26999 * doc/invoke.texi: Document them. Use @itemx where intended.
27000 (gvariable-location-views): Adjust.
27001 * target.def (reset_location_view): New.
27002 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
27003 (TARGET_RESET_LOCATION_VIEW): New.
27004 * doc/tm.texi: Rebuilt.
27005 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
27006 (dwarf2out_default_as_locview_support): New.
27007 (output_asm_line_debug_info): Use option variables.
27008 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
27009 (output_loc_list): Likewise.
27010 (add_high_low_attributes): Check option variables.
27011 Don't output entry view attribute in strict mode.
27012 (gen_inlined_subroutine_die): Check option variables.
27013 (dwarf2out_inline_entry): Likewise.
27014 (init_sections_and_labels): Likewise.
27015 (dwarf2out_early_finish): Likewise.
27016 (maybe_reset_location_view): New, from...
27017 (dwarf2out_var_location): ... here. Call it.
27018 * debug.h (dwarf2out_default_as_loc_support): Declare.
27019 (dwarf2out_default_as_locview_support): Declare.
27020 * hooks.c (hook_int_rtx_insn_0): New.
27021 * hooks.h (hook_int_rtx_insn_0): Declare.
27022 * toplev.c (process_options): Take -gas-loc-support and
27023 -gas-locview-support from dwarf2out. Enable
27024 -gvariable-location-views by default only with locview
27025 assembler support. Enable -ginternal-reset-location-views by
27026 default only if the target defines the corresponding hook.
27027 Enable -ginline-points by default if location views are
27028 enabled; force it disabled if statement frontiers are
27029 disabled.
27030 * tree-inline.c (expand_call_inline): Check option variables.
27031 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
27032
27033 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
27034
27035 PR tree-optimization/84321
27036 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
27037 handling. Also check whether the anti-range contains any values
27038 that satisfy the mask; switch to a VR_RANGE if not.
27039
27040 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
27041
27042 PR sanitizer/84340
27043 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
27044
27045 2018-02-13 Martin Jambor <mjambor@suse.cz>
27046
27047 PR c++/83990
27048 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
27049 of call statements, also set location of a load to a temporary.
27050
27051 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
27052
27053 * config/rl78/rl78.c (add_vector_labels): New function.
27054 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
27055 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
27056 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
27057 which checks that no arguments are passed.
27058 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
27059 * doc/extend.texi: Documentation for the new attribute.
27060
27061 2018-02-13 Andreas Schwab <schwab@suse.de>
27062
27063 * config/riscv/linux.h (CPP_SPEC): Define.
27064
27065 2018-02-13 Jakub Jelinek <jakub@redhat.com>
27066
27067 PR target/84335
27068 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
27069 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
27070 OPTION_MASK_ISA_AES as first argument to def_builtin_const
27071 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
27072 instead of OPTION_MASK_ISA_PCLMUL as first argument to
27073 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
27074 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
27075 temporarily for AES and PCLMUL builtins.
27076
27077 PR tree-optimization/84339
27078 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
27079 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
27080 Formatting fixes.
27081
27082 PR middle-end/84309
27083 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
27084 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
27085 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
27086 inline function.
27087 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
27088 inline function.
27089 * omp-simd-clone.h: New file.
27090 * omp-simd-clone.c: Include omp-simd-clone.h.
27091 (expand_simd_clones): No longer static.
27092 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
27093 cgraph.h and omp-simd-clone.h.
27094 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
27095 (vect_recog_widen_shift_pattern): Formatting fix.
27096 (vect_pattern_recog_1): Don't check optab for calls.
27097
27098 PR target/84336
27099 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
27100 operands[2] into a REG before using gen_lowpart on it.
27101
27102 2018-02-12 Jeff Law <law@redhat.com>
27103
27104 PR target/83760
27105 * config/sh/sh.c (find_barrier): Consider a sibling call
27106 a barrier as well.
27107
27108 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
27109 successfully back substituting a reg.
27110
27111 2018-02-12 Richard Biener <rguenther@suse.de>
27112
27113 PR tree-optimization/84037
27114 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
27115 parameter, move visited init to caller.
27116 (vect_slp_analyze_operations): Separate cost from validity
27117 check, initialize visited once for all instances.
27118 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
27119 for all instances.
27120 * tree-vect-stmts.c (vect_model_simple_cost): Make early
27121 out an assert.
27122 (vect_model_promotion_demotion_cost): Likewise.
27123 (vectorizable_bswap): Guard cost modeling with !slp_node
27124 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
27125 SLP stmts.
27126 (vectorizable_call): Likewise.
27127 (vectorizable_conversion): Likewise.
27128 (vectorizable_assignment): Likewise.
27129 (vectorizable_shift): Likewise.
27130 (vectorizable_operation): Likewise.
27131 (vectorizable_store): Likewise.
27132 (vectorizable_load): Likewise.
27133 (vectorizable_condition): Likewise.
27134 (vectorizable_comparison): Likewise.
27135
27136 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
27137
27138 PR sanitizer/84307
27139 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
27140 (ASAN_MARK): Fix fnspec to account for return value, change pointer
27141 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
27142
27143 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
27144
27145 PR middle-end/83665
27146 * params.def (inline-min-speedup): Increase from 8 to 15.
27147 (max-inline-insns-auto): Decrease from 40 to 30.
27148 * ipa-split.c (consider_split): Add some buffer for function to
27149 be considered inlining candidate.
27150 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
27151 default values.
27152
27153 2018-02-12 Richard Biener <rguenther@suse.de>
27154
27155 PR tree-optimization/84037
27156 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
27157 matched stmts if we cannot swap the non-matched ones.
27158
27159 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
27160
27161 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
27162 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
27163 _mm_maskz_scalef_round_ss): New intrinsics.
27164 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
27165 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
27166 __builtin_ia32_scalefss_round): Remove.
27167 (__builtin_ia32_scalefsd_mask_round,
27168 __builtin_ia32_scalefss_mask_round): New intrinsics.
27169 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
27170 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
27171 ((match_operand:VF_128 2 "<round_nimm_predicate>"
27172 "<round_constraint>")): Changed to ...
27173 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
27174 "<round_scalar_constraint>")): ... this.
27175 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
27176 %0, %1, %2<round_op3>}"): Changed to ...
27177 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
27178 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
27179 %2<round_scalar_mask_op3>}"): ... this.
27180 * config/i386/subst.md (round_scalar_nimm_predicate): New.
27181
27182 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
27183
27184 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
27185 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
27186 (_mm_maskz_sqrt_round_ss): New intrinsics.
27187 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
27188 (__builtin_ia32_sqrtsd_mask_round)
27189 (__builtin_ia32_sqrtss_mask_round): New builtins.
27190 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
27191 (__builtin_ia32_sqrtss_round): Remove.
27192 (__builtin_ia32_sqrtsd_mask_round)
27193 (__builtin_ia32_sqrtss_mask_round): New builtins.
27194 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
27195 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
27196 ((match_operand:VF_128 1 "vector_operand"
27197 "xBm,<round_constraint>")): Changed to ...
27198 ((match_operand:VF_128 1 "vector_operand"
27199 "xBm,<round_scalar_constraint>")): ... this.
27200 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
27201 %0, %2, %<iptr>1<round_op3>}): Changed to ...
27202 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
27203 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
27204 %<iptr>1<round_scalar_mask_op3>}): ... this.
27205 ((set_attr "prefix" "<round_prefix>")): Changed to ...
27206 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
27207
27208 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
27209
27210 PR target/84266
27211 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
27212 Cast vec_cmpeq result to correct type.
27213 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
27214 Cast vec_cmpgt result to correct type.
27215
27216 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
27217
27218 * final.c (final_scan_insn_1): Renamed from...
27219 (final_scan_insn): ... this. New wrapper, to recover
27220 seen from the outermost call in recursive ones.
27221 * config/sparc/sparc.c (output_return): Drop seen from call.
27222 (output_sibcall): Likewise.
27223 * config/visium/visium.c (output_branch): Likewise.
27224
27225 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
27226
27227 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
27228 function label.
27229
27230 2018-02-10 Alan Modra <amodra@gmail.com>
27231
27232 PR target/84300
27233 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
27234 Specify LR as an input.
27235
27236 2018-02-10 Jakub Jelinek <jakub@redhat.com>
27237
27238 PR sanitizer/83987
27239 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
27240 remove_member_access_dummy_vars): New functions.
27241 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
27242 lower_omp_1, execute_lower_omp): Use them.
27243
27244 PR rtl-optimization/84308
27245 * shrink-wrap.c (spread_components): Release todo vector.
27246
27247 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
27248
27249 PR rtl-optimization/57193
27250 * ira-color.c (struct allocno_color_data): Add member
27251 conflict_allocno_hard_prefs.
27252 (update_conflict_allocno_hard_prefs): New.
27253 (bucket_allocno_compare_func): Add a preference based on
27254 conflict_allocno_hard_prefs.
27255 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
27256 (color_allocnos): Remove a dead code. Initiate
27257 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
27258
27259 2018-02-09 Jakub Jelinek <jakub@redhat.com>
27260
27261 PR target/84226
27262 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
27263 constraint from =wa to wa. Avoid a subreg on the output operand,
27264 instead use a pseudo and subreg it in a move.
27265 (p9_xxbrd_<mode>): Changed to ...
27266 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
27267 (p9_xxbrd_v2df): New expander.
27268 (p9_xxbrw_<mode>): Changed to ...
27269 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
27270 (p9_xxbrw_v4sf): New expander.
27271
27272 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
27273
27274 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
27275
27276 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
27277
27278 PR target/83926
27279 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
27280 multiply in 32-bit mode.
27281 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
27282 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
27283 mode.
27284
27285 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
27286
27287 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
27288 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
27289 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
27290 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
27291
27292 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
27293
27294 PR lto/84213
27295 * dwarf2out.c (is_trivial_indirect_ref): New function.
27296 (dwarf2out_late_global_decl): Do not generate a location
27297 attribute for variables that have a non-trivial DECL_VALUE_EXPR
27298 and that are not defined in the current unit.
27299
27300 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
27301
27302 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
27303 instead of a libcall for UNORDERED.
27304
27305 2018-02-09 Tamar Christina <tamar.christina@arm.com>
27306
27307 PR target/82641
27308 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
27309 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
27310
27311 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
27312
27313 PR target/PR84295
27314 * config/s390/s390.c (s390_set_current_function): Invoke
27315 s390_indirect_branch_settings also if fndecl didn't change.
27316
27317 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
27318
27319 * config/rs6000/rs6000.md (blockage): Set length to zero.
27320
27321 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
27322
27323 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
27324
27325 2018-02-09 Jakub Jelinek <jakub@redhat.com>
27326
27327 PR sanitizer/84285
27328 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
27329 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
27330 -static-lib*san.
27331
27332 PR debug/84252
27333 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
27334 PARALLEL incoming that failed vt_get_decl_and_offset check.
27335
27336 PR middle-end/84237
27337 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
27338 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
27339 TREE_READONLY bit.
27340 (get_variable_section): For decls in named .bss* sections pass true as
27341 second argument to bss_initializer_p.
27342
27343 2018-02-09 Marek Polacek <polacek@redhat.com>
27344 Jakub Jelinek <jakub@redhat.com>
27345
27346 PR c++/83659
27347 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
27348 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
27349 Sync some changes from cxx_fold_indirect_ref.
27350
27351 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
27352
27353 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
27354 markers.
27355 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
27356 (BLOCK_INLINE_ENTRY_LABEL): New.
27357 (dwarf2out_var_location): Disregard inline entry markers.
27358 (inline_entry_data): New struct.
27359 (inline_entry_data_hasher): New hashtable type.
27360 (inline_entry_data_hasher::hash): New.
27361 (inline_entry_data_hasher::equal): New.
27362 (inline_entry_data_table): New variable.
27363 (add_high_low_attributes): Add DW_AT_entry_pc and
27364 DW_AT_GNU_entry_view attributes if a pending entry is found
27365 in inline_entry_data_table. Add old entry_pc attribute only
27366 if debug nonbinding markers are disabled.
27367 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
27368 markers are enabled.
27369 (block_within_block_p, dwarf2out_inline_entry): New.
27370 (dwarf2out_finish): Check that no entries remained in
27371 inline_entry_data_table.
27372 * final.c (reemit_insn_block_notes): Handle inline entry notes.
27373 (final_scan_insn, notice_source_line): Likewise.
27374 (rest_of_clean_state): Skip inline entry markers.
27375 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
27376 markers.
27377 * gimple.c (gimple_build_debug_inline_entry): New.
27378 * gimple.h (enum gimple_debug_subcode): Add
27379 GIMPLE_DEBUG_INLINE_ENTRY.
27380 (gimple_build_debug_inline_entry): Declare.
27381 (gimple_debug_inline_entry_p): New.
27382 (gimple_debug_nonbind_marker_p): Adjust.
27383 * insn-notes.def (INLINE_ENTRY): New.
27384 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
27385 inline entry marker notes.
27386 (print_insn): Likewise.
27387 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
27388 (INSN_DEBUG_MARKER_KIND): Likewise.
27389 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
27390 * tree-inline.c (expand_call_inline): Build and insert
27391 debug_inline_entry stmt.
27392 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
27393 inline entry blocks early, if nonbind markers are enabled.
27394 (dump_scope_block): Dump fragment info.
27395 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
27396 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
27397 (gimple_build_debug_inline_entry): New.
27398 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
27399 Enable/disable inline entry points too.
27400 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
27401 (DEBUG_INSN): Describe inline entry markers.
27402
27403 * common.opt (gvariable-location-views): New.
27404 (gvariable-location-views=incompat5): New.
27405 * config.in: Rebuilt.
27406 * configure: Rebuilt.
27407 * configure.ac: Test assembler for view support.
27408 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
27409 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
27410 * dwarf2out.c (var_loc_view): New typedef.
27411 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
27412 (dwarf2out_locviews_in_attribute): New.
27413 (dwarf2out_locviews_in_loclist): New.
27414 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
27415 (enum dw_line_info_opcode): Add LI_adv_address.
27416 (struct dw_line_info_table): Add view.
27417 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
27418 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
27419 (zero_view_p): New variable.
27420 (ZERO_VIEW_P): New macro.
27421 (output_asm_line_debug_info): New.
27422 (struct var_loc_node): Add view.
27423 (add_AT_view_list, AT_loc_list): New.
27424 (add_var_loc_to_decl): Add view param. Test it against last.
27425 (new_loc_list): Add view params. Record them.
27426 (AT_loc_list_ptr): Handle loc and view lists.
27427 (view_list_to_loc_list_val_node): New.
27428 (print_dw_val): Handle dw_val_class_view_list.
27429 (size_of_die): Likewise.
27430 (value_format): Likewise.
27431 (loc_list_has_views): New.
27432 (gen_llsym): Set vl_symbol too.
27433 (maybe_gen_llsym, skip_loc_list_entry): New.
27434 (dwarf2out_maybe_output_loclist_view_pair): New.
27435 (output_loc_list): Output view list or entries too.
27436 (output_view_list_offset): New.
27437 (output_die): Handle dw_val_class_view_list.
27438 (output_dwarf_version): New.
27439 (output_compilation_unit_header): Use it.
27440 (output_skeleton_debug_sections): Likewise.
27441 (output_rnglists, output_line_info): Likewise.
27442 (output_pubnames, output_aranges): Update version comments.
27443 (output_one_line_info_table): Output view numbers in asm comments.
27444 (dw_loc_list): Determine current endview, pass it to new_loc_list.
27445 Call maybe_gen_llsym.
27446 (loc_list_from_tree_1): Adjust.
27447 (add_AT_location_description): Create view list attribute if
27448 needed, check it's absent otherwise.
27449 (convert_cfa_to_fb_loc_list): Adjust.
27450 (maybe_emit_file): Call output_asm_line_debug_info for test.
27451 (dwarf2out_var_location): Reset views as needed. Precompute
27452 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
27453 attribute. Set view.
27454 (new_line_info_table): Reset next view.
27455 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
27456 (dwarf2out_source_line): Likewise. Output view resets and labels to
27457 the assembler, or select appropriate line info opcodes.
27458 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
27459 (optimize_string_length): Catch it. Adjust.
27460 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
27461 dw_val_class_view_list, and remove it if no longer needed.
27462 (hash_loc_list): Hash view numbers.
27463 (loc_list_hasher::equal): Compare them.
27464 (optimize_location_lists): Check whether a view list symbol is
27465 needed, and whether the locview attribute is present, and
27466 whether they match. Remove the locview attribute if no longer
27467 needed.
27468 (index_location_lists): Call skip_loc_list_entry for test.
27469 (dwarf2out_finish): Call output_asm_line_debug_info for test.
27470 Use output_dwarf_version.
27471 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
27472 (struct dw_val_node): Add val_view_list.
27473 * final.c (SEEN_NEXT_VIEW): New.
27474 (set_next_view_needed): New.
27475 (clear_next_view_needed): New.
27476 (maybe_output_next_view): New.
27477 (final_start_function): Rename to...
27478 (final_start_function_1): ... this. Take pointer to FIRST,
27479 add SEEN parameter. Emit param bindings in the initial view.
27480 (final_start_function): Reintroduce SEEN-less interface.
27481 (final): Rename to...
27482 (final_1): ... this. Take SEEN parameter. Output final pending
27483 next view at the end.
27484 (final): Reintroduce seen-less interface.
27485 (final_scan_insn): Output pending next view before switching
27486 sections or ending a block. Mark the next view as needed when
27487 outputting variable locations. Notify debug backend of section
27488 changes, and of location view changes.
27489 (rest_of_handle_final): Adjust.
27490 * toplev.c (process_options): Autodetect value for debug variable
27491 location views option. Warn on incompat5 without -gdwarf-5.
27492 * doc/invoke.texi (gvariable-location-views): New.
27493 (gvariable-location-views=incompat5): New.
27494 (gno-variable-location-views): New.
27495
27496 2018-02-08 David Malcolm <dmalcolm@redhat.com>
27497
27498 PR tree-optimization/84136
27499 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
27500 that the result of find_edge is non-NULL.
27501
27502 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
27503
27504 PR target/83008
27505 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
27506 storing integer register in SImode. Fix cost of 256 and 512
27507 byte aligned SSE register store.
27508
27509 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
27510
27511 * config/i386/i386.c (ix86_multiplication_cost): Fix
27512 multiplication cost for TARGET_AVX512DQ.
27513
27514 2018-02-08 Marek Polacek <polacek@redhat.com>
27515
27516 PR tree-optimization/84238
27517 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
27518 get_range_strlen.
27519
27520 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
27521
27522 PR tree-optimization/84265
27523 * tree-vect-stmts.c (vectorizable_store): Don't treat
27524 VMAT_CONTIGUOUS accesses as grouped.
27525 (vectorizable_load): Likewise.
27526
27527 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
27528
27529 PR tree-optimization/81635
27530 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
27531 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
27532 (test_round_for_mask): New functions.
27533 (wide_int_cc_tests): Call test_round_for_mask.
27534 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
27535 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
27536 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
27537 range returned by get_range_info.
27538
27539 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
27540
27541 PR ipa/81360
27542 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
27543 * symtab.c: Include builtins.h
27544 (symtab_node::output_to_lto_symbol_table_p): Move here
27545 from lto-streamer-out.c:output_symbol_p.
27546 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
27547 (output_symbol_p): Move all logic to symtab.c
27548 (produce_symtab): Update.
27549
27550 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
27551
27552 * config/s390/s390-opts.h (enum indirect_branch): Define.
27553 * config/s390/s390-protos.h (s390_return_addr_from_memory)
27554 (s390_indirect_branch_via_thunk)
27555 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
27556 (enum s390_indirect_branch_type): Define.
27557 * config/s390/s390.c (struct s390_frame_layout, struct
27558 machine_function): Remove.
27559 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
27560 (indirect_branch_table_label_no, indirect_branch_table_name):
27561 Define variables.
27562 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
27563 (enum s390_indirect_branch_option): Define.
27564 (s390_return_addr_from_memory): New function.
27565 (s390_handle_string_attribute): New function.
27566 (s390_attribute_table): Add new attribute handler.
27567 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
27568 (s390_indirect_branch_via_thunk): New function.
27569 (s390_indirect_branch_via_inline_thunk): New function.
27570 (s390_function_ok_for_sibcall): When jumping via thunk disallow
27571 sibling call optimization for non z10 compiles.
27572 (s390_emit_call): Force indirect branch target to be a single
27573 register. Add r1 clobber for non-z10 compiles.
27574 (s390_emit_epilogue): Emit return jump via return_use expander.
27575 (s390_reorg): Handle JUMP_INSNs as execute targets.
27576 (s390_option_override_internal): Perform validity checks for the
27577 new command line options.
27578 (s390_indirect_branch_attrvalue): New function.
27579 (s390_indirect_branch_settings): New function.
27580 (s390_set_current_function): Invoke s390_indirect_branch_settings.
27581 (s390_output_indirect_thunk_function): New function.
27582 (s390_code_end): Implement target hook.
27583 (s390_case_values_threshold): Implement target hook.
27584 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
27585 macros.
27586 * config/s390/s390.h (struct s390_frame_layout)
27587 (struct machine_function): Move here from s390.c.
27588 (TARGET_INDIRECT_BRANCH_NOBP_RET)
27589 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
27590 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
27591 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
27592 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
27593 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
27594 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
27595 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
27596 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
27597 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
27598 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
27599 (mnemonic attribute): Add values which aren't recognized
27600 automatically.
27601 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
27602 pattern for branch conversion. Fix mnemonic attribute.
27603 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
27604 indirect branch via thunk if requested.
27605 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
27606 ("*indirect_jump"): Disable for branch conversion using out of
27607 line thunks.
27608 ("indirect_jump_via_thunk<mode>_z10")
27609 ("indirect_jump_via_thunk<mode>")
27610 ("indirect_jump_via_inlinethunk<mode>_z10")
27611 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
27612 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
27613 ("casesi_jump_via_inlinethunk<mode>_z10")
27614 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
27615 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
27616 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
27617 ("*indirect2_jump"): Disable for branch conversion.
27618 ("casesi_jump"): Turn into expander and expand patterns for branch
27619 conversion.
27620 ("return_use"): New expander.
27621 ("*return"): Emit return via thunk and rename it to ...
27622 ("*return<mode>"): ... this one.
27623 * config/s390/s390.opt: Add new options and and enum for the
27624 option values.
27625
27626 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
27627
27628 * lra-constraints.c (match_reload): Unconditionally use
27629 gen_lowpart_SUBREG, rather than selecting between that
27630 and equivalent gen_rtx_SUBREG code.
27631
27632 2018-02-08 Richard Biener <rguenther@suse.de>
27633
27634 PR tree-optimization/84233
27635 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
27636 changed flag instead of boguously re-using phi_inserted.
27637
27638 2018-02-08 Martin Jambor <mjambor@suse.cz>
27639
27640 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
27641 static local variables.
27642
27643 2018-02-08 Richard Biener <rguenther@suse.de>
27644
27645 PR tree-optimization/84278
27646 * tree-vect-stmts.c (vectorizable_store): When looking for
27647 smaller vector types to perform grouped strided loads/stores
27648 make sure the mode is supported by the target.
27649 (vectorizable_load): Likewise.
27650
27651 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
27652
27653 * config/aarch64/aarch64.c (aarch64_components_for_bb):
27654 Increase LDP/STP opportunities by adding adjacent callee-saves.
27655
27656 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
27657
27658 PR rtl-optimization/84068
27659 PR rtl-optimization/83459
27660 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
27661
27662 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
27663
27664 PR tree-optimization/84224
27665 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
27666 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
27667 non-zero arguments.
27668
27669 2018-02-07 Iain Sandoe <iain@codesourcery.com>
27670
27671 PR target/84113
27672 * config/rs6000/altivec.md (*restore_world): Remove LR use.
27673 * config/rs6000/predicates.md (restore_world_operation): Adjust op
27674 count, remove one USE.
27675
27676 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
27677
27678 * doc/install.texi (Configuration): Document the
27679 --with-long-double-format={ibm,ieee} PowerPC configuration
27680 options.
27681
27682 PR target/84154
27683 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
27684 Convert from define_expand to be define_insn_and_split. Rework
27685 float/double/_Float128 conversions to QI/HI/SImode to work with
27686 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
27687 conversions to QI/HImode types did a store and then a load to
27688 truncate the value. For conversions to VSX registers, don't split
27689 the insn, instead emit the code directly. Use the code iterator
27690 any_fix to combine signed and unsigned conversions.
27691 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
27692 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
27693 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
27694 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
27695 (fix_<mode>di2_hw): Likewise.
27696 (fixuns_<mode>di2_hw): Likewise.
27697 (fix_<mode>si2_hw): Likewise.
27698 (fixuns_<mode>si2_hw): Likewise.
27699 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
27700 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
27701 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
27702 fix<uns>_trunc<SFDF:mode>si2_p8.
27703 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
27704 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
27705 (fix<uns>_<mode>_mem): Likewise.
27706 (fctiw<u>z_<mode>_mem): Likewise.
27707 (fix<uns>_<mode>_mem): Likewise.
27708 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
27709 the register allocator from doing a direct move to the GPRs to do
27710 a store, and instead use the ISA 3.0 store byte/half-word from
27711 vector register instruction. For IEEE 128-bit floating point,
27712 also optimize stores of 32-bit ints.
27713 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
27714
27715 2018-02-07 Alan Hayward <alan.hayward@arm.com>
27716
27717 * genextract.c (push_pathstr_operand): New function to support
27718 [a-zA-Z].
27719 (walk_rtx): Call push_pathstr_operand.
27720 (print_path): Support [a-zA-Z].
27721
27722 2018-02-07 Richard Biener <rguenther@suse.de>
27723
27724 PR tree-optimization/84037
27725 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
27726 (cse_and_gimplify_to_preheader): Declare.
27727 (vect_get_place_in_interleaving_chain): Likewise.
27728 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27729 ivexpr_map.
27730 (_loop_vec_info::~_loop_vec_info): Delete it.
27731 (cse_and_gimplify_to_preheader): New function.
27732 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
27733 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
27734 (vectorizable_load): Likewise. For grouped stores always base
27735 the IV on the first element.
27736 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
27737 condition before gimplifying.
27738
27739 2018-02-07 Jakub Jelinek <jakub@redhat.com>
27740
27741 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
27742 *DIV_EXPR and *MOD_EXPR.
27743
27744 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
27745
27746 PR target/84248
27747 * config/i386/i386.c (ix86_option_override_internal): Mask out
27748 the CF_SET bit when checking -fcf-protection.
27749
27750 2018-02-07 Tom de Vries <tom@codesourcery.com>
27751
27752 PR libgomp/84217
27753 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
27754 enough.
27755
27756 2018-02-07 Richard Biener <rguenther@suse.de>
27757
27758 PR tree-optimization/84204
27759 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
27760 this place.
27761
27762 PR tree-optimization/84205
27763 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
27764 special-case isl_ast_op_zdiv_r.
27765
27766 PR tree-optimization/84223
27767 * graphite-scop-detection.c (gather_bbs::before_dom_children):
27768 Only add conditions from within the region.
27769 (gather_bbs::after_dom_children): Adjust.
27770
27771 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
27772
27773 PR target/84209
27774 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
27775 * config/avr/avr.md: Only post-reload split REG-REG moves if
27776 either register is GENERAL_REG_P.
27777
27778 2018-02-07 Jakub Jelinek <jakub@redhat.com>
27779
27780 PR tree-optimization/84235
27781 * tree-ssa-scopedtables.c
27782 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
27783 if the subtraction is performed in floating point type where NaNs are
27784 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
27785 build 1. Formatting fix.
27786
27787 2018-02-06 Jakub Jelinek <jakub@redhat.com>
27788
27789 PR target/84146
27790 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
27791 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
27792 and skip it regardless of bb boundaries. Use CALL_P macro,
27793 don't test INSN_P (insn) together with CALL_P or JUMP_P check
27794 unnecessarily, formatting fix.
27795
27796 2018-02-06 Michael Collison <michael.collison@arm.com>
27797
27798 * config/arm/thumb2.md:
27799 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
27800 (*thumb_mov_notscc): Ditto.
27801
27802 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
27803
27804 PR target/84154
27805 * config/rs6000/rs6000.md (su code attribute): Use "u" for
27806 unsigned_fix, not "s".
27807
27808 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27809
27810 * configure.ac (gcc_fn_eh_frame_ro): New function.
27811 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
27812 correct .eh_frame permissions.
27813 * configure: Regenerate.
27814
27815 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
27816
27817 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
27818 irrelevant options.
27819
27820 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27821
27822 * config/rs6000/rs6000.c (rs6000_option_override_internal):
27823 Display warning message for -mno-speculate-indirect-jumps.
27824
27825 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
27826
27827 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
27828 Undocumented.
27829 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
27830
27831 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
27832
27833 PR tree-optimization/84225
27834 * tree-eh.c (find_trapping_overflow): Only call
27835 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
27836
27837 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
27838
27839 PR target/84145
27840 * config/i386/i386.c: Reimplement the check of possible options
27841 -mibt/-mshstk conbination. Change error messages.
27842 * doc/invoke.texi: Fix a typo: remove extra '='.
27843
27844 2018-02-06 Marek Polacek <polacek@redhat.com>
27845
27846 PR tree-optimization/84228
27847 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
27848
27849 2018-02-06 Tamar Christina <tamar.christina@arm.com>
27850
27851 PR target/82641
27852 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
27853 emitted arch directives.
27854 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
27855 __ARM_FEATURE_COPROC before changing architectures.
27856
27857 2018-02-06 Richard Biener <rguenther@suse.de>
27858
27859 * config/i386/i386.c (print_reg): Fix typo.
27860 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
27861
27862 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
27863
27864 * configure: Regenerate.
27865
27866 2018-02-05 Martin Sebor <msebor@redhat.com>
27867
27868 PR tree-optimization/83369
27869 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
27870 inlining context.
27871
27872 2018-02-05 Martin Liska <mliska@suse.cz>
27873
27874 * doc/invoke.texi: Cherry-pick upstream r323995.
27875
27876 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
27877
27878 * ira.c (ira_init_register_move_cost): Adjust comment.
27879
27880 2018-02-05 Martin Liska <mliska@suse.cz>
27881
27882 PR gcov-profile/84137
27883 * doc/gcov.texi: Fix typo in documentation.
27884
27885 2018-02-05 Martin Liska <mliska@suse.cz>
27886
27887 PR gcov-profile/83879
27888 * doc/gcov.texi: Document necessity of --dynamic-list-data when
27889 using dlopen functionality.
27890
27891 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
27892
27893 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
27894 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
27895 _mm_maskz_range_ss, _mm_mask_range_round_ss,
27896 _mm_maskz_range_round_ss): New intrinsics.
27897 (__builtin_ia32_rangesd128_round)
27898 (__builtin_ia32_rangess128_round): Remove.
27899 (__builtin_ia32_rangesd128_mask_round,
27900 __builtin_ia32_rangess128_mask_round): New builtins.
27901 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
27902 __builtin_ia32_rangess128_round): Remove.
27903 (__builtin_ia32_rangesd128_mask_round,
27904 __builtin_ia32_rangess128_mask_round): New builtins.
27905 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
27906 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
27907 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
27908 "<round_saeonly_constraint>")): Changed to ...
27909 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
27910 "<round_saeonly_scalar_constraint>")): ... this.
27911 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
27912 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
27913 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
27914 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
27915 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
27916
27917 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
27918
27919 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
27920 options.
27921 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
27922 Remove all values except native, 8540 and 8548.
27923
27924 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
27925
27926 * config/i386/i386.c (ix86_output_function_return): Pass
27927 INVALID_REGNUM, instead of -1, as invalid register number to
27928 indirect_thunk_name and output_indirect_thunk.
27929
27930 2018-02-02 Julia Koval <julia.koval@intel.com>
27931
27932 * config.gcc: Add -march=icelake.
27933 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
27934 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
27935 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
27936 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
27937 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
27938 (processor_target_table): Add icelake.
27939 (ix86_option_override_internal): Handle new PTAs.
27940 (get_builtin_code_for_version): Handle icelake.
27941 (M_INTEL_COREI7_ICELAKE): New.
27942 (fold_builtin_cpu): Handle icelake.
27943 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
27944 * doc/invoke.texi: Add -march=icelake.
27945
27946 2018-02-02 Julia Koval <julia.koval@intel.com>
27947
27948 * config/i386/i386.c (ix86_option_override_internal): Change flags type
27949 to wide_int_bitmask.
27950 * wide-int-bitmask.h: New.
27951
27952 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
27953
27954 PR target/84066
27955 * config/i386/i386.md: Replace Pmode with word_mode in
27956 builtin_setjmp_setup and builtin_longjmp to support x32.
27957
27958 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
27959
27960 PR target/56010
27961 PR target/83743
27962 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
27963 #include "opts.h".
27964 (rs6000_supported_cpu_names): New static variable.
27965 (linux_cpu_translation_table): Likewise.
27966 (elf_platform) <cpu>: Define new static variable and use it.
27967 Translate kernel AT_PLATFORM name to canonical name if needed.
27968 Error if platform name is unknown.
27969
27970 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
27971
27972 PR target/84089
27973 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
27974
27975 2018-02-01 Jeff Law <law@redhat.com>
27976
27977 PR target/84128
27978 * config/i386/i386.c (release_scratch_register_on_entry): Add new
27979 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
27980 the scratch if RELEASE_VIA_POP is false.
27981 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
27982 If we have to save a temporary register, decrement SIZE appropriately.
27983 Pass new arguments to release_scratch_register_on_entry.
27984 (ix86_adjust_stack_and_probe): Likewise.
27985 (ix86_emit_probe_stack_range): Pass new arguments to
27986 release_scratch_register_on_entry.
27987
27988 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
27989
27990 PR rtl-optimization/84157
27991 * combine.c (change_zero_ext): Use REG_P predicate in
27992 front of HARD_REGISTER_P predicate.
27993
27994 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
27995
27996 * config/avr/avr.c (avr_option_override): Move disabling of
27997 -fdelete-null-pointer-checks to...
27998 * common/config/avr/avr-common.c (avr_option_optimization_table):
27999 ...here.
28000
28001 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28002
28003 PR tree-optimization/81635
28004 * tree-data-ref.c (split_constant_offset_1): For types that
28005 wrap on overflow, try to use range info to prove that wrapping
28006 cannot occur.
28007
28008 2018-02-01 Renlin Li <renlin.li@arm.com>
28009
28010 PR target/83370
28011 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
28012 TAILCALL_ADDR_REGS.
28013 (aarch64_register_move_cost): Likewise.
28014 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
28015 TAILCALL_ADDR_REGS.
28016 (REG_CLASS_NAMES): Likewise.
28017 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
28018 TAILCALL_ADDR_REGS. Remove IP registers.
28019 * config/aarch64/aarch64.md (Ucs): Update register constraint.
28020
28021 2018-02-01 Richard Biener <rguenther@suse.de>
28022
28023 * domwalk.h (dom_walker::dom_walker): Add additional constructor
28024 for specifying RPO order and allow NULL for that.
28025 * domwalk.c (dom_walker::dom_walker): Likewise.
28026 (dom_walker::walk): Handle NULL RPO order.
28027 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
28028 in RPO order.
28029 (rewrite_update_dom_walker): Likewise.
28030 (mark_def_dom_walker): Likewise.
28031
28032 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28033
28034 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
28035 (aarch64_maybe_expand_sve_subreg_move): Declare.
28036 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
28037 * config/aarch64/predicates.md (aarch64_any_register_operand): New
28038 predicate.
28039 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
28040 that are semantically a reverse operation.
28041 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
28042 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
28043 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
28044 functions.
28045 (aarch64_can_change_mode_class): For big-endian, forbid changes
28046 between two SVE modes if they have different element sizes.
28047
28048 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28049
28050 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
28051 the TImode handling for big-endian targets.
28052
28053 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28054
28055 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
28056 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
28057 not just bytes.
28058 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
28059 Remove BSWAP handing for big-endian targets and use the form of
28060 LD1RQ appropariate for the mode.
28061
28062 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28063
28064 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
28065 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
28066 duplicated element.
28067
28068 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28069
28070 PR tearget/83845
28071 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
28072 check for operands that need to go through aarch64_sve_reload_be.
28073
28074 2018-02-01 Jakub Jelinek <jakub@redhat.com>
28075
28076 PR tree-optimization/81661
28077 PR tree-optimization/84117
28078 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
28079 * tree-eh.c: Include gimplify.h.
28080 (find_trapping_overflow, replace_trapping_overflow,
28081 rewrite_to_non_trapping_overflow): New functions.
28082 * tree-vect-loop.c: Include tree-eh.h.
28083 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
28084 * tree-data-ref.c: Include tree-eh.h.
28085 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
28086
28087 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
28088
28089 PR rtl-optimization/84123
28090 * combine.c (change_zero_ext): Check if hard register satisfies
28091 can_change_dest_mode before calling gen_lowpart_SUBREG.
28092
28093 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
28094
28095 PR target/82444
28096 * ira.c (ira_init_register_move_cost): Remove assert.
28097
28098 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
28099
28100 PR rtl-optimization/84071
28101 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
28102 * doc/tm.texi: Regenerate.
28103
28104 2018-01-31 Richard Biener <rguenther@suse.de>
28105
28106 PR tree-optimization/84132
28107 * tree-data-ref.c (analyze_miv_subscript): Properly
28108 check whether evolution_function_is_affine_multivariate_p
28109 before calling gcd_of_steps_may_divide_p.
28110
28111 2018-01-31 Julia Koval <julia.koval@intel.com>
28112
28113 PR target/83618
28114 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
28115 * config/i386/i386.md (rdpid_rex64) New.
28116 (rdpid): Make 32bit only.
28117
28118 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
28119
28120 PR lto/84105
28121 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
28122 an IDENTIFIER_NODE for FUNCTION_TYPE's.
28123
28124 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
28125
28126 Revert
28127 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
28128
28129 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
28130
28131 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
28132
28133 PR rtl-optimization/84071
28134 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
28135 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
28136
28137 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
28138
28139 * config/arc/arc.c (arc_handle_aux_attribute): New function.
28140 (arc_attribute_table): Add 'aux' attribute.
28141 (arc_in_small_data_p): Consider aux like variables.
28142 (arc_is_aux_reg_p): New function.
28143 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
28144 (arc_get_aux_arg): New function.
28145 (prepare_move_operands): Handle aux-register access.
28146 (arc_handle_aux_attribute): New function.
28147 * doc/extend.texi (ARC Variable attributes): Add subsection.
28148
28149 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
28150
28151 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
28152 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
28153 (arc_attribute_table): Add 'uncached' attribute.
28154 (arc_print_operand): Print '.di' flag for uncached memory
28155 accesses.
28156 (arc_in_small_data_p): Do not consider for small data the uncached
28157 types.
28158 (arc_is_uncached_mem_p): New function.
28159 * config/arc/predicates.md (compact_store_memory_operand): Check
28160 for uncached memory accesses.
28161 (nonvol_nonimm_operand): Likewise.
28162 * doc/extend.texi (ARC Type Attribute): New subsection.
28163
28164 2018-01-31 Jakub Jelinek <jakub@redhat.com>
28165
28166 PR c/84100
28167 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
28168 falign-loops=): Add Optimization flag.
28169
28170 2018-01-30 Jeff Law <law@redhat.com>
28171
28172 PR target/84064
28173 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
28174 INT_REGISTERS_SAVED. Check it prior to calling
28175 get_scratch_register_on_entry.
28176 (ix86_adjust_stack_and_probe): Similarly.
28177 (ix86_emit_probe_stack_range): Similarly.
28178 (ix86_expand_prologue): Corresponding changes.
28179
28180 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28181
28182 PR target/40411
28183 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
28184 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
28185
28186 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
28187
28188 PR target/84112
28189 * lra-constraints.c (curr_insn_transform): Process AND in the
28190 address.
28191
28192 2018-01-30 Jakub Jelinek <jakub@redhat.com>
28193
28194 PR rtl-optimization/83986
28195 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
28196 dependence against last_pending_memory_flush in addition to
28197 pending_jump_insns.
28198
28199 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
28200
28201 PR tree-optimization/81611
28202 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
28203 copies.
28204
28205 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28206
28207 PR target/83758
28208 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
28209 a reg rtx.
28210
28211 2018-01-30 Richard Biener <rguenther@suse.de>
28212 Jakub Jelinek <jakub@redhat.com>
28213
28214 PR tree-optimization/84111
28215 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
28216 inner loops added during recursion, as they don't have up-to-date
28217 SSA form.
28218
28219 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
28220
28221 PR ipa/81360
28222 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
28223 (can_inline_edge_by_limits_p): ... here.
28224 (can_early_inline_edge_p, check_callers,
28225 update_caller_keys, update_callee_keys, recursive_inlining,
28226 add_new_edges_to_heap, speculation_useful_p,
28227 inline_small_functions,
28228 inline_small_functions, flatten_function,
28229 inline_to_all_callers_1): Update.
28230
28231 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
28232
28233 * profile-count.c (profile_count::combine_with_ipa_count): Handle
28234 zeros correctly.
28235
28236 2018-01-30 Richard Biener <rguenther@suse.de>
28237
28238 PR tree-optimization/83008
28239 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
28240 invariant and constant vector uses in stmts when they need
28241 more than one stmt.
28242
28243 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28244
28245 PR bootstrap/84017
28246 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
28247 * configure: Regenerate.
28248
28249 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
28250
28251 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
28252 pattern.
28253 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
28254 Use gen_rtx_REG rather than gen_lowpart.
28255
28256 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
28257
28258 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
28259 rather than 0 when creating partial subregs.
28260
28261 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
28262
28263 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
28264 of usage.
28265
28266 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
28267
28268 PR target/81550
28269 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
28270 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
28271 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
28272 flags. This restores the settings used before the 2017-07-24.
28273 Turning off pre increment/decrement/modify allows IVOPTS to
28274 optimize DF/SF loops where the index is an int.
28275
28276 2018-01-29 Richard Biener <rguenther@suse.de>
28277 Kelvin Nilsen <kelvin@gcc.gnu.org>
28278
28279 PR bootstrap/80867
28280 * tree-vect-stmts.c (vectorizable_call): Don't call
28281 targetm.vectorize_builtin_md_vectorized_function if callee is
28282 NULL.
28283
28284 2018-01-22 Carl Love <cel@us.ibm.com>
28285
28286 * doc/extend.tex: Fix typo in second arg in
28287 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
28288
28289 2018-01-29 Richard Biener <rguenther@suse.de>
28290
28291 PR tree-optimization/84086
28292 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
28293 (flush_ssaname_freelist): When SSA names were released reset
28294 the SCEV hash table.
28295
28296 2018-01-29 Richard Biener <rguenther@suse.de>
28297
28298 PR tree-optimization/84057
28299 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
28300 removed paths when removing edges.
28301
28302 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
28303
28304 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
28305 -mfunction-return=@var{choice}.
28306
28307 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
28308
28309 PR diagnostic/84034
28310 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
28311 Handle CR like TAB.
28312 (layout::print_source_line): Likewise.
28313 (test_get_line_width_without_trailing_whitespace): Add test cases.
28314
28315 2018-01-27 Jakub Jelinek <jakub@redhat.com>
28316
28317 PR middle-end/84040
28318 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
28319 debug insns.
28320
28321 2018-01-26 Jim Wilson <jimw@sifive.com>
28322
28323 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
28324
28325 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
28326 specified.
28327
28328 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28329
28330 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
28331 and CMP + SUB-immediate -> SUBS.
28332
28333 2018-01-26 Martin Sebor <msebor@redhat.com>
28334
28335 PR tree-optimization/83896
28336 * tree-ssa-strlen.c (get_string_len): Rename...
28337 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
28338 Avoid assuming length is constant.
28339 (handle_char_store): Use HOST_WIDE_INT for string length.
28340
28341 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
28342
28343 PR target/81763
28344 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
28345 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
28346
28347 2018-01-26 Richard Biener <rguenther@suse.de>
28348
28349 PR rtl-optimization/84003
28350 * dse.c (record_store): Only record redundant stores when
28351 the earlier store aliases at least all accesses the later one does.
28352
28353 2018-01-26 Jakub Jelinek <jakub@redhat.com>
28354
28355 PR rtl-optimization/83985
28356 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
28357 REG_CFA_RESTORE insns.
28358 (delete_unmarked_insns): Don't ignore separate shrink wrapping
28359 REG_CFA_RESTORE insns here.
28360
28361 PR c/83989
28362 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
28363 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
28364
28365 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
28366
28367 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
28368 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
28369 (arc_init): Likewise.
28370 (arc_override_options): Likewise.
28371 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
28372 value.
28373 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
28374 support.
28375 * config/arc/arc.h (TARGET_DBNZ): Define.
28376 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
28377 properly set the tune attribute.
28378 (dbnz): Use TARGET_DBNZ guard.
28379 * config/arc/arc.opt (mtune): Add core3 option.
28380
28381 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
28382
28383 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
28384 recognize new pic like addresses.
28385 (arc_delegitimize_address): Clean up.
28386
28387 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
28388
28389 * config/arc/arc-arches.def: Option mrf16 valid for all
28390 architectures.
28391 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
28392 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
28393 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
28394 * config/arc/arc-tables.opt: Regenerate.
28395 * config/arc/arc.c (arc_conditional_register_usage): Handle
28396 reduced register file case.
28397 (arc_file_start): Set must have build attributes.
28398 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
28399 mrf16 option value.
28400 * config/arc/arc.opt (mrf16): Add new option.
28401 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
28402 * config/arc/genmultilib.awk: Handle new mrf16 option.
28403 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
28404 * config/arc/t-multilib: Regenerate.
28405 * doc/invoke.texi (ARC Options): Document mrf16 option.
28406
28407 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
28408
28409 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
28410 * config/arc/arc.c (arc_handle_secure_attribute): New function.
28411 (arc_attribute_table): Add 'secure_call' attribute.
28412 (arc_print_operand): Print secure call operand.
28413 (arc_function_ok_for_sibcall): Don't optimize tail calls when
28414 secure.
28415 (arc_is_secure_call_p): New function. * config/arc/arc.md
28416 (call_i): Add support for sjli instruction.
28417 (call_value_i): Likewise.
28418 * config/arc/constraints.md (Csc): New constraint.
28419
28420 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
28421 John Eric Martin <John.Martin@emmicro-us.com>
28422
28423 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
28424 * config/arc/arc.c (_arc_jli_section): New struct.
28425 (arc_jli_section): New type.
28426 (rc_jli_sections): New static variable.
28427 (arc_handle_jli_attribute): New function.
28428 (arc_attribute_table): Add jli_always and jli_fixed attribute.
28429 (arc_file_end): New function.
28430 (TARGET_ASM_FILE_END): Define.
28431 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
28432 (arc_add_jli_section): New function.
28433 (jli_call_scan): Likewise.
28434 (arc_reorg): Call jli_call_scan.
28435 (arc_output_addsi): Remove 'S' from printing asm operand.
28436 (arc_is_jli_call_p): New function.
28437 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
28438 operand.
28439 (movhi_insn): Likewise.
28440 (movsi_insn): Likewise.
28441 (movsi_set_cc_insn): Likewise.
28442 (loadqi_update): Likewise.
28443 (load_zeroextendqisi_update): Likewise.
28444 (load_signextendqisi_update): Likewise.
28445 (loadhi_update): Likewise.
28446 (load_zeroextendhisi_update): Likewise.
28447 (load_signextendhisi_update): Likewise.
28448 (loadsi_update): Likewise.
28449 (loadsf_update): Likewise.
28450 (movsicc_insn): Likewise.
28451 (bset_insn): Likewise.
28452 (bxor_insn): Likewise.
28453 (bclr_insn): Likewise.
28454 (bmsk_insn): Likewise.
28455 (bicsi3_insn): Likewise.
28456 (cmpsi_cc_c_insn): Likewise.
28457 (movsi_ne): Likewise.
28458 (movsi_cond_exec): Likewise.
28459 (clrsbsi2): Likewise.
28460 (norm_f): Likewise.
28461 (normw): Likewise.
28462 (swap): Likewise.
28463 (divaw): Likewise.
28464 (flag): Likewise.
28465 (sr): Likewise.
28466 (kflag): Likewise.
28467 (ffs): Likewise.
28468 (ffs_f): Likewise.
28469 (fls): Likewise.
28470 (call_i): Remove 'S' asm letter, add jli instruction.
28471 (call_value_i): Likewise.
28472 * config/arc/arc.op (mjli-always): New option.
28473 * config/arc/constraints.md (Cji): New constraint.
28474 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
28475 operand.
28476 (subsf3_fpx): Likewise.
28477 (mulsf3_fpx): Likewise.
28478 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
28479 asm operand.
28480 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
28481 function attrbutes.
28482 * doc/invoke.texi (ARC): Document mjli-always option.
28483
28484 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
28485
28486 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
28487 avoid addition with 0 and use incw and decw where possible.
28488
28489 2018-01-26 Richard Biener <rguenther@suse.de>
28490
28491 PR tree-optimization/81082
28492 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
28493 association if it requires casting to unsigned.
28494 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
28495 from fold_plusminus_mult_expr to catch important cases late when
28496 range info is available.
28497
28498 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28499
28500 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
28501 * configure.ac (hidden_linkonce): New test.
28502 * configure: Regenerate.
28503 * config.in: Regenerate.
28504
28505 2018-01-26 Julia Koval <julia.koval@intel.com>
28506
28507 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
28508 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
28509 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
28510 _mm_mask_bitshuffle_epi64_mask): Fix type.
28511 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
28512 USI_FTYPE_V4DI_V4DI_USI): Remove.
28513 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
28514 __builtin_ia32_vpshufbitqmb256_mask,
28515 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
28516 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
28517 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
28518
28519 2018-01-26 Alan Modra <amodra@gmail.com>
28520
28521 PR target/84033
28522 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
28523 UNSPEC_VBPERMQ. Sort other unspecs.
28524
28525 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
28526
28527 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
28528
28529 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
28530
28531 PR middle-end/83055
28532 * predict.c (drop_profile): Do not push/pop cfun; update also
28533 node->count.
28534 (handle_missing_profiles): Fix logic looking for zero profiles.
28535
28536 2018-01-25 Jakub Jelinek <jakub@redhat.com>
28537
28538 PR middle-end/83977
28539 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
28540 on functions with #pragma omp declare simd or functions with simd
28541 attribute.
28542 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
28543 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
28544 Remove trailing \n from warning_at calls.
28545
28546 2018-01-25 Tom de Vries <tom@codesourcery.com>
28547
28548 PR target/84028
28549 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
28550 for neutered workers.
28551
28552 2018-01-24 Joseph Myers <joseph@codesourcery.com>
28553
28554 PR target/68467
28555 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
28556 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
28557
28558 2018-01-24 Jeff Law <law@redhat.com>
28559
28560 PR target/83994
28561 * i386.c (get_probe_interval): Move to earlier point.
28562 (ix86_compute_frame_layout): If -fstack-clash-protection and
28563 the frame is larger than the probe interval, then use pushes
28564 to save registers rather than reg->mem moves.
28565 (ix86_expand_prologue): Remove conditional for int_registers_saved
28566 assertion.
28567
28568 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
28569
28570 PR target/84014
28571 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
28572 min/max for never referenced object.
28573
28574 2018-01-24 Jakub Jelinek <jakub@redhat.com>
28575
28576 PR middle-end/83977
28577 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
28578 here.
28579 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
28580 attributes from DECL_ATTRIBUTES (decl) without affecting
28581 DECL_ATTRIBUTES (current_function_decl).
28582 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
28583 functions with non-NULL DECL_ABSTRACT_ORIGIN.
28584
28585 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
28586
28587 PR tree-optimization/83979
28588 * fold-const.c (fold_comparison): Use constant_boolean_node
28589 instead of boolean_{true,false}_node.
28590
28591 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
28592
28593 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
28594 with zero counts.
28595
28596 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28597
28598 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
28599 Simplify the clause that sets the length attribute.
28600 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
28601 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
28602 clause that sets the length attribute.
28603 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28604
28605 2018-01-24 Tom de Vries <tom@codesourcery.com>
28606
28607 PR target/83589
28608 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
28609 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
28610 Add strict parameter.
28611 (prevent_branch_around_nothing): Insert dummy insn between branch to
28612 label and label with no ptx insn inbetween.
28613 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
28614
28615 2018-01-24 Tom de Vries <tom@codesourcery.com>
28616
28617 PR target/81352
28618 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
28619 for neutered threads in warp.
28620 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
28621
28622 2018-01-24 Richard Biener <rguenther@suse.de>
28623
28624 PR tree-optimization/83176
28625 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
28626 operands.
28627
28628 2018-01-24 Richard Biener <rguenther@suse.de>
28629
28630 PR tree-optimization/82819
28631 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
28632 code generating pluses that are no-ops in the target precision.
28633
28634 2018-01-24 Richard Biener <rguenther@suse.de>
28635
28636 PR middle-end/84000
28637 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
28638
28639 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
28640
28641 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
28642 to merge probabilities.
28643 * predict.c (probably_never_executed): Also mark as cold functions
28644 with global 0 profile and guessed local profile.
28645 * profile-count.c (profile_probability::combine_with_count): New
28646 member function.
28647 * profile-count.h (profile_probability::operator*,
28648 profile_probability::operator*=, profile_probability::operator/,
28649 profile_probability::operator/=): Reduce precision to adjusted
28650 and set value to guessed on contradictory divisions.
28651 (profile_probability::combine_with_freq): Remove.
28652 (profile_probability::combine_wiht_count): Declare.
28653 (profile_count::force_nonzero):: Set to adjusted.
28654 (profile_count::probability_in):: Set quality to adjusted.
28655 * tree-ssa-tail-merge.c (replace_block_by): Use
28656 combine_with_count.
28657
28658 2018-01-23 Andrew Waterman <andrew@sifive.com>
28659 Jim Wilson <jimw@sifive.com>
28660
28661 * config/riscv/riscv.c (riscv_stack_boundary): New.
28662 (riscv_option_override): Set riscv_stack_boundary. Handle
28663 riscv_preferred_stack_boundary_arg.
28664 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
28665 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
28666 (STACK_BOUNDARY): Set to riscv_stack_boundary.
28667 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
28668 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
28669 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
28670
28671 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
28672
28673 PR target/83905
28674 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
28675 of struct ix86_frame.
28676 (ix86_expand_epilogue): Likewise. Add a local variable for
28677 the reg_save_offset field in struct ix86_frame.
28678
28679 2018-01-23 Bin Cheng <bin.cheng@arm.com>
28680
28681 PR tree-optimization/82604
28682 * tree-loop-distribution.c (enum partition_kind): New enum item
28683 PKIND_PARTIAL_MEMSET.
28684 (partition_builtin_p): Support above new enum item.
28685 (generate_code_for_partition): Ditto.
28686 (compute_access_range): Differentiate cases that equality can be
28687 proven at all loops, the innermost loops or no loops.
28688 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
28689 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
28690 (finalize_partitions, distribute_loop): Don't fuse partition of
28691 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
28692 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
28693 parloop is enabled.
28694
28695 2018-01-23 Martin Liska <mliska@suse.cz>
28696
28697 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
28698 order to ignore the predictor.
28699 (PRED_POLYMORPHIC_CALL): Likewise.
28700 (PRED_RECURSIVE_CALL): Likewise.
28701
28702 2018-01-23 Martin Liska <mliska@suse.cz>
28703
28704 * tree-profile.c (tree_profiling): Print function header to
28705 aware reader which function we are working on.
28706 * value-prof.c (gimple_find_values_to_profile): Do not print
28707 not interesting value histograms.
28708
28709 2018-01-23 Martin Liska <mliska@suse.cz>
28710
28711 * profile-count.h (enum profile_quality): Add
28712 profile_uninitialized as the first value. Do not number values
28713 as they are zero based.
28714 (profile_count::verify): Update sanity check.
28715 (profile_probability::verify): Likewise.
28716
28717 2018-01-23 Nathan Sidwell <nathan@acm.org>
28718
28719 * doc/invoke.texi (ffor-scope): Deprecate.
28720
28721 2018-01-23 David Malcolm <dmalcolm@redhat.com>
28722
28723 PR tree-optimization/83510
28724 * domwalk.c (set_all_edges_as_executable): New function.
28725 (dom_walker::dom_walker): Convert bool param
28726 "skip_unreachable_blocks" to enum reachability. Move setup of
28727 edge flags to set_all_edges_as_executable and only do it when
28728 reachability is REACHABLE_BLOCKS.
28729 * domwalk.h (enum dom_walker::reachability): New enum.
28730 (dom_walker::dom_walker): Convert bool param
28731 "skip_unreachable_blocks" to enum reachability.
28732 (set_all_edges_as_executable): New decl.
28733 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
28734 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
28735 "reachability".
28736 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
28737 but converting true to REACHABLE_BLOCKS.
28738 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
28739 * tree-vrp.c
28740 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
28741 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
28742 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
28743 REACHABLE_BLOCKS.
28744 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
28745 if check_all_array_refs will be called.
28746
28747 2018-01-23 David Malcolm <dmalcolm@redhat.com>
28748
28749 * tree.c (selftest::test_location_wrappers): Add more test
28750 coverage.
28751
28752 2018-01-23 David Malcolm <dmalcolm@redhat.com>
28753
28754 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
28755 (selftest::test_bit_in_range): Likewise.
28756
28757 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
28758
28759 PR testsuite/83888
28760 * doc/sourcebuild.texi (vect_float): Say that the selector
28761 only describes the situation when -funsafe-math-optimizations is on.
28762 (vect_float_strict): Document.
28763
28764 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
28765
28766 PR tree-optimization/83965
28767 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
28768 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
28769 instead of checking only for a reduction.
28770 (vect_recog_widen_sum_pattern): Likewise.
28771
28772 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
28773
28774 * predict.c (probably_never_executed): Only use precise profile info.
28775 (compute_function_frequency): Skip after inlining hack since we now
28776 have quality checking.
28777
28778 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
28779
28780 * profile-count.h (profile_probability::very_unlikely,
28781 profile_probability::unlikely, profile_probability::even): Set
28782 precision to guessed.
28783
28784 2018-01-23 Richard Biener <rguenther@suse.de>
28785
28786 PR tree-optimization/83963
28787 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
28788 Properly terminate dominator walk when crossing the exit edge not
28789 when visiting its source block.
28790
28791 2018-01-23 Jakub Jelinek <jakub@redhat.com>
28792
28793 PR c++/83918
28794 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
28795 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
28796
28797 2018-01-22 Jakub Jelinek <jakub@redhat.com>
28798
28799 PR tree-optimization/83957
28800 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
28801 semicolon after for body surrounded by braces.
28802
28803 PR tree-optimization/83081
28804 * profile-count.h (profile_probability::split): New method.
28805 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
28806 Use profile_probability::split.
28807 (do_compare_rtx_and_jump): Fix adjustment of probabilities
28808 when splitting a single conditional jump into 2.
28809
28810 2018-01-22 David Malcolm <dmalcolm@redhat.com>
28811
28812 PR tree-optimization/69452
28813 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
28814 decl.
28815
28816 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28817
28818 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
28819 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
28820 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
28821
28822 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28823
28824 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
28825 declaration.
28826 * config/rl78/rl78.md (movdi): New define_expand.
28827 * config/rl78/rl78.c (rl78_split_movdi): New function.
28828
28829 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
28830
28831 PR target/83862
28832 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
28833 no longer used.
28834 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
28835 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
28836 128-bit to produce an UNSPEC move to get the double word with the
28837 signbit and then a shift directly to do signbit.
28838 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
28839 implementation with a new version that just does either a direct
28840 move or a regular move. Move memory interface to separate insns.
28841 Move insns so they are next to the expander.
28842 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
28843 with signbit move. Split big and little endian case.
28844 (signbit<mode>2_dm_mem_le): Likewise.
28845 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
28846 (signbit<mode>2_dm2): Likewise.
28847
28848 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28849
28850 * config/rl78/rl78.md (anddi3): New define_expand.
28851
28852 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28853
28854 * config/rl78/rl78.md (umindi3): New define_expand.
28855
28856 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28857
28858 * config/rl78/rl78.md (smindi3): New define_expand.
28859
28860 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28861
28862 * config/rl78/rl78.md (smaxdi3): New define_expand.
28863
28864 2018-01-22 Carl Love <cel@us.ibm.com>
28865
28866 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
28867 LVX_V1TI): Add macro expansion.
28868 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
28869 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
28870 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
28871 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
28872 Change check to determine if the instruction is a byte reversing
28873 entry. Fix typo in comment.
28874 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
28875 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
28876 Add def_builtin calls for new builtins.
28877 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
28878 Add define_insn expansion.
28879
28880 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28881
28882 * config/rl78/rl78.md (umaxdi3): New define_expand.
28883
28884 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28885
28886 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
28887 for non-QImode registers.
28888
28889 2018-01-22 Richard Biener <rguenther@suse.de>
28890
28891 PR tree-optimization/83963
28892 * graphite-scop-detection.c (scop_detection::get_sese): Delay
28893 including the loop exit block.
28894 (scop_detection::merge_sese): Likewise.
28895 (scop_detection::add_scop): Do it here instead.
28896
28897 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28898
28899 * doc/sourcebuild.texi (arm_softfloat): Document.
28900
28901 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
28902
28903 PR gcc/77734
28904 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
28905 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
28906 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
28907
28908 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28909 David Edelsohn <dje.gcc@gmail.com>
28910
28911 PR target/83946
28912 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
28913 Change "crset eq" to "crset 2".
28914 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
28915 (*call_indirect_aix<mode>_nospec): Likewise.
28916 (*call_value_indirect_aix<mode>_nospec): Likewise.
28917 (*call_indirect_elfv2<mode>_nospec): Likewise.
28918 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
28919 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
28920 change assembly output from . to $.
28921 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28922 (indirect_jump<mode>_nospec): Change assembly output from . to $.
28923 (*tablejump<mode>_internal1_nospec): Likewise.
28924
28925 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
28926
28927 PR target/80870
28928 * config/sh/sh_optimize_sett_clrt.cc:
28929 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
28930
28931 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
28932
28933 PR tree-optimization/83940
28934 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
28935 offset_dt to vect_constant_def rather than vect_unknown_def_type.
28936 (vect_check_load_store_mask): Add a mask_dt_out parameter and
28937 use it to pass back the definition type.
28938 (vect_check_store_rhs): Likewise rhs_dt_out.
28939 (vect_build_gather_load_calls): Add a mask_dt argument and use
28940 it instead of a call to vect_is_simple_use.
28941 (vectorizable_store): Update calls to vect_check_load_store_mask
28942 and vect_check_store_rhs. Use the dt returned by the latter instead
28943 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
28944 instead of calls to vect_is_simple_use. Pass the scalar rather
28945 than the vector operand to vect_is_simple_use when handling
28946 second and subsequent copies of an rhs value.
28947 (vectorizable_load): Update calls to vect_check_load_store_mask
28948 and vect_build_gather_load_calls. Use the cached mask_dt and
28949 gs_info.offset_dt instead of calls to vect_is_simple_use.
28950
28951 2018-01-20 Jakub Jelinek <jakub@redhat.com>
28952
28953 PR middle-end/83945
28954 * tree-emutls.c: Include gimplify.h.
28955 (lower_emutls_2): New function.
28956 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
28957 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
28958 it before further processing.
28959
28960 PR target/83930
28961 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
28962 UINTVAL (trueop1) instead of INTVAL (op1).
28963
28964 2018-01-19 Jakub Jelinek <jakub@redhat.com>
28965
28966 PR debug/81570
28967 PR debug/83728
28968 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
28969 INCOMING_FRAME_SP_OFFSET if not defined.
28970 (scan_trace): Add ENTRY argument. If true and
28971 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
28972 emit a note to adjust the CFA offset.
28973 (create_cfi_notes): Adjust scan_trace callers.
28974 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
28975 INCOMING_FRAME_SP_OFFSET in the CIE.
28976 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
28977 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
28978 Likewise.
28979 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
28980 * doc/tm.texi: Regenerated.
28981
28982 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
28983
28984 PR rtl-optimization/83147
28985 * lra-constraints.c (remove_inheritance_pseudos): Use
28986 lra_substitute_pseudo_within_insn.
28987
28988 2018-01-19 Tom de Vries <tom@codesourcery.com>
28989 Cesar Philippidis <cesar@codesourcery.com>
28990
28991 PR target/83920
28992 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
28993
28994 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
28995
28996 PR target/83790
28997 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
28998 spaces for function labels.
28999
29000 2018-01-19 Martin Liska <mliska@suse.cz>
29001
29002 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
29003 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
29004 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
29005 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
29006 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
29007 (PRED_CONST_RETURN): Change from 69 to 65.
29008 (PRED_NULL_RETURN): Change from 91 to 71.
29009 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
29010 (PRED_LOOP_GUARD): Change from 66 to 73.
29011
29012 2018-01-19 Martin Liska <mliska@suse.cz>
29013
29014 * predict.c (predict_insn_def): Add new assert.
29015 (struct branch_predictor): Change type to signed integer.
29016 (test_prediction_value_range): Amend test to cover
29017 PROB_UNINITIALIZED.
29018 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
29019 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
29020 (PRED_LOOP_ITERATIONS_MAX): Likewise.
29021 (PRED_LOOP_IV_COMPARE): Likewise.
29022 * predict.h (PROB_UNINITIALIZED): Define new constant.
29023
29024 2018-01-19 Martin Liska <mliska@suse.cz>
29025
29026 * predict.c (dump_prediction): Add new format for
29027 analyze_brprob.py script which is enabled with -details
29028 suboption.
29029 * profile-count.h (precise_p): New function.
29030
29031 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
29032
29033 PR tree-optimization/83922
29034 * tree-vect-loop.c (vect_verify_full_masking): Return false if
29035 there are no statements that need masking.
29036 (vect_active_double_reduction_p): New function.
29037 (vect_analyze_loop_operations): Use it when handling phis that
29038 are not in the loop header.
29039
29040 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
29041
29042 PR tree-optimization/83914
29043 * tree-vect-loop.c (vectorizable_induction): Don't convert
29044 init_expr or apply the peeling adjustment for inductions
29045 that are nested within the vectorized loop.
29046
29047 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29048
29049 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
29050 instead of NEG.
29051
29052 2018-01-18 Jakub Jelinek <jakub@redhat.com>
29053
29054 PR sanitizer/81715
29055 PR testsuite/83882
29056 * function.h (gimplify_parameters): Add gimple_seq * argument.
29057 * function.c: Include gimple.h and options.h.
29058 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
29059 for the added local temporaries if needed.
29060 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
29061 if there are any parameter cleanups, wrap whole body into a
29062 try/finally with the cleanups.
29063
29064 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
29065
29066 PR target/82964
29067 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
29068 Use GET_MODE_CLASS for scalar floating point.
29069
29070 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
29071
29072 PR ipa/82256
29073 patch by PaX Team
29074 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
29075 Fix call of call_cgraph_insertion_hooks.
29076
29077 2018-01-18 Martin Sebor <msebor@redhat.com>
29078
29079 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
29080
29081 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
29082
29083 PR ipa/83619
29084 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
29085 frequencies.
29086
29087 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
29088
29089 PR other/70268
29090 * common.opt: (-ffile-prefix-map): New option.
29091 * opts.c (common_handle_option): Defer it.
29092 * opts-global.c (handle_common_deferred_options): Handle it.
29093 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
29094 * file-prefix-map.h: New file.
29095 (remap_debug_filename, add_debug_prefix_map): ...here.
29096 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
29097 * final.c (debug_prefix_map, add_debug_prefix_map
29098 remap_debug_filename): Move to...
29099 * file-prefix-map.c: New file.
29100 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
29101 generalize, get rid of alloca(), use strrchr() instead of strchr().
29102 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
29103 Implement in terms of add_prefix_map().
29104 (remap_macro_filename, remap_debug_filename): Implement in term of
29105 remap_filename().
29106 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
29107 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
29108 * dbxout.c: Include file-prefix-map.h.
29109 * varasm.c: Likewise.
29110 * vmsdbgout.c: Likewise.
29111 * xcoffout.c: Likewise.
29112 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
29113 * doc/cppopts.texi (-fmacro-prefix-map): Document.
29114 * doc/invoke.texi (-ffile-prefix-map): Document.
29115 (-fdebug-prefix-map): Update description.
29116
29117 2018-01-18 Martin Liska <mliska@suse.cz>
29118
29119 * config/i386/i386.c (indirect_thunk_name): Document that also
29120 lfence is emitted.
29121 (output_indirect_thunk): Document why both instructions
29122 (pause and lfence) are generated.
29123
29124 2018-01-18 Richard Biener <rguenther@suse.de>
29125
29126 PR tree-optimization/83887
29127 * graphite-scop-detection.c
29128 (scop_detection::get_nearest_dom_with_single_entry): Remove.
29129 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
29130 (scop_detection::merge_sese): Re-implement with a flood-fill
29131 algorithm that properly finds a SESE region if it exists.
29132
29133 2018-01-18 Jakub Jelinek <jakub@redhat.com>
29134
29135 PR c/61240
29136 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
29137 pointer_diff optimizations use view_convert instead of convert.
29138
29139 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29140
29141 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29142 Generate different code for -mno-speculate-indirect-jumps.
29143 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29144 (*call_indirect_aix<mode>): Disable for
29145 -mno-speculate-indirect-jumps.
29146 (*call_indirect_aix<mode>_nospec): New define_insn.
29147 (*call_value_indirect_aix<mode>): Disable for
29148 -mno-speculate-indirect-jumps.
29149 (*call_value_indirect_aix<mode>_nospec): New define_insn.
29150 (*sibcall_nonlocal_sysv<mode>): Generate different code for
29151 -mno-speculate-indirect-jumps.
29152 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29153
29154 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
29155
29156 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
29157 long double type, set the flags for noting the default long double
29158 type, even if we don't pass or return a long double type.
29159
29160 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
29161
29162 PR ipa/83051
29163 * ipa-inline.c (flatten_function): Do not overwrite final inlining
29164 failure.
29165
29166 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
29167
29168 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
29169 support for merge[hl].
29170 (fold_mergehl_helper): New helper function.
29171 (tree-vector-builder.h): New #include for tree_vector_builder usage.
29172 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
29173 (altivec_vmrglw_direct): Add xxmrglw insn.
29174
29175 2018-01-17 Andrew Waterman <andrew@sifive.com>
29176
29177 * config/riscv/riscv.c (riscv_conditional_register_usage): If
29178 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
29179
29180 2018-01-17 David Malcolm <dmalcolm@redhat.com>
29181
29182 PR lto/83121
29183 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
29184 call the lto_location_cache before reading the
29185 DECL_SOURCE_LOCATION of the types.
29186
29187 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
29188 Richard Sandiford <richard.sandiford@linaro.org>
29189
29190 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
29191 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
29192 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
29193 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
29194 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
29195 Add declaration.
29196 * config/aarch64/constraints.md (aarch64_movti_operand):
29197 Limit immediates.
29198 * config/aarch64/predicates.md (Uti): Add new constraint.
29199
29200 2018-01-17 Carl Love <cel@us.ibm.com>
29201
29202 * config/rs6000/vsx.md (define_expand xl_len_r,
29203 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
29204 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
29205 lxvll.
29206 (define_expand, define_insn): Move the shift left from the
29207 define_insn to the define_expand for lxvl and stxvl instructions.
29208 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
29209 and XL_LEN_R definitions to PURE.
29210
29211 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
29212
29213 * config/i386/i386.c (indirect_thunk_name): Declare regno
29214 as unsigned int. Compare regno with INVALID_REGNUM.
29215 (output_indirect_thunk): Ditto.
29216 (output_indirect_thunk_function): Ditto.
29217 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
29218 in the call to output_indirect_thunk_function.
29219
29220 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
29221
29222 PR middle-end/83884
29223 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
29224 rather than the size of inner_type to determine the stack slot size
29225 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
29226
29227 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
29228
29229 PR target/83546
29230 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
29231 to PTA_SILVERMONT.
29232
29233 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
29234
29235 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
29236 endian Linux systems to optionally enable multilibs for selecting
29237 the long double type if the user configured an explicit type.
29238 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
29239 have no long double multilibs if not defined.
29240 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
29241 warn if the user used -mabi={ieee,ibm}longdouble and we built
29242 multilibs for long double.
29243 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
29244 appropriate multilib option.
29245 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
29246 multilib options.
29247 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
29248 for building long double multilibs.
29249 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
29250
29251 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
29252
29253 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
29254 copies.
29255
29256 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
29257 64 bits.
29258 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
29259 128 bits.
29260
29261 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
29262 variables.
29263
29264 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
29265 return value.
29266
29267 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
29268
29269 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
29270 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
29271
29272 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
29273
29274 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
29275 different rtl trees depending on TARGET_64BIT.
29276 (rs6000_gen_lvx): Likewise.
29277
29278 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
29279
29280 * config/visium/visium.md (nop): Tweak comment.
29281 (hazard_nop): Likewise.
29282
29283 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29284
29285 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
29286 -mspeculate-indirect-jumps.
29287 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
29288 for -mno-speculate-indirect-jumps.
29289 (*call_indirect_elfv2<mode>_nospec): New define_insn.
29290 (*call_value_indirect_elfv2<mode>): Disable for
29291 -mno-speculate-indirect-jumps.
29292 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
29293 (indirect_jump): Emit different RTL for
29294 -mno-speculate-indirect-jumps.
29295 (*indirect_jump<mode>): Disable for
29296 -mno-speculate-indirect-jumps.
29297 (*indirect_jump<mode>_nospec): New define_insn.
29298 (tablejump): Emit different RTL for
29299 -mno-speculate-indirect-jumps.
29300 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
29301 (tablejumpsi_nospec): New define_expand.
29302 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
29303 (tablejumpdi_nospec): New define_expand.
29304 (*tablejump<mode>_internal1): Disable for
29305 -mno-speculate-indirect-jumps.
29306 (*tablejump<mode>_internal1_nospec): New define_insn.
29307 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
29308 option.
29309
29310 2018-01-16 Artyom Skrobov tyomitch@gmail.com
29311
29312 * caller-save.c (insert_save): Drop unnecessary parameter. All
29313 callers updated.
29314
29315 2018-01-16 Jakub Jelinek <jakub@redhat.com>
29316 Richard Biener <rguenth@suse.de>
29317
29318 PR libgomp/83590
29319 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
29320 return early, inline manually is_gimple_sizepos. Make sure if we
29321 call gimplify_expr we don't end up with a gimple constant.
29322 * tree.c (variably_modified_type_p): Don't return true for
29323 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
29324 * gimplify.h (is_gimple_sizepos): Remove.
29325
29326 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
29327
29328 PR tree-optimization/83857
29329 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
29330 vectorizable_live_operation for pure SLP statements.
29331 (vectorizable_live_operation): Handle PHIs.
29332
29333 2018-01-16 Richard Biener <rguenther@suse.de>
29334
29335 PR tree-optimization/83867
29336 * tree-vect-stmts.c (vect_transform_stmt): Precompute
29337 nested_in_vect_loop_p since the scalar stmt may get invalidated.
29338
29339 2018-01-16 Jakub Jelinek <jakub@redhat.com>
29340
29341 PR c/83844
29342 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
29343 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
29344 If off is not INTEGER_CST, issue a may not be aligned warning
29345 rather than isn't aligned. Use isn%'t rather than isn't.
29346 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
29347 into MULT_EXPR.
29348 <case MULT_EXPR>: Improve the case when bottom and one of the
29349 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
29350 operand, in that case check if the other operand is multiple of
29351 bottom divided by the INTEGER_CST operand.
29352
29353 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
29354
29355 PR target/83858
29356 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
29357 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
29358 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
29359 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
29360 * config/pa/pa.c (pa_function_arg_advance): Likewise.
29361 (pa_function_arg, pa_arg_partial_bytes): Likewise.
29362 (pa_function_arg_size): New function.
29363
29364 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
29365
29366 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
29367 in a separate statement.
29368
29369 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
29370
29371 PR tree-optimization/83847
29372 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
29373 group gathers and scatters.
29374
29375 2018-01-16 Jakub Jelinek <jakub@redhat.com>
29376
29377 PR rtl-optimization/86620
29378 * params.def (max-sched-ready-insns): Bump minimum value to 1.
29379
29380 PR rtl-optimization/83213
29381 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
29382 to last if both are JUMP_INSNs.
29383
29384 PR tree-optimization/83843
29385 * gimple-ssa-store-merging.c
29386 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
29387 store_immediate_info for bswap/nop orig_stores.
29388
29389 2018-01-15 Andrew Waterman <andrew@sifive.com>
29390
29391 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
29392 !TARGET_MUL.
29393 <UDIV>: Increase cost if !TARGET_DIV.
29394
29395 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
29396
29397 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
29398 (define_attr "cr_logical_3op"): New.
29399 (cceq_ior_compare): Adjust.
29400 (cceq_ior_compare_complement): Adjust.
29401 (*cceq_rev_compare): Adjust.
29402 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
29403 (is_cracked_insn): Adjust.
29404 (insn_must_be_first_in_group): Adjust.
29405 * config/rs6000/40x.md: Adjust.
29406 * config/rs6000/440.md: Adjust.
29407 * config/rs6000/476.md: Adjust.
29408 * config/rs6000/601.md: Adjust.
29409 * config/rs6000/603.md: Adjust.
29410 * config/rs6000/6xx.md: Adjust.
29411 * config/rs6000/7450.md: Adjust.
29412 * config/rs6000/7xx.md: Adjust.
29413 * config/rs6000/8540.md: Adjust.
29414 * config/rs6000/cell.md: Adjust.
29415 * config/rs6000/e300c2c3.md: Adjust.
29416 * config/rs6000/e500mc.md: Adjust.
29417 * config/rs6000/e500mc64.md: Adjust.
29418 * config/rs6000/e5500.md: Adjust.
29419 * config/rs6000/e6500.md: Adjust.
29420 * config/rs6000/mpc.md: Adjust.
29421 * config/rs6000/power4.md: Adjust.
29422 * config/rs6000/power5.md: Adjust.
29423 * config/rs6000/power6.md: Adjust.
29424 * config/rs6000/power7.md: Adjust.
29425 * config/rs6000/power8.md: Adjust.
29426 * config/rs6000/power9.md: Adjust.
29427 * config/rs6000/rs64.md: Adjust.
29428 * config/rs6000/titan.md: Adjust.
29429
29430 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
29431
29432 * config/i386/predicates.md (indirect_branch_operand): Rewrite
29433 ix86_indirect_branch_register logic.
29434
29435 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
29436
29437 * config/i386/constraints.md (Bs): Update
29438 ix86_indirect_branch_register check. Don't check
29439 ix86_indirect_branch_register with GOT_memory_operand.
29440 (Bw): Likewise.
29441 * config/i386/predicates.md (GOT_memory_operand): Don't check
29442 ix86_indirect_branch_register here.
29443 (GOT32_symbol_operand): Likewise.
29444
29445 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
29446
29447 * config/i386/predicates.md (constant_call_address_operand):
29448 Rewrite ix86_indirect_branch_register logic.
29449 (sibcall_insn_operand): Likewise.
29450
29451 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
29452
29453 * config/i386/constraints.md (Bs): Replace
29454 ix86_indirect_branch_thunk_register with
29455 ix86_indirect_branch_register.
29456 (Bw): Likewise.
29457 * config/i386/i386.md (indirect_jump): Likewise.
29458 (tablejump): Likewise.
29459 (*sibcall_memory): Likewise.
29460 (*sibcall_value_memory): Likewise.
29461 Peepholes of indirect call and jump via memory: Likewise.
29462 * config/i386/i386.opt: Likewise.
29463 * config/i386/predicates.md (indirect_branch_operand): Likewise.
29464 (GOT_memory_operand): Likewise.
29465 (call_insn_operand): Likewise.
29466 (sibcall_insn_operand): Likewise.
29467 (GOT32_symbol_operand): Likewise.
29468
29469 2018-01-15 Jakub Jelinek <jakub@redhat.com>
29470
29471 PR middle-end/83837
29472 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
29473 type rather than type addr's type points to.
29474 (expand_omp_atomic_mutex): Likewise.
29475 (expand_omp_atomic): Likewise.
29476
29477 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
29478
29479 PR target/83839
29480 * config/i386/i386.c (output_indirect_thunk_function): Use
29481 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
29482 for __x86_return_thunk.
29483
29484 2018-01-15 Richard Biener <rguenther@suse.de>
29485
29486 PR middle-end/83850
29487 * expmed.c (extract_bit_field_1): Fix typo.
29488
29489 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29490
29491 PR target/83687
29492 * config/arm/iterators.md (VF): New mode iterator.
29493 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
29494 Remove integer-related logic from pattern.
29495 (neon_vabd<mode>_3): Likewise.
29496
29497 2018-01-15 Jakub Jelinek <jakub@redhat.com>
29498
29499 PR middle-end/82694
29500 * common.opt (fstrict-overflow): No longer an alias.
29501 (fwrapv-pointer): New option.
29502 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
29503 also for pointer types based on flag_wrapv_pointer.
29504 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
29505 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
29506 opts->x_flag_wrapv got set.
29507 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
29508 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
29509 POINTER_TYPE_OVERFLOW_UNDEFINED.
29510 * match.pd: Likewise in address comparison pattern.
29511 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
29512
29513 2018-01-15 Richard Biener <rguenther@suse.de>
29514
29515 PR lto/83804
29516 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
29517 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
29518 Reset type names to their identifier if their TYPE_DECL doesn't
29519 have linkage (and thus is used for ODR and devirt).
29520 (save_debug_info_for_decl): Remove.
29521 (save_debug_info_for_type): Likewise.
29522 (add_tree_to_fld_list): Adjust.
29523 * tree-pretty-print.c (dump_generic_node): Make dumping of
29524 type names more robust.
29525
29526 2018-01-15 Richard Biener <rguenther@suse.de>
29527
29528 * BASE-VER: Bump to 8.0.1.
29529
29530 2018-01-14 Martin Sebor <msebor@redhat.com>
29531
29532 PR other/83508
29533 * builtins.c (check_access): Avoid warning when the no-warning bit
29534 is set.
29535
29536 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
29537
29538 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
29539 * ira-color (allocno_hard_regs_compare): Likewise.
29540
29541 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
29542
29543 PR target/83013
29544 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
29545 Use .pushsection/.popsection.
29546
29547 2018-01-14 Martin Sebor <msebor@redhat.com>
29548
29549 PR c++/81327
29550 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
29551
29552 2018-01-14 Jakub Jelinek <jakub@redhat.com>
29553
29554 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
29555 entry from extra_headers.
29556 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
29557 extra_headers, make the list bitwise identical to the i?86-*-* one.
29558
29559 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
29560
29561 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
29562 -mcmodel=large with -mindirect-branch=thunk,
29563 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
29564 -mfunction-return=thunk-extern.
29565 * doc/invoke.texi: Document -mcmodel=large is incompatible with
29566 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
29567 -mfunction-return=thunk and -mfunction-return=thunk-extern.
29568
29569 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
29570
29571 * config/i386/i386.c (print_reg): Print the name of the full
29572 integer register without '%'.
29573 (ix86_print_operand): Handle 'V'.
29574 * doc/extend.texi: Document 'V' modifier.
29575
29576 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
29577
29578 * config/i386/constraints.md (Bs): Disallow memory operand for
29579 -mindirect-branch-register.
29580 (Bw): Likewise.
29581 * config/i386/predicates.md (indirect_branch_operand): Likewise.
29582 (GOT_memory_operand): Likewise.
29583 (call_insn_operand): Likewise.
29584 (sibcall_insn_operand): Likewise.
29585 (GOT32_symbol_operand): Likewise.
29586 * config/i386/i386.md (indirect_jump): Call convert_memory_address
29587 for -mindirect-branch-register.
29588 (tablejump): Likewise.
29589 (*sibcall_memory): Likewise.
29590 (*sibcall_value_memory): Likewise.
29591 Disallow peepholes of indirect call and jump via memory for
29592 -mindirect-branch-register.
29593 (*call_pop): Replace m with Bw.
29594 (*call_value_pop): Likewise.
29595 (*sibcall_pop_memory): Replace m with Bs.
29596 * config/i386/i386.opt (mindirect-branch-register): New option.
29597 * doc/invoke.texi: Document -mindirect-branch-register option.
29598
29599 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
29600
29601 * config/i386/i386-protos.h (ix86_output_function_return): New.
29602 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
29603 set function_return_type.
29604 (indirect_thunk_name): Add ret_p to indicate thunk for function
29605 return.
29606 (output_indirect_thunk_function): Pass false to
29607 indirect_thunk_name.
29608 (ix86_output_indirect_branch_via_reg): Likewise.
29609 (ix86_output_indirect_branch_via_push): Likewise.
29610 (output_indirect_thunk_function): Create alias for function
29611 return thunk if regno < 0.
29612 (ix86_output_function_return): New function.
29613 (ix86_handle_fndecl_attribute): Handle function_return.
29614 (ix86_attribute_table): Add function_return.
29615 * config/i386/i386.h (machine_function): Add
29616 function_return_type.
29617 * config/i386/i386.md (simple_return_internal): Use
29618 ix86_output_function_return.
29619 (simple_return_internal_long): Likewise.
29620 * config/i386/i386.opt (mfunction-return=): New option.
29621 (indirect_branch): Mention -mfunction-return=.
29622 * doc/extend.texi: Document function_return function attribute.
29623 * doc/invoke.texi: Document -mfunction-return= option.
29624
29625 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
29626
29627 * config/i386/i386-opts.h (indirect_branch): New.
29628 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
29629 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
29630 with local indirect jump when converting indirect call and jump.
29631 (ix86_set_indirect_branch_type): New.
29632 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
29633 (indirectlabelno): New.
29634 (indirect_thunk_needed): Likewise.
29635 (indirect_thunk_bnd_needed): Likewise.
29636 (indirect_thunks_used): Likewise.
29637 (indirect_thunks_bnd_used): Likewise.
29638 (INDIRECT_LABEL): Likewise.
29639 (indirect_thunk_name): Likewise.
29640 (output_indirect_thunk): Likewise.
29641 (output_indirect_thunk_function): Likewise.
29642 (ix86_output_indirect_branch_via_reg): Likewise.
29643 (ix86_output_indirect_branch_via_push): Likewise.
29644 (ix86_output_indirect_branch): Likewise.
29645 (ix86_output_indirect_jmp): Likewise.
29646 (ix86_code_end): Call output_indirect_thunk_function if needed.
29647 (ix86_output_call_insn): Call ix86_output_indirect_branch if
29648 needed.
29649 (ix86_handle_fndecl_attribute): Handle indirect_branch.
29650 (ix86_attribute_table): Add indirect_branch.
29651 * config/i386/i386.h (machine_function): Add indirect_branch_type
29652 and has_local_indirect_jump.
29653 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
29654 to true.
29655 (tablejump): Likewise.
29656 (*indirect_jump): Use ix86_output_indirect_jmp.
29657 (*tablejump_1): Likewise.
29658 (simple_return_indirect_internal): Likewise.
29659 * config/i386/i386.opt (mindirect-branch=): New option.
29660 (indirect_branch): New.
29661 (keep): Likewise.
29662 (thunk): Likewise.
29663 (thunk-inline): Likewise.
29664 (thunk-extern): Likewise.
29665 * doc/extend.texi: Document indirect_branch function attribute.
29666 * doc/invoke.texi: Document -mindirect-branch= option.
29667
29668 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
29669
29670 PR ipa/83051
29671 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
29672
29673 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
29674
29675 * ipa-inline.c (want_inline_small_function_p): Return false if
29676 inlining has already failed with CIF_FINAL_ERROR.
29677 (update_caller_keys): Call want_inline_small_function_p before
29678 can_inline_edge_p.
29679 (update_callee_keys): Likewise.
29680
29681 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
29682
29683 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
29684 New function.
29685 (rs6000_quadword_masked_address_p): Likewise.
29686 (quad_aligned_load_p): Likewise.
29687 (quad_aligned_store_p): Likewise.
29688 (const_load_sequence_p): Add comment to describe the outer-most loop.
29689 (mimic_memory_attributes_and_flags): New function.
29690 (rs6000_gen_stvx): Likewise.
29691 (replace_swapped_aligned_store): Likewise.
29692 (rs6000_gen_lvx): Likewise.
29693 (replace_swapped_aligned_load): Likewise.
29694 (replace_swapped_load_constant): Capitalize argument name in
29695 comment describing this function.
29696 (rs6000_analyze_swaps): Add a third pass to search for vector loads
29697 and stores that access quad-word aligned addresses and replace
29698 with stvx or lvx instructions when appropriate.
29699 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
29700 New function prototype.
29701 (rs6000_quadword_masked_address_p): Likewise.
29702 (rs6000_gen_lvx): Likewise.
29703 (rs6000_gen_stvx): Likewise.
29704 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
29705 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
29706 when memory address is aligned.
29707 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
29708 this split to select lvx instruction when memory address is aligned.
29709 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
29710 instruction when memory address is aligned.
29711 (*vsx_le_perm_load_v16qi): Likewise.
29712 (four unnamed splitters): Modify to select the stvx instruction
29713 when memory is aligned.
29714
29715 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
29716
29717 * predict.c (determine_unlikely_bbs): Handle correctly BBs
29718 which appears in the queue multiple times.
29719
29720 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29721 Alan Hayward <alan.hayward@arm.com>
29722 David Sherwood <david.sherwood@arm.com>
29723
29724 * tree-vectorizer.h (vec_lower_bound): New structure.
29725 (_loop_vec_info): Add check_nonzero and lower_bounds.
29726 (LOOP_VINFO_CHECK_NONZERO): New macro.
29727 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
29728 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
29729 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
29730 fields. Make seg_len the distance travelled, not including the
29731 access size.
29732 (dr_direction_indicator): Declare.
29733 (dr_zero_step_indicator): Likewise.
29734 (dr_known_forward_stride_p): Likewise.
29735 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
29736 tree-ssanames.h.
29737 (runtime_alias_check_p): Allow runtime alias checks with
29738 variable strides.
29739 (operator ==): Compare access_size and align.
29740 (prune_runtime_alias_test_list): Rework for new distinction between
29741 the access_size and seg_len.
29742 (create_intersect_range_checks_index): Likewise. Cope with polynomial
29743 segment lengths.
29744 (get_segment_min_max): New function.
29745 (create_intersect_range_checks): Use it.
29746 (dr_step_indicator): New function.
29747 (dr_direction_indicator): Likewise.
29748 (dr_zero_step_indicator): Likewise.
29749 (dr_known_forward_stride_p): Likewise.
29750 * tree-loop-distribution.c (data_ref_segment_size): Return
29751 DR_STEP * (niters - 1).
29752 (compute_alias_check_pairs): Update call to the dr_with_seg_len
29753 constructor.
29754 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
29755 (vect_preserves_scalar_order_p): New function, split out from...
29756 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
29757 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
29758 (vect_vfa_access_size): New function.
29759 (vect_vfa_align): Likewise.
29760 (vect_compile_time_alias): Take access_size_a and access_b arguments.
29761 (dump_lower_bound): New function.
29762 (vect_check_lower_bound): Likewise.
29763 (vect_small_gap_p): Likewise.
29764 (vectorizable_with_step_bound_p): Likewise.
29765 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
29766 depencies if the vectorization factor is 1. Convert the checks
29767 for nonzero steps into checks on the bounds of DR_STEP. Try using
29768 a bunds check for variable steps if the minimum required step is
29769 relatively small. Update calls to the dr_with_seg_len
29770 constructor and to vect_compile_time_alias.
29771 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
29772 function.
29773 (vect_loop_versioning): Call it.
29774 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
29775 when retrying.
29776 (vect_estimate_min_profitable_iters): Account for any bounds checks.
29777
29778 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29779 Alan Hayward <alan.hayward@arm.com>
29780 David Sherwood <david.sherwood@arm.com>
29781
29782 * doc/sourcebuild.texi (vect_scatter_store): Document.
29783 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
29784 optabs.
29785 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
29786 Document.
29787 * genopinit.c (main): Add supports_vec_scatter_store and
29788 supports_vec_scatter_store_cached to target_optabs.
29789 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
29790 IFN_MASK_SCATTER_STORE.
29791 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
29792 functions.
29793 * internal-fn.h (internal_store_fn_p): Declare.
29794 (internal_fn_stored_value_index): Likewise.
29795 * internal-fn.c (scatter_store_direct): New macro.
29796 (expand_scatter_store_optab_fn): New function.
29797 (direct_scatter_store_optab_supported_p): New macro.
29798 (internal_store_fn_p): New function.
29799 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
29800 IFN_MASK_SCATTER_STORE.
29801 (internal_fn_mask_index): Likewise.
29802 (internal_fn_stored_value_index): New function.
29803 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
29804 for scatter stores.
29805 * optabs-query.h (supports_vec_scatter_store_p): Declare.
29806 * optabs-query.c (supports_vec_scatter_store_p): New function.
29807 * tree-vectorizer.h (vect_get_store_rhs): Declare.
29808 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
29809 true for scatter stores.
29810 (vect_gather_scatter_fn_p): Handle scatter stores too.
29811 (vect_check_gather_scatter): Consider using scatter stores if
29812 supports_vec_scatter_store_p.
29813 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
29814 scatter stores too.
29815 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
29816 internal_fn_stored_value_index.
29817 (check_load_store_masking): Handle scatter stores too.
29818 (vect_get_store_rhs): Make public.
29819 (vectorizable_call): Use internal_store_fn_p.
29820 (vectorizable_store): Handle scatter store internal functions.
29821 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
29822 when deciding whether the end of the group has been reached.
29823 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
29824 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
29825 (mask_scatter_store<mode>): New insns.
29826
29827 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29828 Alan Hayward <alan.hayward@arm.com>
29829 David Sherwood <david.sherwood@arm.com>
29830
29831 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
29832 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
29833 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
29834 function.
29835 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
29836 Use vect_truncate_gather_scatter_offset if we can't treat the
29837 operation as a normal gather load or scatter store.
29838 (get_group_load_store_type): Take the gather_scatter_info
29839 as argument. Try using a gather load or scatter store for
29840 single-element groups.
29841 (get_load_store_type): Update calls to get_group_load_store_type
29842 and vect_use_strided_gather_scatters_p.
29843
29844 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29845 Alan Hayward <alan.hayward@arm.com>
29846 David Sherwood <david.sherwood@arm.com>
29847
29848 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
29849 optional tree argument.
29850 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
29851 null target hooks.
29852 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
29853 but continue to use the current value as a fallback.
29854 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
29855 to compare the updates.
29856 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
29857 (get_load_store_type): Use it when handling a strided access.
29858 (vect_get_strided_load_store_ops): New function.
29859 (vect_get_data_ptr_increment): Likewise.
29860 (vectorizable_load): Handle strided gather loads. Always pass
29861 a step to vect_create_data_ref_ptr and bump_vector_ptr.
29862
29863 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29864 Alan Hayward <alan.hayward@arm.com>
29865 David Sherwood <david.sherwood@arm.com>
29866
29867 * doc/md.texi (gather_load@var{m}): Document.
29868 (mask_gather_load@var{m}): Likewise.
29869 * genopinit.c (main): Add supports_vec_gather_load and
29870 supports_vec_gather_load_cached to target_optabs.
29871 * optabs-tree.c (init_tree_optimization_optabs): Use
29872 ggc_cleared_alloc to allocate target_optabs.
29873 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
29874 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
29875 functions.
29876 * internal-fn.h (internal_load_fn_p): Declare.
29877 (internal_gather_scatter_fn_p): Likewise.
29878 (internal_fn_mask_index): Likewise.
29879 (internal_gather_scatter_fn_supported_p): Likewise.
29880 * internal-fn.c (gather_load_direct): New macro.
29881 (expand_gather_load_optab_fn): New function.
29882 (direct_gather_load_optab_supported_p): New macro.
29883 (direct_internal_fn_optab): New function.
29884 (internal_load_fn_p): Likewise.
29885 (internal_gather_scatter_fn_p): Likewise.
29886 (internal_fn_mask_index): Likewise.
29887 (internal_gather_scatter_fn_supported_p): Likewise.
29888 * optabs-query.c (supports_at_least_one_mode_p): New function.
29889 (supports_vec_gather_load_p): Likewise.
29890 * optabs-query.h (supports_vec_gather_load_p): Declare.
29891 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
29892 and memory_type field.
29893 (NUM_PATTERNS): Bump to 15.
29894 * tree-vect-data-refs.c: Include internal-fn.h.
29895 (vect_gather_scatter_fn_p): New function.
29896 (vect_describe_gather_scatter_call): Likewise.
29897 (vect_check_gather_scatter): Try using internal functions for
29898 gather loads. Recognize existing calls to a gather load function.
29899 (vect_analyze_data_refs): Consider using gather loads if
29900 supports_vec_gather_load_p.
29901 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
29902 (vect_get_gather_scatter_offset_type): Likewise.
29903 (vect_convert_mask_for_vectype): Likewise.
29904 (vect_add_conversion_to_patterm): Likewise.
29905 (vect_try_gather_scatter_pattern): Likewise.
29906 (vect_recog_gather_scatter_pattern): New pattern recognizer.
29907 (vect_vect_recog_func_ptrs): Add it.
29908 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
29909 internal_fn_mask_index and internal_gather_scatter_fn_p.
29910 (check_load_store_masking): Take the gather_scatter_info as an
29911 argument and handle gather loads.
29912 (vect_get_gather_scatter_ops): New function.
29913 (vectorizable_call): Check internal_load_fn_p.
29914 (vectorizable_load): Likewise. Handle gather load internal
29915 functions.
29916 (vectorizable_store): Update call to check_load_store_masking.
29917 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
29918 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
29919 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
29920 (aarch64_gather_scale_operand_d): New predicates.
29921 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
29922 (mask_gather_load<mode>): New insns.
29923
29924 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29925 Alan Hayward <alan.hayward@arm.com>
29926 David Sherwood <david.sherwood@arm.com>
29927
29928 * optabs.def (fold_left_plus_optab): New optab.
29929 * doc/md.texi (fold_left_plus_@var{m}): Document.
29930 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
29931 * internal-fn.c (fold_left_direct): Define.
29932 (expand_fold_left_optab_fn): Likewise.
29933 (direct_fold_left_optab_supported_p): Likewise.
29934 * fold-const-call.c (fold_const_fold_left): New function.
29935 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
29936 * tree-parloops.c (valid_reduction_p): New function.
29937 (gather_scalar_reductions): Use it.
29938 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
29939 (vect_finish_replace_stmt): Declare.
29940 * tree-vect-loop.c (fold_left_reduction_fn): New function.
29941 (needs_fold_left_reduction_p): New function, split out from...
29942 (vect_is_simple_reduction): ...here. Accept reductions that
29943 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
29944 (vect_force_simple_reduction): Also store the reduction type in
29945 the assignment's STMT_VINFO_REDUC_TYPE.
29946 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
29947 (merge_with_identity): New function.
29948 (vect_expand_fold_left): Likewise.
29949 (vectorize_fold_left_reduction): Likewise.
29950 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
29951 scalar phi in place for it. Check for target support and reject
29952 cases that would reassociate the operation. Defer the transform
29953 phase to vectorize_fold_left_reduction.
29954 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
29955 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
29956 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
29957
29958 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29959
29960 * tree-if-conv.c (predicate_mem_writes): Remove redundant
29961 call to ifc_temp_var.
29962
29963 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29964 Alan Hayward <alan.hayward@arm.com>
29965 David Sherwood <david.sherwood@arm.com>
29966
29967 * target.def (legitimize_address_displacement): Take the original
29968 offset as a poly_int.
29969 * targhooks.h (default_legitimize_address_displacement): Update
29970 accordingly.
29971 * targhooks.c (default_legitimize_address_displacement): Likewise.
29972 * doc/tm.texi: Regenerate.
29973 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
29974 as an argument, moving assert of ad->disp == ad->disp_term to...
29975 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
29976 Try calling targetm.legitimize_address_displacement before expanding
29977 the address rather than afterwards, and adjust for the new interface.
29978 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
29979 Match the new hook interface. Handle SVE addresses.
29980 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
29981 new hook interface.
29982
29983 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29984
29985 * Makefile.in (OBJS): Add early-remat.o.
29986 * target.def (select_early_remat_modes): New hook.
29987 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
29988 * doc/tm.texi: Regenerate.
29989 * targhooks.h (default_select_early_remat_modes): Declare.
29990 * targhooks.c (default_select_early_remat_modes): New function.
29991 * timevar.def (TV_EARLY_REMAT): New timevar.
29992 * passes.def (pass_early_remat): New pass.
29993 * tree-pass.h (make_pass_early_remat): Declare.
29994 * early-remat.c: New file.
29995 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
29996 function.
29997 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
29998
29999 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30000 Alan Hayward <alan.hayward@arm.com>
30001 David Sherwood <david.sherwood@arm.com>
30002
30003 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
30004 vfm1 with a bound_epilog parameter.
30005 (vect_do_peeling): Update calls accordingly, and move the prologue
30006 call earlier in the function. Treat the base bound_epilog as 0 for
30007 fully-masked loops and retain vf - 1 for other loops. Add 1 to
30008 this base when peeling for gaps.
30009 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
30010 with fully-masked loops.
30011 (vect_estimate_min_profitable_iters): Handle the single peeled
30012 iteration in that case.
30013
30014 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30015 Alan Hayward <alan.hayward@arm.com>
30016 David Sherwood <david.sherwood@arm.com>
30017
30018 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
30019 single-element interleaving even if the size is not a power of 2.
30020 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
30021 accesses for single-element interleaving if the group size is
30022 not a power of 2.
30023
30024 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30025 Alan Hayward <alan.hayward@arm.com>
30026 David Sherwood <david.sherwood@arm.com>
30027
30028 * doc/md.texi (fold_extract_last_@var{m}): Document.
30029 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
30030 * optabs.def (fold_extract_last_optab): New optab.
30031 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
30032 * internal-fn.c (fold_extract_direct): New macro.
30033 (expand_fold_extract_optab_fn): Likewise.
30034 (direct_fold_extract_optab_supported_p): Likewise.
30035 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
30036 * tree-vect-loop.c (vect_model_reduction_cost): Handle
30037 EXTRACT_LAST_REDUCTION.
30038 (get_initial_def_for_reduction): Do not create an initial vector
30039 for EXTRACT_LAST_REDUCTION reductions.
30040 (vectorizable_reduction): Leave the scalar phi in place for
30041 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
30042 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
30043 epilogue code for EXTRACT_LAST_REDUCTION and defer the
30044 transform phase to vectorizable_condition.
30045 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
30046 split out from...
30047 (vect_finish_stmt_generation): ...here.
30048 (vect_finish_replace_stmt): New function.
30049 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
30050 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
30051 pattern.
30052 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
30053
30054 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30055 Alan Hayward <alan.hayward@arm.com>
30056 David Sherwood <david.sherwood@arm.com>
30057
30058 * doc/md.texi (extract_last_@var{m}): Document.
30059 * optabs.def (extract_last_optab): New optab.
30060 * internal-fn.def (EXTRACT_LAST): New internal function.
30061 * internal-fn.c (cond_unary_direct): New macro.
30062 (expand_cond_unary_optab_fn): Likewise.
30063 (direct_cond_unary_optab_supported_p): Likewise.
30064 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
30065 loops using EXTRACT_LAST.
30066 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
30067 (extract_last_<mode>): ...this optab.
30068 (vec_extract<mode><Vel>): Update accordingly.
30069
30070 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30071 Alan Hayward <alan.hayward@arm.com>
30072 David Sherwood <david.sherwood@arm.com>
30073
30074 * target.def (empty_mask_is_expensive): New hook.
30075 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
30076 * doc/tm.texi: Regenerate.
30077 * targhooks.h (default_empty_mask_is_expensive): Declare.
30078 * targhooks.c (default_empty_mask_is_expensive): New function.
30079 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
30080 if the target says that empty masks are expensive.
30081 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
30082 New function.
30083 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
30084
30085 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30086 Alan Hayward <alan.hayward@arm.com>
30087 David Sherwood <david.sherwood@arm.com>
30088
30089 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
30090 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
30091 (vect_use_loop_mask_for_alignment_p): New function.
30092 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
30093 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
30094 niters_skip argument. Make sure that the first niters_skip elements
30095 of the first iteration are inactive.
30096 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
30097 Update call to vect_set_loop_masks_directly.
30098 (get_misalign_in_elems): New function, split out from...
30099 (vect_gen_prolog_loop_niters): ...here.
30100 (vect_update_init_of_dr): Take a code argument that specifies whether
30101 the adjustment should be added or subtracted.
30102 (vect_update_init_of_drs): Likewise.
30103 (vect_prepare_for_masked_peels): New function.
30104 (vect_do_peeling): Skip prologue peeling if we're using a mask
30105 instead. Update call to vect_update_inits_of_drs.
30106 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
30107 mask_skip_niters.
30108 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
30109 alignment. Do not include the number of peeled iterations in
30110 the minimum threshold in that case.
30111 (vectorizable_induction): Adjust the start value down by
30112 LOOP_VINFO_MASK_SKIP_NITERS iterations.
30113 (vect_transform_loop): Call vect_prepare_for_masked_peels.
30114 Take the number of skipped iterations into account when calculating
30115 the loop bounds.
30116 * tree-vect-stmts.c (vect_gen_while_not): New function.
30117
30118 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30119 Alan Hayward <alan.hayward@arm.com>
30120 David Sherwood <david.sherwood@arm.com>
30121
30122 * doc/sourcebuild.texi (vect_fully_masked): Document.
30123 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
30124 default value to 0.
30125 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
30126 split out from...
30127 (vect_analyze_loop_2): ...here. Don't check the vectorization
30128 factor against the number of loop iterations if the loop is
30129 fully-masked.
30130
30131 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30132 Alan Hayward <alan.hayward@arm.com>
30133 David Sherwood <david.sherwood@arm.com>
30134
30135 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
30136 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
30137 (dump_groups): Update accordingly.
30138 (iv_use::mem_type): New member variable.
30139 (address_p): New function.
30140 (record_use): Add a mem_type argument and initialize the new
30141 mem_type field.
30142 (record_group_use): Add a mem_type argument. Use address_p.
30143 Remove obsolete null checks of base_object. Update call to record_use.
30144 (find_interesting_uses_op): Update call to record_group_use.
30145 (find_interesting_uses_cond): Likewise.
30146 (find_interesting_uses_address): Likewise.
30147 (get_mem_type_for_internal_fn): New function.
30148 (find_address_like_use): Likewise.
30149 (find_interesting_uses_stmt): Try find_address_like_use before
30150 calling find_interesting_uses_op.
30151 (addr_offset_valid_p): Use the iv mem_type field as the type
30152 of the addressed memory.
30153 (add_autoinc_candidates): Likewise.
30154 (get_address_cost): Likewise.
30155 (split_small_address_groups_p): Use address_p.
30156 (split_address_groups): Likewise.
30157 (add_iv_candidate_for_use): Likewise.
30158 (autoinc_possible_for_pair): Likewise.
30159 (rewrite_groups): Likewise.
30160 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
30161 (determine_group_iv_cost): Update after split of USE_ADDRESS.
30162 (get_alias_ptr_type_for_ptr_address): New function.
30163 (rewrite_use_address): Rewrite address uses in calls that were
30164 identified by find_address_like_use.
30165
30166 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30167 Alan Hayward <alan.hayward@arm.com>
30168 David Sherwood <david.sherwood@arm.com>
30169
30170 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
30171 TARGET_MEM_REFs.
30172 * gimple-expr.h (is_gimple_addressable: Likewise.
30173 * gimple-expr.c (is_gimple_address): Likewise.
30174 * internal-fn.c (expand_call_mem_ref): New function.
30175 (expand_mask_load_optab_fn): Use it.
30176 (expand_mask_store_optab_fn): Likewise.
30177
30178 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30179 Alan Hayward <alan.hayward@arm.com>
30180 David Sherwood <david.sherwood@arm.com>
30181
30182 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
30183 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
30184 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
30185 (cond_umax@var{mode}): Document.
30186 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
30187 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
30188 (cond_umin_optab, cond_umax_optab): New optabs.
30189 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
30190 (COND_IOR, COND_XOR): New internal functions.
30191 * internal-fn.h (get_conditional_internal_fn): Declare.
30192 * internal-fn.c (cond_binary_direct): New macro.
30193 (expand_cond_binary_optab_fn): Likewise.
30194 (direct_cond_binary_optab_supported_p): Likewise.
30195 (get_conditional_internal_fn): New function.
30196 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
30197 Cope with reduction statements that are vectorized as calls rather
30198 than assignments.
30199 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
30200 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
30201 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
30202 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
30203 (UNSPEC_COND_EOR): New unspecs.
30204 (optab): Add mappings for them.
30205 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
30206 (sve_int_op, sve_fp_op): New int attributes.
30207
30208 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30209 Alan Hayward <alan.hayward@arm.com>
30210 David Sherwood <david.sherwood@arm.com>
30211
30212 * optabs.def (while_ult_optab): New optab.
30213 * doc/md.texi (while_ult@var{m}@var{n}): Document.
30214 * internal-fn.def (WHILE_ULT): New internal function.
30215 * internal-fn.h (direct_internal_fn_supported_p): New override
30216 that takes two types as argument.
30217 * internal-fn.c (while_direct): New macro.
30218 (expand_while_optab_fn): New function.
30219 (convert_optab_supported_p): Likewise.
30220 (direct_while_optab_supported_p): New macro.
30221 * wide-int.h (wi::udiv_ceil): New function.
30222 * tree-vectorizer.h (rgroup_masks): New structure.
30223 (vec_loop_masks): New typedef.
30224 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
30225 and fully_masked_p.
30226 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
30227 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
30228 (vect_max_vf): New function.
30229 (slpeel_make_loop_iterate_ntimes): Delete.
30230 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
30231 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
30232 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
30233 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
30234 internal-fn.h, stor-layout.h and optabs-query.h.
30235 (vect_set_loop_mask): New function.
30236 (add_preheader_seq): Likewise.
30237 (add_header_seq): Likewise.
30238 (interleave_supported_p): Likewise.
30239 (vect_maybe_permute_loop_masks): Likewise.
30240 (vect_set_loop_masks_directly): Likewise.
30241 (vect_set_loop_condition_masked): Likewise.
30242 (vect_set_loop_condition_unmasked): New function, split out from
30243 slpeel_make_loop_iterate_ntimes.
30244 (slpeel_make_loop_iterate_ntimes): Rename to..
30245 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
30246 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
30247 (vect_do_peeling): Update call accordingly.
30248 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
30249 loops.
30250 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
30251 mask_compare_type, can_fully_mask_p and fully_masked_p.
30252 (release_vec_loop_masks): New function.
30253 (_loop_vec_info): Use it to free the loop masks.
30254 (can_produce_all_loop_masks_p): New function.
30255 (vect_get_max_nscalars_per_iter): Likewise.
30256 (vect_verify_full_masking): Likewise.
30257 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
30258 retries, and free the mask rgroups before retrying. Check loop-wide
30259 reasons for disallowing fully-masked loops. Make the final decision
30260 about whether use a fully-masked loop or not.
30261 (vect_estimate_min_profitable_iters): Do not assume that peeling
30262 for the number of iterations will be needed for fully-masked loops.
30263 (vectorizable_reduction): Disable fully-masked loops.
30264 (vectorizable_live_operation): Likewise.
30265 (vect_halve_mask_nunits): New function.
30266 (vect_double_mask_nunits): Likewise.
30267 (vect_record_loop_mask): Likewise.
30268 (vect_get_loop_mask): Likewise.
30269 (vect_transform_loop): Handle the case in which the final loop
30270 iteration might handle a partial vector. Call vect_set_loop_condition
30271 instead of slpeel_make_loop_iterate_ntimes.
30272 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
30273 (check_load_store_masking): New function.
30274 (prepare_load_store_mask): Likewise.
30275 (vectorizable_store): Handle fully-masked loops.
30276 (vectorizable_load): Likewise.
30277 (supportable_widening_operation): Use vect_halve_mask_nunits for
30278 booleans.
30279 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
30280 (vect_gen_while): New function.
30281 * config/aarch64/aarch64.md (umax<mode>3): New expander.
30282 (aarch64_uqdec<mode>): New insn.
30283
30284 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30285 Alan Hayward <alan.hayward@arm.com>
30286 David Sherwood <david.sherwood@arm.com>
30287
30288 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
30289 (reduc_xor_scal_optab): New optabs.
30290 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
30291 (reduc_xor_scal_@var{m}): Document.
30292 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
30293 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
30294 internal functions.
30295 * fold-const-call.c (fold_const_call): Handle them.
30296 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
30297 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
30298 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
30299 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
30300 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
30301 (UNSPEC_XORV): New unspecs.
30302 (optab): Add entries for them.
30303 (BITWISEV): New int iterator.
30304 (bit_reduc_op): New int attributes.
30305
30306 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30307 Alan Hayward <alan.hayward@arm.com>
30308 David Sherwood <david.sherwood@arm.com>
30309
30310 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
30311 * internal-fn.def (VEC_SHL_INSERT): New internal function.
30312 * optabs.def (vec_shl_insert_optab): New optab.
30313 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
30314 (duplicate_and_interleave): Likewise.
30315 * tree-vect-loop.c: Include internal-fn.h.
30316 (neutral_op_for_slp_reduction): New function, split out from
30317 get_initial_defs_for_reduction.
30318 (get_initial_def_for_reduction): Handle option 2 for variable-length
30319 vectors by loading the neutral value into a vector and then shifting
30320 the initial value into element 0.
30321 (get_initial_defs_for_reduction): Replace the code argument with
30322 the neutral value calculated by neutral_op_for_slp_reduction.
30323 Use gimple_build_vector for constant-length vectors.
30324 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
30325 but the first group_size elements have a neutral value.
30326 Use duplicate_and_interleave otherwise.
30327 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
30328 Update call to get_initial_defs_for_reduction. Handle SLP
30329 reductions for variable-length vectors by creating one vector
30330 result for each scalar result, with the elements associated
30331 with other scalar results stubbed out with the neutral value.
30332 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
30333 Require IFN_VEC_SHL_INSERT for double reductions on
30334 variable-length vectors, or SLP reductions that have
30335 a neutral value. Require can_duplicate_and_interleave_p
30336 support for variable-length unchained SLP reductions if there
30337 is no neutral value, such as for MIN/MAX reductions. Also require
30338 the number of vector elements to be a multiple of the number of
30339 SLP statements when doing variable-length unchained SLP reductions.
30340 Update call to vect_create_epilog_for_reduction.
30341 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
30342 and remove initial values.
30343 (duplicate_and_interleave): Make public.
30344 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
30345 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
30346
30347 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30348 Alan Hayward <alan.hayward@arm.com>
30349 David Sherwood <david.sherwood@arm.com>
30350
30351 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
30352 (can_duplicate_and_interleave_p): New function.
30353 (vect_get_and_check_slp_defs): Take the vector of statements
30354 rather than just the current one. Remove excess parentheses.
30355 Restriction rejectinon of vect_constant_def and vect_external_def
30356 for variable-length vectors to boolean types, or types for which
30357 can_duplicate_and_interleave_p is false.
30358 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
30359 (duplicate_and_interleave): New function.
30360 (vect_get_constant_vectors): Use gimple_build_vector for
30361 constant-length vectors and suitable variable-length constant
30362 vectors. Use duplicate_and_interleave for other variable-length
30363 vectors. Don't defer the update when inserting new statements.
30364
30365 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30366 Alan Hayward <alan.hayward@arm.com>
30367 David Sherwood <david.sherwood@arm.com>
30368
30369 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
30370 min_profitable_iters doesn't go negative.
30371
30372 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30373 Alan Hayward <alan.hayward@arm.com>
30374 David Sherwood <david.sherwood@arm.com>
30375
30376 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
30377 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
30378 * optabs.def (vec_mask_load_lanes_optab): New optab.
30379 (vec_mask_store_lanes_optab): Likewise.
30380 * internal-fn.def (MASK_LOAD_LANES): New internal function.
30381 (MASK_STORE_LANES): Likewise.
30382 * internal-fn.c (mask_load_lanes_direct): New macro.
30383 (mask_store_lanes_direct): Likewise.
30384 (expand_mask_load_optab_fn): Handle masked operations.
30385 (expand_mask_load_lanes_optab_fn): New macro.
30386 (expand_mask_store_optab_fn): Handle masked operations.
30387 (expand_mask_store_lanes_optab_fn): New macro.
30388 (direct_mask_load_lanes_optab_supported_p): Likewise.
30389 (direct_mask_store_lanes_optab_supported_p): Likewise.
30390 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
30391 parameter.
30392 (vect_load_lanes_supported): Likewise.
30393 * tree-vect-data-refs.c (strip_conversion): New function.
30394 (can_group_stmts_p): Likewise.
30395 (vect_analyze_data_ref_accesses): Use it instead of checking
30396 for a pair of assignments.
30397 (vect_store_lanes_supported): Take a masked_p parameter.
30398 (vect_load_lanes_supported): Likewise.
30399 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
30400 vect_store_lanes_supported and vect_load_lanes_supported.
30401 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
30402 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
30403 parameter. Don't allow gaps for masked accesses.
30404 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
30405 and vect_load_lanes_supported.
30406 (get_load_store_type): Take a masked_p parameter and update
30407 call to get_group_load_store_type.
30408 (vectorizable_store): Update call to get_load_store_type.
30409 Handle IFN_MASK_STORE_LANES.
30410 (vectorizable_load): Update call to get_load_store_type.
30411 Handle IFN_MASK_LOAD_LANES.
30412
30413 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30414 Alan Hayward <alan.hayward@arm.com>
30415 David Sherwood <david.sherwood@arm.com>
30416
30417 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
30418 modes for SVE.
30419 * config/aarch64/aarch64-protos.h
30420 (aarch64_sve_struct_memory_operand_p): Declare.
30421 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
30422 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
30423 (VPRED, vpred): Handle SVE structure modes.
30424 * config/aarch64/constraints.md (Utx): New constraint.
30425 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
30426 (aarch64_sve_struct_nonimmediate_operand): New predicates.
30427 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
30428 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
30429 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
30430 structure modes. Split into pieces after RA.
30431 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
30432 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
30433 New patterns.
30434 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
30435 SVE structure modes.
30436 (aarch64_classify_address): Likewise.
30437 (sizetochar): Move earlier in file.
30438 (aarch64_print_operand): Handle SVE register lists.
30439 (aarch64_array_mode): New function.
30440 (aarch64_sve_struct_memory_operand_p): Likewise.
30441 (TARGET_ARRAY_MODE): Redefine.
30442
30443 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30444 Alan Hayward <alan.hayward@arm.com>
30445 David Sherwood <david.sherwood@arm.com>
30446
30447 * target.def (array_mode): New target hook.
30448 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
30449 * doc/tm.texi: Regenerate.
30450 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
30451 * hooks.c (hook_optmode_mode_uhwi_none): New function.
30452 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
30453 targetm.array_mode.
30454 * stor-layout.c (mode_for_array): Likewise. Support polynomial
30455 type sizes.
30456
30457 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30458 Alan Hayward <alan.hayward@arm.com>
30459 David Sherwood <david.sherwood@arm.com>
30460
30461 * fold-const.c (fold_binary_loc): Check the argument types
30462 rather than the result type when testing for a vector operation.
30463
30464 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30465
30466 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
30467 * doc/tm.texi: Regenerate.
30468
30469 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30470 Alan Hayward <alan.hayward@arm.com>
30471 David Sherwood <david.sherwood@arm.com>
30472
30473 * doc/invoke.texi (-msve-vector-bits=): Document new option.
30474 (sve): Document new AArch64 extension.
30475 * doc/md.texi (w): Extend the description of the AArch64
30476 constraint to include SVE vectors.
30477 (Upl, Upa): Document new AArch64 predicate constraints.
30478 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
30479 enum.
30480 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
30481 (msve-vector-bits=): New option.
30482 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
30483 SVE when these are disabled.
30484 (sve): New extension.
30485 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
30486 modes. Adjust their number of units based on aarch64_sve_vg.
30487 (MAX_BITSIZE_MODE_ANY_MODE): Define.
30488 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
30489 aarch64_addr_query_type.
30490 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
30491 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
30492 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
30493 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
30494 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
30495 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
30496 (aarch64_simd_imm_zero_p): Delete.
30497 (aarch64_check_zero_based_sve_index_immediate): Declare.
30498 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
30499 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
30500 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
30501 (aarch64_sve_float_mul_immediate_p): Likewise.
30502 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
30503 rather than an rtx.
30504 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
30505 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
30506 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
30507 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
30508 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
30509 (aarch64_regmode_natural_size): Likewise.
30510 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
30511 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
30512 left one place.
30513 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
30514 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
30515 for VG and the SVE predicate registers.
30516 (V_ALIASES): Add a "z"-prefixed alias.
30517 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
30518 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
30519 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
30520 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
30521 (REG_CLASS_NAMES): Add entries for them.
30522 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
30523 and the predicate registers.
30524 (aarch64_sve_vg): Declare.
30525 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
30526 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
30527 (REGMODE_NATURAL_SIZE): Define.
30528 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
30529 SVE macros.
30530 * config/aarch64/aarch64.c: Include cfgrtl.h.
30531 (simd_immediate_info): Add a constructor for series vectors,
30532 and an associated step field.
30533 (aarch64_sve_vg): New variable.
30534 (aarch64_dbx_register_number): Handle VG and the predicate registers.
30535 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
30536 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
30537 (VEC_ANY_DATA, VEC_STRUCT): New constants.
30538 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
30539 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
30540 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
30541 (aarch64_get_mask_mode): New functions.
30542 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
30543 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
30544 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
30545 predicate modes and predicate registers. Explicitly restrict
30546 GPRs to modes of 16 bytes or smaller. Only allow FP registers
30547 to store a vector mode if it is recognized by
30548 aarch64_classify_vector_mode.
30549 (aarch64_regmode_natural_size): New function.
30550 (aarch64_hard_regno_caller_save_mode): Return the original mode
30551 for predicates.
30552 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
30553 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
30554 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
30555 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
30556 functions.
30557 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
30558 does not overlap dest if the function is frame-related. Handle
30559 SVE constants.
30560 (aarch64_split_add_offset): New function.
30561 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
30562 them aarch64_add_offset.
30563 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
30564 and update call to aarch64_sub_sp.
30565 (aarch64_add_cfa_expression): New function.
30566 (aarch64_expand_prologue): Pass extra temporary registers to the
30567 functions above. Handle the case in which we need to emit new
30568 DW_CFA_expressions for registers that were originally saved
30569 relative to the stack pointer, but now have to be expressed
30570 relative to the frame pointer.
30571 (aarch64_output_mi_thunk): Pass extra temporary registers to the
30572 functions above.
30573 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
30574 IP0 and IP1 values for SVE frames.
30575 (aarch64_expand_vec_series): New function.
30576 (aarch64_expand_sve_widened_duplicate): Likewise.
30577 (aarch64_expand_sve_const_vector): Likewise.
30578 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
30579 Handle SVE constants. Use emit_move_insn to move a force_const_mem
30580 into the register, rather than emitting a SET directly.
30581 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
30582 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
30583 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
30584 (offset_9bit_signed_scaled_p): New functions.
30585 (aarch64_replicate_bitmask_imm): New function.
30586 (aarch64_bitmask_imm): Use it.
30587 (aarch64_cannot_force_const_mem): Reject expressions involving
30588 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
30589 (aarch64_classify_index): Handle SVE indices, by requiring
30590 a plain register index with a scale that matches the element size.
30591 (aarch64_classify_address): Handle SVE addresses. Assert that
30592 the mode of the address is VOIDmode or an integer mode.
30593 Update call to aarch64_classify_symbol.
30594 (aarch64_classify_symbolic_expression): Update call to
30595 aarch64_classify_symbol.
30596 (aarch64_const_vec_all_in_range_p): New function.
30597 (aarch64_print_vector_float_operand): Likewise.
30598 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
30599 "vN" for FP registers with SVE modes. Handle (const ...) vectors
30600 and the FP immediates 1.0 and 0.5.
30601 (aarch64_print_address_internal): Handle SVE addresses.
30602 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
30603 (aarch64_regno_regclass): Handle predicate registers.
30604 (aarch64_secondary_reload): Handle big-endian reloads of SVE
30605 data modes.
30606 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
30607 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
30608 (aarch64_convert_sve_vector_bits): New function.
30609 (aarch64_override_options): Use it to handle -msve-vector-bits=.
30610 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
30611 rather than an rtx.
30612 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
30613 Handle SVE vector and predicate modes. Accept VL-based constants
30614 that need only one temporary register, and VL offsets that require
30615 no temporary registers.
30616 (aarch64_conditional_register_usage): Mark the predicate registers
30617 as fixed if SVE isn't available.
30618 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
30619 Return true for SVE vector and predicate modes.
30620 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
30621 rather than an unsigned int. Handle SVE modes.
30622 (aarch64_preferred_simd_mode): Update call accordingly. Handle
30623 SVE modes.
30624 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
30625 if SVE is enabled.
30626 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
30627 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
30628 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
30629 (aarch64_sve_float_mul_immediate_p): New functions.
30630 (aarch64_sve_valid_immediate): New function.
30631 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
30632 Explicitly reject structure modes. Check for INDEX constants.
30633 Handle PTRUE and PFALSE constants.
30634 (aarch64_check_zero_based_sve_index_immediate): New function.
30635 (aarch64_simd_imm_zero_p): Delete.
30636 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
30637 vector modes. Accept constants in the range of CNT[BHWD].
30638 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
30639 ask for an Advanced SIMD mode.
30640 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
30641 (aarch64_simd_vector_alignment): Handle SVE predicates.
30642 (aarch64_vectorize_preferred_vector_alignment): New function.
30643 (aarch64_simd_vector_alignment_reachable): Use it instead of
30644 the vector size.
30645 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
30646 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
30647 functions.
30648 (MAX_VECT_LEN): Delete.
30649 (expand_vec_perm_d): Add a vec_flags field.
30650 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
30651 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
30652 (aarch64_evpc_ext): Don't apply a big-endian lane correction
30653 for SVE modes.
30654 (aarch64_evpc_rev): Rename to...
30655 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
30656 (aarch64_evpc_rev_global): New function.
30657 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
30658 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
30659 MAX_VECT_LEN.
30660 (aarch64_evpc_sve_tbl): New function.
30661 (aarch64_expand_vec_perm_const_1): Update after rename of
30662 aarch64_evpc_rev. Handle SVE permutes too, trying
30663 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
30664 than aarch64_evpc_tbl.
30665 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
30666 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
30667 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
30668 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
30669 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
30670 (aarch64_expand_sve_vcond): New functions.
30671 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
30672 of aarch64_vector_mode_p.
30673 (aarch64_dwarf_poly_indeterminate_value): New function.
30674 (aarch64_compute_pressure_classes): Likewise.
30675 (aarch64_can_change_mode_class): Likewise.
30676 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
30677 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
30678 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
30679 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
30680 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
30681 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
30682 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
30683 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
30684 constraints.
30685 (Dn, Dl, Dr): Accept const as well as const_vector.
30686 (Dz): Likewise. Compare against CONST0_RTX.
30687 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
30688 of "vector" where appropriate.
30689 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
30690 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
30691 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
30692 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
30693 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
30694 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
30695 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
30696 (v_int_equiv): Extend to SVE modes.
30697 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
30698 mode attributes.
30699 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
30700 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
30701 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
30702 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
30703 (SVE_COND_FP_CMP): New int iterators.
30704 (perm_hilo): Handle the new unpack unspecs.
30705 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
30706 attributes.
30707 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
30708 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
30709 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
30710 (aarch64_equality_operator, aarch64_constant_vector_operand)
30711 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
30712 (aarch64_sve_nonimmediate_operand): Likewise.
30713 (aarch64_sve_general_operand): Likewise.
30714 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
30715 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
30716 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
30717 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
30718 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
30719 (aarch64_sve_float_arith_immediate): Likewise.
30720 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
30721 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
30722 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
30723 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
30724 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
30725 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
30726 (aarch64_sve_float_arith_operand): Likewise.
30727 (aarch64_sve_float_arith_with_sub_operand): Likewise.
30728 (aarch64_sve_float_mul_operand): Likewise.
30729 (aarch64_sve_vec_perm_operand): Likewise.
30730 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
30731 (aarch64_mov_operand): Accept const_poly_int and const_vector.
30732 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
30733 as well as const_vector.
30734 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
30735 in file. Use CONST0_RTX and CONSTM1_RTX.
30736 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
30737 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
30738 Use aarch64_simd_imm_zero.
30739 * config/aarch64/aarch64-sve.md: New file.
30740 * config/aarch64/aarch64.md: Include it.
30741 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
30742 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
30743 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
30744 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
30745 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
30746 (sve): New attribute.
30747 (enabled): Disable instructions with the sve attribute unless
30748 TARGET_SVE.
30749 (movqi, movhi): Pass CONST_POLY_INT operaneds through
30750 aarch64_expand_mov_immediate.
30751 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
30752 CNT[BHSD] immediates.
30753 (movti): Split CONST_POLY_INT moves into two halves.
30754 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
30755 Split additions that need a temporary here if the destination
30756 is the stack pointer.
30757 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
30758 (*add<mode>3_poly_1): New instruction.
30759 (set_clobber_cc): New expander.
30760
30761 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30762
30763 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
30764 parameter and use it instead of GET_MODE_SIZE (innermode). Use
30765 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
30766 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
30767 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
30768 Change innermode from fixed_mode_size to machine_mode.
30769 (simplify_subreg): Update call accordingly. Handle a constant-sized
30770 subreg of a variable-length CONST_VECTOR.
30771
30772 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30773 Alan Hayward <alan.hayward@arm.com>
30774 David Sherwood <david.sherwood@arm.com>
30775
30776 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
30777 (add_offset_to_base): New function, split out from...
30778 (create_mem_ref): ...here. When handling a scale other than 1,
30779 check first whether the address is valid without the offset.
30780 Add it into the base if so, leaving the index and scale as-is.
30781
30782 2018-01-12 Jakub Jelinek <jakub@redhat.com>
30783
30784 PR c++/83778
30785 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
30786 fold_for_warn before checking if arg2 is INTEGER_CST.
30787
30788 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
30789
30790 * config/rs6000/predicates.md (load_multiple_operation): Delete.
30791 (store_multiple_operation): Delete.
30792 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
30793 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
30794 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
30795 guarded by TARGET_STRING.
30796 (rs6000_output_load_multiple): Delete.
30797 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
30798 OPTION_MASK_STRING / TARGET_STRING handling.
30799 (print_operand) <'N', 'O'>: Add comment that these are unused now.
30800 (const rs6000_opt_masks) <"string">: Change mask to 0.
30801 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
30802 (MASK_STRING): Delete.
30803 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
30804 parts. Simplify.
30805 (load_multiple): Delete.
30806 (*ldmsi8): Delete.
30807 (*ldmsi7): Delete.
30808 (*ldmsi6): Delete.
30809 (*ldmsi5): Delete.
30810 (*ldmsi4): Delete.
30811 (*ldmsi3): Delete.
30812 (store_multiple): Delete.
30813 (*stmsi8): Delete.
30814 (*stmsi7): Delete.
30815 (*stmsi6): Delete.
30816 (*stmsi5): Delete.
30817 (*stmsi4): Delete.
30818 (*stmsi3): Delete.
30819 (movmemsi_8reg): Delete.
30820 (corresponding unnamed define_insn): Delete.
30821 (movmemsi_6reg): Delete.
30822 (corresponding unnamed define_insn): Delete.
30823 (movmemsi_4reg): Delete.
30824 (corresponding unnamed define_insn): Delete.
30825 (movmemsi_2reg): Delete.
30826 (corresponding unnamed define_insn): Delete.
30827 (movmemsi_1reg): Delete.
30828 (corresponding unnamed define_insn): Delete.
30829 * config/rs6000/rs6000.opt (mno-string): New.
30830 (mstring): Replace by deprecation warning stub.
30831 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
30832
30833 2018-01-12 Jakub Jelinek <jakub@redhat.com>
30834
30835 * regrename.c (regrename_do_replace): If replacing the same
30836 reg multiple times, try to reuse last created gen_raw_REG.
30837
30838 PR debug/81155
30839 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
30840 main to workaround a bug in GDB.
30841
30842 2018-01-12 Tom de Vries <tom@codesourcery.com>
30843
30844 PR target/83737
30845 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
30846
30847 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
30848
30849 PR rtl-optimization/80481
30850 * ira-color.c (get_cap_member): New function.
30851 (allocnos_conflict_by_live_ranges_p): Use it.
30852 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
30853 (setup_slot_coalesced_allocno_live_ranges): Ditto.
30854
30855 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
30856
30857 PR target/83628
30858 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
30859 (*saddl_se_1): Ditto.
30860 (*ssubsi_1): Ditto.
30861 (*ssubl_se_1): Ditto.
30862
30863 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
30864
30865 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
30866 rather than wi::to_widest for DR_INITs.
30867 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
30868 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
30869 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
30870 INTEGER_CSTs.
30871 (vect_analyze_group_access_1): Note that here.
30872
30873 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
30874
30875 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
30876 polynomial type sizes.
30877
30878 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
30879
30880 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
30881 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
30882 (gimple_add_tmp_var): Likewise.
30883
30884 2018-01-12 Martin Liska <mliska@suse.cz>
30885
30886 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
30887 (gimple_alloc_sizes): Likewise.
30888 (dump_gimple_statistics): Use PRIu64 in printf format.
30889 * gimple.h: Change uint64_t to int.
30890
30891 2018-01-12 Martin Liska <mliska@suse.cz>
30892
30893 * tree-core.h: Use uint64_t instead of int.
30894 * tree.c (tree_node_counts): Likewise.
30895 (tree_node_sizes): Likewise.
30896 (dump_tree_statistics): Use PRIu64 in printf format.
30897
30898 2018-01-12 Martin Liska <mliska@suse.cz>
30899
30900 * Makefile.in: As qsort_chk is implemented in vec.c, add
30901 vec.o to linkage of gencfn-macros.
30902 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
30903 passing the info to record_node_allocation_statistics.
30904 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
30905 and pass the info.
30906 * ggc-common.c (struct ggc_usage): Add operator== and use
30907 it in operator< and compare function.
30908 * mem-stats.h (struct mem_usage): Likewise.
30909 * vec.c (struct vec_usage): Remove operator< and compare
30910 function. Can be simply inherited.
30911
30912 2018-01-12 Martin Jambor <mjambor@suse.cz>
30913
30914 PR target/81616
30915 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
30916 * tree-ssa-math-opts.c: Include domwalk.h.
30917 (convert_mult_to_fma_1): New function.
30918 (fma_transformation_info): New type.
30919 (fma_deferring_state): Likewise.
30920 (cancel_fma_deferring): New function.
30921 (result_of_phi): Likewise.
30922 (last_fma_candidate_feeds_initial_phi): Likewise.
30923 (convert_mult_to_fma): Added deferring logic, split actual
30924 transformation to convert_mult_to_fma_1.
30925 (math_opts_dom_walker): New type.
30926 (math_opts_dom_walker::after_dom_children): New method, body moved
30927 here from pass_optimize_widening_mul::execute, added deferring logic
30928 bits.
30929 (pass_optimize_widening_mul::execute): Moved most of code to
30930 math_opts_dom_walker::after_dom_children.
30931 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
30932 * config/i386/i386.c (ix86_option_override_internal): Added
30933 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
30934
30935 2018-01-12 Richard Biener <rguenther@suse.de>
30936
30937 PR debug/83157
30938 * dwarf2out.c (gen_variable_die): Do not reset old_die for
30939 inline instance vars.
30940
30941 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
30942
30943 PR target/81819
30944 * config/rx/rx.c (rx_is_restricted_memory_address):
30945 Handle SUBREG case.
30946
30947 2018-01-12 Richard Biener <rguenther@suse.de>
30948
30949 PR tree-optimization/80846
30950 * target.def (split_reduction): New target hook.
30951 * targhooks.c (default_split_reduction): New function.
30952 * targhooks.h (default_split_reduction): Declare.
30953 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
30954 target requests first reduce vectors by combining low and high
30955 parts.
30956 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
30957 (get_vectype_for_scalar_type_and_size): Export.
30958 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
30959 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
30960 * doc/tm.texi: Regenerate.
30961 * config/i386/i386.c (ix86_split_reduction): Implement
30962 TARGET_VECTORIZE_SPLIT_REDUCTION.
30963
30964 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
30965
30966 PR target/83368
30967 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
30968 in PIC mode except for TARGET_VXWORKS_RTP.
30969 * config/sparc/sparc.c: Include cfgrtl.h.
30970 (TARGET_INIT_PIC_REG): Define.
30971 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
30972 (sparc_pic_register_p): New predicate.
30973 (sparc_legitimate_address_p): Use it.
30974 (sparc_legitimize_pic_address): Likewise.
30975 (sparc_delegitimize_address): Likewise.
30976 (sparc_mode_dependent_address_p): Likewise.
30977 (gen_load_pcrel_sym): Remove 4th parameter.
30978 (load_got_register): Adjust call to above. Remove obsolete stuff.
30979 (sparc_expand_prologue): Do not call load_got_register here.
30980 (sparc_flat_expand_prologue): Likewise.
30981 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
30982 (sparc_use_pseudo_pic_reg): New function.
30983 (sparc_init_pic_reg): Likewise.
30984 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
30985 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
30986
30987 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
30988
30989 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
30990 Add item for branch_cost.
30991
30992 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
30993
30994 PR rtl-optimization/83565
30995 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
30996 not extend the result to a larger mode for rotate operations.
30997 (num_sign_bit_copies1): Likewise.
30998
30999 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
31000
31001 PR target/40411
31002 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
31003 -symbolic.
31004 Use values-Xc.o for -pedantic.
31005 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
31006
31007 2018-01-12 Martin Liska <mliska@suse.cz>
31008
31009 PR ipa/83054
31010 * ipa-devirt.c (final_warning_record::grow_type_warnings):
31011 New function.
31012 (possible_polymorphic_call_targets): Use it.
31013 (ipa_devirt): Likewise.
31014
31015 2018-01-12 Martin Liska <mliska@suse.cz>
31016
31017 * profile-count.h (enum profile_quality): Use 0 as invalid
31018 enum value of profile_quality.
31019
31020 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
31021
31022 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
31023 -mext-string options.
31024
31025 2018-01-12 Richard Biener <rguenther@suse.de>
31026
31027 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
31028 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
31029 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
31030 Likewise.
31031 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
31032
31033 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
31034
31035 * configure.ac (--with-long-double-format): Add support for the
31036 configuration option to change the default long double format on
31037 PowerPC systems.
31038 * config.gcc (powerpc*-linux*-*): Likewise.
31039 * configure: Regenerate.
31040 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
31041 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
31042 used without modification.
31043
31044 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31045
31046 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
31047 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
31048 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
31049 MISC_BUILTIN_SPEC_BARRIER.
31050 (rs6000_init_builtins): Likewise.
31051 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
31052 enum value.
31053 (speculation_barrier): New define_insn.
31054 * doc/extend.texi: Document __builtin_speculation_barrier.
31055
31056 2018-01-11 Jakub Jelinek <jakub@redhat.com>
31057
31058 PR target/83203
31059 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
31060 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
31061 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
31062 iterators.
31063 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
31064 integral modes instead of "ss" and "sd".
31065 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
31066 vectors with 32-bit and 64-bit elements.
31067 (vecdupssescalarmodesuffix): New mode attribute.
31068 (vec_dup<mode>): Use it.
31069
31070 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
31071
31072 PR target/83330
31073 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
31074 frame if argument is passed on stack.
31075
31076 2018-01-11 Jakub Jelinek <jakub@redhat.com>
31077
31078 PR target/82682
31079 * ree.c (combine_reaching_defs): Optimize also
31080 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
31081 reg2=any_extend(exp); reg1=reg2;, formatting fix.
31082
31083 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
31084
31085 PR middle-end/83189
31086 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
31087
31088 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
31089
31090 PR middle-end/83718
31091 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
31092 after they are computed.
31093
31094 2018-01-11 Bin Cheng <bin.cheng@arm.com>
31095
31096 PR tree-optimization/83695
31097 * gimple-loop-linterchange.cc
31098 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
31099 reset cached scev information after interchange.
31100 (pass_linterchange::execute): Remove call to scev_reset_htab.
31101
31102 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31103
31104 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
31105 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
31106 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
31107 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
31108 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
31109 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
31110 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
31111 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
31112 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
31113 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
31114 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
31115 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
31116 (V_lane_reg): Likewise.
31117 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
31118 New define_expand.
31119 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
31120 (vfmal_lane_low<mode>_intrinsic,
31121 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
31122 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
31123 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
31124 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
31125 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
31126 vfmsl_lane_high<mode>_intrinsic): New define_insns.
31127
31128 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31129
31130 * config/arm/arm-cpus.in (fp16fml): New feature.
31131 (ALL_SIMD): Add fp16fml.
31132 (armv8.2-a): Add fp16fml as an option.
31133 (armv8.3-a): Likewise.
31134 (armv8.4-a): Add fp16fml as part of fp16.
31135 * config/arm/arm.h (TARGET_FP16FML): Define.
31136 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
31137 when appropriate.
31138 * config/arm/arm-modes.def (V2HF): Define.
31139 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
31140 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
31141 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
31142 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
31143 vfmsl_low, vfmsl_high): New set of builtins.
31144 * config/arm/iterators.md (PLUSMINUS): New code iterator.
31145 (vfml_op): New code attribute.
31146 (VFMLHALVES): New int iterator.
31147 (VFML, VFMLSEL): New mode attributes.
31148 (V_reg): Define mapping for V2HF.
31149 (V_hi, V_lo): New mode attributes.
31150 (VF_constraint): Likewise.
31151 (vfml_half, vfml_half_selector): New int attributes.
31152 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
31153 define_expand.
31154 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
31155 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
31156 New define_insn.
31157 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
31158 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
31159 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
31160 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
31161 documentation.
31162 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
31163 Document new effective target and option set.
31164
31165 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31166
31167 * config/arm/arm-cpus.in (armv8_4): New feature.
31168 (ARMv8_4a): New fgroup.
31169 (armv8.4-a): New arch.
31170 * config/arm/arm-tables.opt: Regenerate.
31171 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
31172 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
31173 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
31174 Add matching rules for -march=armv8.4-a and extensions.
31175 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
31176
31177 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
31178
31179 PR target/81821
31180 * config/rx/rx.md (BW): New mode attribute.
31181 (sync_lock_test_and_setsi): Add mode suffix to insn output.
31182
31183 2018-01-11 Richard Biener <rguenther@suse.de>
31184
31185 PR tree-optimization/83435
31186 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
31187 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
31188 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
31189
31190 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31191 Alan Hayward <alan.hayward@arm.com>
31192 David Sherwood <david.sherwood@arm.com>
31193
31194 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
31195 field.
31196 (aarch64_classify_address): Initialize it. Track polynomial offsets.
31197 (aarch64_print_address_internal): Use it to check for a zero offset.
31198
31199 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31200 Alan Hayward <alan.hayward@arm.com>
31201 David Sherwood <david.sherwood@arm.com>
31202
31203 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
31204 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
31205 Return a poly_int64 rather than a HOST_WIDE_INT.
31206 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
31207 rather than a HOST_WIDE_INT.
31208 * config/aarch64/aarch64.h (aarch64_frame): Protect with
31209 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
31210 hard_fp_offset, frame_size, initial_adjust, callee_offset and
31211 final_offset from HOST_WIDE_INT to poly_int64.
31212 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
31213 to_constant when getting the number of units in an Advanced SIMD
31214 mode.
31215 (aarch64_builtin_vectorized_function): Check for a constant number
31216 of units.
31217 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
31218 GET_MODE_SIZE.
31219 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
31220 attribute instead of GET_MODE_NUNITS.
31221 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
31222 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
31223 GET_MODE_SIZE for fixed-size registers.
31224 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
31225 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
31226 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
31227 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
31228 (aarch64_print_operand, aarch64_print_address_internal)
31229 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
31230 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
31231 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
31232 Handle polynomial GET_MODE_SIZE.
31233 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
31234 wider than SImode without modification.
31235 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
31236 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
31237 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
31238 passing and returning SVE modes.
31239 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
31240 rather than GEN_INT.
31241 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
31242 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
31243 (aarch64_allocate_and_probe_stack_space): Likewise.
31244 (aarch64_layout_frame): Cope with polynomial offsets.
31245 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
31246 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
31247 polynomial offsets.
31248 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
31249 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
31250 poly_int64 rather than a HOST_WIDE_INT.
31251 (aarch64_get_separate_components, aarch64_process_components)
31252 (aarch64_expand_prologue, aarch64_expand_epilogue)
31253 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
31254 (aarch64_anchor_offset): New function, split out from...
31255 (aarch64_legitimize_address): ...here.
31256 (aarch64_builtin_vectorization_cost): Handle polynomial
31257 TYPE_VECTOR_SUBPARTS.
31258 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
31259 GET_MODE_NUNITS.
31260 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
31261 number of elements from the PARALLEL rather than the mode.
31262 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
31263 rather than GET_MODE_BITSIZE.
31264 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
31265 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
31266 (aarch64_expand_vec_perm_const_1): Handle polynomial
31267 d->perm.length () and d->perm elements.
31268 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
31269 Apply to_constant to d->perm elements.
31270 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
31271 polynomial CONST_VECTOR_NUNITS.
31272 (aarch64_move_pointer): Take amount as a poly_int64 rather
31273 than an int.
31274 (aarch64_progress_pointer): Avoid temporary variable.
31275 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
31276 the mode attribute instead of GET_MODE.
31277
31278 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31279 Alan Hayward <alan.hayward@arm.com>
31280 David Sherwood <david.sherwood@arm.com>
31281
31282 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
31283 x exists before using it.
31284 (aarch64_add_constant_internal): Rename to...
31285 (aarch64_add_offset_1): ...this. Replace regnum with separate
31286 src and dest rtxes. Handle the case in which they're different,
31287 including when the offset is zero. Replace scratchreg with an rtx.
31288 Use 2 additions if there is no spare register into which we can
31289 move a 16-bit constant.
31290 (aarch64_add_constant): Delete.
31291 (aarch64_add_offset): Replace reg with separate src and dest
31292 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
31293 Use aarch64_add_offset_1.
31294 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
31295 an rtx rather than an int. Take the delta as a poly_int64
31296 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
31297 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
31298 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
31299 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
31300 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
31301 and aarch64_add_sp.
31302 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
31303 aarch64_add_constant.
31304
31305 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31306
31307 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
31308 Use scalar_float_mode.
31309
31310 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31311
31312 * config/aarch64/aarch64-simd.md
31313 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
31314 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
31315 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
31316 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
31317 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
31318 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
31319 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
31320 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
31321 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
31322 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
31323
31324 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31325
31326 PR target/83514
31327 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
31328 targ_options->x_arm_arch_string is non NULL.
31329
31330 2018-01-11 Tamar Christina <tamar.christina@arm.com>
31331
31332 * config/aarch64/aarch64.h
31333 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
31334
31335 2018-01-11 Sudakshina Das <sudi.das@arm.com>
31336
31337 PR target/82096
31338 * expmed.c (emit_store_flag_force): Swap if const op0
31339 and change VOIDmode to mode of op0.
31340
31341 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31342
31343 PR rtl-optimization/83761
31344 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
31345 than bytes to mode_for_size.
31346
31347 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
31348
31349 PR middle-end/83189
31350 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
31351 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
31352 profile.
31353
31354 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
31355
31356 PR middle-end/83575
31357 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
31358 when in layout mode.
31359 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
31360 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
31361 partition fixup.
31362
31363 2018-01-10 Michael Collison <michael.collison@arm.com>
31364
31365 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
31366 * config/aarch64/aarch64-option-extension.def: Add
31367 AARCH64_OPT_EXTENSION of 'fp16fml'.
31368 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31369 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
31370 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
31371 * config/aarch64/constraints.md (Ui7): New constraint.
31372 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
31373 (VFMLA_SEL_W): Ditto.
31374 (f16quad): Ditto.
31375 (f16mac1): Ditto.
31376 (VFMLA16_LOW): New int iterator.
31377 (VFMLA16_HIGH): Ditto.
31378 (UNSPEC_FMLAL): New unspec.
31379 (UNSPEC_FMLSL): Ditto.
31380 (UNSPEC_FMLAL2): Ditto.
31381 (UNSPEC_FMLSL2): Ditto.
31382 (f16mac): New code attribute.
31383 * config/aarch64/aarch64-simd-builtins.def
31384 (aarch64_fmlal_lowv2sf): Ditto.
31385 (aarch64_fmlsl_lowv2sf): Ditto.
31386 (aarch64_fmlalq_lowv4sf): Ditto.
31387 (aarch64_fmlslq_lowv4sf): Ditto.
31388 (aarch64_fmlal_highv2sf): Ditto.
31389 (aarch64_fmlsl_highv2sf): Ditto.
31390 (aarch64_fmlalq_highv4sf): Ditto.
31391 (aarch64_fmlslq_highv4sf): Ditto.
31392 (aarch64_fmlal_lane_lowv2sf): Ditto.
31393 (aarch64_fmlsl_lane_lowv2sf): Ditto.
31394 (aarch64_fmlal_laneq_lowv2sf): Ditto.
31395 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
31396 (aarch64_fmlalq_lane_lowv4sf): Ditto.
31397 (aarch64_fmlsl_lane_lowv4sf): Ditto.
31398 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
31399 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
31400 (aarch64_fmlal_lane_highv2sf): Ditto.
31401 (aarch64_fmlsl_lane_highv2sf): Ditto.
31402 (aarch64_fmlal_laneq_highv2sf): Ditto.
31403 (aarch64_fmlsl_laneq_highv2sf): Ditto.
31404 (aarch64_fmlalq_lane_highv4sf): Ditto.
31405 (aarch64_fmlsl_lane_highv4sf): Ditto.
31406 (aarch64_fmlalq_laneq_highv4sf): Ditto.
31407 (aarch64_fmlsl_laneq_highv4sf): Ditto.
31408 * config/aarch64/aarch64-simd.md:
31409 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
31410 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
31411 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
31412 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
31413 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
31414 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
31415 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
31416 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
31417 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
31418 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
31419 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
31420 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
31421 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
31422 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
31423 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
31424 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
31425 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
31426 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
31427 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
31428 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
31429 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
31430 (vfmlsl_low_u32): Ditto.
31431 (vfmlalq_low_u32): Ditto.
31432 (vfmlslq_low_u32): Ditto.
31433 (vfmlal_high_u32): Ditto.
31434 (vfmlsl_high_u32): Ditto.
31435 (vfmlalq_high_u32): Ditto.
31436 (vfmlslq_high_u32): Ditto.
31437 (vfmlal_lane_low_u32): Ditto.
31438 (vfmlsl_lane_low_u32): Ditto.
31439 (vfmlal_laneq_low_u32): Ditto.
31440 (vfmlsl_laneq_low_u32): Ditto.
31441 (vfmlalq_lane_low_u32): Ditto.
31442 (vfmlslq_lane_low_u32): Ditto.
31443 (vfmlalq_laneq_low_u32): Ditto.
31444 (vfmlslq_laneq_low_u32): Ditto.
31445 (vfmlal_lane_high_u32): Ditto.
31446 (vfmlsl_lane_high_u32): Ditto.
31447 (vfmlal_laneq_high_u32): Ditto.
31448 (vfmlsl_laneq_high_u32): Ditto.
31449 (vfmlalq_lane_high_u32): Ditto.
31450 (vfmlslq_lane_high_u32): Ditto.
31451 (vfmlalq_laneq_high_u32): Ditto.
31452 (vfmlslq_laneq_high_u32): Ditto.
31453 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
31454 (AARCH64_FL_FOR_ARCH8_4): New.
31455 (AARCH64_ISA_F16FML): New ISA flag.
31456 (TARGET_F16FML): New feature flag for fp16fml.
31457 (doc/invoke.texi): Document new fp16fml option.
31458
31459 2018-01-10 Michael Collison <michael.collison@arm.com>
31460
31461 * config/aarch64/aarch64-builtins.c:
31462 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
31463 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31464 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
31465 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
31466 (AARCH64_ISA_SHA3): New ISA flag.
31467 (TARGET_SHA3): New feature flag for sha3.
31468 * config/aarch64/iterators.md (sha512_op): New int attribute.
31469 (CRYPTO_SHA512): New int iterator.
31470 (UNSPEC_SHA512H): New unspec.
31471 (UNSPEC_SHA512H2): Ditto.
31472 (UNSPEC_SHA512SU0): Ditto.
31473 (UNSPEC_SHA512SU1): Ditto.
31474 * config/aarch64/aarch64-simd-builtins.def
31475 (aarch64_crypto_sha512hqv2di): New builtin.
31476 (aarch64_crypto_sha512h2qv2di): Ditto.
31477 (aarch64_crypto_sha512su0qv2di): Ditto.
31478 (aarch64_crypto_sha512su1qv2di): Ditto.
31479 (aarch64_eor3qv8hi): Ditto.
31480 (aarch64_rax1qv2di): Ditto.
31481 (aarch64_xarqv2di): Ditto.
31482 (aarch64_bcaxqv8hi): Ditto.
31483 * config/aarch64/aarch64-simd.md:
31484 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
31485 (aarch64_crypto_sha512su0qv2di): Ditto.
31486 (aarch64_crypto_sha512su1qv2di): Ditto.
31487 (aarch64_eor3qv8hi): Ditto.
31488 (aarch64_rax1qv2di): Ditto.
31489 (aarch64_xarqv2di): Ditto.
31490 (aarch64_bcaxqv8hi): Ditto.
31491 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
31492 (vsha512h2q_u64): Ditto.
31493 (vsha512su0q_u64): Ditto.
31494 (vsha512su1q_u64): Ditto.
31495 (veor3q_u16): Ditto.
31496 (vrax1q_u64): Ditto.
31497 (vxarq_u64): Ditto.
31498 (vbcaxq_u16): Ditto.
31499 * config/arm/types.md (crypto_sha512): New type attribute.
31500 (crypto_sha3): Ditto.
31501 (doc/invoke.texi): Document new sha3 option.
31502
31503 2018-01-10 Michael Collison <michael.collison@arm.com>
31504
31505 * config/aarch64/aarch64-builtins.c:
31506 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
31507 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31508 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
31509 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
31510 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
31511 (AARCH64_ISA_SM4): New ISA flag.
31512 (TARGET_SM4): New feature flag for sm4.
31513 * config/aarch64/aarch64-simd-builtins.def
31514 (aarch64_sm3ss1qv4si): Ditto.
31515 (aarch64_sm3tt1aq4si): Ditto.
31516 (aarch64_sm3tt1bq4si): Ditto.
31517 (aarch64_sm3tt2aq4si): Ditto.
31518 (aarch64_sm3tt2bq4si): Ditto.
31519 (aarch64_sm3partw1qv4si): Ditto.
31520 (aarch64_sm3partw2qv4si): Ditto.
31521 (aarch64_sm4eqv4si): Ditto.
31522 (aarch64_sm4ekeyqv4si): Ditto.
31523 * config/aarch64/aarch64-simd.md:
31524 (aarch64_sm3ss1qv4si): Ditto.
31525 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
31526 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
31527 (aarch64_sm4eqv4si): Ditto.
31528 (aarch64_sm4ekeyqv4si): Ditto.
31529 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
31530 (sm3part_op): Ditto.
31531 (CRYPTO_SM3TT): Ditto.
31532 (CRYPTO_SM3PART): Ditto.
31533 (UNSPEC_SM3SS1): New unspec.
31534 (UNSPEC_SM3TT1A): Ditto.
31535 (UNSPEC_SM3TT1B): Ditto.
31536 (UNSPEC_SM3TT2A): Ditto.
31537 (UNSPEC_SM3TT2B): Ditto.
31538 (UNSPEC_SM3PARTW1): Ditto.
31539 (UNSPEC_SM3PARTW2): Ditto.
31540 (UNSPEC_SM4E): Ditto.
31541 (UNSPEC_SM4EKEY): Ditto.
31542 * config/aarch64/constraints.md (Ui2): New constraint.
31543 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
31544 * config/arm/types.md (crypto_sm3): New type attribute.
31545 (crypto_sm4): Ditto.
31546 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
31547 (vsm3tt1aq_u32): Ditto.
31548 (vsm3tt1bq_u32): Ditto.
31549 (vsm3tt2aq_u32): Ditto.
31550 (vsm3tt2bq_u32): Ditto.
31551 (vsm3partw1q_u32): Ditto.
31552 (vsm3partw2q_u32): Ditto.
31553 (vsm4eq_u32): Ditto.
31554 (vsm4ekeyq_u32): Ditto.
31555 (doc/invoke.texi): Document new sm4 option.
31556
31557 2018-01-10 Michael Collison <michael.collison@arm.com>
31558
31559 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
31560 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
31561 (AARCH64_FL_FOR_ARCH8_4): New.
31562 (AARCH64_FL_V8_4): New flag.
31563 (doc/invoke.texi): Document new armv8.4-a option.
31564
31565 2018-01-10 Michael Collison <michael.collison@arm.com>
31566
31567 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31568 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
31569 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
31570 * config/aarch64/aarch64-option-extension.def: Add
31571 AARCH64_OPT_EXTENSION of 'sha2'.
31572 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
31573 (crypto): Disable sha2 and aes if crypto disabled.
31574 (crypto): Enable aes and sha2 if enabled.
31575 (simd): Disable sha2 and aes if simd disabled.
31576 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
31577 New flags.
31578 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
31579 (TARGET_SHA2): New feature flag for sha2.
31580 (TARGET_AES): New feature flag for aes.
31581 * config/aarch64/aarch64-simd.md:
31582 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
31583 conditional on TARGET_AES.
31584 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
31585 (aarch64_crypto_sha1hsi): Make pattern conditional
31586 on TARGET_SHA2.
31587 (aarch64_crypto_sha1hv4si): Ditto.
31588 (aarch64_be_crypto_sha1hv4si): Ditto.
31589 (aarch64_crypto_sha1su1v4si): Ditto.
31590 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
31591 (aarch64_crypto_sha1su0v4si): Ditto.
31592 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
31593 (aarch64_crypto_sha256su0v4si): Ditto.
31594 (aarch64_crypto_sha256su1v4si): Ditto.
31595 (doc/invoke.texi): Document new aes and sha2 options.
31596
31597 2018-01-10 Martin Sebor <msebor@redhat.com>
31598
31599 PR tree-optimization/83781
31600 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
31601 as string arrays.
31602
31603 2018-01-11 Martin Sebor <msebor@gmail.com>
31604 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31605
31606 PR tree-optimization/83501
31607 PR tree-optimization/81703
31608
31609 * tree-ssa-strlen.c (get_string_cst): Rename...
31610 (get_string_len): ...to this. Handle global constants.
31611 (handle_char_store): Adjust.
31612
31613 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
31614 Jim Wilson <jimw@sifive.com>
31615
31616 * config/riscv/riscv-protos.h (riscv_output_return): New.
31617 * config/riscv/riscv.c (struct machine_function): New naked_p field.
31618 (riscv_attribute_table, riscv_output_return),
31619 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
31620 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
31621 (riscv_compute_frame_info): Only compute frame->mask if not a naked
31622 function.
31623 (riscv_expand_prologue): Add early return for naked function.
31624 (riscv_expand_epilogue): Likewise.
31625 (riscv_function_ok_for_sibcall): Return false for naked function.
31626 (riscv_set_current_function): New.
31627 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
31628 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
31629 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
31630 * doc/extend.texi (RISC-V Function Attributes): New.
31631
31632 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
31633
31634 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
31635 check for 128-bit long double before checking TCmode.
31636 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
31637 128-bit long doubles before checking TFmode or TCmode.
31638 (FLOAT128_IBM_P): Likewise.
31639
31640 2018-01-10 Martin Sebor <msebor@redhat.com>
31641
31642 PR tree-optimization/83671
31643 * builtins.c (c_strlen): Unconditionally return zero for the empty
31644 string.
31645 Use -Warray-bounds for warnings.
31646 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
31647 for non-constant array indices with COMPONENT_REF, arrays of
31648 arrays, and pointers to arrays.
31649 (gimple_fold_builtin_strlen): Determine and set length range for
31650 non-constant character arrays.
31651
31652 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
31653
31654 PR middle-end/81897
31655 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
31656 empty blocks.
31657
31658 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
31659
31660 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
31661
31662 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
31663
31664 PR target/83399
31665 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
31666 VECTOR_MEM_ALTIVEC_OR_VSX_P.
31667 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
31668 indexed_or_indirect_operand predicate.
31669 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
31670 (*vsx_le_perm_load_v8hi): Likewise.
31671 (*vsx_le_perm_load_v16qi): Likewise.
31672 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
31673 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
31674 (*vsx_le_perm_store_v8hi): Likewise.
31675 (*vsx_le_perm_store_v16qi): Likewise.
31676 (eight unnamed splitters): Likewise.
31677
31678 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
31679
31680 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
31681 * config/rs6000/emmintrin.h: Likewise.
31682 * config/rs6000/mmintrin.h: Likewise.
31683 * config/rs6000/xmmintrin.h: Likewise.
31684
31685 2018-01-10 David Malcolm <dmalcolm@redhat.com>
31686
31687 PR c++/43486
31688 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
31689 "public_flag".
31690 * tree.c (tree_nop_conversion): Return true for location wrapper
31691 nodes.
31692 (maybe_wrap_with_location): New function.
31693 (selftest::check_strip_nops): New function.
31694 (selftest::test_location_wrappers): New function.
31695 (selftest::tree_c_tests): Call it.
31696 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
31697 (maybe_wrap_with_location): New decl.
31698 (EXPR_LOCATION_WRAPPER_P): New macro.
31699 (location_wrapper_p): New inline function.
31700 (tree_strip_any_location_wrapper): New inline function.
31701
31702 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
31703
31704 PR target/83735
31705 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
31706 stack_realign_offset for the largest alignment of stack slot
31707 actually used.
31708 (ix86_find_max_used_stack_alignment): New function.
31709 (ix86_finalize_stack_frame_flags): Use it. Set
31710 max_used_stack_alignment if we don't realign stack.
31711 * config/i386/i386.h (machine_function): Add
31712 max_used_stack_alignment.
31713
31714 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
31715
31716 * config/arm/arm.opt (-mbranch-cost): New option.
31717 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
31718 account.
31719
31720 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
31721
31722 PR target/83629
31723 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
31724 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
31725
31726 2018-01-10 Richard Biener <rguenther@suse.de>
31727
31728 PR debug/83765
31729 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
31730 early out so it also covers the case where we have a non-NULL
31731 origin.
31732
31733 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
31734
31735 PR tree-optimization/83753
31736 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
31737 for non-strided grouped accesses if the number of elements is 1.
31738
31739 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
31740
31741 PR target/81616
31742 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
31743 * i386.h (TARGET_USE_GATHER): Define.
31744 * x86-tune.def (X86_TUNE_USE_GATHER): New.
31745
31746 2018-01-10 Martin Liska <mliska@suse.cz>
31747
31748 PR bootstrap/82831
31749 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
31750 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
31751 partitioning.
31752 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
31753 CLEANUP_NO_PARTITIONING is not set.
31754
31755 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
31756
31757 * doc/rtl.texi: Remove documentation of (const ...) wrappers
31758 for vectors, as a partial revert of r254296.
31759 * rtl.h (const_vec_p): Delete.
31760 (const_vec_duplicate_p): Don't test for vector CONSTs.
31761 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
31762 * expmed.c (make_tree): Likewise.
31763
31764 Revert:
31765 * common.md (E, F): Use CONSTANT_P instead of checking for
31766 CONST_VECTOR.
31767 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
31768 checking for CONST_VECTOR.
31769
31770 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
31771
31772 PR middle-end/83575
31773 * predict.c (force_edge_cold): Handle in more sane way edges
31774 with no prediction.
31775
31776 2018-01-09 Carl Love <cel@us.ibm.com>
31777
31778 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
31779 V4SI, V4SF types.
31780 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
31781 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
31782 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
31783 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
31784 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
31785 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
31786 * config/rs6000/rs6000-protos.h: Add extern defition for
31787 rs6000_generate_float2_double_code.
31788 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
31789 function.
31790 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
31791 (float2_v2df): Add define_expand.
31792
31793 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
31794
31795 PR target/83628
31796 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
31797 op_mode in the force_to_mode call.
31798
31799 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
31800
31801 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
31802 instead of checking each element individually.
31803 (aarch64_evpc_uzp): Likewise.
31804 (aarch64_evpc_zip): Likewise.
31805 (aarch64_evpc_ext): Likewise.
31806 (aarch64_evpc_rev): Likewise.
31807 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
31808 instead of checking each element individually. Return true without
31809 generating rtl if
31810 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
31811 whether all selected elements come from the same input, instead of
31812 checking each element individually. Remove calls to gen_rtx_REG,
31813 start_sequence and end_sequence and instead assert that no rtl is
31814 generated.
31815
31816 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
31817
31818 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
31819 order of HIGH and CONST checks.
31820
31821 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
31822
31823 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
31824 if the destination isn't an SSA_NAME.
31825
31826 2018-01-09 Richard Biener <rguenther@suse.de>
31827
31828 PR tree-optimization/83668
31829 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
31830 move prologue...
31831 (canonicalize_loop_form): ... here, renamed from ...
31832 (canonicalize_loop_closed_ssa_form): ... this and amended to
31833 swap successor edges for loop exit blocks to make us use
31834 the RPO order we need for initial schedule generation.
31835
31836 2018-01-09 Joseph Myers <joseph@codesourcery.com>
31837
31838 PR tree-optimization/64811
31839 * match.pd: When optimizing comparisons with Inf, avoid
31840 introducing or losing exceptions from comparisons with NaN.
31841
31842 2018-01-09 Martin Liska <mliska@suse.cz>
31843
31844 PR sanitizer/82517
31845 * asan.c (shadow_mem_size): Add gcc_assert.
31846
31847 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
31848
31849 Don't save registers in main().
31850
31851 PR target/83738
31852 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
31853 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
31854 * config/avr/avr.c (avr_set_current_function): Don't error if
31855 naked, OS_task or OS_main are specified at the same time.
31856 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
31857 OS_main.
31858 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
31859 attribute.
31860 * common/config/avr/avr-common.c (avr_option_optimization_table):
31861 Switch on -mmain-is-OS_task for optimizing compilations.
31862
31863 2018-01-09 Richard Biener <rguenther@suse.de>
31864
31865 PR tree-optimization/83572
31866 * graphite.c: Include cfganal.h.
31867 (graphite_transform_loops): Connect infinite loops to exit
31868 and remove fake edges at the end.
31869
31870 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
31871
31872 * ipa-inline.c (edge_badness): Revert accidental checkin.
31873
31874 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
31875
31876 PR ipa/80763
31877 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
31878 symbols; not inline clones.
31879
31880 2018-01-09 Jakub Jelinek <jakub@redhat.com>
31881
31882 PR target/83507
31883 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
31884 hard registers. Formatting fixes.
31885
31886 PR preprocessor/83722
31887 * gcc.c (try_generate_repro): Pass
31888 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
31889 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
31890 do_report_bug.
31891
31892 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
31893 Kito Cheng <kito.cheng@gmail.com>
31894
31895 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
31896 (riscv_leaf_function_p): Delete.
31897 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
31898
31899 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31900
31901 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
31902 function.
31903 (do_ifelse): New function.
31904 (do_isel): New function.
31905 (do_sub3): New function.
31906 (do_add3): New function.
31907 (do_load_mask_compare): New function.
31908 (do_overlap_load_compare): New function.
31909 (expand_compare_loop): New function.
31910 (expand_block_compare): Call expand_compare_loop() when appropriate.
31911 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
31912 option description.
31913 (-mblock-compare-inline-loop-limit): New option.
31914
31915 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31916
31917 PR target/83677
31918 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
31919 Reverse order of second and third operands in first alternative.
31920 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
31921 of first and second elements in UNSPEC_VPERMR vector.
31922 (altivec_expand_vec_perm_le): Likewise.
31923
31924 2018-01-08 Jeff Law <law@redhat.com>
31925
31926 PR rtl-optimizatin/81308
31927 * tree-switch-conversion.c (cfg_altered): New file scoped static.
31928 (process_switch): If group_case_labels makes a change, then set
31929 cfg_altered.
31930 (pass_convert_switch::execute): If a switch is converted, then
31931 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
31932
31933 PR rtl-optimization/81308
31934 * recog.c (split_all_insns): Conditionally cleanup the CFG after
31935 splitting insns.
31936
31937 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
31938
31939 PR target/83663 - Revert r255946
31940 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
31941 generation for cases where splatting a value is not useful.
31942 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
31943 across a vec_duplicate and a paradoxical subreg forming a vector
31944 mode to a vec_concat.
31945
31946 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31947
31948 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
31949 -march=armv8.3-a variants.
31950 * config/arm/t-multilib: Likewise.
31951 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
31952
31953 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31954
31955 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
31956 to generate rtl.
31957 (cceq_ior_compare_complement): Give it a name so I can use it, and
31958 change boolean_or_operator predicate to boolean_operator so it can
31959 be used to generate a crand.
31960 (eqne): New code iterator.
31961 (bd/bd_neg): New code_attrs.
31962 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
31963 a single define_insn.
31964 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
31965 decrement (bdnzt/bdnzf/bdzt/bdzf).
31966 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
31967 with the new names of the branch decrement patterns, and added the
31968 names of the branch decrement conditional patterns.
31969
31970 2018-01-08 Richard Biener <rguenther@suse.de>
31971
31972 PR tree-optimization/83563
31973 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
31974 cache.
31975
31976 2018-01-08 Richard Biener <rguenther@suse.de>
31977
31978 PR middle-end/83713
31979 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
31980
31981 2018-01-08 Richard Biener <rguenther@suse.de>
31982
31983 PR tree-optimization/83685
31984 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
31985 references to abnormals.
31986
31987 2018-01-08 Richard Biener <rguenther@suse.de>
31988
31989 PR lto/83719
31990 * dwarf2out.c (output_indirect_strings): Handle empty
31991 skeleton_debug_str_hash.
31992 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
31993
31994 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
31995
31996 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
31997 (emit_store_direct): Likewise.
31998 (arc_trampoline_adjust_address): Likewise.
31999 (arc_asm_trampoline_template): New function.
32000 (arc_initialize_trampoline): Use asm_trampoline_template.
32001 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
32002 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
32003 * config/arc/arc.md (flush_icache): Delete pattern.
32004
32005 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
32006
32007 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
32008 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
32009 munaligned-access.
32010
32011 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
32012
32013 PR target/83681
32014 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
32015 by not USED_FOR_TARGET.
32016 (make_pass_resolve_sw_modes): Likewise.
32017
32018 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
32019
32020 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
32021 USED_FOR_TARGET.
32022
32023 2018-01-08 Richard Biener <rguenther@suse.de>
32024
32025 PR middle-end/83580
32026 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
32027
32028 2018-01-08 Richard Biener <rguenther@suse.de>
32029
32030 PR middle-end/83517
32031 * match.pd ((t * 2) / 2) -> t): Add missing :c.
32032
32033 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
32034
32035 PR middle-end/81897
32036 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
32037 basic blocks with a small number of successors.
32038 (convert_control_dep_chain_into_preds): Improve handling of
32039 forwarder blocks.
32040 (dump_predicates): Split apart into...
32041 (dump_pred_chain): ...here...
32042 (dump_pred_info): ...and here.
32043 (can_one_predicate_be_invalidated_p): Add debugging printfs.
32044 (can_chain_union_be_invalidated_p): Improve check for invalidation
32045 of paths.
32046 (uninit_uses_cannot_happen): Avoid unnecessary if
32047 convert_control_dep_chain_into_preds yielded nothing.
32048
32049 2018-01-06 Martin Sebor <msebor@redhat.com>
32050
32051 PR tree-optimization/83640
32052 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
32053 subtracting negative offset from size.
32054 (builtin_access::overlap): Adjust offset bounds of the access to fall
32055 within the size of the object if possible.
32056
32057 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
32058
32059 PR rtl-optimization/83699
32060 * expmed.c (extract_bit_field_1): Restrict the vector usage of
32061 extract_bit_field_as_subreg to cases in which the extracted
32062 value is also a vector.
32063
32064 * lra-constraints.c (process_alt_operands): Test for the equivalence
32065 substitutions when detecting a possible reload cycle.
32066
32067 2018-01-06 Jakub Jelinek <jakub@redhat.com>
32068
32069 PR debug/83480
32070 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
32071 by default if flag_selective_schedling{,2}. Formatting fixes.
32072
32073 PR rtl-optimization/83682
32074 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
32075 if it has non-VECTOR_MODE element mode.
32076 (vec_duplicate_p): Likewise.
32077
32078 PR middle-end/83694
32079 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
32080 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
32081
32082 2018-01-05 Jakub Jelinek <jakub@redhat.com>
32083
32084 PR target/83604
32085 * config/i386/i386-builtin.def
32086 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
32087 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
32088 Require also OPTION_MASK_ISA_AVX512F in addition to
32089 OPTION_MASK_ISA_GFNI.
32090 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
32091 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
32092 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
32093 to OPTION_MASK_ISA_GFNI.
32094 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
32095 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
32096 OPTION_MASK_ISA_AVX512BW.
32097 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
32098 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
32099 addition to OPTION_MASK_ISA_GFNI.
32100 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
32101 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
32102 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
32103 to OPTION_MASK_ISA_GFNI.
32104 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
32105 a requirement for all ISAs rather than any of them with a few
32106 exceptions.
32107 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
32108 processing.
32109 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
32110 bitmasks to be enabled with 3 exceptions, instead of requiring any
32111 enabled ISA with lots of exceptions.
32112 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
32113 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
32114 Change avx512bw in isa attribute to avx512f.
32115 * config/i386/sgxintrin.h: Add license boilerplate.
32116 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
32117 to __AVX512F__ and __AVX512VL to __AVX512VL__.
32118 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
32119 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
32120 defined.
32121 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
32122 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
32123 temporarily sse2 rather than sse if not enabled already.
32124
32125 PR target/83604
32126 * config/i386/sse.md (VI248_VLBW): Rename to ...
32127 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
32128 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
32129 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
32130 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
32131 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
32132 mode iterator instead of VI248_VLBW.
32133
32134 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
32135
32136 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
32137 (record_modified): Skip clobbers; add debug output.
32138 (param_change_prob): Use sreal frequencies.
32139
32140 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
32141
32142 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
32143 punt for user-aligned variables.
32144
32145 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
32146
32147 * tree-chrec.c (chrec_contains_symbols): Return true for
32148 POLY_INT_CST.
32149
32150 2018-01-05 Sudakshina Das <sudi.das@arm.com>
32151
32152 PR target/82439
32153 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
32154 of (x|y) == x for BICS pattern.
32155
32156 2018-01-05 Jakub Jelinek <jakub@redhat.com>
32157
32158 PR tree-optimization/83605
32159 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
32160 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
32161 can throw.
32162
32163 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
32164
32165 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
32166 * config/epiphany/rtems.h: New file.
32167
32168 2018-01-04 Jakub Jelinek <jakub@redhat.com>
32169 Uros Bizjak <ubizjak@gmail.com>
32170
32171 PR target/83554
32172 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
32173 QIreg_operand instead of register_operand predicate.
32174 * config/i386/i386.c (ix86_rop_should_change_byte_p,
32175 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
32176 comments instead of -fmitigate[-_]rop.
32177
32178 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
32179
32180 PR bootstrap/81926
32181 * cgraphunit.c (symbol_table::compile): Switch to text_section
32182 before calling assembly_start debug hook.
32183 * run-rtl-passes.c (run_rtl_passes): Likewise.
32184 Include output.h.
32185
32186 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32187
32188 * tree-vrp.c (extract_range_from_binary_expr_1): Check
32189 range_int_cst_p rather than !symbolic_range_p before calling
32190 extract_range_from_multiplicative_op_1.
32191
32192 2018-01-04 Jeff Law <law@redhat.com>
32193
32194 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
32195 redundant test in assertion.
32196
32197 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32198
32199 * doc/rtl.texi: Document machine_mode wrapper classes.
32200
32201 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32202
32203 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
32204 using tree_to_uhwi.
32205
32206 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32207
32208 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
32209 the VEC_PERM_EXPR fold to fail.
32210
32211 2018-01-04 Jakub Jelinek <jakub@redhat.com>
32212
32213 PR debug/83585
32214 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
32215 to switched_sections.
32216
32217 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32218
32219 PR target/83680
32220 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
32221 test for d.testing.
32222
32223 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
32224
32225 PR target/83387
32226 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
32227 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
32228
32229 2018-01-04 Jakub Jelinek <jakub@redhat.com>
32230
32231 PR debug/83666
32232 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
32233 is BLKmode and bitpos not zero or mode change is needed.
32234
32235 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32236
32237 PR target/83675
32238 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
32239 TARGET_VIS2.
32240
32241 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
32242
32243 PR target/83628
32244 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
32245 instead of MULT rtx. Update all corresponding splitters.
32246 (*saddl_se): Ditto.
32247 (*ssub<modesuffix>): Ditto.
32248 (*ssubl_se): Ditto.
32249 (*cmp_sadd_di): Update split patterns.
32250 (*cmp_sadd_si): Ditto.
32251 (*cmp_sadd_sidi): Ditto.
32252 (*cmp_ssub_di): Ditto.
32253 (*cmp_ssub_si): Ditto.
32254 (*cmp_ssub_sidi): Ditto.
32255 * config/alpha/predicates.md (const23_operand): New predicate.
32256 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
32257 Look for ASHIFT, not MULT inner operand.
32258 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
32259
32260 2018-01-04 Martin Liska <mliska@suse.cz>
32261
32262 PR gcov-profile/83669
32263 * gcov.c (output_intermediate_file): Add version to intermediate
32264 gcov file.
32265 * doc/gcov.texi: Document new field 'version' in intermediate
32266 file format. Fix location of '-k' option of gcov command.
32267
32268 2018-01-04 Martin Liska <mliska@suse.cz>
32269
32270 PR ipa/82352
32271 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
32272
32273 2018-01-04 Jakub Jelinek <jakub@redhat.com>
32274
32275 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
32276
32277 2018-01-03 Martin Sebor <msebor@redhat.com>
32278
32279 PR tree-optimization/83655
32280 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
32281 checking calls with invalid arguments.
32282
32283 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32284
32285 * tree-vect-stmts.c (vect_get_store_rhs): New function.
32286 (vectorizable_mask_load_store): Delete.
32287 (vectorizable_call): Return false for masked loads and stores.
32288 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
32289 instead of gimple_assign_rhs1.
32290 (vectorizable_load): Handle IFN_MASK_LOAD.
32291 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
32292
32293 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32294
32295 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
32296 split out from..,
32297 (vectorizable_mask_load_store): ...here.
32298 (vectorizable_load): ...and here.
32299
32300 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32301
32302 * tree-vect-stmts.c (vect_build_all_ones_mask)
32303 (vect_build_zero_merge_argument): New functions, split out from...
32304 (vectorizable_load): ...here.
32305
32306 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32307
32308 * tree-vect-stmts.c (vect_check_store_rhs): New function,
32309 split out from...
32310 (vectorizable_mask_load_store): ...here.
32311 (vectorizable_store): ...and here.
32312
32313 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32314
32315 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
32316 split out from...
32317 (vectorizable_mask_load_store): ...here.
32318
32319 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32320
32321 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
32322 (vect_model_store_cost): Take a vec_load_store_type instead of a
32323 vect_def_type.
32324 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
32325 (vect_model_store_cost): Take a vec_load_store_type instead of a
32326 vect_def_type.
32327 (vectorizable_mask_load_store): Update accordingly.
32328 (vectorizable_store): Likewise.
32329 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
32330
32331 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32332
32333 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
32334 IFN_MASK_LOAD calls here rather than...
32335 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
32336
32337 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32338 Alan Hayward <alan.hayward@arm.com>
32339 David Sherwood <david.sherwood@arm.com>
32340
32341 * expmed.c (extract_bit_field_1): For vector extracts,
32342 fall back to extract_bit_field_as_subreg if vec_extract
32343 isn't available.
32344
32345 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32346 Alan Hayward <alan.hayward@arm.com>
32347 David Sherwood <david.sherwood@arm.com>
32348
32349 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
32350 they are variable or constant sized.
32351 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
32352 slots for constant-sized data.
32353
32354 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32355 Alan Hayward <alan.hayward@arm.com>
32356 David Sherwood <david.sherwood@arm.com>
32357
32358 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
32359 handling COND_EXPRs with boolean comparisons, try to find a better
32360 basis for the mask type than the boolean itself.
32361
32362 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32363
32364 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
32365 is calculated and how it can be overridden.
32366 * genmodes.c (max_bitsize_mode_any_mode): New variable.
32367 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
32368 if defined.
32369 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
32370 if nonzero.
32371
32372 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32373 Alan Hayward <alan.hayward@arm.com>
32374 David Sherwood <david.sherwood@arm.com>
32375
32376 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
32377 Remove the mode argument.
32378 (aarch64_simd_valid_immediate): Remove the mode and inverse
32379 arguments.
32380 * config/aarch64/iterators.md (bitsize): New iterator.
32381 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
32382 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
32383 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
32384 aarch64_simd_valid_immediate.
32385 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
32386 (aarch64_reg_or_bic_imm): Likewise.
32387 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
32388 with an insn_type enum and msl with a modifier_type enum.
32389 Replace element_width with a scalar_mode. Change the shift
32390 to unsigned int. Add constructors for scalar_float_mode and
32391 scalar_int_mode elements.
32392 (aarch64_vect_float_const_representable_p): Delete.
32393 (aarch64_can_const_movi_rtx_p)
32394 (aarch64_simd_scalar_immediate_valid_for_move)
32395 (aarch64_simd_make_constant): Update call to
32396 aarch64_simd_valid_immediate.
32397 (aarch64_advsimd_valid_immediate_hs): New function.
32398 (aarch64_advsimd_valid_immediate): Likewise.
32399 (aarch64_simd_valid_immediate): Remove mode and inverse
32400 arguments. Rewrite to use the above. Use const_vec_duplicate_p
32401 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
32402 and aarch64_float_const_representable_p on the result.
32403 (aarch64_output_simd_mov_immediate): Remove mode argument.
32404 Update call to aarch64_simd_valid_immediate and use of
32405 simd_immediate_info.
32406 (aarch64_output_scalar_simd_mov_immediate): Update call
32407 accordingly.
32408
32409 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32410 Alan Hayward <alan.hayward@arm.com>
32411 David Sherwood <david.sherwood@arm.com>
32412
32413 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
32414 (mode_nunits): Likewise CONST_MODE_NUNITS.
32415 * machmode.def (ADJUST_NUNITS): Document.
32416 * genmodes.c (mode_data::need_nunits_adj): New field.
32417 (blank_mode): Update accordingly.
32418 (adj_nunits): New variable.
32419 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
32420 parameter.
32421 (emit_mode_size_inline): Set need_bytesize_adj for all modes
32422 listed in adj_nunits.
32423 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
32424 listed in adj_nunits. Don't emit case statements for such modes.
32425 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
32426 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
32427 nothing if adj_nunits is nonnull.
32428 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
32429 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
32430 (emit_mode_fbit): Update use of print_maybe_const_decl.
32431 (emit_move_size): Likewise. Treat the array as non-const
32432 if adj_nunits.
32433 (emit_mode_adjustments): Handle adj_nunits.
32434
32435 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32436
32437 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
32438 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
32439 (VECTOR_MODES): Use it.
32440 (make_vector_modes): Take the prefix as an argument.
32441
32442 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32443 Alan Hayward <alan.hayward@arm.com>
32444 David Sherwood <david.sherwood@arm.com>
32445
32446 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
32447 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
32448 for MODE_VECTOR_BOOL.
32449 * machmode.def (VECTOR_BOOL_MODE): Document.
32450 * genmodes.c (VECTOR_BOOL_MODE): New macro.
32451 (make_vector_bool_mode): New function.
32452 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
32453 MODE_VECTOR_BOOL.
32454 * lto-streamer-in.c (lto_input_mode_table): Likewise.
32455 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
32456 Likewise.
32457 * stor-layout.c (int_mode_for_mode): Likewise.
32458 * tree.c (build_vector_type_for_mode): Likewise.
32459 * varasm.c (output_constant_pool_2): Likewise.
32460 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
32461 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
32462 for MODE_VECTOR_BOOL.
32463 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
32464 of mode class checks.
32465 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
32466 instead of a list of mode class checks.
32467 (expand_vector_scalar_condition): Likewise.
32468 (type_for_widest_vector_mode): Handle BImode as an inner mode.
32469
32470 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32471 Alan Hayward <alan.hayward@arm.com>
32472 David Sherwood <david.sherwood@arm.com>
32473
32474 * machmode.h (mode_size): Change from unsigned short to
32475 poly_uint16_pod.
32476 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
32477 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
32478 or if measurement_type is not polynomial.
32479 (fixed_size_mode::includes_p): Check for constant-sized modes.
32480 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
32481 return a poly_uint16 rather than an unsigned short.
32482 (emit_mode_size): Change the type of mode_size from unsigned short
32483 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
32484 (emit_mode_adjustments): Cope with polynomial vector sizes.
32485 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32486 for GET_MODE_SIZE.
32487 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32488 for GET_MODE_SIZE.
32489 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
32490 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
32491 * caller-save.c (setup_save_areas): Likewise.
32492 (replace_reg_with_saved_mem): Likewise.
32493 * calls.c (emit_library_call_value_1): Likewise.
32494 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
32495 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
32496 (gen_lowpart_for_combine): Likewise.
32497 * convert.c (convert_to_integer_1): Likewise.
32498 * cse.c (equiv_constant, cse_insn): Likewise.
32499 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
32500 (cselib_subst_to_values): Likewise.
32501 * dce.c (word_dce_process_block): Likewise.
32502 * df-problems.c (df_word_lr_mark_ref): Likewise.
32503 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
32504 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
32505 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
32506 (rtl_for_decl_location): Likewise.
32507 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
32508 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
32509 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
32510 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
32511 (expand_expr_real_1): Likewise.
32512 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
32513 (pad_below): Likewise.
32514 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
32515 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
32516 * ira.c (get_subreg_tracking_sizes): Likewise.
32517 * ira-build.c (ira_create_allocno_objects): Likewise.
32518 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
32519 (ira_sort_regnos_for_alter_reg): Likewise.
32520 * ira-costs.c (record_operand_costs): Likewise.
32521 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
32522 (resolve_simple_move): Likewise.
32523 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
32524 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
32525 (lra_constraints): Likewise.
32526 (CONST_POOL_OK_P): Reject variable-sized modes.
32527 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
32528 (add_pseudo_to_slot, lra_spill): Likewise.
32529 * omp-low.c (omp_clause_aligned_alignment): Likewise.
32530 * optabs-query.c (get_best_extraction_insn): Likewise.
32531 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
32532 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
32533 (expand_mult_highpart, valid_multiword_target_p): Likewise.
32534 * recog.c (offsettable_address_addr_space_p): Likewise.
32535 * regcprop.c (maybe_mode_change): Likewise.
32536 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
32537 * regrename.c (build_def_use): Likewise.
32538 * regstat.c (dump_reg_info): Likewise.
32539 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
32540 (find_reloads, find_reloads_subreg_address): Likewise.
32541 * reload1.c (eliminate_regs_1): Likewise.
32542 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
32543 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
32544 (simplify_binary_operation_1, simplify_subreg): Likewise.
32545 * targhooks.c (default_function_arg_padding): Likewise.
32546 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
32547 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
32548 (verify_gimple_assign_ternary): Likewise.
32549 * tree-inline.c (estimate_move_cost): Likewise.
32550 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32551 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
32552 (get_address_cost_ainc): Likewise.
32553 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
32554 (vect_supportable_dr_alignment): Likewise.
32555 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
32556 (vectorizable_reduction): Likewise.
32557 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
32558 (vectorizable_operation, vectorizable_load): Likewise.
32559 * tree.c (build_same_sized_truth_vector_type): Likewise.
32560 * valtrack.c (cleanup_auto_inc_dec): Likewise.
32561 * var-tracking.c (emit_note_insn_var_location): Likewise.
32562 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
32563 (ADDR_VEC_ALIGN): Likewise.
32564
32565 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32566 Alan Hayward <alan.hayward@arm.com>
32567 David Sherwood <david.sherwood@arm.com>
32568
32569 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
32570 unsigned short.
32571 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
32572 or if measurement_type is polynomial.
32573 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
32574 * combine.c (make_extraction): Likewise.
32575 * dse.c (find_shift_sequence): Likewise.
32576 * dwarf2out.c (mem_loc_descriptor): Likewise.
32577 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
32578 (extract_bit_field, extract_low_bits): Likewise.
32579 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
32580 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
32581 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
32582 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
32583 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
32584 * reload.c (find_reloads): Likewise.
32585 * reload1.c (alter_reg): Likewise.
32586 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
32587 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
32588 * tree-if-conv.c (predicate_mem_writes): Likewise.
32589 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
32590 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
32591 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
32592 * valtrack.c (dead_debug_insert_temp): Likewise.
32593 * varasm.c (mergeable_constant_section): Likewise.
32594 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
32595
32596 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32597 Alan Hayward <alan.hayward@arm.com>
32598 David Sherwood <david.sherwood@arm.com>
32599
32600 * expr.c (expand_assignment): Cope with polynomial mode sizes
32601 when assigning to a CONCAT.
32602
32603 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32604 Alan Hayward <alan.hayward@arm.com>
32605 David Sherwood <david.sherwood@arm.com>
32606
32607 * machmode.h (mode_precision): Change from unsigned short to
32608 poly_uint16_pod.
32609 (mode_to_precision): Return a poly_uint16 rather than an unsigned
32610 short.
32611 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
32612 or if measurement_type is not polynomial.
32613 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
32614 in which the mode is already known to be a scalar_int_mode.
32615 * genmodes.c (emit_mode_precision): Change the type of mode_precision
32616 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
32617 initializer.
32618 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32619 for GET_MODE_PRECISION.
32620 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32621 for GET_MODE_PRECISION.
32622 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
32623 as polynomial.
32624 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
32625 (expand_field_assignment, make_extraction): Likewise.
32626 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
32627 (get_last_value): Likewise.
32628 * convert.c (convert_to_integer_1): Likewise.
32629 * cse.c (cse_insn): Likewise.
32630 * expr.c (expand_expr_real_1): Likewise.
32631 * lra-constraints.c (simplify_operand_subreg): Likewise.
32632 * optabs-query.c (can_atomic_load_p): Likewise.
32633 * optabs.c (expand_atomic_load): Likewise.
32634 (expand_atomic_store): Likewise.
32635 * ree.c (combine_reaching_defs): Likewise.
32636 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
32637 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
32638 * tree.h (type_has_mode_precision_p): Likewise.
32639 * ubsan.c (instrument_si_overflow): Likewise.
32640
32641 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32642 Alan Hayward <alan.hayward@arm.com>
32643 David Sherwood <david.sherwood@arm.com>
32644
32645 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
32646 polynomial numbers of units.
32647 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
32648 (valid_vector_subparts_p): New function.
32649 (build_vector_type): Remove temporary shim and take the number
32650 of units as a poly_uint64 rather than an int.
32651 (build_opaque_vector_type): Take the number of units as a
32652 poly_uint64 rather than an int.
32653 * tree.c (build_vector_from_ctor): Handle polynomial
32654 TYPE_VECTOR_SUBPARTS.
32655 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
32656 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
32657 (build_vector_from_val): If the number of units is variable,
32658 use build_vec_duplicate_cst for constant operands and
32659 VEC_DUPLICATE_EXPR otherwise.
32660 (make_vector_type): Remove temporary is_constant ().
32661 (build_vector_type, build_opaque_vector_type): Take the number of
32662 units as a poly_uint64 rather than an int.
32663 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
32664 VECTOR_CST_NELTS.
32665 * cfgexpand.c (expand_debug_expr): Likewise.
32666 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
32667 (store_constructor, expand_expr_real_1): Likewise.
32668 (const_scalar_mask_from_tree): Likewise.
32669 * fold-const-call.c (fold_const_reduction): Likewise.
32670 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
32671 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
32672 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
32673 (fold_relational_const): Likewise.
32674 (native_interpret_vector): Likewise. Change the size from an
32675 int to an unsigned int.
32676 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
32677 TYPE_VECTOR_SUBPARTS.
32678 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
32679 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
32680 duplicating a non-constant operand into a variable-length vector.
32681 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
32682 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
32683 * ipa-icf.c (sem_variable::equals): Likewise.
32684 * match.pd: Likewise.
32685 * omp-simd-clone.c (simd_clone_subparts): Likewise.
32686 * print-tree.c (print_node): Likewise.
32687 * stor-layout.c (layout_type): Likewise.
32688 * targhooks.c (default_builtin_vectorization_cost): Likewise.
32689 * tree-cfg.c (verify_gimple_comparison): Likewise.
32690 (verify_gimple_assign_binary): Likewise.
32691 (verify_gimple_assign_ternary): Likewise.
32692 (verify_gimple_assign_single): Likewise.
32693 * tree-pretty-print.c (dump_generic_node): Likewise.
32694 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32695 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
32696 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
32697 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
32698 (vect_shift_permute_load_chain): Likewise.
32699 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
32700 (expand_vector_condition, optimize_vector_constructor): Likewise.
32701 (lower_vec_perm, get_compute_type): Likewise.
32702 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
32703 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
32704 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
32705 (vect_recog_mask_conversion_pattern): Likewise.
32706 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
32707 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
32708 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32709 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
32710 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
32711 (vectorizable_shift, vectorizable_operation, vectorizable_store)
32712 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
32713 (supportable_widening_operation): Likewise.
32714 (supportable_narrowing_operation): Likewise.
32715 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
32716 Likewise.
32717 * varasm.c (output_constant): Likewise.
32718
32719 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32720 Alan Hayward <alan.hayward@arm.com>
32721 David Sherwood <david.sherwood@arm.com>
32722
32723 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
32724 so that both the length == 3 and length != 3 cases set up their
32725 own permute vectors. Add comments explaining why we know the
32726 number of elements is constant.
32727 (vect_permute_load_chain): Likewise.
32728
32729 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32730 Alan Hayward <alan.hayward@arm.com>
32731 David Sherwood <david.sherwood@arm.com>
32732
32733 * machmode.h (mode_nunits): Change from unsigned char to
32734 poly_uint16_pod.
32735 (ONLY_FIXED_SIZE_MODES): New macro.
32736 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
32737 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
32738 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
32739 New typedefs.
32740 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
32741 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
32742 or if measurement_type is not polynomial.
32743 * genmodes.c (ZERO_COEFFS): New macro.
32744 (emit_mode_nunits_inline): Make mode_nunits_inline return a
32745 poly_uint16.
32746 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
32747 Use ZERO_COEFFS when emitting initializers.
32748 * data-streamer.h (bp_pack_poly_value): New function.
32749 (bp_unpack_poly_value): Likewise.
32750 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32751 for GET_MODE_NUNITS.
32752 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32753 for GET_MODE_NUNITS.
32754 * tree.c (make_vector_type): Remove temporary shim and make
32755 the real function take the number of units as a poly_uint64
32756 rather than an int.
32757 (build_vector_type_for_mode): Handle polynomial nunits.
32758 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
32759 * emit-rtl.c (const_vec_series_p_1): Likewise.
32760 (gen_rtx_CONST_VECTOR): Likewise.
32761 * fold-const.c (test_vec_duplicate_folding): Likewise.
32762 * genrecog.c (validate_pattern): Likewise.
32763 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
32764 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
32765 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
32766 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
32767 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
32768 * rtlanal.c (subreg_get_info): Likewise.
32769 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32770 (vect_grouped_load_supported): Likewise.
32771 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
32772 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
32773 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
32774 (simplify_const_unary_operation, simplify_binary_operation_1)
32775 (simplify_const_binary_operation, simplify_ternary_operation)
32776 (test_vector_ops_duplicate, test_vector_ops): Likewise.
32777 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
32778 instead of CONST_VECTOR_NUNITS.
32779 * varasm.c (output_constant_pool_2): Likewise.
32780 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
32781 explicit-encoded elements in the XVEC for variable-length vectors.
32782
32783 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32784
32785 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
32786
32787 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32788 Alan Hayward <alan.hayward@arm.com>
32789 David Sherwood <david.sherwood@arm.com>
32790
32791 * coretypes.h (fixed_size_mode): Declare.
32792 (fixed_size_mode_pod): New typedef.
32793 * builtins.h (target_builtins::x_apply_args_mode)
32794 (target_builtins::x_apply_result_mode): Change type to
32795 fixed_size_mode_pod.
32796 * builtins.c (apply_args_size, apply_result_size, result_vector)
32797 (expand_builtin_apply_args_1, expand_builtin_apply)
32798 (expand_builtin_return): Update accordingly.
32799
32800 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32801
32802 * cse.c (hash_rtx_cb): Hash only the encoded elements.
32803 * cselib.c (cselib_hash_rtx): Likewise.
32804 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
32805 CONST_VECTOR encoding.
32806
32807 2018-01-03 Jakub Jelinek <jakub@redhat.com>
32808 Jeff Law <law@redhat.com>
32809
32810 PR target/83641
32811 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
32812 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
32813 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
32814 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
32815
32816 PR target/83641
32817 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
32818 explicitly probe *sp in a noreturn function if there were any callee
32819 register saves or frame pointer is needed.
32820
32821 2018-01-03 Jakub Jelinek <jakub@redhat.com>
32822
32823 PR debug/83621
32824 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
32825 BLKmode for ternary, binary or unary expressions.
32826
32827 PR debug/83645
32828 * var-tracking.c (delete_vta_debug_insn): New inline function.
32829 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
32830 insns from get_insns () to NULL instead of each bb separately.
32831 Use delete_vta_debug_insn. No longer static.
32832 (vt_debug_insns_local, variable_tracking_main_1): Adjust
32833 delete_vta_debug_insns callers.
32834 * rtl.h (delete_vta_debug_insns): Declare.
32835 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
32836 instead of variable_tracking_main.
32837
32838 2018-01-03 Martin Sebor <msebor@redhat.com>
32839
32840 PR tree-optimization/83603
32841 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
32842 arguments past the endof the argument list in functions declared
32843 without a prototype.
32844 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
32845 Avoid checking when arguments are null.
32846
32847 2018-01-03 Martin Sebor <msebor@redhat.com>
32848
32849 PR c/83559
32850 * doc/extend.texi (attribute const): Fix a typo.
32851 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
32852 issuing -Wsuggest-attribute for void functions.
32853
32854 2018-01-03 Martin Sebor <msebor@redhat.com>
32855
32856 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
32857 offset_int::from instead of wide_int::to_shwi.
32858 (maybe_diag_overlap): Remove assertion.
32859 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
32860 * gimple-ssa-sprintf.c (format_directive): Same.
32861 (parse_directive): Same.
32862 (sprintf_dom_walker::compute_format_length): Same.
32863 (try_substitute_return_value): Same.
32864
32865 2018-01-03 Jeff Law <law@redhat.com>
32866
32867 PR middle-end/83654
32868 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
32869 non-constant residual for zero at runtime and avoid probing in
32870 that case. Reorganize code for trailing problem to mirror handling
32871 of the residual.
32872
32873 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
32874
32875 PR tree-optimization/83501
32876 * tree-ssa-strlen.c (get_string_cst): New.
32877 (handle_char_store): Call get_string_cst.
32878
32879 2018-01-03 Martin Liska <mliska@suse.cz>
32880
32881 PR tree-optimization/83593
32882 * tree-ssa-strlen.c: Include tree-cfg.h.
32883 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
32884 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
32885 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
32886 to false.
32887 (strlen_dom_walker::before_dom_children): Call
32888 gimple_purge_dead_eh_edges. Dump tranformation with details
32889 dump flags.
32890 (strlen_dom_walker::before_dom_children): Update call by adding
32891 new argument cleanup_eh.
32892 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
32893
32894 2018-01-03 Martin Liska <mliska@suse.cz>
32895
32896 PR ipa/83549
32897 * cif-code.def (VARIADIC_THUNK): New enum value.
32898 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
32899 thunks.
32900
32901 2018-01-03 Jan Beulich <jbeulich@suse.com>
32902
32903 * sse.md (mov<mode>_internal): Tighten condition for when to use
32904 vmovdqu<ssescalarsize> for TI and OI modes.
32905
32906 2018-01-03 Jakub Jelinek <jakub@redhat.com>
32907
32908 Update copyright years.
32909
32910 2018-01-03 Martin Liska <mliska@suse.cz>
32911
32912 PR ipa/83594
32913 * ipa-visibility.c (function_and_variable_visibility): Skip
32914 functions with noipa attribure.
32915
32916 2018-01-03 Jakub Jelinek <jakub@redhat.com>
32917
32918 * gcc.c (process_command): Update copyright notice dates.
32919 * gcov-dump.c (print_version): Ditto.
32920 * gcov.c (print_version): Ditto.
32921 * gcov-tool.c (print_version): Ditto.
32922 * gengtype.c (create_file): Ditto.
32923 * doc/cpp.texi: Bump @copying's copyright year.
32924 * doc/cppinternals.texi: Ditto.
32925 * doc/gcc.texi: Ditto.
32926 * doc/gccint.texi: Ditto.
32927 * doc/gcov.texi: Ditto.
32928 * doc/install.texi: Ditto.
32929 * doc/invoke.texi: Ditto.
32930
32931 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32932
32933 * vector-builder.h (vector_builder::m_full_nelts): Change from
32934 unsigned int to poly_uint64.
32935 (vector_builder::full_nelts): Update prototype accordingly.
32936 (vector_builder::new_vector): Likewise.
32937 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
32938 (vector_builder::operator ==): Likewise.
32939 (vector_builder::finalize): Likewise.
32940 * int-vector-builder.h (int_vector_builder::int_vector_builder):
32941 Take the number of elements as a poly_uint64 rather than an
32942 unsigned int.
32943 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
32944 from unsigned int to poly_uint64.
32945 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
32946 (vec_perm_indices::new_vector): Likewise.
32947 (vec_perm_indices::length): Likewise.
32948 (vec_perm_indices::nelts_per_input): Likewise.
32949 (vec_perm_indices::input_nelts): Likewise.
32950 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
32951 number of elements per input as a poly_uint64 rather than an
32952 unsigned int. Use the original encoding for variable-length
32953 vectors, rather than clamping each individual element.
32954 For the second and subsequent elements in each pattern,
32955 clamp the step and base before clamping their sum.
32956 (vec_perm_indices::series_p): Handle polynomial element counts.
32957 (vec_perm_indices::all_in_range_p): Likewise.
32958 (vec_perm_indices_to_tree): Likewise.
32959 (vec_perm_indices_to_rtx): Likewise.
32960 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
32961 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
32962 (tree_vector_builder::new_binary_operation): Handle polynomial
32963 element counts. Return false if we need to know the number
32964 of elements at compile time.
32965 * fold-const.c (fold_vec_perm): Punt if the number of elements
32966 isn't known at compile time.
32967
32968 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32969
32970 * vec-perm-indices.h (vec_perm_builder): Change element type
32971 from HOST_WIDE_INT to poly_int64.
32972 (vec_perm_indices::element_type): Update accordingly.
32973 (vec_perm_indices::clamp): Handle polynomial element_types.
32974 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
32975 (vec_perm_indices::all_in_range_p): Likewise.
32976 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
32977 than shwi trees.
32978 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
32979 polynomial vec_perm_indices element types.
32980 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
32981 * fold-const.c (fold_vec_perm): Likewise.
32982 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
32983 * tree-vect-generic.c (lower_vec_perm): Likewise.
32984 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
32985 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
32986 element type to HOST_WIDE_INT.
32987
32988 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32989 Alan Hayward <alan.hayward@arm.com>
32990 David Sherwood <david.sherwood@arm.com>
32991
32992 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
32993 rather than an int. Use plus_constant.
32994 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
32995 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
32996
32997 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32998 Alan Hayward <alan.hayward@arm.com>
32999 David Sherwood <david.sherwood@arm.com>
33000
33001 * calls.c (emit_call_1, expand_call): Change struct_value_size from
33002 a HOST_WIDE_INT to a poly_int64.
33003
33004 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33005 Alan Hayward <alan.hayward@arm.com>
33006 David Sherwood <david.sherwood@arm.com>
33007
33008 * calls.c (load_register_parameters): Cope with polynomial
33009 mode sizes. Require a constant size for BLKmode parameters
33010 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
33011 forces a parameter to be padded at the lsb end in order to
33012 fill a complete number of words, require the parameter size
33013 to be ordered wrt UNITS_PER_WORD.
33014
33015 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33016 Alan Hayward <alan.hayward@arm.com>
33017 David Sherwood <david.sherwood@arm.com>
33018
33019 * reload1.c (spill_stack_slot_width): Change element type
33020 from unsigned int to poly_uint64_pod.
33021 (alter_reg): Treat mode sizes as polynomial.
33022
33023 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33024 Alan Hayward <alan.hayward@arm.com>
33025 David Sherwood <david.sherwood@arm.com>
33026
33027 * reload.c (complex_word_subreg_p): New function.
33028 (reload_inner_reg_of_subreg, push_reload): Use it.
33029
33030 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33031 Alan Hayward <alan.hayward@arm.com>
33032 David Sherwood <david.sherwood@arm.com>
33033
33034 * lra-constraints.c (process_alt_operands): Reject matched
33035 operands whose sizes aren't ordered.
33036 (match_reload): Refer to this check here.
33037
33038 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33039 Alan Hayward <alan.hayward@arm.com>
33040 David Sherwood <david.sherwood@arm.com>
33041
33042 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
33043 that the mode size is in the set {1, 2, 4, 8, 16}.
33044
33045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33046 Alan Hayward <alan.hayward@arm.com>
33047 David Sherwood <david.sherwood@arm.com>
33048
33049 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
33050 Use plus_constant instead of gen_rtx_PLUS.
33051
33052 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33053 Alan Hayward <alan.hayward@arm.com>
33054 David Sherwood <david.sherwood@arm.com>
33055
33056 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
33057 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
33058 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
33059 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
33060 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
33061 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
33062 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
33063 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
33064 * config/i386/i386.c (ix86_push_rounding): ...this new function.
33065 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
33066 a poly_int64.
33067 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
33068 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
33069 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
33070 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
33071 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
33072 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
33073 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
33074 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
33075 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
33076 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
33077 function.
33078 * expr.c (emit_move_resolve_push): Treat the input and result
33079 of PUSH_ROUNDING as a poly_int64.
33080 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
33081 (emit_push_insn): Likewise.
33082 * lra-eliminations.c (mark_not_eliminable): Likewise.
33083 * recog.c (push_operand): Likewise.
33084 * reload1.c (elimination_effects): Likewise.
33085 * rtlanal.c (nonzero_bits1): Likewise.
33086 * calls.c (store_one_arg): Likewise. Require the padding to be
33087 known at compile time.
33088
33089 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33090 Alan Hayward <alan.hayward@arm.com>
33091 David Sherwood <david.sherwood@arm.com>
33092
33093 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
33094 Use plus_constant instead of gen_rtx_PLUS.
33095
33096 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33097 Alan Hayward <alan.hayward@arm.com>
33098 David Sherwood <david.sherwood@arm.com>
33099
33100 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
33101 rather than an int.
33102
33103 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33104 Alan Hayward <alan.hayward@arm.com>
33105 David Sherwood <david.sherwood@arm.com>
33106
33107 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
33108 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
33109 via stack temporaries. Treat the mode size as polynomial too.
33110
33111 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33112 Alan Hayward <alan.hayward@arm.com>
33113 David Sherwood <david.sherwood@arm.com>
33114
33115 * expr.c (expand_expr_real_2): When handling conversions involving
33116 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
33117 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
33118 as a poly_uint64 too.
33119
33120 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33121 Alan Hayward <alan.hayward@arm.com>
33122 David Sherwood <david.sherwood@arm.com>
33123
33124 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
33125
33126 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33127 Alan Hayward <alan.hayward@arm.com>
33128 David Sherwood <david.sherwood@arm.com>
33129
33130 * combine.c (can_change_dest_mode): Handle polynomial
33131 REGMODE_NATURAL_SIZE.
33132 * expmed.c (store_bit_field_1): Likewise.
33133 * expr.c (store_constructor): Likewise.
33134 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
33135 and polynomial REGMODE_NATURAL_SIZE.
33136 (gen_lowpart_common): Likewise.
33137 * reginfo.c (record_subregs_of_mode): Likewise.
33138 * rtlanal.c (read_modify_subreg_p): Likewise.
33139
33140 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33141 Alan Hayward <alan.hayward@arm.com>
33142 David Sherwood <david.sherwood@arm.com>
33143
33144 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
33145 numbers of elements.
33146
33147 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33148 Alan Hayward <alan.hayward@arm.com>
33149 David Sherwood <david.sherwood@arm.com>
33150
33151 * match.pd: Cope with polynomial numbers of vector elements.
33152
33153 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33154 Alan Hayward <alan.hayward@arm.com>
33155 David Sherwood <david.sherwood@arm.com>
33156
33157 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
33158 in a POINTER_PLUS_EXPR.
33159
33160 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33161 Alan Hayward <alan.hayward@arm.com>
33162 David Sherwood <david.sherwood@arm.com>
33163
33164 * omp-simd-clone.c (simd_clone_subparts): New function.
33165 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
33166 (ipa_simd_modify_function_body): Likewise.
33167
33168 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33169 Alan Hayward <alan.hayward@arm.com>
33170 David Sherwood <david.sherwood@arm.com>
33171
33172 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
33173 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
33174 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
33175 (expand_vector_condition, vector_element): Likewise.
33176 (subparts_gt): New function.
33177 (get_compute_type): Use subparts_gt.
33178 (count_type_subparts): Delete.
33179 (expand_vector_operations_1): Use subparts_gt instead of
33180 count_type_subparts.
33181
33182 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33183 Alan Hayward <alan.hayward@arm.com>
33184 David Sherwood <david.sherwood@arm.com>
33185
33186 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
33187 (vect_compile_time_alias): ...this new function. Do the calculation
33188 on poly_ints rather than trees.
33189 (vect_prune_runtime_alias_test_list): Update call accordingly.
33190
33191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33192 Alan Hayward <alan.hayward@arm.com>
33193 David Sherwood <david.sherwood@arm.com>
33194
33195 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
33196 numbers of units.
33197 (vect_schedule_slp_instance): Likewise.
33198
33199 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33200 Alan Hayward <alan.hayward@arm.com>
33201 David Sherwood <david.sherwood@arm.com>
33202
33203 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
33204 constant and extern definitions for variable-length vectors.
33205 (vect_get_constant_vectors): Note that the number of units
33206 is known to be constant.
33207
33208 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33209 Alan Hayward <alan.hayward@arm.com>
33210 David Sherwood <david.sherwood@arm.com>
33211
33212 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
33213 of units as polynomial. Choose between WIDE and NARROW based
33214 on multiple_p.
33215
33216 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33217 Alan Hayward <alan.hayward@arm.com>
33218 David Sherwood <david.sherwood@arm.com>
33219
33220 * tree-vect-stmts.c (simd_clone_subparts): New function.
33221 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
33222
33223 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33224 Alan Hayward <alan.hayward@arm.com>
33225 David Sherwood <david.sherwood@arm.com>
33226
33227 * tree-vect-stmts.c (vectorizable_call): Treat the number of
33228 vectors as polynomial. Use build_index_vector for
33229 IFN_GOMP_SIMD_LANE.
33230
33231 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33232 Alan Hayward <alan.hayward@arm.com>
33233 David Sherwood <david.sherwood@arm.com>
33234
33235 * tree-vect-stmts.c (get_load_store_type): Treat the number of
33236 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
33237 for variable-length vectors.
33238 (vectorizable_mask_load_store): Treat the number of units as
33239 polynomial, asserting that it is constant if the condition has
33240 already been enforced.
33241 (vectorizable_store, vectorizable_load): Likewise.
33242
33243 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33244 Alan Hayward <alan.hayward@arm.com>
33245 David Sherwood <david.sherwood@arm.com>
33246
33247 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
33248 of units as polynomial. Punt if we can't tell at compile time
33249 which vector contains the final result.
33250
33251 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33252 Alan Hayward <alan.hayward@arm.com>
33253 David Sherwood <david.sherwood@arm.com>
33254
33255 * tree-vect-loop.c (vectorizable_induction): Treat the number
33256 of units as polynomial. Punt on SLP inductions. Use an integer
33257 VEC_SERIES_EXPR for variable-length integer reductions. Use a
33258 cast of such a series for variable-length floating-point
33259 reductions.
33260
33261 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33262 Alan Hayward <alan.hayward@arm.com>
33263 David Sherwood <david.sherwood@arm.com>
33264
33265 * tree.h (build_index_vector): Declare.
33266 * tree.c (build_index_vector): New function.
33267 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
33268 of units as polynomial, forcibly converting it to a constant if
33269 vectorizable_reduction has already enforced the condition.
33270 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
33271 to create a {1,2,3,...} vector.
33272 (vectorizable_reduction): Treat the number of units as polynomial.
33273 Choose vectype_in based on the largest scalar element size rather
33274 than the smallest number of units. Enforce the restrictions
33275 relied on above.
33276
33277 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33278 Alan Hayward <alan.hayward@arm.com>
33279 David Sherwood <david.sherwood@arm.com>
33280
33281 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
33282 number of units as polynomial.
33283
33284 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33285 Alan Hayward <alan.hayward@arm.com>
33286 David Sherwood <david.sherwood@arm.com>
33287
33288 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
33289 * target.def (autovectorize_vector_sizes): Return the vector sizes
33290 by pointer, using vector_sizes rather than a bitmask.
33291 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
33292 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
33293 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
33294 Likewise.
33295 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
33296 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
33297 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
33298 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
33299 * omp-general.c (omp_max_vf): Likewise.
33300 * omp-low.c (omp_clause_aligned_alignment): Likewise.
33301 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
33302 * tree-vect-loop.c (vect_analyze_loop): Likewise.
33303 * tree-vect-slp.c (vect_slp_bb): Likewise.
33304 * doc/tm.texi: Regenerate.
33305 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
33306 to a poly_uint64.
33307 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
33308 the vector size as a poly_uint64 rather than an unsigned int.
33309 (current_vector_size): Change from an unsigned int to a poly_uint64.
33310 (get_vectype_for_scalar_type): Update accordingly.
33311 * tree.h (build_truth_vector_type): Take the size and number of
33312 units as a poly_uint64 rather than an unsigned int.
33313 (build_vector_type): Add a temporary overload that takes
33314 the number of units as a poly_uint64 rather than an unsigned int.
33315 * tree.c (make_vector_type): Likewise.
33316 (build_truth_vector_type): Take the number of units as a poly_uint64
33317 rather than an unsigned int.
33318
33319 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33320 Alan Hayward <alan.hayward@arm.com>
33321 David Sherwood <david.sherwood@arm.com>
33322
33323 * target.def (get_mask_mode): Take the number of units and length
33324 as poly_uint64s rather than unsigned ints.
33325 * targhooks.h (default_get_mask_mode): Update accordingly.
33326 * targhooks.c (default_get_mask_mode): Likewise.
33327 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
33328 * doc/tm.texi: Regenerate.
33329
33330 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33331 Alan Hayward <alan.hayward@arm.com>
33332 David Sherwood <david.sherwood@arm.com>
33333
33334 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
33335 * omp-general.c (omp_max_vf): Likewise.
33336 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
33337 (expand_omp_simd): Handle polynomial safelen.
33338 * omp-low.c (omplow_simd_context): Add a default constructor.
33339 (omplow_simd_context::max_vf): Change from int to poly_uint64.
33340 (lower_rec_simd_input_clauses): Update accordingly.
33341 (lower_rec_input_clauses): Likewise.
33342
33343 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33344 Alan Hayward <alan.hayward@arm.com>
33345 David Sherwood <david.sherwood@arm.com>
33346
33347 * tree-vectorizer.h (vect_nunits_for_cost): New function.
33348 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
33349 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
33350 (vect_analyze_slp_cost): Likewise.
33351 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
33352 (vect_model_load_cost): Likewise.
33353
33354 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33355 Alan Hayward <alan.hayward@arm.com>
33356 David Sherwood <david.sherwood@arm.com>
33357
33358 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
33359 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
33360 from an unsigned int * to a poly_uint64_pod *.
33361 (calculate_unrolling_factor): New function.
33362 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
33363
33364 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33365 Alan Hayward <alan.hayward@arm.com>
33366 David Sherwood <david.sherwood@arm.com>
33367
33368 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
33369 from an unsigned int to a poly_uint64.
33370 (_loop_vec_info::slp_unrolling_factor): Likewise.
33371 (_loop_vec_info::vectorization_factor): Change from an int
33372 to a poly_uint64.
33373 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
33374 (vect_get_num_vectors): New function.
33375 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
33376 (vect_get_num_copies): Use vect_get_num_vectors.
33377 (vect_analyze_data_ref_dependences): Change max_vf from an int *
33378 to an unsigned int *.
33379 (vect_analyze_data_refs): Change min_vf from an int * to a
33380 poly_uint64 *.
33381 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
33382 than an unsigned HOST_WIDE_INT.
33383 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
33384 (vect_analyze_data_ref_dependence): Change max_vf from an int *
33385 to an unsigned int *.
33386 (vect_analyze_data_ref_dependences): Likewise.
33387 (vect_compute_data_ref_alignment): Handle polynomial vf.
33388 (vect_enhance_data_refs_alignment): Likewise.
33389 (vect_prune_runtime_alias_test_list): Likewise.
33390 (vect_shift_permute_load_chain): Likewise.
33391 (vect_supportable_dr_alignment): Likewise.
33392 (dependence_distance_ge_vf): Take the vectorization factor as a
33393 poly_uint64 rather than an unsigned HOST_WIDE_INT.
33394 (vect_analyze_data_refs): Change min_vf from an int * to a
33395 poly_uint64 *.
33396 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
33397 vfm1 as a poly_uint64 rather than an int. Make the same change
33398 for the returned bound_scalar.
33399 (vect_gen_vector_loop_niters): Handle polynomial vf.
33400 (vect_do_peeling): Likewise. Update call to
33401 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
33402 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
33403 be constant.
33404 * tree-vect-loop.c (vect_determine_vectorization_factor)
33405 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
33406 (vect_get_known_peeling_cost): Likewise.
33407 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
33408 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
33409 (vect_transform_loop): Likewise. Use the lowest possible VF when
33410 updating the upper bounds of the loop.
33411 (vect_min_worthwhile_factor): Make static. Return an unsigned int
33412 rather than an int.
33413 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
33414 polynomial unroll factors.
33415 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
33416 (vect_make_slp_decision): Likewise.
33417 (vect_supported_load_permutation_p): Likewise, and polynomial
33418 vf too.
33419 (vect_analyze_slp_cost): Handle polynomial vf.
33420 (vect_slp_analyze_node_operations): Likewise.
33421 (vect_slp_analyze_bb_1): Likewise.
33422 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
33423 than an unsigned HOST_WIDE_INT.
33424 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
33425 (vectorizable_load): Handle polynomial vf.
33426 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
33427 a poly_uint64.
33428 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
33429
33430 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33431 Alan Hayward <alan.hayward@arm.com>
33432 David Sherwood <david.sherwood@arm.com>
33433
33434 * match.pd: Handle bit operations involving three constants
33435 and try to fold one pair.
33436
33437 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33438
33439 * tree-vect-loop-manip.c: Include gimple-fold.h.
33440 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
33441 niters_maybe_zero parameters. Handle other cases besides a step of 1.
33442 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
33443 Add a path that uses a step of VF instead of 1, but disable it
33444 for now.
33445 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
33446 and niters_no_overflow parameters. Update calls to
33447 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
33448 Create a new SSA name if the latter choses to use a ste other
33449 than zero, and return it via niters_vector_mult_vf_var.
33450 * tree-vect-loop.c (vect_transform_loop): Update calls to
33451 vect_do_peeling, vect_gen_vector_loop_niters and
33452 slpeel_make_loop_iterate_ntimes.
33453 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
33454 (vect_gen_vector_loop_niters): Update declarations after above changes.
33455
33456 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
33457
33458 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
33459 128-bit round to integer instructions.
33460 (ceil<mode>2): Likewise.
33461 (btrunc<mode>2): Likewise.
33462 (round<mode>2): Likewise.
33463
33464 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
33465
33466 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
33467 unaligned VSX load/store on P8/P9.
33468 (expand_block_clear): Allow the use of unaligned VSX
33469 load/store on P8/P9.
33470
33471 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
33472
33473 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
33474 New function.
33475 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
33476 swap associated with both a load and a store.
33477
33478 2018-01-02 Andrew Waterman <andrew@sifive.com>
33479
33480 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
33481 * config/riscv/riscv.md (clear_cache): Use it.
33482
33483 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
33484
33485 * web.c: Remove out-of-date comment.
33486
33487 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33488
33489 * expr.c (fixup_args_size_notes): Check that any existing
33490 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
33491 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
33492 (emit_single_push_insn): ...here.
33493
33494 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33495
33496 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
33497 (const_vector_encoded_nelts): New function.
33498 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
33499 (const_vector_int_elt, const_vector_elt): Declare.
33500 * emit-rtl.c (const_vector_int_elt_1): New function.
33501 (const_vector_elt): Likewise.
33502 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
33503 of CONST_VECTOR_ELT.
33504
33505 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33506
33507 * expr.c: Include rtx-vector-builder.h.
33508 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
33509 directly on the tree encoding.
33510 (const_vector_from_tree): Likewise.
33511 * optabs.c: Include rtx-vector-builder.h.
33512 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
33513 sequence of "u" values.
33514 * vec-perm-indices.c: Include rtx-vector-builder.h.
33515 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
33516 directly on the vec_perm_indices encoding.
33517
33518 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33519
33520 * doc/rtl.texi (const_vector): Describe new encoding scheme.
33521 * Makefile.in (OBJS): Add rtx-vector-builder.o.
33522 * rtx-vector-builder.h: New file.
33523 * rtx-vector-builder.c: Likewise.
33524 * rtl.h (rtx_def::u2): Add a const_vector field.
33525 (CONST_VECTOR_NPATTERNS): New macro.
33526 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
33527 (CONST_VECTOR_DUPLICATE_P): Likewise.
33528 (CONST_VECTOR_STEPPED_P): Likewise.
33529 (CONST_VECTOR_ENCODED_ELT): Likewise.
33530 (const_vec_duplicate_p): Check for a duplicated vector encoding.
33531 (unwrap_const_vec_duplicate): Likewise.
33532 (const_vec_series_p): Check for a non-duplicated vector encoding.
33533 Say that the function only returns true for integer vectors.
33534 * emit-rtl.c: Include rtx-vector-builder.h.
33535 (gen_const_vec_duplicate_1): Delete.
33536 (gen_const_vector): Call gen_const_vec_duplicate instead of
33537 gen_const_vec_duplicate_1.
33538 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
33539 (gen_const_vec_duplicate): Use rtx_vector_builder.
33540 (gen_const_vec_series): Likewise.
33541 (gen_rtx_CONST_VECTOR): Likewise.
33542 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
33543 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
33544 Build a new vector rather than modifying a CONST_VECTOR in-place.
33545 (handle_special_swappables): Update call accordingly.
33546 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
33547 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
33548 Build a new vector rather than modifying a CONST_VECTOR in-place.
33549 (handle_special_swappables): Update call accordingly.
33550
33551 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33552
33553 * simplify-rtx.c (simplify_const_binary_operation): Use
33554 CONST_VECTOR_ELT instead of XVECEXP.
33555
33556 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33557
33558 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
33559 the selector elements to be different from the data elements
33560 if the selector is a VECTOR_CST.
33561 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
33562 ssizetype for the selector.
33563
33564 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33565
33566 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
33567 before testing each element individually.
33568 * tree-vect-generic.c (lower_vec_perm): Likewise.
33569
33570 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33571
33572 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
33573 * selftest-run-tests.c (selftest::run_tests): Call it.
33574 * vector-builder.h (vector_builder::operator ==): New function.
33575 (vector_builder::operator !=): Likewise.
33576 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
33577 (vec_perm_indices::all_from_input_p): New function.
33578 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
33579 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
33580 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
33581 instead of reading the VECTOR_CST directly. Detect whether both
33582 vector inputs are the same before constructing the vec_perm_indices,
33583 and update the number of inputs argument accordingly. Use the
33584 utility functions added above. Only construct sel2 if we need to.
33585
33586 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33587
33588 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
33589 the broadcast of the low byte.
33590 (expand_mult_highpart): Use an explicit encoding for the permutes.
33591 * optabs-query.c (can_mult_highpart_p): Likewise.
33592 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
33593 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33594 (vectorizable_bswap): Likewise.
33595 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
33596 explicit encoding for the power-of-2 permutes.
33597 (vect_permute_store_chain): Likewise.
33598 (vect_grouped_load_supported): Likewise.
33599 (vect_permute_load_chain): Likewise.
33600
33601 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33602
33603 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
33604 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
33605 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
33606 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
33607 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
33608 (vect_gen_perm_mask_any): Likewise.
33609
33610 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33611
33612 * int-vector-builder.h: New file.
33613 * vec-perm-indices.h: Include int-vector-builder.h.
33614 (vec_perm_indices): Redefine as an int_vector_builder.
33615 (auto_vec_perm_indices): Delete.
33616 (vec_perm_builder): Redefine as a stand-alone class.
33617 (vec_perm_indices::vec_perm_indices): New function.
33618 (vec_perm_indices::clamp): Likewise.
33619 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
33620 (vec_perm_indices::new_vector): New function.
33621 (vec_perm_indices::new_expanded_vector): Update for new
33622 vec_perm_indices class.
33623 (vec_perm_indices::rotate_inputs): New function.
33624 (vec_perm_indices::all_in_range_p): Operate directly on the
33625 encoded form, without computing elided elements.
33626 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
33627 encoding. Update for new vec_perm_indices class.
33628 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
33629 the given vec_perm_builder.
33630 (expand_vec_perm_var): Update vec_perm_builder constructor.
33631 (expand_mult_highpart): Use vec_perm_builder instead of
33632 auto_vec_perm_indices.
33633 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
33634 vec_perm_indices instead of auto_vec_perm_indices. Use a single
33635 or double series encoding as appropriate.
33636 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
33637 vec_perm_indices instead of auto_vec_perm_indices.
33638 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33639 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33640 (vect_permute_store_chain): Likewise.
33641 (vect_grouped_load_supported): Likewise.
33642 (vect_permute_load_chain): Likewise.
33643 (vect_shift_permute_load_chain): Likewise.
33644 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
33645 (vect_transform_slp_perm_load): Likewise.
33646 (vect_schedule_slp_instance): Likewise.
33647 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33648 (vectorizable_mask_load_store): Likewise.
33649 (vectorizable_bswap): Likewise.
33650 (vectorizable_store): Likewise.
33651 (vectorizable_load): Likewise.
33652 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
33653 vec_perm_indices instead of auto_vec_perm_indices. Use
33654 tree_to_vec_perm_builder to read the vector from a tree.
33655 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
33656 vec_perm_builder instead of a vec_perm_indices.
33657 (have_whole_vector_shift): Use vec_perm_builder and
33658 vec_perm_indices instead of auto_vec_perm_indices. Leave the
33659 truncation to calc_vec_perm_mask_for_shift.
33660 (vect_create_epilog_for_reduction): Likewise.
33661 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
33662 from auto_vec_perm_indices to vec_perm_indices.
33663 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
33664 instead of changing individual elements.
33665 (aarch64_vectorize_vec_perm_const): Use new_vector to install
33666 the vector in d.perm.
33667 * config/arm/arm.c (expand_vec_perm_d::perm): Change
33668 from auto_vec_perm_indices to vec_perm_indices.
33669 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
33670 instead of changing individual elements.
33671 (arm_vectorize_vec_perm_const): Use new_vector to install
33672 the vector in d.perm.
33673 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
33674 Update vec_perm_builder constructor.
33675 (rs6000_expand_interleave): Likewise.
33676 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
33677 (rs6000_expand_interleave): Likewise.
33678
33679 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33680
33681 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
33682 to qimode could truncate the indices.
33683 * optabs.c (expand_vec_perm_var): Likewise.
33684
33685 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33686
33687 * Makefile.in (OBJS): Add vec-perm-indices.o.
33688 * vec-perm-indices.h: New file.
33689 * vec-perm-indices.c: Likewise.
33690 * target.h (vec_perm_indices): Replace with a forward class
33691 declaration.
33692 (auto_vec_perm_indices): Move to vec-perm-indices.h.
33693 * optabs.h: Include vec-perm-indices.h.
33694 (expand_vec_perm): Delete.
33695 (selector_fits_mode_p, expand_vec_perm_var): Declare.
33696 (expand_vec_perm_const): Declare.
33697 * target.def (vec_perm_const_ok): Replace with...
33698 (vec_perm_const): ...this new hook.
33699 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
33700 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
33701 * doc/tm.texi: Regenerate.
33702 * optabs.def (vec_perm_const): Delete.
33703 * doc/md.texi (vec_perm_const): Likewise.
33704 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
33705 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
33706 expand_vec_perm for constant permutation vectors. Assert that
33707 the mode of variable permutation vectors is the integer equivalent
33708 of the mode that is being permuted.
33709 * optabs-query.h (selector_fits_mode_p): Declare.
33710 * optabs-query.c: Include vec-perm-indices.h.
33711 (selector_fits_mode_p): New function.
33712 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
33713 is defined, instead of checking whether the vec_perm_const_optab
33714 exists. Use targetm.vectorize.vec_perm_const instead of
33715 targetm.vectorize.vec_perm_const_ok. Check whether the indices
33716 fit in the vector mode before using a variable permute.
33717 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
33718 vec_perm_indices instead of an rtx.
33719 (expand_vec_perm): Replace with...
33720 (expand_vec_perm_const): ...this new function. Take the selector
33721 as a vec_perm_indices rather than an rtx. Also take the mode of
33722 the selector. Update call to shift_amt_for_vec_perm_mask.
33723 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
33724 Use vec_perm_indices::new_expanded_vector to expand the original
33725 selector into bytes. Check whether the indices fit in the vector
33726 mode before using a variable permute.
33727 (expand_vec_perm_var): Make global.
33728 (expand_mult_highpart): Use expand_vec_perm_const.
33729 * fold-const.c: Includes vec-perm-indices.h.
33730 * tree-ssa-forwprop.c: Likewise.
33731 * tree-vect-data-refs.c: Likewise.
33732 * tree-vect-generic.c: Likewise.
33733 * tree-vect-loop.c: Likewise.
33734 * tree-vect-slp.c: Likewise.
33735 * tree-vect-stmts.c: Likewise.
33736 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
33737 Delete.
33738 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
33739 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
33740 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
33741 (aarch64_vectorize_vec_perm_const): ...this new function.
33742 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33743 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33744 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
33745 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
33746 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33747 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33748 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
33749 into...
33750 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
33751 check for NEON modes.
33752 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
33753 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
33754 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
33755 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
33756 into...
33757 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
33758 the old VEC_PERM_CONST conditions.
33759 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
33760 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
33761 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
33762 (ia64_vectorize_vec_perm_const_ok): Merge into...
33763 (ia64_vectorize_vec_perm_const): ...this new function.
33764 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
33765 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
33766 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
33767 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
33768 * config/mips/mips.c (mips_expand_vec_perm_const)
33769 (mips_vectorize_vec_perm_const_ok): Merge into...
33770 (mips_vectorize_vec_perm_const): ...this new function.
33771 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
33772 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
33773 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
33774 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
33775 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
33776 (rs6000_expand_vec_perm_const): Delete.
33777 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
33778 Delete.
33779 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33780 (altivec_expand_vec_perm_const_le): Take each operand individually.
33781 Operate on constant selectors rather than rtxes.
33782 (altivec_expand_vec_perm_const): Likewise. Update call to
33783 altivec_expand_vec_perm_const_le.
33784 (rs6000_expand_vec_perm_const): Delete.
33785 (rs6000_vectorize_vec_perm_const_ok): Delete.
33786 (rs6000_vectorize_vec_perm_const): New function.
33787 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
33788 an element count and rtx array.
33789 (rs6000_expand_extract_even): Update call accordingly.
33790 (rs6000_expand_interleave): Likewise.
33791 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
33792 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
33793 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
33794 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
33795 (rs6000_expand_vec_perm_const): Delete.
33796 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33797 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33798 (altivec_expand_vec_perm_const_le): Take each operand individually.
33799 Operate on constant selectors rather than rtxes.
33800 (altivec_expand_vec_perm_const): Likewise. Update call to
33801 altivec_expand_vec_perm_const_le.
33802 (rs6000_expand_vec_perm_const): Delete.
33803 (rs6000_vectorize_vec_perm_const_ok): Delete.
33804 (rs6000_vectorize_vec_perm_const): New function. Remove stray
33805 reference to the SPE evmerge intructions.
33806 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
33807 an element count and rtx array.
33808 (rs6000_expand_extract_even): Update call accordingly.
33809 (rs6000_expand_interleave): Likewise.
33810 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
33811 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
33812 new function.
33813 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33814
33815 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33816
33817 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
33818 vector mode and that that mode matches the mode of the data
33819 being permuted.
33820 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
33821 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
33822 directly using expand_vec_perm_1 when forcing selectors into
33823 registers.
33824 (expand_vec_perm_var): New function, split out from expand_vec_perm.
33825
33826 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33827
33828 * optabs-query.h (can_vec_perm_p): Delete.
33829 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
33830 * optabs-query.c (can_vec_perm_p): Split into...
33831 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
33832 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
33833 particular selector is valid.
33834 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33835 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33836 (vect_grouped_load_supported): Likewise.
33837 (vect_shift_permute_load_chain): Likewise.
33838 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
33839 (vect_transform_slp_perm_load): Likewise.
33840 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33841 (vectorizable_bswap): Likewise.
33842 (vect_gen_perm_mask_checked): Likewise.
33843 * fold-const.c (fold_ternary_loc): Likewise. Don't take
33844 implementations of variable permutation vectors into account
33845 when deciding which selector to use.
33846 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
33847 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
33848 with a false third argument.
33849 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
33850 to test whether the constant selector is valid and can_vec_perm_var_p
33851 to test whether a variable selector is valid.
33852
33853 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33854
33855 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
33856 * optabs-query.c (can_vec_perm_p): Likewise.
33857 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
33858 instead of vec_perm_indices.
33859 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
33860 (vect_gen_perm_mask_checked): Likewise,
33861 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
33862 (vect_gen_perm_mask_checked): Likewise,
33863
33864 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33865
33866 * optabs-query.h (qimode_for_vec_perm): Declare.
33867 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
33868 (qimode_for_vec_perm): ...this new function.
33869 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
33870
33871 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
33872
33873 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
33874 does not have a conditional at the top.
33875
33876 2018-01-02 Richard Biener <rguenther@suse.de>
33877
33878 * ipa-inline.c (big_speedup_p): Fix expression.
33879
33880 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
33881
33882 PR target/81616
33883 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
33884 for generic 4->6.
33885
33886 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
33887
33888 PR target/81616
33889 Generic tuning.
33890 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
33891 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
33892 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
33893 cond_taken_branch_cost 3->4.
33894
33895 2018-01-01 Jakub Jelinek <jakub@redhat.com>
33896
33897 PR tree-optimization/83581
33898 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
33899 TODO_cleanup_cfg if any changes have been made.
33900
33901 PR middle-end/83608
33902 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
33903 convert_modes if target mode has the right side, but different mode
33904 class.
33905
33906 PR middle-end/83609
33907 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
33908 last argument when extracting from CONCAT. If either from_real or
33909 from_imag is NULL, use expansion through memory. If result is not
33910 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
33911 the parts directly to inner mode, if even that fails, use expansion
33912 through memory.
33913
33914 PR middle-end/83623
33915 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
33916 check for bswap in mode rather than HImode and use that in expand_unop
33917 too.
33918 \f
33919 Copyright (C) 2018 Free Software Foundation, Inc.
33920
33921 Copying and distribution of this file, with or without modification,
33922 are permitted in any medium without royalty provided the copyright
33923 notice and this notice are preserved.