PR middle-end/82063 - issues with arguments enabled by -Wall
[gcc.git] / gcc / ChangeLog
1 2018-07-20 Martin Sebor <msebor@redhat.com>
2
3 PR middle-end/82063
4 * builtins.c (expand_builtin_alloca): Adjust.
5 * calls.c (alloc_max_size): Simplify.
6 * cgraphunit.c (cgraph_node::expand): Adjust.
7 * common.opt (larger_than_size, warn_frame_larger_than): Remove
8 variables.
9 (frame_larger_than_size): Same.
10 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
11 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
12 Initialize.
13 * doc/invoke.texi (GCC Command Options): Document option arguments.
14 Explain byte-size arguments and suffixes.
15 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
16 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
17 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
18 * doc/options.texi (UInteger): Expand.
19 (Host_Wide_Int, ByteSize): Document new properties.
20 * final.c (final_start_function_1): Include sizes in an error message.
21 * function.c (frame_offset_overflow): Same.
22 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
23 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
24 Diagnose unbounded alloca calls only for limits of less than
25 PTRDIFF_MAX.
26 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
27 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
28 for alloca(0).
29 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
30 only for limits of less than PTRDIFF_MAX.
31 * langhooks-def.h (lhd_handle_option): Change function argument
32 to HOST_WIDE_INT.
33 * langhooks.c (lhd_handle_option): Same.
34 * langhooks.h (handle_option): Same.
35 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
36 ByteSize flags.
37 (var_type, var_type_struct): Same.
38 (var_set): Handle ByteSize flag.
39 * optc-gen.awk: Add comments to output to ease debugging. Make
40 use of HOST_WIDE_INT where appropriate.
41 * opts-gen-save.awk: Use %lx to format unsigned long.
42 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
43 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
44 arguments. Parse bytes-size suffixes.
45 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
46 (enum_value_to_arg): Same.
47 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
48 (handle_option): Adjust.
49 (generate_option): Change function argument to HOST_WIDE_INT.
50 (cmdline_handle_error): Adjust.
51 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
52 (set_option): Change function argument to HOST_WIDE_INT.
53 (option_enabled): Handle cl_host_wide_int.
54 (get_option_state): Handle CLVC_SIZE.
55 (control_warning_option): Same.
56 * opts.c (common_handle_option): Change function argument to
57 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
58 OPT_Wvla_larger_than_.
59 * opts.h (enum cl_var_type): Add an enumerator.
60 * stor-layout.c (layout_decl): Print a more meaningful warning.
61 * toplev.c (output_stack_usage): Adjust.
62
63 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
64
65 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
66 call to inline_expand_builtin_string_cmp.
67 (expand_builtin_strcmp): Likewise.
68 (expand_builtin_strncmp): Likewise.
69 (inline_string_cmp): Delete the last parameter, change char_type_node
70 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
71 two operands.
72 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
73 the inlining expansion on target where the type of the call has same or
74 narrower precision than unsigned char.
75
76 2018-07-20 David Malcolm <dmalcolm@redhat.com>
77
78 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
79 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
80 * common.opt (fsave-optimization-record): New option.
81 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
82 * doc/invoke.texi (-fsave-optimization-record): New option.
83 * dumpfile.c: Include "optinfo-emit-json.h".
84 (struct kv_pair): Move to coretypes.h.
85 (optgroup_options): Make non-static.
86 (dump_context::end_scope): Call
87 optimization_records_maybe_pop_dump_scope.
88 * dumpfile.h (optgroup_options): New decl.
89 * json.cc: New file.
90 * json.h: New file.
91 * optinfo-emit-json.cc: New file.
92 * optinfo-emit-json.h: New file.
93 * optinfo.cc: Include "optinfo-emit-json.h".
94 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
95 (optinfo_enabled_p): Check optimization_records_enabled_p.
96 (optinfo_wants_inlining_info_p): Likewise.
97 * optinfo.h: Update comment.
98 * profile-count.c (profile_quality_as_string): New function.
99 * profile-count.h (profile_quality_as_string): New decl.
100 (profile_count::quality): New accessor.
101 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
102 and optinfo_emit_json_cc_tests.
103 * selftest.h (selftest::json_cc_tests): New decl.
104 (selftest::optinfo_emit_json_cc_tests): New decl.
105 * toplev.c: Include "optinfo-emit-json.h".
106 (compile_file): Call optimization_records_finish.
107 (do_compile): Call optimization_records_start.
108 * tree-ssa-live.c: Include optinfo.h.
109 (remove_unused_scope_block_p): Retain inlining information if
110 optinfo_wants_inlining_info_p returns true.
111
112 2018-07-20 Richard Biener <rguenther@suse.de>
113
114 PR debug/86585
115 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
116 to cover -flto-partition=none.
117
118 2018-07-20 Martin Liska <mliska@suse.cz>
119
120 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
121 (get_decl_source_range): Remove unused function.
122
123 2018-07-20 Richard Biener <rguenther@suse.de>
124
125 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
126 (struct vn_phi_s): Likewise.
127 (struct vn_reference_s): Likewise.
128 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
129 for searching the slot of an entry known to be in the hash itself.
130 (vn_phi_hasher::equal): Likewise.
131 (vn_reference_hasher::equal): Likewise.
132 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
133 globals.
134 (optimistic_info, current_info): Remove, keeping only valid_info.
135 (vn_reference_lookup_1): Remove fallback lookup.
136 (vn_reference_lookup_2): Likewise.
137 (vn_nary_op_lookup_1): Likewise.
138 (vn_phi_lookup): Likewise.
139 (vn_nary_build_or_lookup_1): Make sure to not chain the built
140 hash element.
141 (vn_reference_insert): Adjust, chain the inserted hash element
142 at last_inserted_ref.
143 (vn_reference_insert_pieces): Likewise.
144 (visit_reference_op_call): Likewise.
145 (vn_nary_op_insert_into): Chain the inserted hash element at
146 last_inserted_nary.
147 (vn_nary_op_insert_pieces): Adjust.
148 (vn_nary_op_insert): Likewise.
149 (vn_nary_op_insert_stmt): Likewise.
150 (vn_phi_insert): Adjust, chain the inserted hash element at
151 last_inserted_phi.
152 (process_scc): Remove clearing and copying the optimistic
153 table. Instead remove elements inserted during an optimistic
154 iteration from the single table we maintain.
155 (init_scc_vn): Adjust.
156 (free_scc_vn): Likewise.
157 (sccvn_dom_walker::record_cond): Likewise.
158 (sccvn_dom_walker::after_dom_children): Likewise.
159
160 2018-07-19 Martin Sebor <msebor@redhat.com>
161
162 PR tree-optimization/84047
163 PR tree-optimization/83776
164 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
165 (check_array_bounds): Call it.
166
167 2018-07-19 Martin Sebor <msebor@redhat.com>
168
169 * align.h (align_flags): Use member initialization.
170
171 2018-07-19 David Malcolm <dmalcolm@redhat.com>
172
173 * Makefile.in (OBJS): Add optinfo.o.
174 * coretypes.h (class symtab_node): New forward decl.
175 (struct cgraph_node): New forward decl.
176 (class varpool_node): New forward decl.
177 * dump-context.h: New file.
178 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
179 "tree-pass.h".
180 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
181 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
182 (set_alt_dump_file): Likewise.
183 (dump_context::~dump_context): New dtor.
184 (dump_gimple_stmt): Move implementation to...
185 (dump_context::dump_gimple_stmt): ...this new member function.
186 Add the stmt to any pending optinfo, creating one if need be.
187 (dump_gimple_stmt_loc): Move implementation to...
188 (dump_context::dump_gimple_stmt_loc): ...this new member function.
189 Start a new optinfo and add the stmt to it.
190 (dump_gimple_expr): Move implementation to...
191 (dump_context::dump_gimple_expr): ...this new member function.
192 Add the stmt to any pending optinfo, creating one if need be.
193 (dump_gimple_expr_loc): Move implementation to...
194 (dump_context::dump_gimple_expr_loc): ...this new member function.
195 Start a new optinfo and add the stmt to it.
196 (dump_generic_expr): Move implementation to...
197 (dump_context::dump_generic_expr): ...this new member function.
198 Add the tree to any pending optinfo, creating one if need be.
199 (dump_generic_expr_loc): Move implementation to...
200 (dump_context::dump_generic_expr_loc): ...this new member
201 function. Add the tree to any pending optinfo, creating one if
202 need be.
203 (dump_printf): Move implementation to...
204 (dump_context::dump_printf_va): ...this new member function. Add
205 the text to any pending optinfo, creating one if need be.
206 (dump_printf_loc): Move implementation to...
207 (dump_context::dump_printf_loc_va): ...this new member function.
208 Start a new optinfo and add the stmt to it.
209 (dump_dec): Move implementation to...
210 (dump_context::dump_dec): ...this new member function. Add the
211 value to any pending optinfo, creating one if need be.
212 (dump_context::dump_symtab_node): New member function.
213 (dump_context::get_scope_depth): New member function.
214 (dump_context::begin_scope): New member function.
215 (dump_context::end_scope): New member function.
216 (dump_context::ensure_pending_optinfo): New member function.
217 (dump_context::begin_next_optinfo): New member function.
218 (dump_context::end_any_optinfo): New member function.
219 (dump_context::s_current): New global.
220 (dump_context::s_default): New global.
221 (dump_scope_depth): Delete global.
222 (dumpfile_ensure_any_optinfo_are_flushed): New function.
223 (dump_symtab_node): New function.
224 (get_dump_scope_depth): Reimplement in terms of dump_context.
225 (dump_begin_scope): Likewise.
226 (dump_end_scope): Likewise.
227 (selftest::temp_dump_context::temp_dump_context): New ctor.
228 (selftest::temp_dump_context::~temp_dump_context): New dtor.
229 (selftest::verify_item): New function.
230 (ASSERT_IS_TEXT): New macro.
231 (ASSERT_IS_TREE): New macro.
232 (ASSERT_IS_GIMPLE): New macro.
233 (selftest::test_capture_of_dump_calls): New test.
234 (selftest::dumpfile_c_tests): Call it.
235 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
236 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
237 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
238 descriptive comment.
239 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
240 (dump_node, dump_bb): Move these unrelated decls.
241 (class dump_manager): Add leading comment.
242 * optinfo.cc: New file.
243 * optinfo.h: New file.
244
245 2018-07-19 Michael Collison <michael.collison@arm.com>
246 Richard Henderson <rth@redhat.com>
247
248 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
249 (subti): Handle op1 zero.
250 (subvti4, usub4ti4): New.
251 (*sub<GPI>3_compare1_imm): New.
252 (sub<GPI>3_carryinCV): New.
253 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
254 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
255
256 2018-07-19 Michael Collison <michael.collison@arm.com>
257 Richard Henderson <rth@redhat.com>
258
259 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
260 (addti3): Create simpler code if low part is already known to be 0.
261 (addvti4, uaddvti4): New.
262 (*add<GPI>3_compareC_cconly_imm): New.
263 (*add<GPI>3_compareC_cconly): New.
264 (*add<GPI>3_compareC_imm): New.
265 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
266 handle constants within this pattern..
267 (*add<GPI>3_compareV_cconly_imm): New.
268 (*add<GPI>3_compareV_cconly): New.
269 (*add<GPI>3_compareV_imm): New.
270 (add<GPI>3_compareV): New.
271 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
272 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
273 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
274 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
275 with 'comparison' operator.
276 (*add<GPI>3_compareV_cconly_imm): Ditto.
277 (*add<GPI>3_compareV_cconly): Ditto.
278 (*add<GPI>3_compareV_imm): Ditto.
279 (add<GPI>3_compareV): Ditto.
280 (add<mode>3_carryinC): Ditto.
281 (*add<mode>3_carryinC_zero): Ditto.
282 (*add<mode>3_carryinC): Ditto.
283 (add<mode>3_carryinV): Ditto.
284 (*add<mode>3_carryinV_zero): Ditto.
285 (*add<mode>3_carryinV): Ditto.
286
287 2018-07-19 Michael Collison <michael.collison@arm.com>
288 Richard Henderson <rth@redhat.com>
289
290 * config/aarch64/aarch64-modes.def (CC_V): New.
291 * config/aarch64/aarch64-protos.h
292 (aarch64_addti_scratch_regs): Declare
293 (aarch64_subvti_scratch_regs): Declare.
294 (aarch64_expand_subvti): Declare.
295 (aarch64_gen_unlikely_cbranch): Declare
296 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
297 for signed overflow using CC_Vmode.
298 (aarch64_get_condition_code_1): Handle CC_Vmode.
299 (aarch64_gen_unlikely_cbranch): New function.
300 (aarch64_addti_scratch_regs): New function.
301 (aarch64_subvti_scratch_regs): New function.
302 (aarch64_expand_subvti): New function.
303
304 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
305
306 * config/aarch64/aarch64-option-extensions.def: New entry for profile
307 extension.
308 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
309 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
310 extension.
311
312 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
313
314 PR target/83009
315 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
316 address check not strict.
317
318 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
319
320 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
321 Umq with Umn.
322 (store_pair_lanes<mode>): Likewise.
323 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
324 enum value 'ADDR_QUERY_LDP_STP_N'.
325 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
326 (aarch64_print_address_internal): Add declaration.
327 (aarch64_print_ldpstp_address): Remove.
328 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
329 (aarch64_print_operand): Change printing of 'y'.
330 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
331 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
332 'true' rather than '1'.
333 * gcc/config/aarch64/constraints.md (Uml): Likewise.
334 (Uml): Rename to Umn.
335 (Umq): Remove.
336
337 2018-07-19 Richard Biener <rguenther@suse.de>
338
339 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
340 a trailing array.
341 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
342 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
343 (vn_reference_hasher): Likewise.
344 (struct vn_tables_s): Remove obstack and alloc-pool members.
345 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
346 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
347 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
348 (vn_reference_insert_pieces): Likewise.
349 (alloc_vn_nary_op_noinit): Adjust.
350 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
351 (vn_phi_eq): Adjust.
352 (shared_lookup_phiargs): Remove.
353 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
354 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
355 (visit_reference_op_call): Likewise.
356 (copy_nary, copy_phi, copy_reference): Remove.
357 (process_scc): Rewind the obstack when iterating. Do not
358 copy the elements to valid_info but just move them from one
359 hashtable to the other.
360 (allocate_vn_table): Adjust.
361 (free_vn_table): Likewise.
362 (init_scc_vn): Likewise.
363 (free_scc_vn): Likewise.
364
365 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
366
367 PR target/86560
368 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
369 indirect_return as function type attribute.
370 (ix86_attribute_table): Change indirect_return to function
371 type attribute.
372 * doc/extend.texi: Update indirect_return attribute.
373
374 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
375
376 * wide-int.h (widest2_int): New.
377 * gimple-fold.c (arith_overflowed_p): Use it.
378 * tree.h (widest2_int_cst): New.
379 * tree-vrp.c (wide_int_binop_overflow): Rename from
380 vrp_int_const_binop.
381 Rewrite to work on trees.
382 (extract_range_from_multiplicative_op_1): Abstract code to...
383 (wide_int_range_min_max): ...here.
384 (wide_int_range_cross_product): ...and here.
385 (extract_range_from_binary_expr_1): Abstract overflow code to...
386 (wide_int_range_mult_wrapping): ...here.
387 * tree-vrp.h (wide_int_range_cross_product): New.
388 (wide_int_range_mult_wrapping): New.
389
390 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
391 Julia Koval <julia.koval@intel.com>
392
393 * config/i386/x86-tune-costs.h (skylake_memcpy,
394 skylake_memset): Replace rep_prefix with unrolling for size 512.
395
396 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
397
398 PR middle-end/86544
399 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
400 in last stmt.
401
402 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
403
404 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
405 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
406 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
407 previously known as "PowerPC AltiVec Built-in Functions". Move
408 some material to new subsubsections "PowerPC AltiVec Built-in
409 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
410 ISA 2.07".
411 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
412 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
413 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
414 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
415
416 2018-07-18 Richard Biener <rguenther@suse.de>
417
418 PR tree-optimization/86557
419 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
420 EXACT_DIV_EXPR.
421
422 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
423
424 * config/s390/s390.c (s390_function_profiler): Generate CFI.
425
426 2018-07-17 Jeff Law <law@redhat.com>
427
428 * config/arm/arm.c (get_label_padding): Update for recent
429 changes to label_to_alignment.
430
431 PR tree-optimization/86010
432 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
433
434 * config/mips/mips.c (vr4130_align_insns): Update for recent
435 changes to label_to_alignment.
436
437 * config/frv/frv.c (frv_label_align): Update for recent changes
438 to label_to_alignment.
439
440 * config/nios2/nios2.c (nios2_label_align): Update for recent
441 changes which dropped ALIGN_LABELS_LOG.
442
443 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
444
445 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
446 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
447
448 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
449
450 * config/arc/arc.c (arc_label_align): Use align_labels instead of
451 deprecated align_labels_log.
452
453 2018-07-17 Richard Biener <rguenther@suse.de>
454
455 PR lto/86456
456 * dwarf2out.c (init_sections_and_labels): Always generate
457 a debug_line_str_section for early LTO debug.
458 (dwarf2out_finish): Reset debug_line_str_hash output early.
459 Bump counter for extra dwarf5 .debug_loc labels to not conflict
460 with fat LTO part.
461 (dwarf2out_early_finish): Output debug_line_str.
462
463 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
464
465 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
466 index register on z196 or later.
467
468 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
469
470 * config/s390/s390.c (s390_default_align): Set default function
471 alignment to 16.
472 (s390_override_options_after_change): Call s390_default align.
473 (s390_option_override_internal): Call s390_default_align.
474 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
475
476 2018-07-17 Jakub Jelinek <jakub@redhat.com>
477
478 PR middle-end/86542
479 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
480 to _looptemp_ clauses, other than the first two.
481
482 2018-07-17 Martin Liska <mliska@suse.cz>
483
484 * opts.c: Do not enable OPT_falign_* for -Os.
485
486 2018-07-17 Martin Liska <mliska@suse.cz>
487
488 * align.h (MAX_CODE_ALIGN): New.
489 (MAX_CODE_ALIGN_VALUE): New.
490 * common/config/i386/i386-common.c (ix86_handle_option):
491 (MAX_CODE_ALIGN): Moved to align.h.
492 * final.c (MAX_CODE_ALIGN): Likewise.
493 * opts.c (parse_and_check_align_values):
494 (MAX_CODE_ALIGN): Likewise.
495 (MAX_CODE_ALIGN_VALUE): Likewise.
496
497 2018-07-17 Martin Liska <mliska@suse.cz>
498
499 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
500 in order to fulfil coding style.
501 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
502 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
503 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
504 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
505 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
506 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
507 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
508 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
509 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
510
511 2018-07-17 Martin Liska <mliska@suse.cz>
512
513 * align.h: New file.
514 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
515 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
516 align_flags of label_to_alignment.
517 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
518 class.
519 * config/m68k/m68k.c: Do not use removed align_labels_value and
520 align_loops_value.
521 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
522 (LOOP_ALIGN): Likewise.
523 (LABEL_ALIGN): Likewise.
524 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
525 Remove not used macro.
526 (rs6000_loop_align): Change return type to align_flags.
527 (rs6000_loop_align_max_skip): Remove.
528 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
529 Change return type to align_flags.
530 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
531 Remove not used macro.
532 (rs6000_loop_align): Change return type to align_flags.
533 (rs6000_loop_align_max_skip): Remove.
534 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
535 * config/rx/rx-protos.h (rx_align_for_label): Make it
536 static function.
537 * config/rx/rx.c (rx_align_for_label): Change return type
538 to align_flags.
539 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
540 macro definitions.
541 into align_flags class.
542 (LABEL_ALIGN): Likewise.
543 (LOOP_ALIGN): Likewise.
544 * config/s390/s390.c (s390_label_align): Use align_flags
545 class member.
546 (s390_asm_output_function_label): Likewise.
547 * config/sh/sh.c (sh_override_options_after_change):
548 Use align_flags class directly without macros.
549 (find_barrier): Likewise.
550 (barrier_align): Likewise.
551 (sh_loop_align): Likewise.
552 * config/spu/spu.c (spu_option_override):
553 Use align_flags_tuple::get_value instead of removed macros.
554 (spu_sched_init): Likewise.
555 * config/spu/spu.h (GTY): Likewise.
556 * config/visium/visium.c (visium_option_override):
557 Set "8" as default secondary alignment.
558 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
559 in order to guarantee secondary alignment of 8.
560 * coretypes.h: Include align.h header file.
561 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
562 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
563 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
564 * doc/tm.texi.in: Likewise.
565 * final.c (struct label_alignment): Remove not used structure.
566 (LABEL_ALIGN): Change type to align_flags.
567 (LOOP_ALIGN): Likewise.
568 (JUMP_ALIGN): Likewise.
569 (default_loop_align_max_skip): Remove.
570 (default_label_align_max_skip): Likewise.
571 (default_jump_align_max_skip): Likewise.
572 (default_label_align_after_barrier_max_skip):
573 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
574 (LABEL_TO_MAX_SKIP): Remove.
575 (label_to_alignment): Return align_flags type instead of integer.
576 (label_to_max_skip): Remove.
577 (align_fuzz): Use align_flags type.
578 (compute_alignments): Use align_flags type and use align_flags::max
579 to combine multiple alignments.
580 (grow_label_align): Grow vec instead of C array.
581 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
582 (shorten_branches): Use align_flags type and use align_flags::max
583 to combine multiple alignments.
584 (final_scan_insn_1): Remove usage of secondary alignment that comes
585 from label alignment, but instead use proper secondary alignment
586 which is computed in grow_label_align.
587 * flags.h (struct align_flags_tuple): Move to align.h.
588 (struct align_flags): Likewise.
589 (state_align_loops): Rename to align_loops.
590 (state_align_jumps): Rename to align_jumps.
591 (state_align_labels): Rename to align_labels.
592 (state_align_functions): Rename to align_functions.
593 (align_loops_log): Remove.
594 (align_jumps_log): Remove.
595 (align_labels_log): Remove.
596 (align_functions_log): Remove.
597 (align_loops_max_skip): Remove.
598 (align_jumps_max_skip): Remove.
599 (align_labels_max_skip): Remove.
600 (align_functions_max_skip): Remove.
601 (align_loops_value): Remove.
602 (align_jumps_value): Remove.
603 (align_labels_value): Remove.
604 (align_functions_value): Remove.
605 * output.h (label_to_alignment): Change return type to align_flags.
606 (label_to_max_skip): Remove.
607 * target.def: Remove loop_align_max_skip, label_align_max_skip,
608 jump_align_max_skip macros.
609 * targhooks.h (default_loop_align_max_skip): Remove.
610 (default_label_align_max_skip): Likewise.
611 (default_jump_align_max_skip): Likewise.
612 (default_label_align_after_barrier_max_skip): Remove.
613 * toplev.c (read_log_maxskip): Use ::normalize function.
614 (parse_N_M): Remove not used argument and also call ::normalize.
615 (parse_alignment_opts): Do not pass unused arguments.
616 * varasm.c (assemble_start_function): Use directly align_functions
617 instead of removed macros.
618 * system.h: Do not poison removed macros.
619
620 2018-07-17 Jakub Jelinek <jakub@redhat.com>
621
622 PR middle-end/86539
623 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
624 and cond temporaries don't have reference type if iterator has
625 pointer type. For init use &for_pre_body instead of pre_p if
626 for_pre_body is non-empty.
627
628 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
629
630 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
631 double-double modes to SFmode directly directly.
632 (trunc<mode>sf2_fprs): Delete.
633
634 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
635
636 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
637 for conversions between IFmode and the decimal floating point modes.
638 (init_float128_ieee): Use the correct names for conversions between
639 KFmode and the decimal floating point modes.
640
641 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
642
643 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
644 for the conversions between TDmode and IFmode.
645 (init_float128_ieee): Use more correct names for the conversions
646 between TDmode and KFmode.
647
648 2018-07-16 Jakub Jelinek <jakub@redhat.com>
649
650 PR tree-optimization/86526
651 * builtins.c (expand_builtin_memcmp): Formatting fixes.
652 (inline_expand_builtin_string_cmp): Likewise.
653 (inline_string_cmp): Likewise. Use c_readstr instead of
654 builtin_memcpy_read_str. Add unit_mode temporary.
655
656 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
657
658 PR middle-end/86528
659 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
660 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
661
662 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
663
664 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
665 Alphabetize prototypes of built-in functions, separating out
666 built-in functions that are listed in this section but should be
667 described elsewhere.
668
669 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
670
671 PR target/86511
672 * expmed.c (emit_store_flag): Do not emit setcc followed by a
673 conditional move when trapping comparison was split to a
674 non-trapping one (and vice versa).
675
676 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
677
678 * config/s390/s390.c (s390_function_profiler): Generate nops
679 instead of profiler call sequences.
680 * config/s390/s390.opt: Add the new option.
681
682 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
683
684 * config/s390/s390.c (s390_function_profiler): Generate
685 __mcount_loc section.
686 * config/s390/s390.opt: Add the new option.
687
688 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
689
690 * common.opt: Add the new warning.
691 * config/s390/s390.c (s390_function_profiler): Emit "brasl
692 %r0,__fentry__" when -mfentry is specified.
693 (s390_option_override_internal): Disallow -mfentry for 31-bit
694 CPUs.
695 * config/s390/s390.opt: Add the new option.
696
697 2018-07-16 Richard Biener <rguenther@suse.de>
698
699 PR lto/86523
700 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
701 for function-local FUNCTION_DECL and RESULT_DECL immediately.
702
703 2018-07-16 Martin Liska <mliska@suse.cz>
704
705 PR ipa/86529
706 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
707 to ::get_create.
708
709 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
710
711 * config/arc/arcHS.md: Update ARCHS scheduling rules.
712
713 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
714
715 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
716 for ARCHS4x.
717 * config/arc/arc-cpus.def (hs4x): New cpu.
718 (hs4xd): Likewise.
719 * config/arc/arc-tables.opt: Regenerate.
720 * config/arc/arc.c (arc_sched_issue_rate): New function.
721 (TARGET_SCHED_ISSUE_RATE): Define.
722 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
723 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
724 fpu_cvt.
725 (attr tune): Add ARCHS4x tune values.
726 (attr tune_dspmpy): Define.
727 (*tst): Correct instruction type.
728 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
729 * config/arc/arcHS4x.md: New file.
730 * config/arc/fpu.md: Update instruction type attributes.
731 * config/arc/t-multilib: Regenerate.
732
733 2018-07-16 Tom de Vries <tdevries@suse.de>
734
735 PR debug/86455
736 * var-tracking.c (vt_initialize): Fix pre_dec handling.
737
738 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
739
740 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
741 early clobber.
742
743 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
744
745 PR tree-optimization/86514
746 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
747 conversion to a boolean type from a type with greater precision.
748
749 2018-07-16 Tom de Vries <tdevries@suse.de>
750
751 * var-tracking.c (vt_initialize): Print adjusted insn slim if
752 dump_flags request TDF_SLIM.
753
754 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
755
756 * fold-const.c (int_const_binop_1): Abstract...
757 (wide_int_binop): ...wide int code here.
758 (poly_int_binop): ...poly int code here.
759 Abstract the rest of int_const_binop_1 into int_const_binop.
760 * fold-const.h (wide_int_binop): New.
761 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
762 Remove useless PLUS/MINUS_EXPR case.
763 (zero_nonzero_bits_from_vr): Move wide int code...
764 (zero_nonzero_bits_from_bounds): ...here.
765 (extract_range_from_binary_expr_1): Move mask optimization code...
766 (range_easy_mask_min_max): ...here.
767 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
768 (range_easy_mask_min_max): New.
769
770 2018-07-15 Jeff Law <law@redhat.com>
771
772 PR target/85993
773 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
774 block.
775
776 2018-07-14 Jim Wilson <jimw@sifive.com>
777
778 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
779
780 2018-07-14 Paul Koning <ni1d@arrl.net>
781
782 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
783
784 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
785
786 * lto-streamer-out.c (copy_function_or_variable): Dump info about
787 copying section.
788
789 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
790 Steve Munroe <munroesj52@gmail.com>
791
792 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
793 (_mm_andnot_si128): Likewise.
794 (_mm_or_si128): Likewise.
795 (_mm_xor_si128): Likewise.
796
797 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
798
799 PR middle-end/78809
800 * builtins.c (expand_builtin_memcmp): Inline the calls first
801 when result_eq is false.
802 (expand_builtin_strcmp): Inline the calls first.
803 (expand_builtin_strncmp): Likewise.
804 (inline_string_cmp): New routine. Expand a string compare
805 call by using a sequence of char comparison.
806 (inline_expand_builtin_string_cmp): New routine. Inline expansion
807 a call to str(n)cmp/memcmp.
808 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
809 New option.
810 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
811
812 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
813
814 * config/arm/driver-arm.c: Include arm-native.h.
815 (host_detect_local_cpu): Use auto-generated data tables.
816 (vendors, arm_cpu_table): Delete. Move part information to ...
817 * config/arm/arm-cpus.in: ... here.
818 * config/arm/parsecpu.awk (gen_native): New function.
819 (vendor, part): New CPU fields.
820 (END): Add support for building the native CPU detection tables.
821 * config/arm/t-arm (arm-native.h): Add build rule.
822 (driver-arm.o): Add dependency on arm-native.h.
823
824 2018-07-13 Richard Biener <rguenther@suse.de>
825
826 PR middle-end/85974
827 * match.pd (addr1 - addr2): Allow either of the operand to
828 have a conversion.
829
830 2018-07-13 Tom de Vries <tdevries@suse.de>
831
832 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
833 in remap_ssa_name.
834
835 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
836
837 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
838 arrays instead of numbered variables.
839
840 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
841
842 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
843 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
844
845 2018-07-13 Richard Biener <rguenther@suse.de>
846
847 PR debug/86452
848 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
849 instead of get_context_die.
850
851 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
852 Richard Biener <rguenther@suse.de>
853
854 PR middle-end/86489
855 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
856 that the loop latch destination where phi is defined.
857
858 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
859
860 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
861 (riscv_expand_epilogue): Add assertion to check interrupt mode.
862 (riscv_set_current_function): Extract getting interrupt type to new
863 function.
864 (riscv_get_interrupt_type): New function.
865 (riscv_merge_decl_attributes): New function, checking interrupt type is
866 same.
867 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
868
869 2018-07-12 Paul Koning <ni1d@arrl.net>
870
871 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
872 directive.
873
874 2018-07-12 Paul Koning <ni1d@arrl.net>
875
876 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
877 zero reference, add doloop_end instead.
878 * doc/md.texi (decrement_and_branch_until_zero): Remove.
879 (Looping patterns): Remove decrement_and_branch_until_zero. Add
880 detail for doloop_end.
881
882 2018-07-12 Martin Sebor <msebor@redhat.com>
883
884 PR c/86453
885 * attribs.c (decl_attributes): Reject conflicting attributes before
886 calling attribute handlers.
887
888 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
889
890 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
891 parameter.
892 (gcc::dump_manager::get_dump_file_name): likewise.
893 (dump_begin): Likewise.
894 * dumpfile.h (dump_begin): Update prototype.
895 (gcc::dump_manager::get_dump_file_name,
896 gcc::dump_manager::get_dump_file_name): Update prototype.
897
898 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
899
900 * internal-fn.h (vectorizable_internal_fn_p): New function.
901 * tree-vect-slp.c (compatible_calls_p): Likewise.
902 (vect_build_slp_tree_1): Remove nops argument. Handle calls
903 to internal functions.
904 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
905
906 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
907
908 * fold-const.h (inverse_conditions_p): Declare.
909 * fold-const.c (inverse_conditions_p): New function.
910 * match.pd: Use inverse_conditions_p. Add folds of view_converts
911 that test the inverse condition of a conditional internal function.
912 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
913 * internal-fn.c (internal_fn_mask_index): Handle conditional
914 internal functions.
915 (vectorized_internal_fn_supported_p): New function.
916 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
917 (any_pred_load_store): Replace with...
918 (need_to_predicate): ...this new variable.
919 (redundant_ssa_names): New variable.
920 (ifcvt_can_use_mask_load_store): Move initial checks to...
921 (ifcvt_can_predicate): ...this new function. Handle tree codes
922 for which a conditional internal function exists.
923 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
924 instead of ifcvt_can_use_mask_load_store. Update after variable
925 name change.
926 (predicate_load_or_store): New function, split out from
927 predicate_mem_writes.
928 (check_redundant_cond_expr): New function.
929 (value_available_p): Likewise.
930 (predicate_rhs_code): Likewise.
931 (predicate_mem_writes): Rename to...
932 (predicate_statements): ...this. Use predicate_load_or_store
933 and predicate_rhs_code.
934 (combine_blocks, tree_if_conversion): Update after above name changes.
935 (ifcvt_local_dce): Handle redundant_ssa_names.
936 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
937 general conditional functions.
938 * tree-vect-stmts.c (vectorizable_call): Likewise.
939
940 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
941 Alan Hayward <alan.hayward@arm.com>
942 David Sherwood <david.sherwood@arm.com>
943
944 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
945 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
946 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
947 plus and minus and convert them into IFN_COND_FMA-based sequences.
948 (convert_mult_to_fma): Handle conditional plus and minus.
949
950 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
951
952 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
953 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
954 (cond_fnms_optab): New optabs.
955 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
956 internal functions.
957 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
958 * internal-fn.h (get_conditional_internal_fn): Declare.
959 (get_unconditional_internal_fn): Likewise.
960 * internal-fn.c (cond_ternary_direct): New macro.
961 (expand_cond_ternary_optab_fn): Likewise.
962 (direct_cond_ternary_optab_supported_p): Likewise.
963 (FOR_EACH_COND_FN_PAIR): Likewise.
964 (get_conditional_internal_fn): New function.
965 (get_unconditional_internal_fn): Likewise.
966 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
967 (gimple_match_op::gimple_match_op): Add a new overload for 5
968 operands.
969 (gimple_match_op::set_op): Likewise.
970 (gimple_resimplify5): Declare.
971 * genmatch.c (decision_tree::gen): Generate simplifications for
972 5 operands.
973 * gimple-match-head.c (gimple_simplify): Define an overload for
974 5 operands. Handle calls with 5 arguments in the top-level overload.
975 (convert_conditional_op): Handle conversions from unconditional
976 internal functions to conditional ones.
977 (gimple_resimplify5): New function.
978 (build_call_internal): Pass a fifth operand.
979 (maybe_push_res_to_seq): Likewise.
980 (try_conditional_simplification): Try converting conditional
981 internal functions to unconditional internal functions.
982 Handle 3-operand unconditional forms.
983 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
984 Define ternary equivalents of the current rules for binary conditional
985 internal functions.
986 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
987 ternary operations.
988 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
989 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
990 (optab): Handle them.
991 (SVE_COND_FP_TERNARY): New int iterator.
992 (sve_fmla_op, sve_fmad_op): New int attributes.
993 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
994 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
995 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
996
997 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
998
999 * target.def (preferred_else_value): New target hook.
1000 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
1001 * doc/tm.texi: Regenerate.
1002 * targhooks.h (default_preferred_else_value): Declare.
1003 * targhooks.c (default_preferred_else_value): New function.
1004 * internal-fn.h (conditional_internal_fn_code): Declare.
1005 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
1006 (get_conditional_internal_fn): Use it.
1007 (conditional_internal_fn_code): New function.
1008 * gimple-match.h (gimple_match_cond): New struct.
1009 (gimple_match_op): Add a cond member function.
1010 (gimple_match_op::gimple_match_op): Update all forms to take a
1011 gimple_match_cond.
1012 * genmatch.c (expr::gen_transform): Use the same condition as res_op
1013 for the suboperation, but don't specify a particular else_value.
1014 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
1015 (visit_nary_op, visit_reference_op_load): Pass
1016 gimple_match_cond::UNCOND to the gimple_match_op constructor.
1017 * gimple-match-head.c: Include tree-eh.h
1018 (convert_conditional_op): New function.
1019 (maybe_resimplify_conditional_op): Likewise.
1020 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
1021 (gimple_resimplify2): Likewise.
1022 (gimple_resimplify3): Likewise.
1023 (gimple_resimplify4): Likewise.
1024 (maybe_push_res_to_seq): Return null for conditional operations.
1025 (try_conditional_simplification): New function.
1026 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
1027 constructor.
1028 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
1029 IFN_COND_* call.
1030 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
1031 function.
1032 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
1033
1034 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
1035
1036 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1037 DECL_FCONTEXT
1038 (hash_tree): Do not hash DECL_FCONTEXT
1039 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
1040 Do not stream DECL_FCONTEXT.
1041 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
1042 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
1043
1044 2018-07-12 Richard Biener <rguenther@suse.de>
1045
1046 PR debug/86462
1047 * dwarf2out.c (gen_block_die): Only output blocks when they have
1048 at least one !DECL_IGNORED_P variable.
1049
1050 2018-07-12 Richard Biener <rguenther@suse.de>
1051
1052 PR target/84829
1053 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
1054 Remove -mieee-fp handling.
1055
1056 2018-07-12 Richard Biener <rguenther@suse.de>
1057
1058 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
1059 left-over from last patch.
1060
1061 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1062
1063 PR tree-optimization/86492
1064 * gimple-ssa-store-merging.c
1065 (imm_store_chain_info::coalesce_immediate_stores): Call
1066 check_no_overlap even for the merge_overlapping case. Formatting fix.
1067
1068 2018-07-12 Richard Biener <rguenther@suse.de>
1069
1070 PR middle-end/86479
1071 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
1072 move possibly trapping operations into the conditional.
1073
1074 2018-07-12 Richard Biener <rguenther@suse.de>
1075
1076 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
1077 (vn_lookup_simplify_result): Remove recursion limit applied
1078 here.
1079 (vn_nary_build_or_lookup_1): Adjust.
1080 (try_to_simplify): Likewise.
1081 * gimple-match-head.c (gimple_resimplify1): Instead apply one
1082 here.
1083 (gimple_resimplify2): Likewise.
1084 (gimple_resimplify3): Likewise.
1085 (gimple_resimplify4): Likewise.
1086
1087 2018-07-11 Jakub Jelinek <jakub@redhat.com>
1088
1089 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
1090 Use __mmask64 type instead of __mmask8 for __M argument.
1091 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
1092 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
1093 __U argument.
1094 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
1095 __mmask16 for __M argument.
1096 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
1097 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
1098 to __mmask16 instead of __mmask8.
1099 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
1100 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
1101 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
1102 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
1103 instead of __mmask16 for __U argument.
1104 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
1105 __mmask16 instead of __mmask8 for __U argument.
1106 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
1107 __U argument.
1108 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
1109 __mmask16.
1110 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
1111 argument.
1112 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
1113 __U argument.
1114 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
1115 __mmask16.
1116 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
1117 of __mmask16.
1118 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
1119 __U argument.
1120 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
1121 __U argument.
1122 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
1123 __U argument.
1124 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
1125 __U argument.
1126 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
1127 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
1128 return type as well as __M argument type and all casts from __mmask8
1129 to __mmask32.
1130 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
1131 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
1132 return type as well as __M argument type and all casts from __mmask8
1133 to __mmask16.
1134 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
1135 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
1136 return type as well as __M argument type and all casts from __mmask8
1137 to __mmask32.
1138 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
1139 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
1140 return type as well as __M argument type and all casts from __mmask8
1141 to __mmask16.
1142 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
1143 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
1144 __mmask16.
1145
1146 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
1147
1148 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
1149 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
1150 for __U argument.
1151
1152 2018-07-11 Paul Koning <ni1d@arrl.net>
1153
1154 * doc/md.texi (define_subst): Document how multiple occurrences of
1155 the same argument in the replacement pattern are handled.
1156
1157 2018-07-11 Paul Koning <ni1d@arrl.net>
1158
1159 * doc/extend.texi (Common Variable Attributes): Move "mode" into
1160 alphabetical order.
1161 (Common Type Attributes): Add "mode" attribute.
1162
1163 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
1164
1165 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
1166 stream DECL_ORIGINAL_TYPE.
1167 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
1168 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
1169 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
1170 Do not walk original type.
1171 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
1172 external decls.
1173 (write_ts_decl_non_common_tree_pointers): Do not stream
1174 DECL_ORIGINAL_TYPE
1175 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
1176 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
1177
1178 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1179
1180 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
1181 thread twice from the same starting edge.
1182
1183 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1184
1185 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
1186 * gimple.c (gimple_call_nonnull_result_p): ...here...
1187 (gimple_call_nonnull_arg): ...and here.
1188 * gimple.h (gimple_call_nonnull_result_p): New.
1189 (gimple_call_nonnull_arg): New.
1190
1191 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
1192
1193 * config/arm/arm-cpus.in: Move information from fpu field of each
1194 cpu definition to the isa field.
1195 * config/arm/parsecpu.awk (fpu): Delete match rule.
1196 (gen_comm_data): Don't add bits from the CPU's FPU entry.
1197
1198 2018-07-11 Richard Biener <rguenther@suse.de>
1199
1200 PR debug/86457
1201 * dwarf2out.c (init_sections_and_labels): Use
1202 output_asm_line_debug_info consistently.
1203 (dwarf2out_early_finish): Likewise.
1204 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
1205 type units.
1206
1207 2018-07-11 Richard Biener <rguenther@suse.de>
1208
1209 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
1210 Rework father_bb setting in a way to avoid propagating constants
1211 multiple times on a loop body.
1212
1213 2018-07-10 Mark Wielaard <mark@klomp.org>
1214
1215 PR debug/86459
1216 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
1217
1218 2018-07-10 Richard Biener <rguenther@suse.de>
1219
1220 * hash-map.h (hash_map::iterator::operator*): Return
1221 references to key and value.
1222
1223 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1224
1225 PR c++/86443
1226 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
1227 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
1228 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
1229 (gimplify_omp_for): For composite loops, move outer
1230 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
1231 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
1232 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
1233 TREE_LIST for both the original class iterator and the "last" helper
1234 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
1235 loop, remember has_decl_expr from outer composite loops for the
1236 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
1237
1238 2018-07-09 Martin Sebor <msebor@redhat.com>
1239
1240 PR middle-end/77357
1241 PR middle-end/86428
1242 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
1243 accessing implicitly initialized array elements.
1244 * expr.c (string_constant): Handle string initializers of
1245 character arrays within aggregates.
1246 * gimple-fold.c (fold_array_ctor_reference): Add argument.
1247 Store element offset. As a special case, handle zero size.
1248 (fold_nonarray_ctor_reference): Same.
1249 (fold_ctor_reference): Add argument. Store subobject offset.
1250 * gimple-fold.h (fold_ctor_reference): Add argument.
1251
1252 2018-07-09 Paul Koning <ni1d@arrl.net>
1253
1254 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
1255 (pdp11_insn_cost): New function.
1256 (pdp11_md_asm_adjust): New function.
1257 (TARGET_INVALID_WITHIN_DOLOOP): Define.
1258 (pdp11_rtx_costs): Update to match machine better.
1259 (output_addr_const_pdp11): Correct format mismatch warnings.
1260 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
1261 * config/pdp11/pdp11.md: General change to add base_cost and/or
1262 length attributes for use by new pdp11_insn_cost function.
1263 (MIN_BRANCH): Correct definition.
1264 (MIN_SOB): Ditto.
1265 (doloop_end): Use standard pattern name for looping pattern.
1266 (doloop_end_nocc): New.
1267 (movsf): Add another constraint alternative.
1268 (zero_extendqihi2): Add constraint alternatives for not in place
1269 extend.
1270 (zero_extendhisi2): Remove.
1271 (shift patterns): Add CC handling variants.
1272 (bswaphi2): New.
1273 (bswapsi2): New.
1274 (rothi3): New.
1275 (define_peephole2): New peephole to recognize mov that sets CC for
1276 subsequent test.
1277
1278 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1279
1280 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
1281 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
1282 wi::add.
1283
1284 2018-07-09 Jakub Jelinek <jakub@redhat.com>
1285
1286 PR c/86420
1287 * real.c (real_nextafter): Return true if result is denormal.
1288
1289 2018-07-09 Martin Liska <mliska@suse.cz>
1290
1291 * common.opt: Add back wrongly removed attribute.
1292
1293 2018-07-09 Richard Biener <rguenther@suse.de>
1294
1295 PR debug/86413
1296 * dwarf2out.c (gen_block_die): For an early generated DIE
1297 always output high/low PC attributes.
1298
1299 2018-07-09 Tom de Vries <tdevries@suse.de>
1300
1301 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
1302 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
1303 onto VAR_DECL with abstract origin.
1304
1305 2018-07-07 Jim Wilson <jimw@sifive.com>
1306
1307 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
1308
1309 2018-07-07 Tom de Vries <tdevries@suse.de>
1310
1311 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
1312
1313 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
1314
1315 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
1316 overflow_type.
1317 (combine_bound): Use wide-int overflow calculation instead of
1318 rolling our own.
1319 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
1320 overflow_type.
1321 * fold-const.c (int_const_binop_2): Same.
1322 (extract_muldiv_1): Same.
1323 (fold_div_compare): Same.
1324 (fold_abs_const): Same.
1325 * match.pd: Same.
1326 * poly-int.h (add): Same.
1327 (sub): Same.
1328 (neg): Same.
1329 (mul): Same.
1330 * predict.c (predict_iv_comparison): Same.
1331 * profile-count.c (slow_safe_scale_64bit): Same.
1332 * simplify-rtx.c (simplify_const_binary_operation): Same.
1333 * tree-chrec.c (tree_fold_binomial): Same.
1334 * tree-data-ref.c (split_constant_offset_1): Same.
1335 * tree-if-conv.c (idx_within_array_bound): Same.
1336 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
1337 * tree-ssa-phiopt.c (minmax_replacement): Same.
1338 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
1339 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
1340 * vr-values.c (vr_values::adjust_range_with_scev): Same.
1341 * wide-int.cc (wi::add_large): Same.
1342 (wi::mul_internal): Same.
1343 (wi::sub_large): Same.
1344 (wi::divmod_internal): Same.
1345 * wide-int.h: Change overflow type to overflow_type for neg, add,
1346 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
1347 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
1348 mul_internal, divmod_internal.
1349 (overflow_type): New enum.
1350 (accumulate_overflow): New.
1351
1352 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
1353
1354 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
1355 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
1356
1357 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1358
1359 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
1360 argument is checked for zero before entering loop, avoid checking again.
1361
1362 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1363
1364 * gimplify.h (generic_expr_could_trap_p): Set as global function.
1365 * gimplify.h (generic_expr_could_trap_p): Likwise.
1366 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
1367
1368 2018-07-06 Jakub Jelinek <jakub@redhat.com>
1369
1370 PR tree-optimization/86401
1371 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
1372 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
1373 (fold_bit_and_mask): ... here. New helper function for match.pd.
1374 * fold-const.h (fold_bit_and_mask): Declare.
1375 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
1376
1377 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
1378
1379 PR target/86324
1380 * target.def (translate_mode_attribute): New hook.
1381 * targhooks.h (default_translate_mode_attribute): Declare.
1382 * targhooks.c (default_translate_mode_attribute): New function.
1383 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
1384 * doc/tm.texi: Regenerate.
1385 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
1386 (rs6000_translate_mode_attribute): New function.
1387
1388 2018-07-06 Paul Koning <ni1d@arrl.net>
1389
1390 * doc/md.texi (define_split): Document DONE and FAIL.
1391 (define_peephole2): Ditto.
1392
1393 2018-07-05 Jeff Law <law@redhat.com>
1394
1395 PR tree-optimization/86010
1396 * tree-ssa-dse.c (compute_trims): More aggressively trim at
1397 both the head and tail of mem* and str* calls.
1398
1399 2018-07-05 Jim Wilson <jimw@sifive.com>
1400
1401 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
1402
1403 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
1404
1405 * config/aarch64/aarch64-simd.md: correct flags text for
1406 MIN_EXPR replacement.
1407
1408 2018-07-05 James Clarke <jrtc27@jrtc27.com>
1409
1410 * configure: Regenerated.
1411
1412 2018-07-05 Carl Love <cel@us.ibm.com>
1413
1414 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
1415 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
1416 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
1417 VSX_BUILTIN_DOUBLEL_V4SF.
1418
1419 2018-07-05 Martin Sebor <msebor@redhat.com>
1420
1421 PR c++/86400
1422 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
1423 than its domain to compute its the upper bound of a char array.
1424
1425 2018-07-05 Nathan Sidwell <nathan@acm.org>
1426
1427 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
1428 * doc/cpp.texi: Update comment.
1429 * doc/tm.texi: Rebuilt.
1430 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
1431 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
1432 * doc/extend.texi (Backwards Compatibility): Clarify it is system
1433 headers affected by extern "C".
1434 * system.h: Poison NO_IMPLICIT_EXTERN_C.
1435 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
1436 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
1437 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
1438 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
1439 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
1440 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
1441 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
1442 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
1443 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
1444 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
1445 config/sparc/sp64-elf.h, config/spu/spu.h,
1446 config/stormy16/stormy16.h, config/v850/v850.h,
1447 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
1448 define NO_IMPLICIT_EXTERN_C.
1449 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
1450
1451 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1452
1453 PR target/84711
1454 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
1455 instead of GET_MODE_SIZE when comparing Units.
1456
1457 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1458
1459 PR target/84711
1460 * rtlanal.c (set_noop_p): Constrain on mode change,
1461 include hard-reg-set.h
1462
1463 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1464
1465 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
1466
1467 2018-07-05 Jakub Jelinek <jakub@redhat.com>
1468
1469 Revert
1470 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
1471
1472 PR sanitizer/84250
1473 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1474 libasan.
1475 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1476
1477 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
1478
1479 PR sanitizer/84250
1480 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1481 libasan.
1482 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1483
1484 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
1485
1486 PR middle-end/86380
1487 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
1488
1489 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
1490
1491 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
1492 neg_*_op* variables.
1493
1494 2018-07-04 Martin Liska <mliska@suse.cz>
1495
1496 * tree-switch-conversion.c: Define
1497 max_ratio_for_speed and max_ratio_for_size constants.
1498
1499 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
1500 Martin Liska <mliska@suse.cz>
1501
1502 PR middle-end/66240
1503 PR target/45996
1504 PR c/84100
1505 * common.opt: Rename align options with 'str_' prefix.
1506 * common/config/i386/i386-common.c (set_malign_value): New
1507 function.
1508 (ix86_handle_option): Use it to set -falign-* options/
1509 * config/aarch64/aarch64-protos.h (struct tune_params): Change
1510 type from int to string.
1511 * config/aarch64/aarch64.c: Update default values from int
1512 to string.
1513 * config/alpha/alpha.c (alpha_override_options_after_change):
1514 Likewise.
1515 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
1516 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1517 max skip conditionally.
1518 * config/i386/freebsd.h (SUBALIGN_LOG): New.
1519 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1520 max skip conditionally.
1521 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1522 max skip conditionally.
1523 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
1524 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1525 max skip conditionally.
1526 * config/i386/i386.c (struct ptt): Change type from int to
1527 string.
1528 (ix86_default_align): Set default values.
1529 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
1530 max skip conditionally.
1531 * config/i386/iamcu.h (SUBALIGN_LOG): New.
1532 (ASM_OUTPUT_MAX_SKIP_ALIGN):
1533 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
1534 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1535 max skip conditionally.
1536 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
1537 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
1538 * config/i386/x86-64.h (SUBALIGN_LOG): New.
1539 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1540 max skip conditionally.
1541 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1542 * config/ia64/ia64.c (ia64_option_override): Set default values
1543 for alignment options.
1544 * config/m68k/m68k.c: Handle new str_align_* options.
1545 * config/mips/mips.c (mips_set_compression_mode): Change
1546 type of constants.
1547 (mips_option_override): Set default values for options.
1548 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1549 Likewise.
1550 * config/rs6000/rs6000.c (rs6000_option_override_internal):
1551 Likewise.
1552 * config/rx/rx.c (rx_option_override): Likewise.
1553 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
1554 (LABEL_ALIGN): Use align_labels_log.
1555 (LOOP_ALIGN): Use align_loops_align.
1556 * config/s390/s390.c (s390_asm_output_function_label): Use new
1557 macros.
1558 * config/sh/sh.c (sh_override_options_after_change):
1559 Change type of constants.
1560 * config/spu/spu.c (spu_sched_init): Likewise.
1561 * config/sparc/sparc.c (sparc_option_override): Set default
1562 values for options.
1563 * config/visium/visium.c (visium_option_override): Likewise.
1564 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
1565 emit p2align format with last argument if it's not needed.
1566 * doc/invoke.texi: Document extended format of -falign-*.
1567 * final.c: Use align_labels alignment.
1568 * flags.h (struct target_flag_state): Change type to use
1569 align_flags.
1570 (struct align_flags_tuple): New.
1571 (struct align_flags): Likewise.
1572 (align_loops_log): Redefine macro to use new types.
1573 (align_loops_max_skip): Redefine macro to use new types.
1574 (align_jumps_log): Redefine macro to use new types.
1575 (align_jumps_max_skip): Redefine macro to use new types.
1576 (align_labels_log): Redefine macro to use new types.
1577 (align_labels_max_skip): Redefine macro to use new types.
1578 (align_functions_log): Redefine macro to use new types.
1579 (align_loops): Redefine macro to use new types.
1580 (align_jumps): Redefine macro to use new types.
1581 (align_labels): Redefine macro to use new types.
1582 (align_functions): Redefine macro to use new types.
1583 (align_functions_max_skip): Redefine macro to use new types.
1584 (align_loops_value): New macro.
1585 (align_jumps_value): New macro.
1586 (align_labels_value): New macro.
1587 (align_functions_value): New macro.
1588 * function.c (invoke_set_current_function_hook): Propagate
1589 alignment values from flags to global variables default in
1590 topleev.h.
1591 * ipa-icf.c (sem_function::equals_wpa): Use
1592 cl_optimization_option_eq instead of memcmp.
1593 * lto-streamer.h (cl_optimization_stream_out): Support streaming
1594 of string types.
1595 (cl_optimization_stream_in): Likewise.
1596 * optc-save-gen.awk: Support strings in cl_optimization.
1597 * opth-gen.awk: Likewise.
1598 * opts.c (finish_options): Remove error checking of invalid
1599 value ranges.
1600 (MAX_CODE_ALIGN): Remove.
1601 (MAX_CODE_ALIGN_VALUE): Likewise.
1602 (parse_and_check_align_values): New function.
1603 (check_alignment_argument): Likewise.
1604 (common_handle_option): Use check_alignment_argument.
1605 * opts.h (parse_and_check_align_values): Declare.
1606 * toplev.c (init_alignments): Remove.
1607 (read_log_maxskip): New.
1608 (parse_N_M): Likewise.
1609 (parse_alignment_opts): Likewise.
1610 (backend_init_target): Remove usage of init_alignments.
1611 * toplev.h (parse_alignment_opts): Declare.
1612 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
1613 argument.
1614 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
1615 * tree.c (cl_option_hasher::equal): New.
1616 * varasm.c: Use new global macros.
1617
1618 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
1619
1620 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
1621 Use a simpler align directive also if MAXSKIP = ALIGN-1.
1622 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1623 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1624 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1625 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1626 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
1627 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
1628 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
1629 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1630 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1631 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1632 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1633
1634 2018-07-04 Martin Liska <mliska@suse.cz>
1635 Jonathan Wakely <jwakely@redhat.com>
1636
1637 * coverage.c: Use correct type.
1638 * doc/invoke.texi: Language correction.
1639
1640 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
1641
1642 PR target/85620
1643 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
1644 ENDBRANCH for non-tail call which may return via indirect branch.
1645 * doc/extend.texi: Document indirect_return attribute.
1646
1647 2018-07-03 Martin Sebor <msebor@redhat.com>
1648
1649 PR tree-optimization/86274
1650 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
1651 precondition.
1652 (format_floating): Correct handling of infinities and NaNs.
1653
1654 2018-07-03 Martin Sebor <msebor@redhat.com>
1655
1656 * print-tree.c (print_real_cst): New function.
1657 (print_node_brief): Call it.
1658 (print_node): Ditto.
1659
1660 2018-07-03 Jeff Law <law@redhat.com>
1661
1662 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
1663 into a single pattern.
1664
1665 * config/h8300/h8300.md (ors code_iterator): New.
1666 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
1667 a single pattern and single splitter.
1668 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
1669 (iorqi3_1, xorqi3_1): Likewise.
1670 (iorqi3, xorqi3 expanders): Similarly.
1671
1672 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
1673 (movmd_internal) into a single pattern using the P mode iterator.
1674 (movmd splitters): Similarly.
1675 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
1676 (movsd splitters): Similarly.
1677
1678 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
1679 ADDB, ADDW and ADDL into a single ADD attribute which selects the
1680 right table based on the size of the operand.
1681 * config/h8300/h8300.md (length_table): Corresponding changes. All
1682 references to "addb", "addw" and "addl" changed to "add".
1683 (btst patterns): Merge two variants into a single pattern.
1684 (tstqi, tsthi): Likewise.
1685 (addhi3_incdec, addsi3_incdec): Likewise.
1686 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
1687 (mulhi3, mulsi3): Likewise.
1688 (udivhi3, udivsi3): Likewise.
1689 (divhi3, divsi3): Likewise.
1690 (andorqi3, andorhi3, andorsi3): Likewise.
1691
1692 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
1693
1694 PR target/85694
1695 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
1696 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
1697
1698 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1699
1700 PR tree-optimization/85694
1701 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
1702 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
1703 UNSPEC_URHADD.
1704 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
1705 (<u>avg<mode>3_ceil): New patterns.
1706
1707 2018-07-03 David Malcolm <dmalcolm@redhat.com>
1708
1709 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
1710 scan-tree-dump directive.
1711 * gcc.dg/vect/slp-perm-2.c: Likewise.
1712 * gcc.dg/vect/slp-perm-3.c: Likewise.
1713 * gcc.dg/vect/slp-perm-5.c: Likewise.
1714 * gcc.dg/vect/slp-perm-6.c: Likewise.
1715 * gcc.dg/vect/slp-perm-7.c: Likewise.
1716 * gcc.dg/vect/slp-perm-8.c: Likewise.
1717
1718 2018-07-03 Marek Polacek <polacek@redhat.com>
1719
1720 PR middle-end/86202
1721 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
1722
1723 2018-07-03 Richard Biener <rguenther@suse.de>
1724
1725 PR ipa/86389
1726 * tree-ssa-structalias.c (find_func_clobbers): Properly
1727 handle indirect calls.
1728
1729 2018-07-03 Jeff Law <law@redhat.com>
1730
1731 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
1732 (shifts): New code iterator.
1733 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
1734 expander. Fix HImode handling on H8/SX.
1735 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
1736 (subqi3, subhi3, subsi3 expanders): Likewise.
1737 (andqi3, andhi3, andsi3 expanders): Likewise.
1738 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
1739 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
1740 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
1741 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
1742 (zero_extendqihi2, zero_extendqisi2): Likewise.
1743 (extendqihi2, extendqisi2): Likewise.
1744 (rotlqi3, rotlhi3, rotlsi3): Likewise.
1745 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
1746 (rotlqi3_1, rotlhi3_1): Likewise.
1747 (logicalhi3_sn, logicalsi3_sn): Likewise.
1748 (logicalhi3, logicalsi3): Likewise.
1749
1750 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1751
1752 * tree-vect-patterns.c (vect_recog_rotate_pattern)
1753 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1754 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
1755 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
1756 type to append_pattern_def_seq instead of creating a stmt_vec_info
1757 directly.
1758 (build_mask_conversion): Likewise. Remove vinfo argument.
1759 (vect_add_conversion_to_patterm): Likewise, renaming to...
1760 (vect_add_conversion_to_pattern): ...this.
1761 (vect_recog_mask_conversion_pattern): Update call to
1762 build_mask_conversion. Pass the vector type to
1763 append_pattern_def_seq here too.
1764 (vect_recog_gather_scatter_pattern): Update call to
1765 vect_add_conversion_to_pattern.
1766
1767 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1768
1769 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
1770 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1771 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
1772 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
1773 STMT_VINFO_PATTERN_DEF_SEQ to null here.
1774 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
1775 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
1776 append_pattern_def_seq instead of new_pattern_def_seq.
1777 (vect_recog_divmod_pattern): Do both of the above.
1778 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
1779 is null.
1780
1781 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1782
1783 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
1784 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
1785 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
1786 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
1787 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
1788 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1789 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
1790 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1791 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1792 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
1793 parameter with a single stmt_vec_info.
1794 (vect_recog_func_ptr): Likewise.
1795 (vect_recog_gather_scatter_pattern): Likewise, folding in...
1796 (vect_try_gather_scatter_pattern): ...this.
1797 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
1798 the stmt_vec_info of the statement to be matched. Don't clear
1799 STMT_VINFO_RELATED_STMT.
1800 (vect_pattern_recog): Update call accordingly.
1801
1802 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1803
1804 PR tree-optimization/85694
1805 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
1806 (uavgM3_ceil): Document new optabs.
1807 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
1808 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
1809 functions.
1810 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
1811 (savg_ceil_optab): New optabs.
1812 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
1813 (vect_vect_recog_func_ptrs): Add it.
1814 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
1815 constant directly from the associated lhs.
1816
1817 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1818
1819 * tree-vect-patterns.c (vect_split_statement): New function.
1820 (vect_convert_input): Use it to try to split an existing cast.
1821
1822 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1823
1824 * poly-int.h (print_hex): New function.
1825 * dumpfile.h (dump_dec, dump_hex): Declare.
1826 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
1827 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
1828 min_input_precision, operation_precision and operation_sign.
1829 * tree-vect-patterns.c (vect_get_range_info): New function.
1830 (vect_same_loop_or_bb_p, vect_single_imm_use)
1831 (vect_operation_fits_smaller_type): Delete.
1832 (vect_look_through_possible_promotion): Add an optional
1833 single_use_p parameter.
1834 (vect_recog_over_widening_pattern): Rewrite to use new
1835 stmt_vec_info infomration. Handle one operation at a time.
1836 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
1837 (vect_truncatable_operation_p, vect_set_operation_type)
1838 (vect_set_min_input_precision): New functions.
1839 (vect_determine_min_output_precision_1): Likewise.
1840 (vect_determine_min_output_precision): Likewise.
1841 (vect_determine_precisions_from_range): Likewise.
1842 (vect_determine_precisions_from_users): Likewise.
1843 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
1844 (vect_vect_recog_func_ptrs): Put over_widening first.
1845 Add cast_forwprop.
1846 (vect_pattern_recog): Call vect_determine_precisions.
1847
1848 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1849
1850 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
1851 statements that have been replaced by further pattern statements.
1852 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
1853
1854 2018-07-03 Richard Biener <rguenther@suse.de>
1855
1856 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
1857 always set *dt. Dump vectype in vectype overload.
1858 * dumpfile.h (dump_gimple_expr): New function.
1859 (dump_gimple_expr_loc): Likewise.
1860 * dumpfile.c (dump_gimple_expr): New function.
1861 (dump_gimple_expr_loc): Likewise.
1862
1863 2018-07-02 Jeff Law <law@redhat.com>
1864
1865 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
1866 the H8/300, H8/300H and H8/S variants into a single pattern.
1867 (movhi_h8300, movqi_h8300hs): Similarly.
1868 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
1869 (QHI mode iterator): New.
1870
1871 * config/h8300/h8300.md: Remove trailing whitespace.
1872
1873 2018-07-02 Jim Wilson <jimw@sifive.com>
1874
1875 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
1876 instead of emit_insn for interrupt returns.
1877 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
1878 (riscv_sret, riscv_uret): Likewise.
1879
1880 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1881
1882 * pretty-print.c (selftest::test_pp_format): Move save and restore
1883 of quotes to class auto_fix_quotes, and add an instance.
1884 * selftest.c: Include "intl.h".
1885 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
1886 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
1887 * selftest.h (selftest::auto_fix_quotes): New class.
1888
1889 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
1890
1891 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
1892 (aarch64_sve_prepare_conditional_op): Remove.
1893 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
1894 Allow aarch64_simd_reg_or_zero as select operand; remove
1895 the aarch64_sve_prepare_conditional_op call.
1896 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
1897 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1898 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
1899 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
1900 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
1901 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
1902 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
1903 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
1904 and a splitters to match all of the *_any patterns.
1905 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
1906
1907 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
1908 (SVE_COND_FP_BINARY_REV): Remove.
1909 (sve_int_op_rev, sve_fp_op_rev): New.
1910 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
1911 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
1912 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
1913 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
1914 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
1915 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
1916 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
1917 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
1918 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
1919
1920 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
1921 Remove match_dup 1 from the inner unspec.
1922 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1923
1924 * config/aarch64/aarch64.md (movprfx): New attr.
1925 (length): Default movprfx to 8.
1926 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
1927 (*madd<SVE_I>, *msub<SVE_I): Likewise.
1928 (*<su>mul<SVE_I>3_highpart): Likewise.
1929 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
1930 (*v<ASHIFT><SVE_I>3): Likewise.
1931 (*<su><MAXMIN><SVE_I>3): Likewise.
1932 (*<su><MAXMIN><SVE_F>3): Likewise.
1933 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
1934 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
1935 (*div<SVE_F>4): Likewise.
1936
1937 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
1938
1939 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
1940 in dump string.
1941
1942 2018-07-02 Richard Biener <rguenther@suse.de>
1943
1944 PR tree-optimization/86363
1945 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
1946 memset argument refers to a non-variable address.
1947
1948 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
1949
1950 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
1951 {PLUS,MINUS}_EXPR code to...
1952 (adjust_symbolic_bound): ...here,
1953 (combine_bound): ...here,
1954 (set_value_range_with_overflow): ...and here.
1955
1956 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
1957
1958 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
1959 code...
1960 (extract_range_from_abs_expr): ...here.
1961
1962 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
1963
1964 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
1965 -fno-omit-frame-pointer when not optimizing.
1966
1967 2018-07-02 Martin Liska <mliska@suse.cz>
1968
1969 PR ipa/86279
1970 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
1971 (propagate_nothrow): Likewise.
1972
1973 2018-07-02 Martin Liska <mliska@suse.cz>
1974
1975 PR ipa/86323
1976 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
1977
1978 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1979
1980 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
1981 function in r262149, changing "loc" param from source_location to
1982 const dump_location_t &.
1983 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
1984 declaration, as above.
1985
1986 2018-07-01 Paul Koning <ni1d@arrl.net>
1987
1988 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1989 -munit-asm, -mgnu-asm, -mdec-asm.
1990 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
1991 (pdp11_output_labelref): New.
1992 (pdp11_output_def): New.
1993 (pdp11_output_addr_vec_elt): New.
1994 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
1995 %# and %@ format codes.
1996 (pdp11_option_override): New.
1997 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
1998 (pdp11_output_ident): New.
1999 (pdp11_asm_named_section): New.
2000 (pdp11_asm_init_sections): New.
2001 (pdp11_file_start): New.
2002 (pdp11_file_end): New.
2003 (output_ascii): Use .ascii/.asciz for -mdec-asm.
2004 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
2005 %o, like %c but octal.
2006 (pdp11_option_override): New.
2007 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
2008 -mdec-asm.
2009 (DATA_SECTION_ASM_OP): Ditto.
2010 (READONLY_DATA_SECTION_ASM_OP): New.
2011 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
2012 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
2013 (ASM_OUTPUT_LABELREF): Ditto.
2014 (ASM_OUTPUT_DEF): Ditto.
2015 (ASM_OUTPUT_EXTERNAL): New.
2016 (ASM_OUTPUT_SOURCE_FILENAME): New.
2017 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
2018 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
2019 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
2020 %# and %@ format codes.
2021 * config/pdp11/pdp11.opt (mgnu-asm): New.
2022 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
2023 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
2024 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
2025
2026 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
2027
2028 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
2029 dereferencing path[] beyond its length.
2030 (debug_path): New.
2031 (debug_all_paths): New.
2032 (rewire_first_differing_edge): New.
2033 (adjust_paths_after_duplication): New.
2034 (duplicate_thread_path): Call adjust_paths_after_duplication.
2035 Add new argument.
2036 (thread_through_all_blocks): Add new argument to
2037 duplicate_thread_path.
2038
2039 2018-06-30 Jim Wilson <jimw@sifive.com>
2040
2041 * config/riscv/predicates.md (p2m1_shift_operand): New.
2042 (high_mask_shift_operand): New.
2043 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
2044 pattern using p2m1_shift_operand.
2045 (lshsi3_zero_extend_3+2): New combiner pattern using
2046 high_mask_shift_operand.
2047
2048 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2049
2050 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
2051 split out from...
2052 (vect_recog_rotate_pattern): ...here.
2053 (vect_convert_input): Try to insert casts of invariants in the
2054 preheader.
2055 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
2056 preheader to be empty.
2057
2058 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2059
2060 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
2061 vector type. If given, install it in the new statement's
2062 STMT_VINFO_VECTYPE.
2063 (vect_element_precision): New function.
2064 (vect_unpromoted_value): New struct.
2065 (vect_unpromoted_value::vect_unpromoted_value): New function.
2066 (vect_unpromoted_value::set_op): Likewise.
2067 (vect_look_through_possible_promotion): Likewise.
2068 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
2069 (vect_widened_op_tree, vect_convert_input): Likewise.
2070 (vect_convert_inputs, vect_convert_output): Likewise.
2071 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
2072 to handle the optional cast of the multiplication result and
2073 vect_widened_op_tree to detect the widened multiplication itself.
2074 Do not require the input and output of promotion casts to have
2075 the same sign, but base the signedness of the operation on the
2076 input rather than the result. If the pattern includes two
2077 promotions, check that those promotions have the same sign.
2078 Do not restrict the MULT_EXPR handling to a double-width result;
2079 handle quadruple-width results and wider. Use vect_convert_inputs
2080 to convert the inputs to the common type.
2081 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
2082 to handle the optional cast of the ABS result. Also allow a sign
2083 change or a sign extension between the ABS and MINUS.
2084 Use vect_widened_op_tree to detect the widened subtraction and use
2085 vect_convert_inputs to convert the inputs to the common type.
2086 (vect_handle_widen_op_by_const): Delete.
2087 (vect_recog_widen_op_pattern): New function.
2088 (vect_recog_widen_mult_pattern): Use it.
2089 (vect_recog_widen_shift_pattern): Likewise.
2090 (vect_recog_widen_sum_pattern): Use
2091 vect_look_through_possible_promotion to handle the promoted
2092 PLUS_EXPR operand.
2093
2094 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2095
2096 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
2097 the containing gimple_seq *.
2098 * gimple-iterator.h (gsi_for_stmt): Declare it.
2099 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
2100 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
2101 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2102 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2103 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
2104 checks.
2105 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
2106 split out from...
2107 (vect_mark_pattern_stmts): ...here. Handle cases in which the
2108 statement being replaced is part of an existing pattern
2109 definition sequence, inserting the new pattern statements before
2110 the original one.
2111 (vect_pattern_recog_1): Don't return a bool. If the statement
2112 is already part of a pattern, instead apply pattern matching
2113 to the pattern definition statements. Don't clear the
2114 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
2115 (vect_pattern_recog): Don't break after the first match;
2116 continue processing the pattern definition statements instead.
2117 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
2118
2119 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2120
2121 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
2122 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2123 (vect_recog_widen_sum_pattern): Use it.
2124
2125 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2126
2127 * tree-vect-loop.c (vectorizable_reduction): Assert that the
2128 phi is not a pattern statement and has not been replaced by
2129 a pattern statement.
2130 * tree-vect-patterns.c (type_conversion_p): Don't check
2131 STMT_VINFO_IN_PATTERN_P.
2132 (vect_recog_vector_vector_shift_pattern): Likewise.
2133 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
2134 the pattern statement rather than the original statement; check
2135 directly for a WIDEN_MULT_EXPR here.
2136 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
2137 vect_is_simple_use to return the pattern statement rather
2138 than the original statement; use is_pattern_stmt_p to check
2139 for such a pattern statement.
2140 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
2141 to return the pattern statement rather than the original statement;
2142 don't do the same transformation here.
2143 (vect_is_simple_use): If the defining statement has been replaced
2144 by a pattern statement, return the pattern statement instead.
2145 Remove the corresponding (local) transformation from the vectype
2146 overload.
2147
2148 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2149
2150 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
2151 end and default to null.
2152 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2153 (vectorizable_reduction): Update calls accordingly, dropping the
2154 gimple ** argument if the passed-back statement isn't needed.
2155 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
2156 (vect_recog_rotate_pattern): Likewise.
2157 (vect_recog_mask_conversion_pattern): Likewise.
2158 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2159 (vect_mask_constant_operand_p): Likewise.
2160 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
2161 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
2162 (get_group_load_store_type, get_load_store_type): Likewise.
2163 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
2164 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
2165 (vectorizable_conversion, vectorizable_assignment): Likewise.
2166 (vectorizable_shift, vectorizable_operation): Likewise.
2167 (vectorizable_store, vect_is_simple_cond): Likewise.
2168 (vectorizable_condition, vectorizable_comparison): Likewise.
2169 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
2170 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
2171 and move it to the end. Cope with null def_stmt_outs.
2172
2173 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2174
2175 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
2176
2177 2018-06-29 Jeff Law <law@redhat.com>
2178
2179 * config/v850/v850.c (v850_legitimate_address_p): Handle large
2180 displacements for TARGET_V850E2V3 and newer.
2181 (TARGET_LRA_P): Remove. Defaults to LRA now.
2182 * config/v850/v850.md (sign23byte_load): Remove.
2183 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
2184 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
2185
2186 2018-06-29 Martin Liska <mliska@suse.cz>
2187
2188 PR lto/85759
2189 * coverage.c (coverage_init): Mangle full path name.
2190 * doc/invoke.texi: Document the change.
2191 * gcov-io.c (mangle_path): New.
2192 * gcov-io.h (mangle_path): Likewise.
2193 * gcov.c (mangle_name): Use mangle_path for path mangling.
2194
2195 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2196
2197 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2198 if starting source register is not even.
2199
2200 2018-06-29 Martin Liska <mliska@suse.cz>
2201
2202 PR tree-optimization/86263
2203 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
2204 Make edge redirection.
2205
2206 2018-06-29 David Malcolm <dmalcolm@redhat.com>
2207
2208 * dumpfile.c (dump_loc): Add indentation based on scope depth.
2209 (dump_scope_depth): New variable.
2210 (get_dump_scope_depth): New function.
2211 (dump_begin_scope): New function.
2212 (dump_end_scope): New function.
2213 * dumpfile.h (get_dump_scope_depth): New declaration.
2214 (dump_begin_scope): New declaration.
2215 (dump_end_scope): New declaration.
2216 (class auto_dump_scope): New class.
2217 (AUTO_DUMP_SCOPE): New macro.
2218 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
2219 AUTO_DUMP_SCOPE.
2220
2221 2018-06-29 Richard Biener <rguenther@suse.de>
2222
2223 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
2224 compute_all_dependences succeeds.
2225 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
2226 exceed --param loop-max-datarefs-for-datadeps.
2227
2228 2018-06-29 Jakub Jelinek <jakub@redhat.com>
2229
2230 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
2231
2232 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
2233
2234 PR target/86348
2235 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
2236 alternative 0 in preferred_for_speed attribute.
2237
2238 2018-06-28 Paul Koning <ni1d@arrl.net>
2239
2240 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
2241 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
2242 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
2243 * config/pdp11/pdp11.md: Correct "length" attribute calculation
2244 for shift insn patterns.
2245
2246 2018-06-28 David Malcolm <dmalcolm@redhat.com>
2247
2248 * cgraph.c (cgraph_node::get_body): Replace assignments to
2249 "dump_file" with calls to set_dump_file.
2250 * dumpfile.c (alt_dump_file): Make static, and group with...
2251 (alt_flags): ...this definition.
2252 (dumps_are_enabled): New variable.
2253 (refresh_dumps_are_enabled): New function.
2254 (set_dump_file): New function.
2255 (set_alt_dump_file): New function.
2256 (gcc::dump_manager::dump_start): Replace assignments to
2257 "dump_file" and "alt_dump_file" with calls to set_dump_file and
2258 set_alt_dump_file.
2259 (gcc::dump_manager::dump_finish): Likewise.
2260 * dumpfile.h (alt_dump_file): Delete decl.
2261 (dumps_are_enabled): New variable decl.
2262 (set_dump_file): New function decl.
2263 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
2264 global.
2265 * tree-nested.c (lower_nested_functions): Replace assignments to
2266 "dump_file" with calls to set_dump_file.
2267
2268 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2269
2270 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
2271 goto_locus of each outgoing edge of each basic block.
2272
2273 2018-06-28 Richard Biener <rguenther@suse.de>
2274
2275 * dwarf2out.c (decl_scope_table): Remove.
2276 (push_decl_scope): Likewise.
2277 (pop_decl_scope): Likewise.
2278 (gen_type_die_for_member): Do not call push/pop_decl_scope.
2279 (gen_struct_or_union_type_die): Likewise.
2280 (gen_tagged_type_die): Likewise.
2281 (dwarf2out_init): Do not initialize decl_scope_table.
2282 (dwarf2out_c_finalize): Do not free it.
2283
2284 2018-06-28 Richard Biener <rguenther@suse.de>
2285
2286 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
2287 deciding whether to not re-use a DIE.
2288
2289 2018-06-28 Richard Biener <rguenther@suse.de>
2290
2291 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
2292 DW_AT_abstract_origin attribute.
2293
2294 2018-06-28 Martin Liska <mliska@suse.cz>
2295
2296 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2297 Use newly introduced constants.
2298 * tree-switch-conversion.h (struct jump_table_cluster):
2299 Define max_ratio_for_size and max_ratio_for_speed.
2300
2301 2018-06-28 Martin Liska <mliska@suse.cz>
2302
2303 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2304 Add new checking assert to catch invalid state.
2305 (jump_table_cluster::can_be_handled): Handle single case
2306 clusters.
2307 (jump_table_cluster::is_beneficial): Bail out for such case.
2308 (bit_test_cluster::find_bit_tests):
2309 Add new checking assert to catch invalid state.
2310 (bit_test_cluster::can_be_handled): Handle single case
2311 clusters.
2312 (bit_test_cluster::is_beneficial): Bail out for such case.
2313 (switch_decision_tree::analyze_switch_statement):
2314 Fix comment.
2315
2316 2018-06-28 Martin Liska <mliska@suse.cz>
2317
2318 * common.opt: Introduce -completion option.
2319 * gcc.c (driver_handle_option): Handle it.
2320 (driver::main): Print completions if completion
2321 is set.
2322 * opt-suggestions.c (option_proposer::get_completions):
2323 New function.
2324 (option_proposer::suggest_completion): Likewise.
2325 (option_proposer::find_param_completions): Likewise.
2326 (verify_autocompletions): Likewise.
2327 (test_completion_valid_options): Likewise.
2328 (test_completion_valid_params): Likewise.
2329 (in_completion_p): Likewise.
2330 (empty_completion_p): Likewise.
2331 (test_completion_partial_match): Likewise.
2332 (test_completion_garbage): Likewise.
2333 (opt_proposer_c_tests): Likewise.
2334 * opt-suggestions.h: Declare new functions.
2335 * opts.c (common_handle_option): Handle OPT__completion_.
2336 * selftest-run-tests.c (selftest::run_tests): Add
2337 opt_proposer_c_tests.
2338 * selftest.c (assert_str_startswith): New.
2339 * selftest.h (assert_str_startswith): Likewise.
2340 (opt_proposer_c_tests): New.
2341 (ASSERT_STR_STARTSWITH): Likewise.
2342
2343 2018-06-28 Martin Liska <mliska@suse.cz>
2344
2345 * Makefile.in: Add opt-suggestions.o.
2346 * gcc-main.c: Include opt-suggestions.h.
2347 * gcc.c (driver::driver): Likewise.
2348 (driver::~driver): Remove m_option_suggestions.
2349 (driver::build_option_suggestions): Moved to option_proposer.
2350 (driver::suggest_option): Likewise.
2351 (driver::handle_unrecognized_options): Use option_proposer.
2352 * gcc.h (class driver): Add new memver m_option_proposer.
2353 * opt-suggestions.c: New file.
2354 * opt-suggestions.h: New file.
2355
2356 2018-06-28 Martin Liska <mliska@suse.cz>
2357
2358 * vec.h (class auto_string_vec): New (moved from auto_argvec).
2359 (auto_string_vec::~auto_string_vec): Likewise.
2360
2361 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2362
2363 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
2364 prevent_decl_creation_for_types fields up and add reset_location field.
2365 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
2366 statement if id->reset_location is true.
2367 (copy_edges_for_bb): Do not set goto_locus on the new edges if
2368 id->reset_location is true.
2369 (copy_phis_for_bb): Force input_location on the arguments if
2370 id->reset_location is true.
2371 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
2372 is set on the function to be inlined.
2373
2374 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
2375
2376 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
2377
2378 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
2379
2380 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
2381 registers for Pmode.
2382 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
2383 hard registers for the clobbered pseudo.
2384
2385 2018-06-27 Paul Koning <ni1d@arrl.net>
2386
2387 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2388 mutually exclusive options.
2389 * config/pdp11/constraints.md (h): New constraint.
2390 (O): Update definition to match shift code generation.
2391 (D): New constraint.
2392 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
2393 (CCFP): Remove.
2394 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
2395 function.
2396 (output_jump): Change arguments.
2397 (pdp11_fixed_cc_regs): New function.
2398 (pdp11_cc_mode): Ditto.
2399 (pdp11_expand_shift): Ditto.
2400 (pdp11_assemble_shift): Ditto.
2401 (pdp11_small_shift): Ditto.
2402 (pdp11_branch_cost): Remove.
2403 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
2404 from output.
2405 (pdp11_register_move_cost): Update for CC registers.
2406 (pdp11_rtx_costs): Add case for LSHIFTRT.
2407 (pdp11_output_jump): Add CCNZ mode conditional branches.
2408 (notice_update_cc_on_set): Remove.
2409 (pdp11_cc_mode): New function.
2410 (simple_memory_operand): Correct pre/post decrement case.
2411 (no_side_effect_operand): New function.
2412 (pdp11_regno_reg_class): Add CC_REGS class.
2413 (pdp11_fixed_cc_regs): New function.
2414 (pdp11_small_shift): New function.
2415 (pdp11_expand_shift): New function to expand shift insns.
2416 (pdp11_assemble_shift): New function to output shifts.
2417 (pdp11_branch_cost): Remove.
2418 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
2419 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
2420 (WCHAR_TYPE): Ditto.
2421 (PTRDIFF_TYPE): Ditto.
2422 (ADJUST_INSN_LENGTH): New macro.
2423 (FIXED_REGISTERS): Add CC registers.
2424 (CALL_USED_REGISTERS): Ditto.
2425 (reg_class): Ditto.
2426 (REG_CLASS_NAMES): Ditto.
2427 (REG_CLASS_CONTENTS): Ditto.
2428 (SELECT_CC_MODE): Use new function.
2429 (TARGET_FLAGS_REGNUM): New macro.
2430 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
2431 (cc0_reg_rtx): Remove.
2432 (CC_STATUS_MDEP): Remove.
2433 (CC_STATUS_MDEFP_INIT): Remove.
2434 (CC_IN_FPU): Remove.
2435 (NOTICE_UPDATE_CC): Remove.
2436 (REGISTER_NAMES): Add CC registers.
2437 (BRANCH_COST): Change to constant 1.
2438 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
2439 handling.
2440 * config/pdp11/pdp11.opt (mbcopy): Remove.
2441 (mbcopy-builtin): Remove.
2442 (mbranch-cheap): Remove.
2443 (mbranch-expensive): Remove.
2444 * config/pdp11/predicates.md (expand_shift_operand): Update to
2445 match shift code generation.
2446 (ccnz_operator): New predicate.
2447 * doc/invoke.texi (PDP-11 Options): Remove deleted options
2448 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
2449 Remove non-existent option -mabshi, -mno-abshi. Document mutually
2450 exclusive options.
2451 * doc/md.texi (PDP-11): Document new D and h constraints. Update
2452 description of O constraint.
2453
2454 2018-06-27 Jeff Law <law@redhat.com>
2455 Austin Law <austinklaw@gmail.com>
2456
2457 * config/v850/v850.md (addsi3_set_flags): New pattern.
2458 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
2459 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
2460 (zero_extendhisi2_v850_set_flags): Likewise.
2461 (zero_extendqisi2_v850_set_flags): Likewise.
2462 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
2463 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
2464 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
2465
2466 * config/v850/v850-protos.h (notice_update_cc): Remove.
2467 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
2468 (v850_print_operand): Handle 'D' and "d".
2469 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
2470 Add handling of arithmetic/logical operations compared against zero.
2471 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
2472 Do not look at v850_compare_op, instead get mode from last argument.
2473 (v850_gen_compare): Remove
2474 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
2475 after reload for prologue insns.
2476 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
2477 patterns.
2478 (construct_save_jarl): Likewise.
2479 (TARGET_FLAGS_REGNUM): Define.
2480 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
2481 (NOTICE_UPDATE_CC): Remove.
2482 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
2483 than cc0. Conditionalize on reload_completed.
2484 (cmpsi_insn, setfcc_insn): Likewise.
2485 (tst1 splitter): Turn into define_and_split which sets the flags
2486 after reload.
2487 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
2488 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
2489 (cstoresf4, cstoredf4): Clobber the flags.
2490 (cmpsi, cmpsf, cmpdf): Remove expanders.
2491 (setf_insn): Remove pattern.
2492 (addsi3): Turn into define_and_split which clobbers the flags after
2493 reload and a suitable pattern (addsi3_clobber_flags) for use after
2494 reload.
2495 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
2496 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
2497 (ashrsi3, ashrsi3_v850e2): Likewise.
2498 (bins): Clobber the flags.
2499 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
2500 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
2501 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
2502 (call_value_internal_short, call_value_internal_long): Likewise.
2503 (callt_save_interrupt, callt_return_interrupt): Likewise.
2504 (save_interrupt, return_interrupt): Likewise.
2505 (callt_save_all_interrupt, save_all_interrupt): Likewise.
2506 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
2507 (restore_all_interrupt, _restore_all_interrupt): Likewise.
2508 (All FP comparisons): Only allow after reload has completed.
2509 (trfsr): Likewise.
2510 (divh, divhu): Tweak output template.
2511 (branch_z_normal, branch_z_invert): Remove
2512 (branch_nz_normal, branch_nz_invert): Likewise.
2513 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
2514
2515 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
2516 * config/v850/v850.c (notice_update_cc): Remove.
2517 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
2518 (CC_NO_CARRY): Likewise.
2519 (NOTICE_UPDATE_CC): Define to nothing.
2520 * config/v850/v850.md: Remove block comment on cc0 handling
2521 Remove "cc" attribute from all patterns. Remove cc_status handling
2522 from all patterns. Minor formatting fixes.
2523
2524 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2525
2526 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
2527 (cortex-a76.cortex-a55): Likewise.
2528 * config/aarch64/aarch64-tune.md: Regenerate.
2529 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
2530 cortex-a76.cortex-a55.
2531
2532 2018-06-27 Jeff Law <law@redhat.com>
2533
2534 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
2535 (MULTILIB_DIRNAMES): Similarly.
2536
2537 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
2538
2539 * gimple.h (gimple_return_retbnd): Delete.
2540 (gimple_return_set_retbnd): Likewise.
2541 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
2542 gimple_return_set_retbnd.
2543 * gimple-pretty-print.c (dump_gimple_return): Remove call to
2544 gimple_return_retbnd and adjust.
2545 * tree-inline.h (struct copy_body_data): Remove retbnd field.
2546 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
2547 Explicitly return NULL in a couple more cases. Move assertion
2548 on debug statements and remove unreachable code.
2549 (reset_debug_binding): Do not test id->retbnd.
2550 (expand_call_inline): Do not set it.
2551
2552 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2553
2554 * configure.ac: Add --disable-gcov option.
2555 * configure: Regenerate.
2556 * Makefile.in: Honour @enable_gcov@.
2557 * doc/install.texi: Document --disable-gcov.
2558
2559 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2560
2561 * config/arm/arm-cpus.in (cortex-a76): New entry.
2562 (cortex-a76.cortex-a55): Likewise.
2563 * config/arm/arm-tables.opt: Regenerate.
2564 * config/arm/arm-tune.md: Likewise.
2565 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
2566 * doc/invoke.texi (ARM Options): Document cortex-a76 and
2567 cortex-a76.cortex-a55.
2568
2569 2018-06-27 Tamar Christina <tamar.christina@arm.com>
2570
2571 PR target/85769
2572 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
2573
2574 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
2575
2576 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
2577 comment.
2578 (EPILOGUE_USES): Likewise.
2579
2580 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
2581
2582 * tree-inline.c (remap_location): New function extracted from...
2583 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
2584 (copy_phis_for_bb): ...here. Call remap_location.
2585 (copy_cfg_body): Adjust call to copy_edges_for_bb.
2586
2587 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2588
2589 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
2590 unaligned vsx for 16B memset.
2591
2592 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
2593
2594 PR target/86285
2595 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
2596 ieee128_float_type_node to long_double_type_node unless
2597 TARGET_LONG_DOUBLE_128 is set.
2598
2599 2018-06-26 David Malcolm <dmalcolm@redhat.com>
2600
2601 * cfgloop.c (get_loop_location): Convert return type from
2602 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
2603 by implicit construction from rtx_insn *, and using
2604 dump_user_location_t::from_function_decl for the fallback case.
2605 * cfgloop.h (get_loop_location): Convert return type from
2606 location_t to dump_user_location_t.
2607 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
2608 dump_printf_loc to pass in a dump_location_t rather than a
2609 location_t, via the gimple stmt.
2610 * coverage.c (get_coverage_counts): Update calls to
2611 dump_printf_loc to pass in dump_location_t rather than a
2612 location_t.
2613 * doc/optinfo.texi (Dump types): Convert example of
2614 dump_printf_loc from taking "locus" to taking "insn". Update
2615 description of the "_loc" calls to cover dump_location_t.
2616 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
2617 "selftest.h".
2618 (dump_user_location_t::dump_user_location_t): New constructors,
2619 from gimple *stmt and rtx_insn *.
2620 (dump_user_location_t::from_function_decl): New function.
2621 (dump_loc): Make static.
2622 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
2623 const dump_location_t &.
2624 (dump_generic_expr_loc): Delete.
2625 (dump_printf_loc): Convert param "loc" from location_t to
2626 const dump_location_t &.
2627 (selftest::test_impl_location): New function.
2628 (selftest::dumpfile_c_tests): New function.
2629 * dumpfile.h: Include "profile-count.h".
2630 (class dump_user_location_t): New class.
2631 (struct dump_impl_location_t): New struct.
2632 (class dump_location_t): New class.
2633 (dump_printf_loc): Convert 2nd param from source_location to
2634 const dump_location_t &.
2635 (dump_generic_expr_loc): Delete.
2636 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
2637 const dump_location_t &.
2638 * gimple-fold.c (fold_gimple_assign): Update call to
2639 dump_printf_loc to pass in a dump_location_t rather than a
2640 location_t, via the gimple stmt.
2641 (gimple_fold_call): Likewise.
2642 * gimple-loop-interchange.cc
2643 (loop_cand::analyze_iloop_reduction_var): Update for change to
2644 check_reduction_path.
2645 (tree_loop_interchange::interchange): Update for change to
2646 find_loop_location.
2647 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
2648 change in return-type of find_loop_location.
2649 (graphite_regenerate_ast_isl): Likewise.
2650 * graphite-optimize-isl.c (optimize_isl): Likewise.
2651 * graphite.c (graphite_transform_loops): Likewise.
2652 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
2653 pass in a dump_location_t rather than a location_t, via the
2654 gimple stmt.
2655 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2656 * ipa.c (walk_polymorphic_call_targets): Likewise.
2657 * loop-unroll.c (report_unroll): Convert "locus" param from
2658 location_t to dump_location_t.
2659 (decide_unrolling): Update for change to get_loop_location's
2660 return type.
2661 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
2662 location_t to dump_user_location_t.
2663 (grid_find_single_omp_among_assignments_1): Updates calls to
2664 dump_printf_loc to pass in a dump_location_t rather than a
2665 location_t, via the gimple stmt.
2666 (grid_parallel_clauses_gridifiable): Convert "tloc" from
2667 location_t to dump_location_t. Updates calls to dump_printf_loc
2668 to pass in a dump_location_t rather than a location_t, via the
2669 gimple stmt.
2670 (grid_inner_loop_gridifiable_p): Likewise.
2671 (grid_dist_follows_simple_pattern): Likewise.
2672 (grid_gfor_follows_tiling_pattern): Likewise.
2673 (grid_target_follows_gridifiable_pattern): Likewise.
2674 (grid_attempt_target_gridification): Convert initialization
2675 of local "grid" from memset to zero-initialization; FIXME: does
2676 this require C++11? Update call to dump_printf_loc to pass in a
2677 optinfo_location rather than a location_t, via the gimple stmt.
2678 * profile.c (read_profile_edge_counts): Updates call to
2679 dump_printf_loc to pass in a dump_location_t rather than a
2680 location_t
2681 (compute_branch_probabilities): Likewise.
2682 * selftest-run-tests.c (selftest::run_tests): Call
2683 dumpfile_c_tests.
2684 * selftest.h (dumpfile_c_tests): New decl.
2685 * tree-loop-distribution.c (pass_loop_distribution::execute):
2686 Update for change in return type of find_loop_location.
2687 * tree-parloops.c (parallelize_loops): Likewise.
2688 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
2689 "locus" from location_t to dump_user_location_t.
2690 (canonicalize_loop_induction_variables): Likewise.
2691 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
2692 for change in return type of find_loop_location.
2693 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
2694 to dump_printf_loc to pass in a dump_location_t rather than a
2695 location_t, via the stmt.
2696 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
2697 Likewise.
2698 * tree-vect-loop-manip.c (find_loop_location): Convert return
2699 type from source_location to dump_user_location_t.
2700 (vect_do_peeling): Update for above change.
2701 (vect_loop_versioning): Update for change in type of
2702 vect_location.
2703 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
2704 from location_t to dump_user_location_t.
2705 (vect_estimate_min_profitable_iters): Update for change in type
2706 of vect_location.
2707 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
2708 location_t to dump_location_t.
2709 (vect_slp_bb): Update for change in type of vect_location.
2710 * tree-vectorizer.c (vect_location): Convert from source_location
2711 to dump_user_location_t.
2712 (try_vectorize_loop_1): Update for change in vect_location's type.
2713 (vectorize_loops): Likewise.
2714 (increase_alignment): Likewise.
2715 * tree-vectorizer.h (vect_location): Convert from source_location
2716 to dump_user_location_t.
2717 (find_loop_location): Convert return type from source_location to
2718 dump_user_location_t.
2719 (check_reduction_path): Convert 1st param from location_t to
2720 dump_user_location_t.
2721 * value-prof.c (check_counter): Update call to dump_printf_loc to
2722 pass in a dump_user_location_t rather than a location_t; update
2723 call to error_at for change in type of "locus".
2724 (check_ic_target): Update call to dump_printf_loc to
2725 pass in a dump_user_location_t rather than a location_t, via the
2726 call_stmt.
2727
2728 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
2729
2730 * config/s390/s390.h (enum processor_flags): Do not use
2731 default tune parameter when -march was specified.
2732
2733 2018-06-26 Jakub Jelinek <jakub@redhat.com>
2734
2735 PR target/86314
2736 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
2737 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
2738 operands.
2739
2740 2018-06-26 Richard Biener <rguenther@suse.de>
2741
2742 PR tree-optimization/86287
2743 PR bootstrap/86316
2744 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
2745 (vect_analyze_loop): Initialize n_stmts.
2746
2747 2018-06-26 Richard Biener <rguenther@suse.de>
2748
2749 PR middle-end/86271
2750 * fold-const.c (fold_convertible_p): Pointer extension
2751 isn't valid.
2752
2753 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
2754
2755 PR debug/86064
2756 * dwarf2out.c (loc_list_has_views): Adjust comments.
2757 (dw_loc_list): Split single cross-partition range with
2758 nonzero locview.
2759
2760 2018-06-25 Jeff Law <law@redhat.com>
2761
2762 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
2763 on -mbig-switch by default.
2764
2765 * config/v850/predicates.md (const_float_1_operand): Fix match_code
2766 test.
2767 (const_float_0_operand): Remove unused predicate.
2768 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
2769 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
2770 (recipsf2): New expander. Original pattern now called
2771 (recipsf2_insn).
2772 (recipdf2, recipdf2_insn): Similarly.
2773 (rsqrtsf2, rsqrtsf2_insn): Similarly
2774 (rsqrtdf2, rsqrtdf2_insn): Similarly
2775
2776 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
2777
2778 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
2779 Simplify logic for FreeBSD (twice).
2780
2781 2018-06-25 Martin Sebor <msebor@redhat.com>
2782
2783 PR tree-optimization/86204
2784 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
2785 a strnlen result if it's less than the length of the string.
2786
2787 2018-06-25 Martin Sebor <msebor@redhat.com>
2788
2789 PR tree-optimization/85700
2790 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
2791 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
2792 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
2793
2794 2018-06-25 Martin Sebor <msebor@redhat.com>
2795
2796 * doc/extend.texi (Zero-length arrays): Update and clarify.
2797
2798 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
2799
2800 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
2801 added IEEE/IBM long double multilib support on PowerPC little
2802 endian Linux systems.
2803 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
2804 (MULTILIB_DEFAULTS): Likewise.
2805 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2806 Likewise.
2807 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
2808 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
2809 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
2810
2811 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
2812
2813 PR middle-end/86311
2814 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
2815 (REORDER_45): Likewise.
2816
2817 2018-06-25 Jeff Law <law@redhat.com>
2818
2819 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
2820 dividend to 32 bits. Adjust length.
2821 (udivmodhi4): Cleanup output template. Fix length.
2822
2823 2018-06-25 Carl Love <cel@us.ibm.com>
2824
2825 * config/rs6000/vsx.md: Change word selector to prefered location.
2826
2827 2018-06-25 Richard Biener <rguenther@suse.de>
2828
2829 PR tree-optimization/86304
2830 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
2831 epilogue-if-converted loops as well.
2832
2833 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
2834
2835 * lto-section-out.c (lto_begin_section): Do not print section
2836 name for noaddr and unnumbered dumps.
2837
2838 2018-06-25 Richard Biener <rguenther@suse.de>
2839
2840 * tree-vectorizer.h (struct vec_info_shared): New structure
2841 with parts split out from struct vec_info and loop_nest from
2842 struct _loop_vec_info.
2843 (struct vec_info): Adjust accordingly.
2844 (struct _loop_vec_info): Likewise.
2845 (LOOP_VINFO_LOOP_NEST): Adjust.
2846 (LOOP_VINFO_DATAREFS): Likewise.
2847 (LOOP_VINFO_DDRS): Likewise.
2848 (struct _bb_vec_info): Likewise.
2849 (BB_VINFO_DATAREFS): Likewise.
2850 (BB_VINFO_DDRS): Likewise.
2851 (struct _stmt_vec_info): Add dr_aux member.
2852 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
2853 (DR_MISALIGNMENT_UNINITIALIZED): New.
2854 (set_dr_misalignment): Adjust.
2855 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
2856 (vect_analyze_loop): Adjust prototype.
2857 (vect_analyze_loop_form): Likewise.
2858 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2859 Compute dependences lazily.
2860 (vect_record_base_alignments): Use shared datarefs/ddrs.
2861 (vect_verify_datarefs_alignment): Likewise.
2862 (vect_analyze_data_refs_alignment): Likewise.
2863 (vect_analyze_data_ref_accesses): Likewise.
2864 (vect_analyze_data_refs): Likewise.
2865 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
2866 constructor parameter for shared part.
2867 (vect_analyze_loop_form): Pass in shared part and adjust.
2868 (vect_analyze_loop_2): Pass in storage for the number of
2869 stmts. Move loop nest finding to the caller. Compute
2870 datarefs lazily.
2871 (vect_analyze_loop): Pass in shared part.
2872 (vect_transform_loop): Verify shared datarefs are unchanged.
2873 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
2874 constructor parameter for shared part.
2875 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
2876 (vect_slp_bb): Verify shared datarefs are unchanged before
2877 transform.
2878 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
2879 change.
2880 (new_stmt_vec_info): Initialize DR_AUX misalignment to
2881 DR_MISALIGNMENT_UNINITIALIZED.
2882 * tree-vectorizer.c (vec_info::vec_info): Add constructor
2883 parameter for shared part.
2884 (vec_info::~vec_info): Adjust.
2885 (vec_info_shared::vec_info_shared): New.
2886 (vec_info_shared::~vec_info_shared): Likewise.
2887 (vec_info_shared::save_datarefs): Likewise.
2888 (vec_info_shared::check_datarefs): Likewise.
2889 (try_vectorize_loop_1): Construct shared part live for analyses
2890 of a single loop for multiple vector sizes.
2891 * tree-parloops.c (gather_scalar_reductions): Adjust.
2892
2893 2018-06-25 Richard Biener <rguenther@suse.de>
2894
2895 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
2896 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
2897 (vect_analyze_data_refs): Remove similar code from here and
2898 simplify accordingly.
2899
2900 2018-06-25 Richard Biener <rguenther@suse.de>
2901
2902 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
2903 for reverse storage order accesses rather than asserting
2904 they cannot happen here.
2905
2906 2018-06-25 Tom de Vries <tdevries@suse.de>
2907
2908 PR debug/86257
2909 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
2910 Use data16 instead of .byte for insn prefix.
2911
2912 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
2913
2914 PR C++/86082
2915 * parser.c (make_char_string_pack): Pass this literal chars
2916 through cpp_interpret_string.
2917 (cp_parser_userdef_numeric_literal): Check the result of
2918 make_char_string_pack.
2919
2920 2018-06-24 Maya Rashish <coypu@sdf.org>
2921
2922 * ginclude/stddef.h: Simplify conditions around avoiding
2923 re-definition of __size_t.
2924
2925 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2926
2927 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
2928 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
2929
2930 2018-06-22 Maya Rashish <coypu@sdf.org>
2931
2932 * doc/invoke.texi (mno-fancy-math-387): Update for changes
2933 made to OpenBSD and NetBSD through the years.
2934
2935 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
2936
2937 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2938 behavior of vec_pack (vector double, vector double) to match
2939 behavior of vec_float2 (vector double, vector double).
2940
2941 2018-06-22 Olivier Hainque <hainque@adacore.com>
2942
2943 * gimplify.c (gimplify_function_tree): Prevent creation
2944 of a trampoline for the address of the current function
2945 passed to entry/exit instrumentation hooks.
2946
2947 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
2948
2949 PR target/86222
2950 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
2951 correctly.
2952
2953 2018-06-22 Martin Liska <mliska@suse.cz>
2954
2955 PR tree-optimization/86263
2956 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2957 Bail out if is_enabled is false.
2958 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
2959 New declaration.
2960 (jump_table_cluster::is_enabled): New function.
2961
2962 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2963
2964 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2965 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
2966 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
2967 (lto_input_ts_binfo_tree_pointers): Likewise.
2968 * tree-streamer-out.c (streamer_write_tree_bitfields,
2969 write_ts_binfo_tree_pointers): Likewise.
2970 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
2971
2972 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2973
2974 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
2975
2976 2018-06-22 Martin Liska <mliska@suse.cz>
2977
2978 * symbol-summary.h (get): Make it pure and inline move
2979 functionality from ::get function.
2980 (get): Remove and inline into ::get and ::get_create.
2981 (get_create): Move code from ::get function.
2982
2983 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2984
2985 PR target/85994
2986 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
2987 -x assembler-with-cpp.
2988
2989 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2990
2991 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
2992 _FILE_OFFSET_BITS=64 for C++.
2993
2994 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
2995
2996 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
2997 conversion insn that shows up when pr85657-3.c is compiled using
2998 IEEE 128-bit long double.
2999 (neg<mode>2_internal): Use the correct mode to check whether the
3000 mode is IBM extended.
3001 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3002 multiply and divide external functions from being created more
3003 than once.
3004
3005 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3006
3007 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
3008 functions.
3009 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
3010 the edge can be forwarded.
3011 (cfg_layout_merge_blocks): Likewise.
3012
3013 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3014
3015 * except.c (finish_eh_generation): Commit edge insertions only after
3016 the EH edges have been redirected from post-landing to landing pads.
3017
3018 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3019
3020 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
3021 create_tmp_var_for to create the FRAME decl.
3022 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
3023
3024 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3025
3026 * tree-inline.c (copy_edges_for_bb): Minor tweak.
3027 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
3028 debug statement when resetting its value.
3029 (expand_call_inline): Copy the locus of the call onto the assignment
3030 of the return value, if any. Use local variable in more cases.
3031
3032 2018-06-21 Martin Liska <mliska@suse.cz>
3033
3034 * ipa-pure-const.c (propagate_nothrow): Use
3035 funct_state_summaries->get.
3036 (dump_malloc_lattice): Likewise.
3037 (propagate_malloc): Likewise.
3038
3039 2018-06-21 Richard Biener <rguenther@suse.de>
3040
3041 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
3042 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
3043 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
3044 comment.
3045 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
3046 BLOCK_ABSTRACT_ORIGIN unconditionally.
3047
3048 2018-06-21 David Malcolm <dmalcolm@redhat.com>
3049
3050 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
3051 deleting it.
3052 * ipa-reference.c (ipa_reference_c_finalize): Delete
3053 ipa_ref_opt_sum_summaries and set it to NULL.
3054
3055 2018-06-21 Tom de Vries <tdevries@suse.de>
3056
3057 PR tree-optimization/85859
3058 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
3059 test with comment from bb_no_side_effects_p.
3060
3061 2018-06-21 Richard Biener <rguenther@suse.de>
3062
3063 PR tree-optimization/86232
3064 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
3065 max for constant niter.
3066
3067 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
3068
3069 * config/aarch64/aarch64-simd.md
3070 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
3071
3072 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
3073
3074 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
3075 Make opernads of the unspec commutative.
3076
3077 2018-06-21 Richard Biener <rguenther@suse.de>
3078
3079 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
3080 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
3081 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
3082 (vect_analyze_data_ref_dependence): Re-order checks to deal with
3083 NULL DR_STEP.
3084 (vect_record_base_alignments): Do not record base alignment
3085 for gathers or scatters.
3086 (vect_compute_data_ref_alignment): Drop return value that is always
3087 true. Bail out early for gathers or scatters.
3088 (vect_enhance_data_refs_alignment): Bail out early for gathers
3089 or scatters.
3090 (vect_find_same_alignment_drs): Likewise.
3091 (vect_analyze_data_refs_alignment): Remove dead code.
3092 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3093 (vect_analyze_data_refs): For possible gathers or scatters do
3094 not create an alternate DR, just check their possible validity
3095 and mark them. Adjust DECL_NONALIASED handling to not rely
3096 on DR_BASE_ADDRESS.
3097 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
3098 update inits of gathers or scatters.
3099 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
3100 Also copy gather/scatter flag to pattern vinfo.
3101
3102 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
3103
3104 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3105 behavior of vec_packsu (vector unsigned long long, vector unsigned
3106 long long) to match behavior of vec_packs with same signature.
3107
3108 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3109 Thomas Schwinge <thomas@codesourcery.com>
3110 Cesar Philippidis <cesar@codesourcery.com>
3111
3112 * gimplify.c (gimplify_scan_omp_clauses): Add support for
3113 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3114 (gimplify_adjust_omp_clauses): Likewise.
3115 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
3116 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
3117 (gimplify_omp_target_update): Update handling of acc update and
3118 enter/exit data.
3119 * omp-low.c (install_var_field): Remove unused parameter
3120 base_pointers_restrict.
3121 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
3122 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
3123 FINALIZE}
3124 (omp_target_base_pointers_restrict_p): Delete.
3125 (scan_omp_target): Update call to scan_sharing_clauses.
3126 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
3127 FINALIZE}.
3128 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3129 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3130 (convert_local_omp_clauses): Likewise.
3131 * tree-pretty-print.c (dump_omp_clause): Likewise.
3132 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
3133 FINALIZE}.
3134 (omp_clause_code_name): Likewise.
3135
3136 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3137
3138 PR debug/86194
3139 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
3140 be narrowed.
3141
3142 PR tree-optimization/86231
3143 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
3144 anti-range don't overwrite *vr0min before using it to compute *vr0max.
3145
3146 2018-06-20 Tom de Vries <tdevries@suse.de>
3147
3148 PR tree-optimization/86097
3149 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
3150 iv type if signedness of iv type is not the same as that of *nit.
3151
3152 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3153
3154 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
3155 EDGE_EH edges, verify they are all EDGE_EH.
3156
3157 2018-06-20 Maya Rashish <coypu@sdf.org>
3158
3159 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
3160
3161 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3162
3163 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
3164 * config/aarch64/aarch64.c (xgene1_tunings): Add
3165 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
3166 (aarch64_mode_valid_for_sched_fusion_p):
3167 Allow 16-byte modes.
3168 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
3169 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
3170 128-bit modes.
3171 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
3172 New pattern.
3173 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
3174 * config/aarch64/iterators.md (VQ2): New mode iterator.
3175
3176 2018-06-20 Martin Liska <mliska@suse.cz>
3177
3178 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3179 Change default ratio from 10 to 8.
3180
3181 2018-06-20 Martin Liska <mliska@suse.cz>
3182
3183 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3184 New.
3185 (bit_test_cluster::find_bit_tests): Likewise.
3186 (switch_decision_tree::analyze_switch_statement): Find clusters.
3187 * tree-switch-conversion.h (struct jump_table_cluster): Document
3188 hierarchy.
3189
3190 2018-06-20 Martin Liska <mliska@suse.cz>
3191
3192 * tree-switch-conversion.c (switch_conversion::collect):
3193 Record m_uniq property.
3194 (switch_conversion::expand): Bail out for special conditions.
3195 (group_cluster::~group_cluster): New.
3196 (group_cluster::group_cluster): Likewise.
3197 (group_cluster::dump): Likewise.
3198 (jump_table_cluster::emit): New.
3199 (switch_decision_tree::fix_phi_operands_for_edges): New.
3200 (struct case_node): Remove struct.
3201 (jump_table_cluster::can_be_handled): New.
3202 (case_values_threshold): Moved to header.
3203 (reset_out_edges_aux): Likewise.
3204 (jump_table_cluster::is_beneficial): New.
3205 (bit_test_cluster::can_be_handled): Likewise.
3206 (add_case_node): Remove.
3207 (bit_test_cluster::is_beneficial): New.
3208 (case_bit_test::cmp): New.
3209 (bit_test_cluster::emit): New.
3210 (expand_switch_as_decision_tree_p): Remove.
3211 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
3212 (fix_phi_operands_for_edge): Likewise.
3213 (switch_decision_tree::analyze_switch_statement): New.
3214 (compute_cases_per_edge): Move ...
3215 (switch_decision_tree::compute_cases_per_edge): ... here.
3216 (try_switch_expansion): Likewise.
3217 (switch_decision_tree::try_switch_expansion): Likewise.
3218 (record_phi_operand_mapping): Likewise.
3219 (switch_decision_tree::record_phi_operand_mapping): Likewise.
3220 (emit_case_decision_tree): Likewise.
3221 (switch_decision_tree::emit): Likewise.
3222 (balance_case_nodes): Likewise.
3223 (switch_decision_tree::balance_case_nodes): Likewise.
3224 (dump_case_nodes): Likewise.
3225 (switch_decision_tree::dump_case_nodes): Likewise.
3226 (emit_jump): Likewise.
3227 (switch_decision_tree::emit_jump): Likewise.
3228 (emit_cmp_and_jump_insns): Likewise.
3229 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3230 (emit_case_nodes): Likewise.
3231 (switch_decision_tree::emit_case_nodes): Likewise.
3232 (conditional_probability): Remove.
3233 * tree-switch-conversion.h (enum cluster_type): New.
3234 (PRINT_CASE): New.
3235 (struct cluster): Likewise.
3236 (cluster::cluster): Likewise.
3237 (struct simple_cluster): Likewise.
3238 (simple_cluster::simple_cluster): Likewise.
3239 (struct group_cluster): Likewise.
3240 (struct jump_table_cluster): Likewise.
3241 (struct bit_test_cluster): Likewise.
3242 (struct min_cluster_item): Likewise.
3243 (struct case_tree_node): Likewise.
3244 (case_tree_node::case_tree_node): Likewise.
3245 (jump_table_cluster::case_values_threshold): Likewise.
3246 (struct case_bit_test): Likewise.
3247 (struct switch_decision_tree): Likewise.
3248 (struct switch_conversion): Likewise.
3249 (switch_decision_tree::reset_out_edges_aux): Likewise.
3250
3251 2018-06-20 Martin Liska <mliska@suse.cz>
3252
3253 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
3254 (hoist_edge_and_branch_if_true): Likewise.
3255 (expand_switch_using_bit_tests_p): Likewise.
3256 (struct case_bit_test): Likewise.
3257 (case_bit_test_cmp): Likewise.
3258 (emit_case_bit_tests): Likewise.
3259 (switch_conversion::switch_conversion): New class.
3260 (struct switch_conv_info): Remove old struct.
3261 (collect_switch_conv_info): More to ...
3262 (switch_conversion::collect): ... this.
3263 (check_range): Likewise.
3264 (switch_conversion::check_range): Likewise.
3265 (check_all_empty_except_final): Likewise.
3266 (switch_conversion::check_all_empty_except_final): Likewise.
3267 (check_final_bb): Likewise.
3268 (switch_conversion::check_final_bb): Likewise.
3269 (create_temp_arrays): Likewise.
3270 (switch_conversion::create_temp_arrays): Likewise.
3271 (free_temp_arrays): Likewise.
3272 (gather_default_values): Likewise.
3273 (switch_conversion::gather_default_values): Likewise.
3274 (build_constructors): Likewise.
3275 (switch_conversion::build_constructors): Likewise.
3276 (constructor_contains_same_values_p): Likewise.
3277 (switch_conversion::contains_same_values_p): Likewise.
3278 (array_value_type): Likewise.
3279 (switch_conversion::array_value_type): Likewise.
3280 (build_one_array): Likewise.
3281 (switch_conversion::build_one_array): Likewise.
3282 (build_arrays): Likewise.
3283 (switch_conversion::build_arrays): Likewise.
3284 (gen_def_assigns): Likewise.
3285 (switch_conversion::gen_def_assigns): Likewise.
3286 (prune_bbs): Likewise.
3287 (switch_conversion::prune_bbs): Likewise.
3288 (fix_phi_nodes): Likewise.
3289 (switch_conversion::fix_phi_nodes): Likewise.
3290 (gen_inbound_check): Likewise.
3291 (switch_conversion::gen_inbound_check): Likewise.
3292 (process_switch): Use the newly created class.
3293 (switch_conversion::expand): New.
3294 (switch_conversion::~switch_conversion): New.
3295 * tree-switch-conversion.h: New file.
3296
3297 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3298
3299 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
3300 tree-vect-patterns.c.
3301 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
3302 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
3303 (vect_recog_sad_pattern): Likewise.
3304 (vect_recog_widen_sum_pattern): Likewise.
3305 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
3306 (vect_recog_widen_shift_pattern): Remove the type_in argument.
3307 (vect_recog_rotate_pattern): Likewise.
3308 (vect_recog_mult_pattern): Likewise.
3309 (vect_recog_vector_vector_shift_pattern): Likewise.
3310 (vect_recog_divmod_pattern): Likewise.
3311 (vect_recog_mixed_size_cond_pattern): Likewise.
3312 (vect_recog_bool_pattern): Likewise.
3313 (vect_recog_mask_conversion_pattern): Likewise.
3314 (vect_try_gather_scatter_pattern): Likewise.
3315 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
3316 (vect_recog_over_widening_pattern): Likewise.
3317 (vect_recog_gather_scatter_pattern): Likewise.
3318 (vect_recog_func_ptr): Move from tree-vectorizer.h
3319 (vect_vect_recog_func_ptrs): Move further down the file.
3320 (vect_recog_func): Likewise. Remove the third argument.
3321 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
3322 (vect_pattern_recog_1): Expect the pattern function to do any
3323 necessary target tests. Also expect it to provide a vector type.
3324 Remove the type_in handling.
3325
3326 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3327
3328 * tree-vect-patterns.c (vect_pattern_detected): New function.
3329 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
3330 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
3331 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
3332 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
3333 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3334 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3335 (vect_recog_mask_conversion_pattern)
3336 (vect_try_gather_scatter_pattern): Likewise.
3337
3338 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3339
3340 * tree-vect-patterns.c (vect_get_internal_def): New function.
3341 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3342 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
3343 (search_type_for_mask_1): Use it.
3344
3345 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3346
3347 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3348 redundant WIDEN_SUM_EXPR handling.
3349 (vect_recog_sad_pattern): Likewise.
3350
3351 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3352
3353 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3354 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
3355 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
3356 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
3357 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
3358
3359 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3360
3361 * tree-vect-stmts.c (vectorizable_call): Make sure that we
3362 use the stmt_vec_info of the original bb statement for the
3363 new zero assignment, even if the call is part of a pattern.
3364
3365 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3366
3367 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
3368 that the sequence is attached to the original statement rather
3369 than the pattern statement.
3370 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
3371 PATTERN_DEF_SEQ from the original statement rather than
3372 the main pattern statement.
3373 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
3374 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
3375 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
3376
3377 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3378
3379 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
3380 definition statements before the early exit for statements that aren't
3381 live or relevant.
3382 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
3383 split out from...
3384 (vect_transform_loop): ...here. Process pattern definition
3385 statements without first checking whether the main pattern
3386 statement is live or relevant.
3387
3388 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3389
3390 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
3391 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
3392
3393 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
3394
3395 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
3396 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
3397 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
3398 (expand_block_compare): Change select_block_compare_mode call.
3399 (expand_strncmp_align_check): Use new functions, fix comment.
3400 (emit_final_str_compare_gpr): New function.
3401 (expand_strn_compare): Refactor and clean up code.
3402 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
3403
3404 2018-06-19 Tony Reix <tony.reix@atos.com>
3405 Damien Bergamini <damien.bergamini@atos.com>
3406 David Edelsohn <dje.gcc@gmail.com>
3407
3408 * collect2.c (static_obj): New variable.
3409 (static_libs): New variable.
3410 (is_in_list): Uncomment declaration.
3411 (main): Track AIX libraries linked statically.
3412 (is_in_list): Uncomment definition.
3413 (scan_prog_file): Don't add AIX shared libraries initializer
3414 to constructor list if linking statically.
3415
3416 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
3417
3418 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
3419 constant.
3420 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
3421
3422 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
3423
3424 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
3425 blocks.
3426
3427 2018-06-19 Martin Liska <mliska@suse.cz>
3428
3429 * config/i386/i386.c (ix86_can_inline_p): Do not use
3430 ipa_fn_summaries::get_create.
3431 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
3432 get.
3433 (devirtualization_time_bonus): Likewise.
3434 (ipcp_propagate_stage): Likewise.
3435 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3436 (edge_set_predicate): Likewise.
3437 (evaluate_conditions_for_known_args): Likewise.
3438 (evaluate_properties_for_edge): Likewise.
3439 (ipa_call_summary::reset): Tranform to ...
3440 (ipa_call_summary::~ipa_call_summary): ... this.
3441 (ipa_fn_summary::reset): Transform to ...
3442 (ipa_fn_summary::~ipa_fn_summary): ... this.
3443 (ipa_fn_summary_t::remove): Rename to ...
3444 (ipa_fn_summary_t::remove_callees): ... this.
3445 (ipa_fn_summary_t::duplicate): Use placement new
3446 instead of memory copy.
3447 (ipa_call_summary_t::duplicate): Likewise.
3448 (ipa_call_summary_t::remove): Remove.
3449 (dump_ipa_call_summary): Change get_create to get.
3450 (ipa_dump_fn_summary): Dump only when summary exists.
3451 (analyze_function_body): Use symbol_summary::get instead
3452 of get_create.
3453 (compute_fn_summary): Likewise.
3454 (estimate_edge_devirt_benefit): Likewise.
3455 (estimate_edge_size_and_time): Likewise.
3456 (inline_update_callee_summaries): Likewise.
3457 (remap_edge_change_prob): Likewise.
3458 (remap_edge_summaries): Likewise.
3459 (ipa_merge_fn_summary_after_inlining): Likewise.
3460 (write_ipa_call_summary): Likewise.
3461 (ipa_fn_summary_write): Likewise.
3462 (ipa_free_fn_summary): Likewise.
3463 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
3464 (struct ipa_call_summary): Likewise.
3465 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
3466 of get_create.
3467 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
3468 (estimate_size_after_inlining): Likewise.
3469 (estimate_growth): Likewise.
3470 (growth_likely_positive): Likewise.
3471 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3472 (inline_call): Likewise.
3473 * ipa-inline.c (caller_growth_limits): Likewise.
3474 (can_inline_edge_p): Likewise.
3475 (can_inline_edge_by_limits_p): Likewise.
3476 (compute_uninlined_call_time): Likewise.
3477 (compute_inlined_call_time): Likewise.
3478 (want_inline_small_function_p): Likewise.
3479 (edge_badness): Likewise.
3480 (update_caller_keys): Likewise.
3481 (update_callee_keys): Likewise.
3482 (inline_small_functions): Likewise.
3483 (inline_to_all_callers_1): Likewise.
3484 (dump_overall_stats): Likewise.
3485 (early_inline_small_functions): Likewise.
3486 (early_inliner): Likewise.
3487 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3488 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3489 * ipa-pure-const.c (malloc_candidate_p): Likewise.
3490 * ipa-split.c (execute_split_functions): Likewise.
3491 * symbol-summary.h: Likewise.
3492 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3493
3494 2018-06-19 Richard Biener <rguenther@suse.de>
3495
3496 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
3497 (vectorize_loops): ... here. Fix dbgcnt handling.
3498 (try_vectorize_loop): Wrap try_vectorize_loop_1.
3499
3500 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
3501
3502 PR target/86197
3503 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3504 ieee128 argument takes up only one (vector) register, not two (floating
3505 point) registers.
3506
3507 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3508
3509 * gimplify.c (gimplify_init_constructor): Really never clear for an
3510 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
3511
3512 2018-06-19 Richard Biener <rguenther@suse.de>
3513
3514 PR tree-optimization/86179
3515 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
3516 after failed recognition.
3517
3518 2018-06-18 Martin Sebor <msebor@redhat.com>
3519
3520 PR middle-end/85602
3521 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3522 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3523 Handle integer subtraction.
3524 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3525 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3526
3527 2018-06-18 David Malcolm <dmalcolm@redhat.com>
3528
3529 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
3530 param from rtx to rtx_insn *.
3531 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
3532 param.
3533 (frv_ifcvt_modify_insn): Likwise.
3534 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
3535 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
3536 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
3537 as_a <rtx_insn *> cast to local "unprotected_region" once
3538 it's been established that it's not NULL or pc_rtx.
3539 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
3540 param "sethi" from rtx to rtx_insn *.
3541 (nds32_group_float_insns): Likewise for param "insn".
3542 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
3543 param.
3544 (vax_output_int_subtract): Likewise.
3545 * config/vax/vax.c (vax_output_int_add): Likewise for param
3546 "insn".
3547 (vax_output_int_subtract): Likewise.
3548 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
3549 (emit_pattern_after): Likewise for param "after".
3550 (emit_insn_after): Likewise.
3551 (emit_jump_insn_after): Likewise.
3552 (emit_call_insn_after): Likewise.
3553 (emit_debug_insn_after): Likewise.
3554 (emit_pattern_before): Likewise for param "before".
3555 (emit_insn_before): Likewise.
3556 (emit_jump_insn_before): Likewise.
3557 * final.c (get_insn_template): Likewise for param "insn", removing
3558 a cast.
3559 * output.h (get_insn_template): Likewise for 2nd param.
3560 * rtl.h (emit_insn_before): Likewise.
3561 (emit_jump_insn_before): Likewise.
3562 (emit_debug_insn_before_noloc): Likewise.
3563 (emit_insn_after): Likewise.
3564 (emit_jump_insn_after): Likewise.
3565 (emit_call_insn_after): Likewise.
3566 (emit_debug_insn_after): Likewise.
3567 (set_insn_deleted): Likewise for param.
3568
3569 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
3570
3571 PR target/85358
3572 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3573 floating point modes, so that IFmode is numerically greater than
3574 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3575 to declare the ordering. This prevents IFmode from being
3576 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3577 machine. Include rs6000-modes.h to share the fractional values
3578 between genmodes* and the rest of the compiler.
3579 (IFmode): Likewise.
3580 (KFmode): Likewise.
3581 (TFmode): Likewise.
3582 * config/rs6000/rs6000-modes.h: New file.
3583 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3584 meaning of rs6000_long_double_size so that 126..128 selects an
3585 appropriate 128-bit floating point type.
3586 (rs6000_option_override_internal): Likewise.
3587 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3588 (TARGET_LONG_DOUBLE_128): Change the meaning of
3589 rs6000_long_double_size so that 126..128 selects an appropriate
3590 128-bit floating point type.
3591 (LONG_DOUBLE_TYPE_SIZE): Update comment.
3592 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
3593 source and destination to match the standard usage.
3594 (truncifkf2): Likewise.
3595 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
3596 ISA 2.07 to use an explicit clobber, instead of passing in a
3597 temporary.
3598 (copysign<mode>3_soft): Likewise.
3599
3600 2018-06-18 David Malcolm <dmalcolm@redhat.com>
3601
3602 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3603 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
3604 (vect_slp_analyze_instance_dependence): Likewise.
3605 (vect_enhance_data_refs_alignment): Likewise.
3606 (vect_analyze_data_refs_alignment): Likewise.
3607 (vect_slp_analyze_and_verify_instance_alignment
3608 (vect_analyze_data_ref_accesses): Likewise.
3609 (vect_prune_runtime_alias_test_list): Likewise.
3610 (vect_analyze_data_refs): Likewise.
3611 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
3612 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
3613 (vect_analyze_scalar_cycles_1): Likewise.
3614 (vect_get_loop_niters): Likewise.
3615 (vect_analyze_loop_form_1): Likewise.
3616 (vect_update_vf_for_slp): Likewise.
3617 (vect_analyze_loop_operations): Likewise.
3618 (vect_analyze_loop): Likewise.
3619 (vectorizable_induction): Likewise.
3620 (vect_transform_loop): Likewise.
3621 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
3622 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3623 (vect_make_slp_decision): Likewise.
3624 (vect_detect_hybrid_slp): Likewise.
3625 (vect_slp_analyze_operations): Likewise.
3626 (vect_slp_bb): Likewise.
3627 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
3628 (vectorizable_bswap): Likewise.
3629 (vectorizable_call): Likewise.
3630 (vectorizable_simd_clone_call): Likewise.
3631 (vectorizable_conversion): Likewise.
3632 (vectorizable_assignment): Likewise.
3633 (vectorizable_shift): Likewise.
3634 (vectorizable_operation): Likewise.
3635 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
3636
3637 2018-06-18 Martin Sebor <msebor@redhat.com>
3638
3639 PR tree-optimization/81384
3640 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
3641 * builtins.c (expand_builtin_strnlen): New function.
3642 (expand_builtin): Call it.
3643 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
3644 * builtins.def (BUILT_IN_STRNLEN): New.
3645 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
3646 Warn for bounds in excess of maximum object size.
3647 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
3648 single-value ranges. Handle strnlen.
3649 (handle_builtin_strlen): Handle strnlen.
3650 (strlen_check_and_optimize_stmt): Same.
3651 * doc/extend.texi (Other Builtins): Document strnlen.
3652
3653 2018-06-18 Maya Rashish <coypu@sdf.org>
3654
3655 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
3656 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
3657 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
3658
3659 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
3660 here to ...
3661 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
3662
3663 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3664
3665 * tree.c (escaped_string::escape): Replace cast to char * by
3666 const_cast<char *> (unescaped).
3667
3668 2018-06-18 Nick Clifton <nickc@redhat.com>
3669
3670 PR 84195
3671 * tree.c (escaped_string): New class. Converts an unescaped
3672 string into its escaped equivalent.
3673 (warn_deprecated_use): Use the new class to convert the
3674 deprecation message, if present.
3675 (test_escaped_strings): New self test.
3676 (test_c_tests): Add test_escaped_strings.
3677 * doc/extend.texi (deprecated): Add a note that the
3678 deprecation message is affected by the -fmessage-length
3679 option, and that control characters will be escaped.
3680 (#pragma GCC error): Document this pragma.
3681 (#pragma GCC warning): Likewise.
3682 * doc/invoke.texi (-fmessage-length): Document this option's
3683 effect on the #warning and #error preprocessor directives and
3684 the deprecated attribute.
3685
3686 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
3687
3688 * tree.c (decl_value_expr_lookup): Revert latest change.
3689 (decl_value_expr_insert): Likewise.
3690
3691 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
3692
3693 * gimplify.c (nonlocal_vlas): Delete.
3694 (nonlocal_vla_vars): Likewise.
3695 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
3696 referenced VLAs.
3697 (gimplify_body): Do not create and destroy nonlocal_vlas.
3698 * tree-nested.c: Include diagnostic.h.
3699 (use_pointer_in_frame): Tweak.
3700 (lookup_field_for_decl): Add assertion and declare the transformation.
3701 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
3702 internal error when the reference is in a wrong context. Do not
3703 create a debug decl by default.
3704 (note_nonlocal_block_vlas): Delete.
3705 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
3706 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
3707 create a debug decl by default.
3708 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
3709 call is in a wrong context.
3710 (fixup_vla_decls): New function.
3711 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
3712 debug variables were created.
3713 * tree.c (decl_value_expr_lookup): Add checking assertion.
3714 (decl_value_expr_insert): Likewise.
3715
3716 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3717
3718 PR middle-end/82479
3719 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
3720 * tree-scalar-evolution.c (interpret_expr): Likewise.
3721 (expression_expensive_p): Likewise.
3722 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
3723 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
3724 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
3725 (ssa_defined_by_minus_one_stmt_p): New.
3726
3727 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3728
3729 PR middle-end/64946
3730 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
3731 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
3732 * dojump.c (do_jump): Likewise.
3733 * expr.c (expand_expr_real_2): Check operand type's sign.
3734 * fold-const.c (const_unop): Handle ABSU_EXPR.
3735 (fold_abs_const): Likewise.
3736 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
3737 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
3738 (strip_sign_op_1): Likesise.
3739 * match.pd: Add new pattern to generate ABSU_EXPR.
3740 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
3741 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3742 * tree-eh.c (operation_could_trap_helper_p): Likewise.
3743 * tree-inline.c (estimate_operator_cost): Likewise.
3744 * tree-pretty-print.c (dump_generic_node): Likewise.
3745 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
3746 * tree.def (ABSU_EXPR): New.
3747
3748 2018-06-16 Jakub Jelinek <jakub@redhat.com>
3749
3750 PR middle-end/86095
3751 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
3752 documented as preserved for backward compatibility only.
3753 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
3754
3755 PR rtl-optimization/86108
3756 * bb-reorder.c (create_forwarder_block): Renamed to ...
3757 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
3758 jump from new landing pad to the second part.
3759 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
3760 Adjust callers.
3761
3762 2018-06-15 Jakub Jelinek <jakub@redhat.com>
3763
3764 PR middle-end/85878
3765 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
3766 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
3767 Only call store_expr for halves if the mode is the same.
3768
3769 PR middle-end/86123
3770 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
3771 Fix up comment formatting.
3772
3773 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3774
3775 * typed-splay-tree.h (typed_splay_tree::remove): New function.
3776 (typed_splay_tree::closure,
3777 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
3778 (typed_splay_tree::typed_splay_tree,
3779 typed_splay_tree::operator =): Declared private.
3780 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
3781 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
3782 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
3783 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
3784 typed_splay_tree::splay_tree_splay,
3785 typed_splay_tree::splay_tree_foreach_helper,
3786 typed_splay_tree::splay_tree_insert,
3787 typed_splay_tree::splay_tree_remove,
3788 typed_splay_tree::splay_tree_lookup,
3789 typed_splay_tree::splay_tree_predecessor,
3790 typed_splay_tree::splay_tree_successor,
3791 typed_splay_tree::splay_tree_min,
3792 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
3793 (typed_splay_tree::root, typed_splay_tree::comp,
3794 typed_splay_tree::delete_key,
3795 typed_splay_tree::delete_value): New data members.
3796 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
3797 typed_splay_tree::remove.
3798
3799 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
3800
3801 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
3802 -mginv and -mno-ginv to the assembler.
3803 * config/mips/mips.opt (-mcrc): New option.
3804 (-mginv): Likewise.
3805 * doc/invoke.text (-mcrc): Document.
3806 (-mginv): Likewise.
3807
3808 2018-06-15 Nick Clifton <nickc@redhat.com>
3809
3810 PR 84195
3811 * tree.c (escaped_string): New class. Converts an unescaped
3812 string into its escaped equivalent.
3813 (warn_deprecated_use): Use the new class to convert the
3814 deprecation message, if present.
3815 (test_escaped_strings): New self test.
3816 (test_c_tests): Add test_escaped_strings.
3817 * doc/extend.texi (deprecated): Add a note that the
3818 deprecation message is affected by the -fmessage-length
3819 option, and that control characters will be escaped.
3820 (#pragma GCC error): Document this pragma.
3821 (#pragma GCC warning): Likewise.
3822 * doc/invoke.texi (-fmessage-length): Document this option's
3823 effect on the #warning and #error preprocessor directives and
3824 the deprecated attribute.
3825
3826 2018-06-15 Richard Biener <rguenther@suse.de>
3827
3828 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
3829 here, also noting vector size used.
3830 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
3831 size used in MSG_OPTIMIZED_LOCATIONS dump.
3832 (pass_slp_vectorize::execute): Adjust.
3833
3834 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
3835
3836 PR target/85968
3837 * config/arc/arc.c (arc_return_address_register): Fix
3838 if-condition.
3839
3840 2018-06-15 Richard Biener <rguenther@suse.de>
3841
3842 PR middle-end/86159
3843 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
3844 leave useless conversion stripping to force_gimple_operand_gsi.
3845 (gimplify_build2): Likewise.
3846 (gimplify_build1): Likewise.
3847
3848 2018-06-15 Richard Biener <rguenther@suse.de>
3849
3850 PR middle-end/86076
3851 * tree-cfg.c (move_stmt_op): unshare invariant addresses
3852 before adjusting their block.
3853
3854 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
3855
3856 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
3857 multilibs for *-*-rtems*.
3858 * config/riscv/t-rtems: New file.
3859
3860 2018-06-14 Jakub Jelinek <jakub@redhat.com>
3861
3862 PR middle-end/86122
3863 * match.pd ((A +- CST1) +- CST2): Punt if last resort
3864 unsigned_type_for returns NULL.
3865
3866 PR target/85945
3867 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
3868 subregs of multi-word pseudos unless the float mode has word size.
3869
3870 2018-06-14 Richard Biener <rguenther@suse.de>
3871
3872 PR middle-end/86139
3873 * tree-vect-generic.c (build_word_mode_vector_type): Remove
3874 duplicate and harmful type_hash_canon.
3875 * tree.c (type_hash_canon): Assert we didn't find ourselves.
3876
3877 2018-06-14 Richard Biener <rguenther@suse.de>
3878
3879 PR ipa/86124
3880 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
3881 NULL cgraph_node.
3882
3883 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3884
3885 * config/rtems.h (STDINT_LONG32): Define.
3886
3887 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
3888 Prachi Godbole <prachi.godbole@imgtec.com>
3889
3890 * config/mips/mips-cpus.def: Define P6600.
3891 * config/mips/mips-tables.opt: Regenerate.
3892 * config/mips/mips.c (mips_ucbranch_type): New enum.
3893 (mips_rtx_cost_data): Add support for P6600.
3894 (mips_issue_rate): Likewise.
3895 (mips_multipass_dfa_lookahead): Likewise.
3896 (mips_avoid_hazard): Likewise.
3897 (mips_reorg_process_insns): Likewise.
3898 (mips_classify_branch_p6600): New function.
3899 * config/mips/mips.h (TUNE_P6600): New define.
3900 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
3901 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
3902 * config/mips/mips.md: Include p6600.md.
3903 (processor): Add p6600.
3904 * config/mips/p6600.md: New file.
3905 * doc/invoke.texi: Add p6600 to supported architectures.
3906
3907 2018-06-13 Martin Sebor <msebor@redhat.com>
3908
3909 PR tree-optimization/86114
3910 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
3911 of integer types.
3912 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
3913
3914 2018-06-13 Richard Biener <rguenther@suse.de>
3915
3916 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
3917 Properly set vector type of the intermediate stmt.
3918 * tree-vect-stmts.c (vectorizable_operation): The destination
3919 var always has vectype_out type.
3920
3921 2018-06-13 Jeff Law <law@redhat.com>
3922
3923 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
3924 integer 0 for argument to print_rtl_with_bb.
3925 (rl78_reorg): Likewise.
3926
3927 2018-06-13 David Malcolm <dmalcolm@redhat.com>
3928
3929 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
3930 from rtx to rtx_insn *.
3931 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
3932 "label".
3933 (add_sched_insns_for_speculation): Likewise for local "target",
3934 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3935 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
3936 from rtx_insn ** to rtx_code_label **.
3937 (reorg_emit_nops): Likewise.
3938 (c6x_reorg): Likewise for local "call_labels".
3939 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
3940 rtx to rtx_insn *.
3941 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
3942 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
3943 the loops over LABEL_REFS.
3944 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
3945 braf_label.
3946 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3947 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
3948 (split_branches): Strengthen local "olabel" from rtx to
3949 rtx_insn *, adding a safe_as_a cast.
3950 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
3951 to "rtx_insn *".
3952 (add_insn_after): Likewise for first two params.
3953 (add_insn_before): Likewise.
3954 (remove_insn): Likewise for param.
3955 (emit_pattern_before_noloc): Likewise for second and third params.
3956 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
3957 (emit_call_insn_before_noloc): Likewise.
3958 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
3959 to "rtx_insn *".
3960 (emit_barrier_before): Likewise.
3961 (emit_label_before): Strengthen "label" param from "rtx" to
3962 "rtx_code_label *". Strengthen "before" param from "rtx" to
3963 "rtx_insn *".
3964 (emit_insn_after_1): Strengthen "after" param from "rtx" to
3965 "rtx_insn *".
3966 (emit_pattern_after_noloc): Likewise.
3967 (emit_insn_after_noloc): Likewise.
3968 (emit_jump_insn_after_noloc): Likewise.
3969 (emit_call_insn_after_noloc): Likewise.
3970 (emit_debug_insn_after_noloc): Likewise.
3971 (emit_barrier_after): Likewise.
3972 (emit_label_after): Likewise for both params.
3973 (emit_pattern_after_setloc): Likewise for "after" param. Convert
3974 "loc" param from "int" to "location_t".
3975 (emit_insn_after_setloc): Likewise.
3976 (emit_jump_insn_after_setloc): Likewise.
3977 (emit_call_insn_after_setloc): Likewise.
3978 (emit_debug_insn_after_setloc): Likewise.
3979 (emit_pattern_before_setloc): Likewise for "before" param. Convert
3980 "loc" param from "int" to "location_t".
3981 (emit_pattern_before): Convert NULL_RTX to NULL.
3982 (emit_insn_before_setloc): Convert "loc" param from "int" to
3983 "location_t".
3984 (emit_jump_insn_before_setloc): Likewise.
3985 (emit_call_insn_before_setloc): Likewise.
3986 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
3987 rtx_insn *. Convert "loc" param from "int" to "location_t".
3988 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
3989 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
3990 Convert 3rd param from "int" to "location_t".
3991 (emit_barrier_before, emit_barrier_after, next_real_insn):
3992 Strengthen param from rtx to rtx_insn *.
3993 (emit_label_before): Strengthen 1st param from "rtx" to
3994 "rtx_code_label *". Strengthen 2nd param from "rtx" to
3995 "rtx_insn *".
3996 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
3997 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
3998 Strengthen 2nd param from "rtx" to "rtx_insn *".
3999 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
4000 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
4001 Likewise. Convert 3rd param from "int" to "location_t".
4002 (emit_label_after): Strengthen 1st param from "rtx" to
4003 "rtx_code_label *".
4004 (next_real_insn, remove_insn): Strengthen param from "rtx" to
4005 "rtx_insn *".
4006 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
4007 from "rtx" to "rtx_insn *".
4008
4009 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
4010
4011 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
4012 bodies streamed in with -Q.
4013 * dumpfile.c (dump_files): Add lto-stream-out dump file.
4014 * dumpfile.h (tree_dump_index): Add lto_stream_out.
4015 * gimple-streamer-out.c: Include gimple-pretty-print.h
4016 (output_bb): Dump stmts streamed.
4017 * lto-section-out.c: Include print-tree.h
4018 (lto_begin_section): Dump sections created.
4019 (lto_output_decl_index): Dump decl encoded.
4020 * lto-streamer-out.c: Include print-tree.h
4021 (create_output_block): Dump output block created.
4022 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
4023 (output_function): Dump function output.
4024 (output_constructor): Dump constructor streamed.
4025 (write_global_stream): Output indexes encoded.
4026 (produce_asm_for_decls): Dump streams encoded.
4027 * lto-streamer.c (streamer_dump_file): New global var.
4028 * lto-streamer.h (streamer_dump_file): Declare.
4029 * passes.c (ipa_write_summaries): Initialize streamer dump.
4030 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
4031 in.
4032
4033 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
4034
4035 PR target/86048
4036 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
4037 offsets for register save directives. Emit a second batch of save
4038 directives, if need be, when the function accesses prior frames.
4039
4040 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4041
4042 * config/arc/fpu.md (fmasf4): Force operand to register.
4043 (fnmasf4): Likewise.
4044
4045 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4046
4047 * config/arc/arc-protos.h (arc_pad_return): Remove.
4048 * config/arc/arc.c (machine_function): Remove force_short_suffix
4049 and size_reason.
4050 (arc_print_operand): Adjust printing of '&'.
4051 (arc_verify_short): Remove conditional printing of short suffix.
4052 (arc_final_prescan_insn): Remove reference to size_reason.
4053 (pad_return): New function.
4054 (arc_reorg): Call pad_return.
4055 (arc_pad_return): Remove.
4056 (arc_init_machine_status): Remove reference to force_short_suffix.
4057 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
4058 (attr length): When attribute iscompact is true force to 2
4059 regardless; in the case of maybe check if we want to force the
4060 instruction to have 4 bytes length.
4061 (nopv): Change it to generate 4 byte long nop as well.
4062 (blockage): New pattern.
4063 (simple_return): Remove call to arc_pad_return.
4064 (p_return_i): Likewise.
4065
4066 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4067
4068 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
4069
4070 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4071
4072 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
4073 ARC cores.
4074
4075 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4076
4077 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
4078 for ARC700 and ARCv2.
4079
4080 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
4081
4082 PR target/86076
4083 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
4084 operands[2] instead of operands[1].
4085
4086
4087 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
4088
4089 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
4090 case, check whether the outer register overlaps an unallocatable
4091 register, not just whether it fits the required class.
4092
4093 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
4094
4095 * poly-int.h (can_div_trunc_p): Add new overload in which all values
4096 are poly_ints.
4097 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
4098 (memrefs_conflict_p): Likewise.
4099 (init_alias_analysis): Likewise.
4100 * cfgexpand.c (expand_debug_expr): Likewise.
4101 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
4102 * cse.c (fold_rtx): Likewise.
4103 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
4104 * expr.c (emit_block_move_hints): Likewise.
4105 (clear_storage_hints, push_block, emit_push_insn): Likewise.
4106 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
4107 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
4108 (emit_group_store): Likewise.
4109 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
4110 to read the PRE/POST_MODIFY increment.
4111 * calls.c (store_one_arg): Use strip_offset.
4112 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
4113 poly_int_rtx_p.
4114 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
4115 by a VEC_SELECT.
4116 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
4117 (simplify_binary_operation_1): Extend CONST_INT handling to
4118 poly_int_rtx_p.
4119 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
4120 than a HOST_WIDE_INT.
4121 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
4122 poly_int64.
4123 (adjust_mems, add_stores): Update accodingly.
4124 (vt_canonicalize_addr): Track polynomial offsets.
4125 (emit_note_insn_var_location): Likewise.
4126 (vt_add_function_parameter): Likewise.
4127 (vt_initialize): Likewise.
4128
4129 2018-06-12 Jeff Law <law@redhat.com>
4130
4131 * config.gcc (alpha*-*-freebsd*): Remove.
4132 * config/alpha/freebsd.h: Remove.
4133
4134 2018-06-12 David Malcolm <dmalcolm@redhat.com>
4135
4136 PR other/69968
4137 * spellcheck-tree.c (levenshtein_distance): Rename to...
4138 (get_edit_distance): ...this, and update for underlying renaming.
4139 * spellcheck-tree.h (levenshtein_distance): Rename to...
4140 (get_edit_distance): ...this.
4141 * spellcheck.c (levenshtein_distance): Rename to...
4142 (get_edit_distance): ...this. Convert from Levenshtein distance
4143 to Damerau-Levenshtein distance by supporting transpositions of
4144 adjacent characters. Rename "v1" to "v_next" and "v0" to
4145 "v_one_ago".
4146 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
4147 (selftest::test_edit_distance_unit_test_oneway): ...this, and
4148 update for underlying renaming.
4149 (selftest::levenshtein_distance_unit_test): Rename to...
4150 (selftest::test_get_edit_distance_unit): ...this, and update for
4151 underlying renaming.
4152 (selftest::test_find_closest_string): Add example from PR 69968
4153 where transposition helps
4154 (selftest::test_metric_conditions): Update for renaming.
4155 (selftest::test_metric_conditions): Likewise.
4156 (selftest::spellcheck_c_tests): Likewise.
4157 * spellcheck.h (levenshtein_distance): Rename both overloads to...
4158 (get_edit_distance): ...this.
4159 (best_match::consider): Update for renaming.
4160
4161 2018-06-12 Martin Sebor <msebor@redhat.com>
4162
4163 PR tree-optimization/85259
4164 * builtins.c (compute_objsize): Handle constant offsets.
4165 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
4166 true iff a warning has been issued.
4167 * gimple.h (gimple_nonartificial_location): New function.
4168 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
4169 gimple_nonartificial_location and handle -Wno-system-headers.
4170 (handle_builtin_stxncpy): Same.
4171
4172 2018-06-12 Martin Sebor <msebor@redhat.com>
4173
4174 PR c/85931
4175 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
4176
4177 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
4178
4179 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4180 BUILTIN_VEC_XST entries for pointer to double and long long.
4181
4182 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
4183
4184 PR target/85990
4185 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4186 Update comments.
4187 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4188 Likewise.
4189
4190 2018-06-12 Martin Liska <mliska@suse.cz>
4191
4192 * doc/options.texi: Document IntegerRange.
4193
4194 2018-06-12 Martin Liska <mliska@suse.cz>
4195
4196 * config/i386/i386.opt: Make MPX-related options as Deprecated.
4197 * opt-functions.awk: Handle Deprecated flag.
4198 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
4199 and report error.
4200 (read_cmdline_option): Report warning for a deprecated option.
4201 * opts.h (struct cl_option): Add new field cl_deprecated.
4202 (CL_ERR_DEPRECATED): New.
4203
4204 2018-06-12 Martin Liska <mliska@suse.cz>
4205
4206 * doc/options.texi: Document Deprecated option flag.
4207
4208 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4209
4210 * config/arc/arc-arch.h (arc_extras): New enum.
4211 (arc_cpu_t):Add field extra.
4212 (arc_cpu_types): Consider the extras.
4213 * config/arc/arc-cpus.def: Add extras info.
4214 * config/arc/arc-opts.h (processor_type): Consider extra field.
4215 * config/arc/arc.c (arc_override_options): Handle extra field.
4216
4217 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4218
4219 * config/arc/arc-arch.h: Update ARC_OPTX macro.
4220 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
4221 field.
4222 * config/arc/arc.c (arc_init): Update pic warning.
4223 (irq_range): Update irq range parsing warnings.
4224 (arc_override_options): Update various warning messages.
4225 (arc_handle_aux_attribute): Likewise.
4226
4227 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
4228
4229 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
4230
4231 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4232
4233 * doc/sourcebuild.texi: Document usage of line number 0 in verify
4234 compiler messages directives.
4235
4236 2018-06-12 Matthew Fortune <mfortune@gmail.com>
4237
4238 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
4239 * config/mips/mips-tables.opt: Regenerate.
4240 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
4241 mips64r6.
4242 * doc/invoke.texi: Document -march=i6500.
4243
4244 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
4245
4246 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
4247 (i6400_gpmul): Add cpu_unit.
4248 (i6400_gpdiv): Likewise.
4249 (i6400_msa_add_d): Update reservations.
4250 (i6400_msa_int_add) Likewise.
4251 (i6400_msa_short_logic3) Likewise.
4252 (i6400_msa_short_logic2) Likewise.
4253 (i6400_msa_short_logic) Likewise.
4254 (i6400_msa_move) Likewise.
4255 (i6400_msa_cmp) Likewise.
4256 (i6400_msa_short_float2) Likewise.
4257 (i6400_msa_div_d) Likewise.
4258 (i6400_msa_long_logic1) Likewise.
4259 (i6400_msa_long_logic2) Likewise.
4260 (i6400_msa_mult) Likewise.
4261 (i6400_msa_long_float2) Likewise.
4262 (i6400_msa_long_float4) Likewise.
4263 (i6400_msa_long_float5) Likewise.
4264 (i6400_msa_long_float8) Likewise.
4265 (i6400_fpu_fadd): Include frint type.
4266 (i6400_fpu_store): New define_insn_reservation.
4267 (i6400_fpu_load): Likewise.
4268 (i6400_fpu_move): Likewise.
4269 (i6400_fpu_fcmp): Likewise.
4270 (i6400_fpu_fmadd): Likewise.
4271 (i6400_int_mult): Include imul3nc type and update reservation.
4272 (i6400_int_div): Include idiv3 type and update reservation.
4273 (i6400_int_load): Update to check type not move_type.
4274 (i6400_int_store): Likewise.
4275 (i6400_int_prefetch): Set zero latency.
4276
4277 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
4278
4279 * gcc.c: Document new %@{...} sequence.
4280 (LINK_COMMAND_SPEC): Use it for the -L switches.
4281 (cpp_unique_options): Use it for the -I switches.
4282 (at_file_argbuf): New global variable.
4283 (in_at_file): Likewise.
4284 (alloc_args): Create at_file_argbuf.
4285 (clear_args): Truncate at_file_argbuf.
4286 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
4287 (open_at_file): New function.
4288 (close_at_file): Likewise.
4289 (create_at_file): Delete.
4290 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
4291 <'o'>: Likewise.
4292 <'@'>: New case.
4293 (validate_switches_from_spec): Deal with %@{...} sequence.
4294 (validate_switches): Likewise.
4295 (driver::finalize): Call clear_args.
4296
4297 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4298
4299 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
4300
4301 2018-06-11 Martin Sebor <msebor@redhat.com>
4302
4303 * doc/invoke.texi (-Wall): List -Wc++17-compat.
4304 (Wno-class-memaccess): Add @opindex.
4305 (Wno-templates, Wno-multiple-inheritance): Same.
4306 (Wno-virtual-inheritance, Wno-namespaces): Same.
4307 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
4308 (Wno-format-overflow, Wno-format-truncation): Same.
4309 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
4310 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
4311 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
4312 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
4313 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
4314 (Wno-misspelled-isr): Same.
4315
4316 2018-06-11 Martin Sebor <msebor@redhat.com>
4317
4318 * PR tree-optimization/86083
4319 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
4320
4321 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
4322
4323 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
4324
4325 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
4326
4327 PR target/85755
4328 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
4329 on the correct operand.
4330 (*movdi_internal64): Ditto.
4331
4332 2018-06-11 Martin Liska <mliska@suse.cz>
4333
4334 PR tree-optimization/86089
4335 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
4336
4337 2018-06-11 Julia Koval <julia.koval@intel.com>
4338
4339 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
4340 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
4341 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
4342
4343 2018-06-11 Olivier Hainque <hainque@adacore.com>
4344
4345 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
4346 for Ada with strict dwarf2.
4347
4348 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
4349
4350 PR target/85755
4351 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
4352 addresses.
4353
4354 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
4355
4356 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
4357
4358 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
4359
4360 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
4361 TARGET_ELF.
4362
4363 2018-06-08 Martin Liska <mliska@suse.cz>
4364
4365 * tree-cfg.h (debug_function): Fix argument type to match
4366 implementation.
4367
4368 2018-06-08 Martin Liska <mliska@suse.cz>
4369
4370 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
4371 Remove usage of MPX-related (and removed) fields.
4372 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
4373
4374 2018-06-08 David Malcolm <dmalcolm@redhat.com>
4375
4376 * cfg.c (debug): Use TDF_NONE rather than 0.
4377 * cfghooks.c (debug): Likewise.
4378 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
4379 (struct dump_option_value_info): Convert to...
4380 (struct kv_pair): ...this template type.
4381 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
4382 rather than 0.
4383 (optinfo_verbosity_options): Likewise.
4384 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
4385 OPTGROUP_NONE.
4386 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
4387 than int for "optgroup_flags" param.
4388 (dump_generic_expr_loc): Use dump_flags_t rather than int for
4389 "dump_kind" param.
4390 (dump_dec): Likewise.
4391 (dump_finish): Use TDF_NONE rather than 0.
4392 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
4393 rather than int for "optgroup_flags" param. Use TDF_NONE rather
4394 than 0. Update for change to option_ptr.
4395 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
4396 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
4397 0. Update for changes to optinfo_verbosity_options and
4398 optgroup_options.
4399 (opt_info_switch_p): Convert optgroup_flags from int to
4400 optgroup_flags_t.
4401 (dump_basic_block): Use dump_flags_t rather than int
4402 for "dump_kind" param.
4403 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
4404 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
4405 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
4406 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
4407 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
4408 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
4409 TDF_NONE): Convert from macros to...
4410 (enum dump_flag): ...this new enum.
4411 (dump_flags_t): Update to use enum.
4412 (operator|, operator&, operator~, operator|=, operator&=):
4413 Implement for dump_flags_t.
4414 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
4415 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
4416 Convert from macros to...
4417 (enum optgroup_flag): ...this new enum.
4418 (optgroup_flags_t): New typedef.
4419 (operator|, operator|=): Implement for optgroup_flags_t.
4420 (struct dump_file_info): Convert field "alt_flags" to
4421 dump_flags_t. Convert field "optgroup_flags" to
4422 optgroup_flags_t.
4423 (dump_basic_block): Use dump_flags_t rather than int for param.
4424 (dump_generic_expr_loc): Likewise.
4425 (dump_dec): Likewise.
4426 (dump_register): Convert param "optgroup_flags" to
4427 optgroup_flags_t.
4428 (opt_info_enable_passes): Likewise.
4429 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
4430 than 0.
4431 * gimple-pretty-print.c (debug): Likewise.
4432 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
4433 (merged_store_group::apply_stores): Likewise.
4434 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
4435 * gimple.c (verify_gimple_pp): Likewise.
4436 * graphite-poly.c (print_pbb_body): Likewise.
4437 * passes.c (pass_manager::register_one_dump_file): Convert
4438 local "optgroup_flags" to optgroup_flags_t.
4439 * print-tree.c (print_node): Use TDF_NONE rather than 0.
4440 (debug): Likewise.
4441 (debug_body): Likewise.
4442 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
4443 to optgroup_flags_t.
4444 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
4445 than 0.
4446 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
4447 (convert_mult_to_fma): Likewise.
4448 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
4449 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
4450 * tree-vect-data-refs.c (dump_lower_bound): Convert param
4451 "dump_kind" to dump_flags_t.
4452
4453 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
4454
4455 * config/rs6000/rs6000.c (min, max): Delete.
4456
4457 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
4458
4459 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
4460 -mabi=spe and -mabi=no-spe.
4461
4462 2018-06-08 Martin Liska <mliska@suse.cz>
4463
4464 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
4465 where we expect an existing summary.
4466
4467 2018-06-08 Martin Liska <mliska@suse.cz>
4468
4469 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
4470 * ipa-inline.h (estimate_edge_growth): Likewise.
4471
4472 2018-06-08 Martin Liska <mliska@suse.cz>
4473
4474 * cgraph.c (function_version_hasher::hash): Use
4475 cgraph_node::get_uid ().
4476 (function_version_hasher::equal):
4477 * cgraph.h (cgraph_node::get_uid): New method.
4478 * ipa-inline.c (update_caller_keys): Use
4479 cgraph_node::get_uid ().
4480 (update_callee_keys): Likewise.
4481 * ipa-utils.c (searchc): Likewise.
4482 (ipa_reduced_postorder): Likewise.
4483 * lto-cgraph.c (input_node): Likewise.
4484 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
4485 * symbol-summary.h (symtab_insertion): Likewise.
4486 (symtab_removal): Likewise.
4487 (symtab_duplication): Likewise.
4488 * tree-pretty-print.c (dump_function_header): Likewise.
4489 * tree-sra.c (convert_callers_for_node): Likewise.
4490
4491 2018-06-08 Martin Liska <mliska@suse.cz>
4492
4493 * cgraph.c (symbol_table::create_edge): Always assign a new
4494 unique number.
4495 (symbol_table::free_edge): Do not recycle numbers.
4496 * cgraph.h (cgraph_edge::get): New method.
4497 * symbol-summary.h (symtab_removal): Use it.
4498 (symtab_duplication): Likewise.
4499 (call_summary::hashable_uid): Remove.
4500
4501 2018-06-08 Martin Liska <mliska@suse.cz>
4502
4503 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
4504 (initialize_growth_caches): Remove.
4505 (free_growth_caches): Likewise.
4506 (do_estimate_edge_time): Use edge_growth_cache.
4507 (do_estimate_edge_size): Likewise.
4508 (do_estimate_edge_hints): Likewise.
4509 * ipa-inline.c (reset_edge_caches): Likewise.
4510 (recursive_inlining): Likewise.
4511 (inline_small_functions): Likewise.
4512 * ipa-inline.h (initialize_growth_caches): Remove.
4513 (estimate_edge_size): Likewise.
4514 (estimate_edge_time): Likewise.
4515 (estimate_edge_hints): Likewise.
4516 (reset_edge_growth_cache): Likewise.
4517 * symbol-summary.h (call_summary::remove): New method.
4518
4519 2018-06-08 Martin Liska <mliska@suse.cz>
4520
4521 * ipa-cp.c (class edge_clone_summary): New summary.
4522 (grow_edge_clone_vectors): Remove.
4523 (ipcp_edge_duplication_hook): Remove.
4524 (class edge_clone_summary_t): New call_summary class.
4525 (ipcp_edge_removal_hook): Remove.
4526 (edge_clone_summary_t::duplicate): New function.
4527 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
4528 (create_specialized_node): Likewise.
4529 (ipcp_driver): Initialize edge_clone_summaries and do not
4530 register hooks.
4531
4532 2018-06-08 Martin Liska <mliska@suse.cz>
4533
4534 * symbol-summary.h (get): New function.
4535 (call_summary::m_initialize_when_cloning): New class member.
4536
4537 2018-06-08 Martin Liska <mliska@suse.cz>
4538
4539 * cgraph.c (cgraph_node::remove): Do not recycle uid.
4540 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
4541 (symbol_table::allocate_cgraph_symbol): Do not set uid.
4542 * passes.c (uid_hash_t): Record removed_nodes by their uids.
4543 (remove_cgraph_node_from_order): Use the removed_nodes set.
4544 (do_per_function_toporder): Likwise.
4545 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
4546 instead of summary_uid.
4547 (symtab_removal): Likewise.
4548 (symtab_duplication): Likewise.
4549
4550 2018-06-08 Martin Liska <mliska@suse.cz>
4551
4552 * ipa-cp.c (ipcp_store_bits_results): Use
4553 ipcp_transformation_sum.
4554 (ipcp_store_vr_results): Likewise.
4555 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
4556 to ...
4557 (ipcp_transformation_initialize): ... this.
4558 (ipa_set_node_agg_value_chain):
4559 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
4560 (write_ipcp_transformation_info): Likewise.
4561 (read_ipcp_transformation_info): Likewise.
4562 (ipcp_update_bits): Likewise.
4563 (ipcp_update_vr): Likewise.
4564 (ipcp_transform_function): Likewise.
4565 * ipa-prop.h: Rename ipcp_transformation_summary to
4566 ipcp_transformation.
4567 (class ipcp_transformation_t): New function summary.
4568 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
4569 (ipa_get_agg_replacements_for_node): Likewise.
4570
4571 2018-06-08 Martin Liska <mliska@suse.cz>
4572
4573 * ipa-pure-const.c (struct funct_state_d): Do it class instead
4574 of struct.
4575 (class funct_state_summary_t): New function_summary class.
4576 (has_function_state): Remove.
4577 (get_function_state): Likewise.
4578 (set_function_state): Likewise.
4579 (add_new_function): Likewise.
4580 (funct_state_summary_t::insert): New function.
4581 (duplicate_node_data): Remove.
4582 (remove_node_data): Remove.
4583 (funct_state_summary_t::duplicate): New function.
4584 (register_hooks): Create new funct_state_summaries.
4585 (pure_const_generate_summary): Use it.
4586 (pure_const_write_summary): Likewise.
4587 (pure_const_read_summary): Likewise.
4588 (propagate_pure_const): Likewise.
4589 (propagate_nothrow): Likewise.
4590 (dump_malloc_lattice): Likewise.
4591 (propagate_malloc): Likewise.
4592 (execute): Do not register hooks, just remove summary
4593 instead.
4594 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
4595 constructor.
4596
4597 2018-06-08 Martin Liska <mliska@suse.cz>
4598
4599 * ipa-reference.c (remove_node_data): Remove.
4600 (duplicate_node_data): Likewise.
4601 (class ipa_ref_var_info_summary_t): New class.
4602 (class ipa_ref_opt_summary_t): Likewise.
4603 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
4604 (get_reference_optimization_summary): Use
4605 ipa_ref_opt_sum_summaries.
4606 (set_reference_vars_info): Remove.
4607 (set_reference_optimization_summary): Likewise.
4608 (ipa_init): Create summaries.
4609 (init_function_info): Use function summary.
4610 (ipa_ref_opt_summary_t::duplicate): New function.
4611 (ipa_ref_opt_summary_t::remove): New function.
4612 (get_read_write_all_from_node): Fix GNU coding style.
4613 (propagate): Use function summary.
4614 (write_node_summary_p): Fix GNU coding style.
4615 (stream_out_bitmap): Likewise.
4616 (ipa_reference_read_optimization_summary): Use function summary.
4617 (ipa_reference_c_finalize): Do not release hooks.
4618
4619 2018-06-08 Martin Liska <mliska@suse.cz>
4620
4621 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
4622 (analyze_function_body): Extract multiple calls of get_create.
4623 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4624 * ipa-inline.c (recursive_inlining): Use ::get method.
4625 * ipa-inline.h (estimate_edge_growth): Likewise.
4626
4627 2018-06-08 Martin Liska <mliska@suse.cz>
4628
4629 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
4630 HSA_INVALID.
4631 (hsa_function_summary::hsa_function_summary): Use the new enum
4632 value.
4633 (hsa_gpu_implementation_p): Use hsa_summaries::get.
4634 * hsa-gen.c (hsa_get_host_function): Likewise.
4635 (get_brig_function_name): Likewise.
4636 * ipa-hsa.c (process_hsa_functions): Likewise.
4637 (ipa_hsa_write_summary): Likewise.
4638 * symbol-summary.h (symtab_duplication): Use ::get function/
4639 (get): New function.
4640
4641 2018-06-08 Martin Liska <mliska@suse.cz>
4642
4643 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
4644 of get.
4645 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
4646 (hsa_register_kernel): Likewise.
4647 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
4648 * hsa-gen.c (hsa_get_host_function): Likewise.
4649 (get_brig_function_name): Likewise.
4650 (generate_hsa): Likewise.
4651 (pass_gen_hsail::execute): Likewise.
4652 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
4653 (devirtualization_time_bonus): Likewise.
4654 (ipcp_propagate_stage): Likewise.
4655 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4656 (edge_set_predicate): Likewise.
4657 (evaluate_conditions_for_known_args): Likewise.
4658 (evaluate_properties_for_edge): Likewise.
4659 (ipa_fn_summary::reset): Likewise.
4660 (ipa_fn_summary_t::duplicate): Likewise.
4661 (dump_ipa_call_summary): Likewise.
4662 (ipa_dump_fn_summary): Likewise.
4663 (analyze_function_body): Likewise.
4664 (compute_fn_summary): Likewise.
4665 (estimate_edge_devirt_benefit): Likewise.
4666 (estimate_edge_size_and_time): Likewise.
4667 (estimate_calls_size_and_time): Likewise.
4668 (estimate_node_size_and_time): Likewise.
4669 (inline_update_callee_summaries): Likewise.
4670 (remap_edge_change_prob): Likewise.
4671 (remap_edge_summaries): Likewise.
4672 (ipa_merge_fn_summary_after_inlining): Likewise.
4673 (ipa_update_overall_fn_summary): Likewise.
4674 (read_ipa_call_summary): Likewise.
4675 (inline_read_section): Likewise.
4676 (write_ipa_call_summary): Likewise.
4677 (ipa_fn_summary_write): Likewise.
4678 (ipa_free_fn_summary): Likewise.
4679 * ipa-hsa.c (process_hsa_functions): Likewise.
4680 (ipa_hsa_write_summary): Likewise.
4681 (ipa_hsa_read_section): Likewise.
4682 * ipa-icf.c (sem_function::merge): Likewise.
4683 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4684 (do_estimate_edge_time): Likewise.
4685 (estimate_size_after_inlining): Likewise.
4686 (estimate_growth): Likewise.
4687 (growth_likely_positive): Likewise.
4688 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4689 (inline_call): Likewise.
4690 * ipa-inline.c (caller_growth_limits): Likewise.
4691 (can_inline_edge_p): Likewise.
4692 (can_inline_edge_by_limits_p): Likewise.
4693 (compute_uninlined_call_time): Likewise.
4694 (compute_inlined_call_time): Likewise.
4695 (want_inline_small_function_p): Likewise.
4696 (edge_badness): Likewise.
4697 (update_caller_keys): Likewise.
4698 (update_callee_keys): Likewise.
4699 (recursive_inlining): Likewise.
4700 (inline_small_functions): Likewise.
4701 (inline_to_all_callers_1): Likewise.
4702 (dump_overall_stats): Likewise.
4703 (early_inline_small_functions): Likewise.
4704 (early_inliner): Likewise.
4705 * ipa-inline.h (estimate_edge_growth): Likewise.
4706 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4707 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4708 * ipa-prop.h (IPA_NODE_REF): Likewise.
4709 (IPA_EDGE_REF): Likewise.
4710 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4711 (propagate_malloc): Likewise.
4712 * ipa-split.c (execute_split_functions): Likewise.
4713 * symbol-summary.h: Rename get to get_create.
4714 (get): Likewise.
4715 (get_create): Likewise.
4716 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4717
4718 2018-06-08 Martin Liska <mliska@suse.cz>
4719
4720 * symbol-summary.h (release): Move definition out of class
4721 declaration.
4722 (symtab_removal): Likewise.
4723 (symtab_duplication): Likewise.
4724
4725 2018-06-08 Martin Liska <mliska@suse.cz>
4726
4727 * symbol-summary.h (function_summary): Move constructor
4728 implementation out of class declaration.
4729 (release): Likewise.
4730 (symtab_insertion): Likewise.
4731 (symtab_removal): Likewise.
4732 (symtab_duplication): Likewise.
4733 (get): Likewise.
4734
4735 2018-06-08 Martin Liska <mliska@suse.cz>
4736
4737 * Makefile.in: Remove support for MPX (macros, related functions,
4738 fields in cgraph_node, ...).
4739 * builtin-types.def (BT_BND): Likewise.
4740 (BT_FN_BND_CONST_PTR): Likewise.
4741 (BT_FN_CONST_PTR_BND): Likewise.
4742 (BT_FN_VOID_PTR_BND): Likewise.
4743 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
4744 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
4745 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
4746 (expand_builtin_mempcpy_with_bounds): Likewise.
4747 (expand_builtin_memset_with_bounds): Likewise.
4748 (expand_builtin_memset_args): Likewise.
4749 (std_expand_builtin_va_start): Likewise.
4750 (expand_builtin): Likewise.
4751 (expand_builtin_with_bounds): Likewise.
4752 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
4753 (DEF_LIB_BUILTIN_CHKP): Likewise.
4754 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
4755 (DEF_CHKP_BUILTIN): Likewise.
4756 (BUILT_IN_MEMCPY): Likewise.
4757 (BUILT_IN_MEMMOVE): Likewise.
4758 (BUILT_IN_MEMPCPY): Likewise.
4759 (BUILT_IN_MEMSET): Likewise.
4760 (BUILT_IN_STPCPY): Likewise.
4761 (BUILT_IN_STRCAT): Likewise.
4762 (BUILT_IN_STRCHR): Likewise.
4763 (BUILT_IN_STRCPY): Likewise.
4764 (BUILT_IN_STRLEN): Likewise.
4765 (BUILT_IN_MEMCPY_CHK): Likewise.
4766 (BUILT_IN_MEMMOVE_CHK): Likewise.
4767 (BUILT_IN_MEMPCPY_CHK): Likewise.
4768 (BUILT_IN_MEMSET_CHK): Likewise.
4769 (BUILT_IN_STPCPY_CHK): Likewise.
4770 (BUILT_IN_STRCAT_CHK): Likewise.
4771 (BUILT_IN_STRCPY_CHK): Likewise.
4772 * calls.c (store_bounds): Likewise.
4773 (emit_call_1): Likewise.
4774 (special_function_p): Likewise.
4775 (maybe_warn_nonstring_arg): Likewise.
4776 (initialize_argument_information): Likewise.
4777 (finalize_must_preallocate): Likewise.
4778 (compute_argument_addresses): Likewise.
4779 (expand_call): Likewise.
4780 * cfgexpand.c (expand_call_stmt): Likewise.
4781 (expand_return): Likewise.
4782 (expand_gimple_stmt_1): Likewise.
4783 (pass_expand::execute): Likewise.
4784 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
4785 (cgraph_node::remove): Likewise.
4786 (cgraph_node::dump): Likewise.
4787 (cgraph_node::verify_node): Likewise.
4788 * cgraph.h (chkp_function_instrumented_p): Likewise.
4789 (symtab_node::get_alias_target): Likewise.
4790 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
4791 (cgraph_local_p): Likewise.
4792 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
4793 (cgraph_edge::rebuild_references): Likewise.
4794 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
4795 (walk_polymorphic_call_targets): Likewise.
4796 (cgraph_node::expand_thunk): Likewise.
4797 (symbol_table::output_weakrefs): Likewise.
4798 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
4799 (ix86_handle_option): Likewise.
4800 * config/i386/constraints.md: Likewise.
4801 * config/i386/i386-builtin-types.def (BND): Likewise.
4802 (VOID): Likewise.
4803 (PVOID): Likewise.
4804 (ULONG): Likewise.
4805 * config/i386/i386-builtin.def (BDESC_END): Likewise.
4806 (BDESC_FIRST): Likewise.
4807 (BDESC): Likewise.
4808 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
4809 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
4810 * config/i386/i386.c (enum reg_class): Likewise.
4811 (ix86_target_string): Likewise.
4812 (ix86_option_override_internal): Likewise.
4813 (ix86_conditional_register_usage): Likewise.
4814 (ix86_valid_target_attribute_inner_p): Likewise.
4815 (ix86_set_indirect_branch_type): Likewise.
4816 (ix86_set_current_function): Likewise.
4817 (ix86_function_arg_regno_p): Likewise.
4818 (init_cumulative_args): Likewise.
4819 (ix86_function_arg_advance): Likewise.
4820 (ix86_function_arg): Likewise.
4821 (ix86_pass_by_reference): Likewise.
4822 (ix86_function_value_regno_p): Likewise.
4823 (ix86_function_value_1): Likewise.
4824 (ix86_function_value_bounds): Likewise.
4825 (ix86_return_in_memory): Likewise.
4826 (ix86_setup_incoming_vararg_bounds): Likewise.
4827 (ix86_va_start): Likewise.
4828 (indirect_thunk_need_prefix): Likewise.
4829 (print_reg): Likewise.
4830 (ix86_print_operand): Likewise.
4831 (ix86_expand_call): Likewise.
4832 (ix86_output_function_return): Likewise.
4833 (reg_encoded_number): Likewise.
4834 (BDESC_VERIFYS): Likewise.
4835 (ix86_init_mpx_builtins): Likewise.
4836 (ix86_init_builtins): Likewise.
4837 (ix86_emit_cmove): Likewise.
4838 (ix86_emit_move_max): Likewise.
4839 (ix86_expand_builtin): Likewise.
4840 (ix86_builtin_mpx_function): Likewise.
4841 (ix86_get_arg_address_for_bt): Likewise.
4842 (ix86_load_bounds): Likewise.
4843 (ix86_store_bounds): Likewise.
4844 (ix86_load_returned_bounds): Likewise.
4845 (ix86_store_returned_bounds): Likewise.
4846 (ix86_class_likely_spilled_p): Likewise.
4847 (ix86_hard_regno_mode_ok): Likewise.
4848 (x86_order_regs_for_local_alloc): Likewise.
4849 (ix86_mitigate_rop): Likewise.
4850 (ix86_bnd_prefixed_insn_p): Likewise.
4851 (ix86_mpx_bound_mode): Likewise.
4852 (ix86_make_bounds_constant): Likewise.
4853 (ix86_initialize_bounds): Likewise.
4854 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
4855 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
4856 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
4857 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
4858 (TARGET_CHKP_BOUND_MODE): Likewise.
4859 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
4860 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
4861 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
4862 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
4863 * config/i386/i386.h (TARGET_MPX): Likewise.
4864 (TARGET_MPX_P): Likewise.
4865 (VALID_BND_REG_MODE): Likewise.
4866 (FIRST_BND_REG): Likewise.
4867 (LAST_BND_REG): Likewise.
4868 (enum reg_class): Likewise.
4869 (BND_REG_P): Likewise.
4870 (BND_REGNO_P): Likewise.
4871 (BNDmode): Likewise.
4872 (ADJUST_INSN_LENGTH): Likewise.
4873 * config/i386/i386.md: Likewise.
4874 * config/i386/i386.opt: Likewise.
4875 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
4876 (defined): Likewise.
4877 (LINK_MPX): Likewise.
4878 (MPX_SPEC): Likewise.
4879 (LIBMPX_SPEC): Likewise.
4880 (LIBMPXWRAPPERS_SPEC): Likewise.
4881 (CHKP_SPEC): Likewise.
4882 * config/i386/predicates.md: Likewise.
4883 * dbxout.c (dbxout_type): Likewise.
4884 * doc/extend.texi: Likewise.
4885 * doc/invoke.texi: Likewise.
4886 * doc/md.texi: Likewise.
4887 * doc/tm.texi: Likewise.
4888 * doc/tm.texi.in: Likewise.
4889 * dwarf2out.c (is_base_type): Likewise.
4890 (gen_formal_types_die): Likewise.
4891 (gen_subprogram_die): Likewise.
4892 (gen_type_die_with_usage): Likewise.
4893 (gen_decl_die): Likewise.
4894 (dwarf2out_late_global_decl): Likewise.
4895 * expr.c (expand_assignment): Likewise.
4896 (emit_storent_insn): Likewise.
4897 (store_expr_with_bounds): Likewise.
4898 (store_expr): Likewise.
4899 (expand_expr_real_1): Likewise.
4900 * expr.h (store_expr_with_bounds): Likewise.
4901 * function.c (use_register_for_decl): Likewise.
4902 (struct bounds_parm_data): Likewise.
4903 (assign_parms_augmented_arg_list): Likewise.
4904 (assign_parm_find_entry_rtl): Likewise.
4905 (assign_parm_is_stack_parm): Likewise.
4906 (assign_parm_load_bounds): Likewise.
4907 (assign_bounds): Likewise.
4908 (assign_parms): Likewise.
4909 (expand_function_start): Likewise.
4910 * gcc.c (CHKP_SPEC): Likewise.
4911 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
4912 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
4913 (wrestrict_dom_walker::check_call): Likewise.
4914 * gimple.c (gimple_build_call_from_tree): Likewise.
4915 * gimple.h (enum gf_mask): Likewise.
4916 (gimple_call_with_bounds_p): Likewise.
4917 (gimple_call_set_with_bounds): Likewise.
4918 * gimplify.c (gimplify_init_constructor): Likewise.
4919 * ipa-cp.c (initialize_node_lattices): Likewise.
4920 (propagate_constants_across_call): Likewise.
4921 (find_more_scalar_values_for_callers_subset): Likewise.
4922 * ipa-hsa.c (process_hsa_functions): Likewise.
4923 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
4924 * ipa-icf.c (sem_function::merge): Likewise.
4925 * ipa-inline.c (early_inliner): Likewise.
4926 * ipa-pure-const.c (warn_function_noreturn): Likewise.
4927 (warn_function_cold): Likewise.
4928 (propagate_pure_const): Likewise.
4929 * ipa-ref.h (enum GTY): Likewise.
4930 * ipa-split.c (find_retbnd): Likewise.
4931 (consider_split): Likewise.
4932 (split_function): Likewise.
4933 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4934 * ipa.c (walk_polymorphic_call_targets): Likewise.
4935 (symbol_table::remove_unreachable_nodes): Likewise.
4936 (process_references): Likewise.
4937 (cgraph_build_static_cdtor_1): Likewise.
4938 * lto-cgraph.c (lto_output_node): Likewise.
4939 (output_refs): Likewise.
4940 (compute_ltrans_boundary): Likewise.
4941 (input_overwrite_node): Likewise.
4942 (input_node): Likewise.
4943 (input_cgraph_1): Likewise.
4944 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
4945 * passes.c (pass_manager::execute_early_local_passes): Likewise.
4946 (class pass_chkp_instrumentation_passes): Likewise.
4947 (make_pass_chkp_instrumentation_passes): Likewise.
4948 * passes.def: Likewise.
4949 * rtl.h (struct GTY): Likewise.
4950 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
4951 * stor-layout.c (layout_type): Likewise.
4952 * symtab.c: Likewise.
4953 * target.def: Likewise.
4954 * targhooks.c (default_chkp_bound_type): Likewise.
4955 (default_chkp_bound_mode): Likewise.
4956 (default_builtin_chkp_function): Likewise.
4957 (default_chkp_function_value_bounds): Likewise.
4958 (default_chkp_make_bounds_constant): Likewise.
4959 (default_chkp_initialize_bounds): Likewise.
4960 * targhooks.h (default_chkp_bound_type): Likewise.
4961 (default_chkp_bound_mode): Likewise.
4962 (default_builtin_chkp_function): Likewise.
4963 (default_chkp_function_value_bounds): Likewise.
4964 (default_chkp_make_bounds_constant): Likewise.
4965 (default_chkp_initialize_bounds): Likewise.
4966 * toplev.c (compile_file): Likewise.
4967 (process_options): Likewise.
4968 * tree-core.h (DEF_BUILTIN): Likewise.
4969 (DEF_BUILTIN_CHKP): Likewise.
4970 * tree-inline.c (declare_return_variable): Likewise.
4971 (remap_gimple_stmt): Likewise.
4972 (copy_bb): Likewise.
4973 (initialize_inlined_parameters): Likewise.
4974 (expand_call_inline): Likewise.
4975 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
4976 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
4977 (make_pass_ipa_chkp_produce_thunks): Likewise.
4978 (make_pass_chkp): Likewise.
4979 (make_pass_chkp_opt): Likewise.
4980 (make_pass_chkp_instrumentation_passes): Likewise.
4981 * tree-pretty-print.c (dump_generic_node): Likewise.
4982 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
4983 * tree-ssa-dce.c (propagate_necessity): Likewise.
4984 (eliminate_unnecessary_stmts): Likewise.
4985 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
4986 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
4987 * tree-ssa-sccvn.h: Likewise.
4988 * tree-ssa-strlen.c (get_string_length): Likewise.
4989 (valid_builtin_call): Likewise.
4990 (adjust_last_stmt): Likewise.
4991 (handle_builtin_strchr): Likewise.
4992 (handle_builtin_strcpy): Likewise.
4993 (handle_builtin_stxncpy): Likewise.
4994 (handle_builtin_memcpy): Likewise.
4995 (handle_builtin_strcat): Likewise.
4996 (strlen_check_and_optimize_stmt): Likewise.
4997 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
4998 * tree-streamer-in.c: Likewise.
4999 * tree-streamer.c (record_common_node): Likewise.
5000 * tree.c (tree_code_size): Likewise.
5001 (wide_int_to_tree_1): Likewise.
5002 (type_contains_placeholder_1): Likewise.
5003 (build_common_tree_nodes): Likewise.
5004 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
5005 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
5006 (POINTER_BOUNDS_P): Likewise.
5007 (BOUNDED_TYPE_P): Likewise.
5008 (BOUNDED_P): Likewise.
5009 (CALL_WITH_BOUNDS_P): Likewise.
5010 (pointer_bounds_type_node): Likewise.
5011 * value-prof.c (gimple_ic): Likewise.
5012 * var-tracking.c (vt_add_function_parameters): Likewise.
5013 * varasm.c (make_decl_rtl): Likewise.
5014 (assemble_start_function): Likewise.
5015 (output_constant): Likewise.
5016 (maybe_assemble_visibility): Likewise.
5017 * varpool.c (ctor_for_folding): Likewise.
5018 * chkp-builtins.def: Remove.
5019 * ipa-chkp.c: Remove.
5020 * ipa-chkp.h: Remove.
5021 * rtl-chkp.c: Remove.
5022 * rtl-chkp.h: Remove.
5023 * tree-chkp-opt.c: Remove.
5024 * tree-chkp.c: Remove.
5025 * tree-chkp.h: Remove.
5026
5027 2018-06-07 Carl Love <cel@us.ibm.com>
5028
5029 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
5030 vextract_fp_from_shortl): Add BE support.
5031
5032 2018-06-07 Paul Koning <ni1d@arrl.net>
5033
5034 * compare-elim.c (try_merge_compare): Don't merge compare if
5035 address contains a side effect.
5036 (try_eliminate_compare): Likewise.
5037
5038 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
5039
5040 * config.gcc: Support "tremont".
5041 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
5042 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5043 PROCESSOR_TREMONT.
5044 * config/i386/i386.c (m_TREMONT): Define.
5045 (processor_target_table): Add "tremont".
5046 (PTA_TREMONT): Define.
5047 (ix86_lea_outperforms): Add TARGET_TREMONT.
5048 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
5049 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
5050 and M_INTEL_GOLDMONT_PLUS.
5051 (fold_builtin_cpu): Add "tremont".
5052 (ix86_add_stmt_cost): Add TARGET_TREMONT.
5053 (ix86_option_override_internal): Add "tremont".
5054 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
5055 (processor_type): Add PROCESSOR_TREMONT.
5056 * config/i386/x86-tune.def: Add m_TREMONT.
5057 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
5058
5059 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5060
5061 * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
5062 symbol defined for msp430i* devices to be lower case.
5063
5064 gcc/testsuite/gcc.target/msp430/
5065 * msp430i-device-symbol.c: New test.
5066 * msp430f-device-symbol.c: New test.
5067 * msp430.h: New test header file.
5068
5069 2018-06-07 Richard Biener <rguenther@suse.de>
5070
5071 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
5072 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
5073 Properly wrap signed arithmetic if overflow wraps.
5074
5075 2018-06-07 Jakub Jelinek <jakub@redhat.com>
5076
5077 PR tree-optimization/69615
5078 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
5079 of a cast from a same precision integral SSA_NAME in a bb dominated
5080 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
5081 cast to utype if rhs2 has already a compatible type.
5082
5083 2018-06-07 Richard Biener <rguenther@suse.de>
5084
5085 PR tree-optimization/85935
5086 * graphite-scop-detection.c (find_params_in_bb): Analyze
5087 condition operands with respect to the correct loop. Assert
5088 the analysis doesn't fail.
5089
5090 2018-06-04 Carl Love <cel@us.ibm.com>
5091
5092 * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
5093 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
5094 as it is slightly cheaper.
5095 (first_match_or_eos_index_<mode>):
5096 Calculate index using natural element order.
5097 (first_match_index_<mode>):
5098 Calculate index using natural element order.
5099 (first_match_or_eos_index_<mode>):
5100 Calculate index using natural order.
5101 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
5102 for BE and LE modes.
5103 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
5104 P9V_BUILTIN_VCLZLSBB_V16QI.
5105 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
5106 specific.
5107
5108 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5109
5110 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
5111 indentation and line wrap for many prototypes. Add missing
5112 @smallexample directives around block of prototypes for vec_xl and
5113 vec_xst.
5114
5115 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
5116
5117 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
5118 track if we pass or return IEEE 128-bit floating point.
5119 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
5120 C++ mangling that is compatible with GCC 8.1.
5121 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
5122 (init_cumulative_args): Note if we pass or return IEEE 128-bit
5123 floating point types.
5124 (rs6000_function_arg_advance_1): Likewise.
5125 (rs6000_mangle_type): Optionally generate mangled names that match
5126 what GCC 8.1 generated for IEEE 128-bit floating point types.
5127 (rs6000_globalize_decl_name): If we have an external function that
5128 passes or returns IEEE 128-bit types, generate a weak reference
5129 from the mangled name used in GCC 8.1 to the current mangled
5130 name.
5131 (rs6000_init_builtins): Make __ibm128 use the long double type if
5132 long double is IBM extended double. Make __float128 use the long
5133 double type if long double is IEEE 128-bit.
5134
5135 PR target/85657
5136 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
5137 macro for __ibm128 built-in functions.
5138 (PACK_IF): Add __ibm128 pack/unpack functions.
5139 (UNPACK_IF): Likewise.
5140 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
5141 enable long double built-in functions if long double is IEEE
5142 128-bit floating point.
5143 (rs6000_invalid_builtin): Update long double built-in function
5144 error message.
5145 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
5146 functions, adjust the built-in function to use the long double
5147 built-in function if __ibm128 and long double are the same type.
5148 * doc/extend.texi (PowerPC builtins): Update documention for
5149 __builtin_{,un}pack_longdouble. Add documentation for
5150 __builtin_{,un}pack_ibm128.
5151
5152 2018-06-06 Jim Wilson <jimw@sifive.com>
5153
5154 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
5155 (struct machine_function): New field interrupt_mode.
5156 (riscv_handle_type_attribute): New function. Add forward declaration.
5157 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
5158 (riscv_expand_epilogue): Check interrupt_mode field.
5159 (riscv_set_current_function): Check interrupt attribute args and
5160 set interrupt_mode field.
5161 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
5162 (riscv_sret, riscv_uret): New.
5163 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
5164 new arguments to interrupt attribute.
5165
5166 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
5167
5168 PR target/63177
5169 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
5170 Don't handle -mcpu=power8 if -mpower9-vector is also used.
5171
5172 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5173
5174 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
5175 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
5176 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5177 several redundant entries.
5178
5179 2018-06-06 David Malcolm <dmalcolm@redhat.com>
5180
5181 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
5182 type from "rtx" to "rtx_insn *".
5183 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
5184 for local "call_insn", removing cast.
5185 (ix86_expand_call): Likewise, introducing a "call_insn" local.
5186
5187 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
5188
5189 PR tree-optimization/86066
5190 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
5191 for BIT_INSERT_EXPR stores.
5192
5193 2018-06-06 Richard Biener <rguenther@suse.de>
5194
5195 PR tree-optimization/86062
5196 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5197 component refs ontop
5198 of to be offsetted base.
5199
5200 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5201
5202 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
5203 to be static and remove check on interrupt attribute name.
5204
5205 gcc/testsuite/gcc.target/msp430/
5206 * function-attributes-4.c: New test.
5207 * static-interrupts.c: New test.
5208
5209 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
5210
5211 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5212 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
5213
5214 2018-06-05 Steve Ellcey <sellcey@cavium.com>
5215
5216 PR target/79924
5217 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
5218 second argument.
5219 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
5220 Remove second argument, change how error is called.
5221 (aarch64_layout_arg): Remove second argument from
5222 aarch64_err_no_fpadvsimd call.
5223 (aarch64_init_cumulative_args): Ditto.
5224 (aarch64_gimplify_va_arg_expr): Ditto.
5225 * config/aarch64/aarch64.md (mov<mode>): Ditto.
5226
5227 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
5228
5229 * config/i386/i386.md (simple_return_indirect_internal): New expander.
5230 (*simple_return_indirect_internal<mode>): Rename from
5231 simple_return_indirect_internal. Use W mode iterator.
5232 (rstorssp): New expander.
5233 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
5234 (clrssbsy): New expander.
5235 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
5236
5237 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
5238
5239 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
5240 __typeof__.
5241 (cmse_check_pointed_object): Likewise.
5242
5243 2018-06-05 Martin Liska <mliska@suse.cz>
5244
5245 PR gcov-profile/47618
5246 * doc/invoke.texi: Document how -fprofile-dir format
5247 is extended.
5248
5249 2018-06-05 Richard Biener <rguenther@suse.de>
5250
5251 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
5252 removal pretend DOM info isn't available so we do not update
5253 it and only remove edges, not dominated blocks. Actually free
5254 DOM info in case we removed something. Remove unreachable blocks.
5255 (mfb_keep_latches): Work with either DOM info or marked backedges.
5256 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
5257 first. Mark backedges if DOM info isn't available.
5258 (Re-)compute DOM info after cleanup_control_flow_pre.
5259
5260 2018-06-05 Richard Biener <rguenther@suse.de>
5261
5262 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
5263 (locus_discrim_hasher::hash): Adjust.
5264 (locus_discrim_hasher::equal): Likewise.
5265 (next_discriminator_for_locus): Work on line directly.
5266 (same_line_p): Pass in expanded locus1 as well.
5267 (assign_discriminators): Avoid redundant location expansions.
5268
5269 2018-06-05 Richard Biener <rguenther@suse.de>
5270
5271 PR tree-optimization/86046
5272 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
5273 if required after clearing TREE_ADDRESSABLE.
5274
5275 2018-06-05 Richard Biener <rguenther@suse.de>
5276
5277 PR tree-optimization/86047
5278 * tree-ssa-loop.c (for_each_index): Glob handling of all
5279 decls and constants and really handle all of them.
5280
5281 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5282
5283 PR target/81497
5284 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
5285 qualifier_void_pointer and qualifier_const_void_pointer.
5286 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
5287 (arm_init_builtins): Handle the above.
5288 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
5289 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
5290 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
5291 void intrinsics.
5292
5293 2018-06-05 Martin Liska <mliska@suse.cz>
5294
5295 * auto-profile.c (read_autofdo_file): Do not use
5296 gcov_ctr_summary struct.
5297 (afdo_callsite_hot_enough_for_early_inline): Likewise.
5298 * coverage.c (struct counts_entry): Likewise.
5299 (read_counts_file): Read just single summary entry.
5300 (get_coverage_counts): Use gcov_summary struct.
5301 * coverage.h (get_coverage_counts): Likewise.
5302 * gcov-dump.c (dump_working_sets): Likewise.
5303 (tag_summary): Dump just single summary.
5304 * gcov-io.c (gcov_write_summary): Write just histogram
5305 summary.
5306 (gcov_read_summary): Read just single summary.
5307 (compute_working_sets): Use gcov_summary struct.
5308 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
5309 of GCOV_COUNTERS_SUMMABLE.
5310 (GCOV_COUNTERS_SUMMABLE): Remove.
5311 (GCOV_FIRST_VALUE_COUNTER): Replace with
5312 GCOV_COUNTER_V_INTERVAL.
5313 (struct gcov_ctr_summary): Remove.
5314 (struct gcov_summary): Directly use fields of former
5315 gcov_ctr_summary.
5316 (compute_working_sets): Use gcov_summary struct.
5317 * gcov.c (read_count_file): Do not use ctrs fields.
5318 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
5319 struct.
5320 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
5321 struct.
5322 * profile.c: Likewise.
5323 * profile.h: Likewise.
5324
5325 2018-06-05 Martin Liska <mliska@suse.cz>
5326
5327 PR gcov-profile/84846
5328 * gcov.c (output_lines): Print working directory only
5329 in intermediate format.
5330
5331 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
5332
5333 * config/s390/s390-builtin-types.def: Add void function type.
5334 * config/s390/s390-builtins.def: Use the function type for the
5335 tbeginc builtin.
5336
5337 2018-06-04 Jim Wilson <jimw@sifive.com>
5338
5339 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
5340 to int.
5341 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
5342 and maybe_eh_return. Change regno to unsigned int. Use new args to
5343 handle EH_RETURN_DATA_REGNO registers properly.
5344 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
5345 (riscv_expand_epilogue): Update comment. Change argument name and
5346 type. Update code to use new name and type. Pass new args to
5347 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
5348 EXCEPTION_RETURN.
5349 * config/riscv/riscv.md (NORMAL_RETURN): New.
5350 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
5351 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
5352 (eh_return): Call gen_eh_return_internal and emit barrier.
5353 (eh_return_internal): Call riscv_expand_epilogue.
5354
5355 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
5356
5357 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
5358 bit_insertion field and declare can_be_merged_into method.
5359 (merged_store_group::can_be_merged_into): New method.
5360 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
5361 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
5362 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
5363
5364 2018-06-04 Richard Biener <rguenther@suse.de>
5365
5366 PR tree-optimization/85955
5367 * builtins.c (fold_builtin_sincos): Convert pointers to
5368 destination to appropriate type before dereferencing.
5369
5370 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
5371
5372 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
5373
5374 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
5375
5376 * expr.c (expand_expr_real_1): Force the operand into memory if
5377 its TYPE_MODE is BLKmode and if there is no integer mode for
5378 the number of bits being extracted.
5379
5380 2018-06-04 Jakub Jelinek <jakub@redhat.com>
5381
5382 PR target/85832
5383 PR target/86036
5384 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5385 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
5386
5387 2018-06-04 Richard Biener <rguenther@suse.de>
5388
5389 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
5390 (cleanup_tree_cfg_noloop): ... single caller. Do
5391 start_recording_case_labels later.
5392
5393 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
5394
5395 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
5396 to _IMMINTRIN_H_INCLUDED.
5397 * config/i386/pconfigintrin.h: Ditto.
5398 * config/i386/waitpkgintrin.h: Ditto.
5399 * config/i386/immintrin.h: Add includes for sgxintrin.h,
5400 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
5401 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
5402 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
5403 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
5404 waitpkgintrin.h and cldemoteintrin.h.
5405
5406 2018-06-04 Richard Biener <rguenther@suse.de>
5407
5408 PR tree-optimization/86038
5409 * tracer.c (find_best_successor): Check probability for
5410 being initialized, bail out if not.
5411
5412 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
5413
5414 PR target/86003
5415 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
5416 of bits to ignore when comparing architectures.
5417
5418 2018-06-04 Jakub Jelinek <jakub@redhat.com>
5419
5420 PR tree-optimization/69615
5421 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
5422 maximum or minimum of the type, try to merge it also as if
5423 range1 is + [-, x - 1] or + [x + 1, -].
5424
5425 PR c++/86025
5426 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
5427
5428 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
5429
5430 PR tree-optimization/86034
5431 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
5432 the unsigned bitfield type in a bit insertion sequence if it does not
5433 have a larger precision than the bitfield size.
5434 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
5435
5436 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
5437
5438 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
5439
5440 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
5441
5442 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
5443 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
5444 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
5445 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
5446
5447 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
5448
5449 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
5450 Disable -fdelete-null-pointer-checks for ELF toolchain.
5451
5452 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
5453 Kito Cheng <kito.cheng@gmail.com>
5454
5455 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
5456 (nds32le-*-*, nds32be-*-*): Integrate checking process.
5457 (nds32*-*-*): Add glibc and uclibc conditions.
5458 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
5459 (TARGET_EXCEPT_UNWIND_INFO): Define.
5460 * config/nds32/elf.h: New file.
5461 * config/nds32/linux.h: New file.
5462 * config/nds32/nds32-elf.opt: New file.
5463 * config/nds32/nds32-linux.opt: New file.
5464 * config/nds32/nds32-fp-as-gp.c
5465 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
5466 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
5467 TARGET_LINUX_ABI.
5468 (nds32_asm_file_end): Ditto.
5469 (nds32_print_operand): Ditto.
5470 (nds32_insert_attributes): Ditto.
5471 (nds32_init_libfuncs): New function.
5472 (TARGET_HAVE_TLS): Define.
5473 (TARGET_INIT_LIBFUNCS): Define.
5474 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
5475 spec content.
5476 (TARGET_ELF): Apply different mcmodel setting.
5477 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
5478 been migrated into elf.h and linux.h files.
5479 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
5480 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
5481 (mcmodel): The content has been migrated into nds32-elf.opt and
5482 nds32-linux.opt files.
5483 * config/nds32/t-elf: New file.
5484 * config/nds32/t-linux: New file.
5485
5486 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
5487 Shiva Chen <shiva0217@gmail.com>
5488
5489 * config/nds32/constants.md (unspec_volatile_element): Add
5490 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
5491 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
5492 optimization.
5493 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
5494 (make_pass_nds32_fp_as_gp): Declare.
5495 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
5496 optmization pass.
5497 (nds32_asm_function_end_prologue): Remove unused asm output.
5498 (nds32_asm_function_begin_epilogue): Remove unused asm output.
5499 (nds32_asm_file_start): Output necessary fp_as_gp information.
5500 (nds32_option_override): Adjust register usage.
5501 (nds32_expand_prologue): Consider fp_as_gp situation.
5502 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
5503 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
5504 (epilogue): Ditto.
5505 (return): Ditto.
5506 (simple_return): Ditto.
5507 (omit_fp_begin): Output special directive for fp_as_gp.
5508 (omit_fp_end): Output special directive for fp_as_gp.
5509 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
5510 mforbid-fp-as-gp): New options.
5511
5512 2018-06-01 Mark Wielaard <mark@klomp.org>
5513
5514 * dwarf2out.c (dwarf2out_finish): Remove generation of
5515 DW_AT_loclists_base.
5516
5517 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5518
5519 * gimple-ssa-store-merging.c: Include gimple-fold.h.
5520 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
5521 (struct merged_store_group): Add bit_insertion field.
5522 (dump_char_array): Use standard hexadecimal format.
5523 (merged_store_group::merged_store_group): Set bit_insertion to false.
5524 (merged_store_group::apply_stores): Use optimal buffer size. Deal
5525 with BIT_INSERT_EXPR stores. Move up code updating the mask and
5526 also print the mask in the dump file.
5527 (pass_store_merging::gate): Minor tweak.
5528 (imm_store_chain_info::coalesce_immediate): Fix wrong association
5529 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
5530 stores with INTEGER_CST stores.
5531 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
5532 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
5533 and use it throughout. Generate bit insertion sequences if need be.
5534 (pass_store_merging::process_store): Remove redundant condition.
5535 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
5536
5537 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
5538
5539 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
5540 the 128-bit floating point types. Fix function comment.
5541
5542 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5543
5544 * config/aarch64/aarch64-simd.md
5545 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
5546 mnemonics.
5547 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
5548 mnemonics.
5549
5550 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
5551
5552 PR tree-optimization/85989
5553 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
5554 variable.
5555 (backprop::intersect_uses): Check it when deciding whether this
5556 is a backedge reference.
5557 (backprop::process_block): Add each phi to m_visited_phis
5558 after visiting it, then clear it at the end.
5559
5560 2018-06-01 Richard Biener <rguenther@suse.de>
5561
5562 * tree-vectorizer.h (vect_dr_stmt): New function.
5563 (vect_get_load_cost): Adjust.
5564 (vect_get_store_cost): Likewise.
5565 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
5566 Use vect_dr_stmt instead of DR_SMTT.
5567 (vect_record_base_alignments): Likewise.
5568 (vect_calculate_target_alignment): Likewise.
5569 (vect_compute_data_ref_alignment): Likewise and make static.
5570 (vect_update_misalignment_for_peel): Likewise.
5571 (vect_verify_datarefs_alignment): Likewise.
5572 (vector_alignment_reachable_p): Likewise.
5573 (vect_get_data_access_cost): Likewise. Pass down
5574 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
5575 (vect_get_peeling_costs_all_drs): Likewise.
5576 (vect_peeling_hash_get_lowest_cost): Likewise.
5577 (vect_enhance_data_refs_alignment): Likewise.
5578 (vect_find_same_alignment_drs): Likewise.
5579 (vect_analyze_data_refs_alignment): Likewise.
5580 (vect_analyze_group_access_1): Likewise.
5581 (vect_analyze_group_access): Likewise.
5582 (vect_analyze_data_ref_access): Likewise.
5583 (vect_analyze_data_ref_accesses): Likewise.
5584 (vect_vfa_segment_size): Likewise.
5585 (vect_small_gap_p): Likewise.
5586 (vectorizable_with_step_bound_p): Likewise.
5587 (vect_prune_runtime_alias_test_list): Likewise.
5588 (vect_analyze_data_refs): Likewise.
5589 (vect_supportable_dr_alignment): Likewise.
5590 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5591 (vect_gen_prolog_loop_niters): Likewise.
5592 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5593 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
5594 modify DR_STMT.
5595 (vect_recog_mask_conversion_pattern): Likewise.
5596 (vect_try_gather_scatter_pattern): Likewise.
5597 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
5598 to vect_get_store_cost.
5599 (vect_get_store_cost): Get stmt_info instead of DR.
5600 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
5601 (vect_get_load_cost): Get stmt_info instead of DR.
5602
5603 2018-06-01 Richard Biener <rguenther@suse.de>
5604
5605 PR middle-end/86017
5606 * gimple-fold.c (var_decl_component_p): Also allow offsetted
5607 vars wrapped in MEM_REFs.
5608
5609 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
5610
5611 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5612 Fix subreg tests so that we only return a choice between
5613 GENERAL_REGS and FP_REGS if the original classes included both.
5614
5615 2018-06-01 Richard Biener <rguenther@suse.de>
5616
5617 PR ipa/85960
5618 * tree-ssa-structalias.c (get_function_part_constraint):
5619 Handle NULL fi->decl.
5620 (find_func_aliases_for_call): Properly handle indirect
5621 fi from direct call.
5622 (find_func_clobbers): Likewise.
5623 (ipa_pta_execute): Likewise.
5624 (create_variable_info_for): For functions that are ifunc_resolver
5625 resolve to a varinfo that contains the result of the resolver call.
5626 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
5627 aliases.
5628
5629 2018-05-31 Michael Collison <michael.collison@arm.com>
5630
5631 * config/aarch64/aarch64.md:
5632 (*fix_to_zero_extenddfdi2): New pattern.
5633 * gcc.target/aarch64/fix_extend1.c: New testcase.
5634
5635 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
5636
5637 PR middle-end/78809
5638 PR middle-end/83026
5639 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
5640 and BUILT_IN_STRNCMP_EQ.
5641 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
5642 BUILT_IN_STRNCMP_EQ.
5643 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
5644 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5645 (gimple_fold_builtin): Likewise.
5646 * tree-ssa-strlen.c (compute_string_length): New function.
5647 (determine_min_obsize): New function.
5648 (handle_builtin_string_cmp): New function to handle calls to
5649 string compare functions.
5650 (strlen_optimize_stmt): Add handling to builtin string compare
5651 calls.
5652 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
5653 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5654 * tree.c (build_common_builtin_nodes): Add new defines of
5655 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
5656
5657 2018-05-31 Jakub Jelinek <jakub@redhat.com>
5658
5659 PR target/85984
5660 * bb-reorder.c (pass_partition_blocks::gate): Return false for
5661 functions with naked attribute.
5662
5663 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5664
5665 * config/i386/sse.md (avx_vec_concat<mode>):
5666 Substitute concat_tg_mode mode attribute with xtg_mode.
5667 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
5668 (concat_tg_mode): Remove mode attribute.
5669
5670 2018-05-31 Martin Sebor <msebor@redhat.com>
5671
5672 PR c/82063
5673 * calls.c (alloc_max_size): Correct a logic error/typo.
5674 Treat excessive arguments as infinite. Warn for invalid arguments.
5675 * doc/invoke.texi (-Walloc-size-larger-than): Update.
5676
5677 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
5678
5679 PR target/85829
5680 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
5681 and movx for Haswell.
5682
5683 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
5684 Cesar Philippidis <cesar@codesourcery.com>
5685
5686 PR middle-end/85879
5687 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
5688 when emitting error on private/firstprivate reductions.
5689 * omp-low.c (lower_omp_target): Avoid reference-type processing
5690 on pointers for firstprivate clause.
5691
5692 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5693
5694 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
5695 (st1x2): Likewise.
5696 (st1x3): Likewise.
5697 * config/aarch64/aarch64-simd.md
5698 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
5699 (aarch64_ld1_x3_<mode>): Likewise
5700 (aarch64_st1x2<VALLDIF:mode>): Likewise
5701 (aarch64_st1_x2_<mode>): Likewise
5702 (aarch64_st1x3<VALLDIF:mode>): Likewise
5703 (aarch64_st1_x3_<mode>): Likewise
5704 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
5705 (vld1_s8_x3): Likewise.
5706 (vld1_u16_x3): Likewise.
5707 (vld1_s16_x3): Likewise.
5708 (vld1_u32_x3): Likewise.
5709 (vld1_s32_x3): Likewise.
5710 (vld1_u64_x3): Likewise.
5711 (vld1_s64_x3): Likewise.
5712 (vld1_f16_x3): Likewise.
5713 (vld1_f32_x3): Likewise.
5714 (vld1_f64_x3): Likewise.
5715 (vld1_p8_x3): Likewise.
5716 (vld1_p16_x3): Likewise.
5717 (vld1_p64_x3): Likewise.
5718 (vld1q_u8_x3): Likewise.
5719 (vld1q_s8_x3): Likewise.
5720 (vld1q_u16_x3): Likewise.
5721 (vld1q_s16_x3): Likewise.
5722 (vld1q_u32_x3): Likewise.
5723 (vld1q_s32_x3): Likewise.
5724 (vld1q_u64_x3): Likewise.
5725 (vld1q_s64_x3): Likewise.
5726 (vld1q_f16_x3): Likewise.
5727 (vld1q_f32_x3): Likewise.
5728 (vld1q_f64_x3): Likewise.
5729 (vld1q_p8_x3): Likewise.
5730 (vld1q_p16_x3): Likewise.
5731 (vld1q_p64_x3): Likewise.
5732 (vst1_s64_x2): Likewise.
5733 (vst1_u64_x2): Likewise.
5734 (vst1_f64_x2): Likewise.
5735 (vst1_s8_x2): Likewise.
5736 (vst1_p8_x2): Likewise.
5737 (vst1_s16_x2): Likewise.
5738 (vst1_p16_x2): Likewise.
5739 (vst1_s32_x2): Likewise.
5740 (vst1_u8_x2): Likewise.
5741 (vst1_u16_x2): Likewise.
5742 (vst1_u32_x2): Likewise.
5743 (vst1_f16_x2): Likewise.
5744 (vst1_f32_x2): Likewise.
5745 (vst1_p64_x2): Likewise.
5746 (vst1q_s8_x2): Likewise.
5747 (vst1q_p8_x2): Likewise.
5748 (vst1q_s16_x2): Likewise.
5749 (vst1q_p16_x2): Likewise.
5750 (vst1q_s32_x2): Likewise.
5751 (vst1q_s64_x2): Likewise.
5752 (vst1q_u8_x2): Likewise.
5753 (vst1q_u16_x2): Likewise.
5754 (vst1q_u32_x2): Likewise.
5755 (vst1q_u64_x2): Likewise.
5756 (vst1q_f16_x2): Likewise.
5757 (vst1q_f32_x2): Likewise.
5758 (vst1q_f64_x2): Likewise.
5759 (vst1q_p64_x2): Likewise.
5760 (vst1_s64_x3): Likewise.
5761 (vst1_u64_x3): Likewise.
5762 (vst1_f64_x3): Likewise.
5763 (vst1_s8_x3): Likewise.
5764 (vst1_p8_x3): Likewise.
5765 (vst1_s16_x3): Likewise.
5766 (vst1_p16_x3): Likewise.
5767 (vst1_s32_x3): Likewise.
5768 (vst1_u8_x3): Likewise.
5769 (vst1_u16_x3): Likewise.
5770 (vst1_u32_x3): Likewise.
5771 (vst1_f16_x3): Likewise.
5772 (vst1_f32_x3): Likewise.
5773 (vst1_p64_x3): Likewise.
5774 (vst1q_s8_x3): Likewise.
5775 (vst1q_p8_x3): Likewise.
5776 (vst1q_s16_x3): Likewise.
5777 (vst1q_p16_x3): Likewise.
5778 (vst1q_s32_x3): Likewise.
5779 (vst1q_s64_x3): Likewise.
5780 (vst1q_u8_x3): Likewise.
5781 (vst1q_u16_x3): Likewise.
5782 (vst1q_u32_x3): Likewise.
5783 (vst1q_u64_x3): Likewise.
5784 (vst1q_f16_x3): Likewise.
5785 (vst1q_f32_x3): Likewise.
5786 (vst1q_f64_x3): Likewise.
5787 (vst1q_p64_x3): Likewise.
5788
5789 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5790
5791 * config/msp430/msp430.c (msp430_output_labelref): Prepend
5792 user_label_prefix to name.
5793
5794 * tree-core.h: Update comment about the format of NAME string
5795 passed to handler in attribute_spec.
5796
5797 * config/msp430/msp430.md: Remove erroneous subreg expression from
5798 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
5799 zero_extend{q,h}isi2.
5800
5801 2018-05-30 Borislav Petkov <bp@suse.de>
5802
5803 * doc/extend.texi: Document some architecture specific
5804 constraints and sort entries.
5805
5806 2018-05-30 Martin Sebor <msebor@redhat.com>
5807
5808 PR middle-end/85369
5809 * builtins.c (expand_builtin_stpcpy_1): New function.
5810 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
5811 only if the former succeeds.
5812
5813 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5814
5815 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
5816 in saphira.
5817
5818 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5819
5820 * doc/invoke.texi (-flinker-output): Document
5821
5822 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5823
5824 * passes.c (ipa_write_summaries): Only modify statements if body
5825 is in memory.
5826 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
5827 incrementally linking.
5828 (ipa_passes): Likewise.
5829 * lto-cgraph.c (lto_output_node): When incrementally linking do not
5830 pass down resolution info.
5831 * common.opt (flag_incremental_link): Update info.
5832 * gcc.c (plugin specs): Turn flinker-output=* to
5833 -plugin-opt=-linker-output-known
5834 * toplev.c (compile_file): Also cut compilation when doing incremental
5835 link.
5836 * flag-types. (enum lto_partition_model): Add
5837 LTO_LINKER_OUTPUT_NOLTOREL.
5838 (invoke.texi): Add -flinker-output docs.
5839 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
5840 link same way as WPA; do not stream in dead initializers.
5841
5842 * dwarf2out.c (dwarf2out_die_ref_for_decl,
5843 darf2out_register_external_decl): Support incremental link.
5844
5845 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5846
5847 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
5848
5849 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5850
5851 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
5852 it down to simple_object_copy_lto_debug_sections.
5853 (run_gcc): Determine incremental LTO link time and configure
5854 lto1 into non-wpa mode, disable renaming of debug sections.
5855
5856 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
5857
5858 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5859 descriptions of various incorrectly documented functions.
5860
5861 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
5862
5863 Revert:
5864 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5865 address check not strict.
5866
5867 2018-05-30 Richard Biener <rguenther@suse.de>
5868
5869 PR tree-optimization/85964
5870 * tracer.c (better_p): Drop initialized count check, we only
5871 call the function with initialized counts now.
5872 (find_best_successor): Do find a best edge if one
5873 has uninitialized count.
5874 (find_best_predecessor): Likewise. Do BB frequency check only
5875 if count is initialized.
5876
5877 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
5878
5879 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
5880 (aarch64_ldrstr_offset_compare): New.
5881 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
5882 load/store orderings.
5883 (aarch64_gen_adjusted_ldpstp): Likewise.
5884
5885 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
5886
5887 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5888 Check for subset of GENERAL_REGS and FP_REGS.
5889 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
5890 r=w alternative.
5891
5892 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
5893
5894 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
5895 and wi::to_poly_offset. Add the current offset and then check
5896 whether the sum fits, rather than using an unchecked addition of
5897 a checked term. Check for a shwi rather than a uhwi.
5898 * expr.c (get_bit_range): Use tree_to_poly_uint64.
5899 (store_constructor): Use poly_int_tree_p.
5900 (expand_expr_real_1): Likewise.
5901 * function.c (assign_temp): Likewise.
5902 * fold-const.c (const_binop): Use poly_int_tree_p and
5903 wi::to_poly_offset.
5904 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
5905 division.
5906 * ipa-icf-gimple.c (func_checker::compare_operand): Use
5907 to_poly_offset for MEM offsets.
5908 * ipa-icf.c (sem_variable::equals): Likewise.
5909 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
5910 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
5911 wi::to_poly_offset for BIT_FIELD_REF offsets.
5912 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
5913 wi::to_poly_offset.
5914 * var-tracking.c (emit_note_insn_var_location): Use
5915 tree_to_poly_uint64.
5916
5917 2018-05-29 Jim Wilson <jimw@sifive.com>
5918
5919 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
5920
5921 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
5922
5923 PR target/85950
5924 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
5925 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
5926 sequence.
5927 (sse4_1_round<mode>2): Use nonimmediate_operand
5928 for operand 1 predicate.
5929
5930 2018-05-29 Martin Sebor <msebor@redhat.com>
5931 Richard Biener <rguenther@suse.de>
5932
5933 PR testsuite/85888
5934 * calls.c (get_size_range): Call determine_value_range instead
5935 of get_value_range..
5936 * tree-vrp.h (determine_value_range): Declared new function.
5937 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
5938
5939 2018-05-29 Richard Biener <rguenther@suse.de>
5940
5941 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
5942 sure to use non-pattern stmts for get_earlier_stmt arguments.
5943 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
5944 called on pattern stmts.
5945 (get_later_stmt): Likewise.
5946
5947 2018-05-29 Martin Liska <mliska@suse.cz>
5948
5949 PR gcov-profile/85759
5950 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
5951 env variables.
5952
5953 2018-05-29 Jakub Jelinek <jakub@redhat.com>
5954
5955 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
5956 VEC_UNPACK_*_EXPR.
5957 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
5958 VEC_PACK_*_EXPR.
5959
5960 PR target/85918
5961 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5962 VEC_PACK_FLOAT_EXPR): New tree codes.
5963 * tree-pretty-print.c (op_code_prio): Handle
5964 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5965 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5966 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5967 * tree-inline.c (estimate_operator_cost): Likewise.
5968 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
5969 * fold-const.c (const_binop): Likewise.
5970 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
5971 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5972 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5973 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
5974 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5975 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5976 * expr.c (expand_expr_real_2): Likewise.
5977 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
5978 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
5979 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
5980 optabs.
5981 * optabs.c (expand_widen_pattern_expr): For
5982 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
5983 sign from result type rather than operand's type.
5984 (expand_binop_directly): For vec_packu_float_optab and
5985 vec_packs_float_optab allow result type to be different from operand's
5986 type.
5987 * optabs-tree.c (optab_for_tree_code): Handle
5988 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5989 VEC_PACK_FLOAT_EXPR. Formatting fixes.
5990 * tree-vect-generic.c (expand_vector_operations_1): Handle
5991 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5992 VEC_PACK_FLOAT_EXPR.
5993 * tree-vect-stmts.c (supportable_widening_operation): Handle
5994 FIX_TRUNC_EXPR.
5995 (supportable_narrowing_operation): Handle FLOAT_EXPR.
5996 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
5997 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
5998 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
5999 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
6000 mode attributes.
6001 (vec_pack<floatprefix>_float_<mode>): New expander.
6002 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
6003 attributes.
6004 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
6005 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
6006 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
6007 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
6008 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
6009 Document.
6010 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
6011 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
6012 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6013 VEC_PACK_FLOAT_EXPR): Document.
6014
6015 2018-05-29 Richard Biener <rguenther@suse.de>
6016
6017 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
6018 member.
6019 (stmt_vec_info_vec): Make pointer.
6020 (init_stmt_vec_info_vec): Remove.
6021 (free_stmt_vec_info_vec): Likewise.
6022 (set_stmt_vec_info_vec): New function.
6023 (free_stmt_vec_infos): Likewise.
6024 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
6025 (set_vinfo_for_stmt): Likewise.
6026 (get_earlier_stmt): Likewise.
6027 (get_later_stmt): Likewise.
6028 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
6029 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
6030 (vec_info::~vec_info): Free stmt_vec_infos.
6031 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
6032 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
6033 (pass_slp_vectorize::execute): Likewise.
6034 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
6035 (free_stmt_vec_info_vec): Likewise.
6036 (set_stmt_vec_info_vec): New function.
6037 (free_stmt_vec_infos): Likewise.
6038 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
6039 the global stmt_vec_info_vec.
6040 * tree-parloops.c (gather_scalar_reductions): Use
6041 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
6042 vector.
6043
6044 2018-05-29 Richard Biener <rguenther@suse.de>
6045
6046 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
6047
6048 2018-05-29 Martin Liska <mliska@suse.cz>
6049 David Malcolm <dmalcolm@redhat.com>
6050
6051 * vec.c (test_reverse): New.
6052 (vec_c_tests): Add new test.
6053 * vec.h (vl_ptr>::reverse): New function.
6054
6055 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
6056
6057 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
6058
6059 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
6060 and later.
6061
6062 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
6063
6064 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
6065
6066 2018-05-28 Richard Biener <rguenther@suse.de>
6067
6068 PR tree-optimization/85933
6069 * tree-vect-data-refs.c (vect_record_base_alignments): Only
6070 look at stmts marked as vectorizable.
6071
6072 2018-05-28 Richard Biener <rguenther@suse.de>
6073
6074 PR tree-optimization/85934
6075 * tree-vect-generic.c (expand_vector_operations_1): Hoist
6076 vector boolean check before scalar optimization.
6077
6078 2018-05-28 Jakub Jelinek <jakub@redhat.com>
6079
6080 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
6081 for armv5te.
6082
6083 2018-05-28 Mark Wielaard <mark@klomp.org>
6084
6085 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
6086 if it is an expression containing a minus sign.
6087
6088 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
6089
6090 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
6091
6092 2018-05-27 Paul Koning <ni1d@arrl.net>
6093
6094 * config/pdp11/pdp11.md (truncsihi2): Remove.
6095
6096 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
6097 Chung-Ju Wu <jasonwucj@gmail.com>
6098
6099 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
6100 implementation.
6101 (unaligned_store_dw): Ditto.
6102 * config/nds32/nds32-memory-manipulation.c
6103 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
6104 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
6105 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
6106 (emit_setmem_word_loop): Rename to ...
6107 (emit_setmem_doubleword_loop): ... this.
6108 (nds32_gen_dup_4_byte_to_word_value): New function.
6109 (nds32_gen_dup_8_byte_to_double_word_value): New function.
6110 (nds32_expand_setmem_loop): Refine implementation.
6111 (nds32_expand_setmem_loop_v3m): Ditto.
6112 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
6113 pattern.
6114
6115 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6116
6117 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
6118
6119 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6120
6121 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
6122 (nds32_init_machine_status): Initialize machine->attr_naked_p and
6123 machine->attr_no_prologue_p.
6124 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
6125 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
6126 (nds32_expand_epilogue): Consider attr_naked_p.
6127 (nds32_expand_epilogue_v3pop): Likewise.
6128 (nds32_can_use_return_insn): Likewise.
6129 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
6130 attr_no_prologue_p fields.
6131 * config/nds32/nds32.opt (mret-in-naked-func): New option.
6132
6133 2018-05-27 Jakub Jelinek <jakub@redhat.com>
6134
6135 PR target/85918
6136 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
6137 attributes.
6138 * config/i386/sse.md
6139 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
6140 Rename to ...
6141 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
6142 ... this.
6143 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
6144 Rename to ...
6145 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
6146 ... this.
6147 (*<floatsuffix>floatv2div2sf2): Rename to ...
6148 (*float<floatunssuffix>v2div2sf2): ... this.
6149 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
6150 (float<floatunssuffix>v2div2sf2_mask): ... this.
6151 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
6152 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
6153 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
6154 to ...
6155 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
6156 ... this.
6157 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6158 Rename to ...
6159 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6160 ... this.
6161 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6162 Rename to ...
6163 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6164 ... this.
6165 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
6166 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
6167 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
6168 gen_ufix_truncv8dfv8si2.
6169 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
6170 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
6171 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
6172 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
6173 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
6174 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
6175 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
6176 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
6177
6178 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6179
6180 PR target/85900
6181 PR target/85345
6182 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
6183
6184 2018-05-25 Jim Wilson <jimw@sifive.com>
6185
6186 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
6187 * config/riscv/riscv.c (struct machine_function): Add
6188 interrupt_handler_p and attribute_checked_p fields.
6189 (riscv_attribute_table): Add interrupt.
6190 (riscv_interrupt_type_p): New.
6191 (riscv_save_reg_p): Save extra regs for interrupt handler.
6192 (riscv_use_save_libcall): Return false for interrupt handler.
6193 (riscv_first_stack_step): Add forward declaration.
6194 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
6195 for interrupt handler with large frame. Use it for saved reg list.
6196 (riscv_expand_prologue): Move flag_stack_usage_info support to
6197 eliminate duplication.
6198 (riscv_expand_epilogue): Generate mret for interrupt handler.
6199 (riscv_epilogue_uses): New.
6200 (riscv_can_use_return_insn): Return false for interrupt handler.
6201 (riscv_function_ok_for_sibcall): Likewise.
6202 (riscv_set_current_function): Add interrupt handler support.
6203 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
6204 * config/riscv/riscv.md (UNSPECV_MRET): New.
6205 (GP_REGNUM): New.
6206 (riscv_frflags, riscv_fsflags): Use tab after opcode.
6207 (riscv_mret): New.
6208 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
6209
6210 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
6211
6212 PR tree-optimization/85712
6213 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
6214 this candidate has already been replaced in-situ by a copy.
6215
6216 2018-05-25 Jason Merrill <jason@redhat.com>
6217
6218 PR c++/80485 - inline function non-zero address.
6219 * symtab.c (nonzero_address): Check DECL_COMDAT.
6220
6221 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
6222
6223 PR target/83628
6224 * config/alpha/alpha.md (ashlsi3): New insn pattern.
6225 (*ashlsi_se): Rename from *ashldi_se. Define as sign
6226 extension of SImode operation. Use const123_operand predicate.
6227 (*saddsi_1): Remove.
6228 (*saddl_se_1): Ditto.
6229 (*ssubsi_1): Ditto.
6230 (*ssubl_se_1): Ditto.
6231 * config/alpha/predicates.md (const123_operand): New predicate.
6232 * config/alpha/constraints.md (P): Use IN_RANGE.
6233
6234 2018-05-25 Richard Biener <rguenther@suse.de>
6235
6236 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
6237 defaulted to true.
6238 (ref_maybe_used_by_stmt_p): Likewise.
6239 (stmt_may_clobber_ref_p): Likewise.
6240 (stmt_may_clobber_ref_p_1): Likewise.
6241 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
6242 and pass it along.
6243 (ref_maybe_used_by_stmt_p): Likewise.
6244 (stmt_may_clobber_ref_p): Likewise.
6245 (stmt_may_clobber_ref_p_1): Likewise.
6246 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
6247 the alias oracle to disambiguate DRs with stmts DR analysis
6248 couldn't handle.
6249 (vect_analyze_data_refs): Do not give up on not analyzable
6250 DRs for BB vectorization. Remove code truncating the dataref
6251 vector.
6252
6253 2018-05-25 Jakub Jelinek <jakub@redhat.com>
6254
6255 PR target/85832
6256 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6257 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
6258 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
6259
6260 2018-05-25 Richard Biener <rguenther@suse.de>
6261
6262 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
6263 function, combining stmt data ref gathering and fatal analysis
6264 parts.
6265 (vect_analyze_data_refs): Remove now redudnant code and simplify.
6266 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
6267 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
6268 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
6269 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
6270
6271 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6272
6273 PR tree-optimization/85720
6274 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
6275 SCC if all partitions are builtins.
6276 (version_loop_by_alias_check): New parameter. Generate cancelable
6277 runtime alias check if all partitions are builtins.
6278 (distribute_loop): Update call to above function.
6279
6280 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6281
6282 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
6283 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
6284 (parm_default_def_partition_arg): Ditto.
6285 (set_parm_default_def_partition): Ditto.
6286 (get_parm_default_def_partitions): Ditto and make it static.
6287 (get_undefined_value_partitions): Ditto and make it static.
6288 (remove_ssa_form): Refactor call to init_var_map here.
6289 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
6290 computation for loop region.
6291 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
6292 (register_default_def): Delete.
6293 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
6294 (parm_default_def_partition_arg): Ditto.
6295 (set_parm_default_def_partition): Ditto.
6296 (get_parm_default_def_partitions): Ditto and make it static.
6297 (get_undefined_value_partitions): Ditto and make it static.
6298 (coalesce_with_default, coalesce_with_default): Update comment.
6299 (create_coalesce_list_for_region): New func factored out from
6300 create_outofssa_var_map.
6301 (populate_coalesce_list_for_outofssa): New func factored out from
6302 create_outofssa_var_map and coalesce_ssa_name.
6303 (create_outofssa_var_map): Delete.
6304 (coalesce_ssa_name): Refactor to support live range computation.
6305 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
6306 (get_parm_default_def_partitions): Delete.
6307 (get_undefined_value_partitions): Ditto.
6308 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
6309 computation for loop region.
6310 (new_tree_live_info, loe_visit_block): Ditto.
6311 (live_worklist, set_var_live_on_entry): Ditto.
6312 (calculate_live_on_exit, verify_live_on_entry): Ditto.
6313 * tree-ssa-live.h (struct _var_map): New fields.
6314 (init_var_map): Change decl.
6315 (region_contains_p): New.
6316
6317 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6318
6319 * tree-ssa-live.h (live_merge_and_clear): Delete.
6320
6321 2018-05-25 Richard Biener <rguenther@suse.de>
6322
6323 PR c++/85912
6324 * tree-dump.c (dequeue_and_dump): Remove access to removed
6325 operand 2 of a SWITCH_EXPR.
6326
6327 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6328
6329 * doc/sourcebuild.texi (vect_double_cond_arith): Include
6330 multiplication and division.
6331 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
6332 (cond_udiv@var{m}, cond_umod@var{m}): Document.
6333 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
6334 (cond_udiv_optab, cond_umod_optab): New optabs.
6335 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
6336 (IFN_COND_RDIV): New internal functions.
6337 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
6338 TRUNC_MOD_EXPR and RDIV_EXPR.
6339 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
6340 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
6341 New unspecs.
6342 (SVE_INT_BINARY): Include mult.
6343 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
6344 (optab, sve_int_op): Handle mult.
6345 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
6346 UNSPEC_COND_DIV.
6347 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
6348 for SVE_INT_BINARY_SD.
6349
6350 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6351
6352 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
6353 (optab, sve_int_op): Handle div and udiv.
6354 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
6355 for SVE_INT_BINARY_SD.
6356 (*<optab><mode>3): New insn for the same.
6357
6358 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6359
6360 * tree-vect-patterns.c: Include predict.h.
6361 (vect_recog_divmod_pattern): Restrict check for division support
6362 to when optimizing for size.
6363
6364 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6365
6366 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
6367 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
6368 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
6369 (gimple_match_op::set_op): Likewise.
6370 (gimple_resimplify4): Declare.
6371 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
6372 (expr::gen_transform): Likewise.
6373 (decision_tree::gen): Generate a simplification routine for 4 operands.
6374 * gimple-match-head.c (gimple_simplify): Add an overload for
6375 4 operands. In the top-level function, handle up to 4 call
6376 arguments and call gimple_resimplify4.
6377 (gimple_resimplify4): New function.
6378 (build_call_internal): Pass a fourth operand.
6379 (maybe_push_to_seq): Likewise.
6380 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
6381 Fold VEC_COND_EXPRs of an operation and a default value into
6382 an IFN_COND_* function if possible.
6383 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
6384 New unspecs.
6385 (SVE_COND_FP_BINARY): Include them.
6386 (optab, sve_fp_op): Handle them.
6387 (SVE_INT_BINARY_REV): New code iterator.
6388 (SVE_COND_FP_BINARY_REV): New int iterator.
6389 (commutative): New int attribute.
6390 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
6391 Declare.
6392 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
6393 function.
6394 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
6395 (*cond_<optab><mode>): New patterns for reversed operands.
6396
6397 2018-05-25 Richard Biener <rguenther@suse.de>
6398
6399 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
6400 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
6401 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
6402 (STMT_VINFO_GROUPED_ACCESS): Adjust.
6403 * tree-vect-data-refs.c (everywhere): Adjust users.
6404 * tree-vect-loop.c (everywhere): Likewise.
6405 * tree-vect-slp.c (everywhere): Likewise.
6406 * tree-vect-stmts.c (everywhere): Likewise.
6407 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6408
6409 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6410
6411 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
6412 Rename to...
6413 (gcc_cv_as_section_exclude): ... this.
6414 Try Solaris as #exclude syntax.
6415 * configure: Regenerate.
6416 * config.in: Regenerate.
6417 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
6418 SECTION_EXCLUDE.
6419 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
6420 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
6421
6422 * varasm.c (default_elf_asm_named_section): Don't check if
6423 HAVE_GAS_SECTION_EXCLUDE is defined.
6424
6425 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6426
6427 * doc/md.texi: Update the documentation of the cond_* optabs
6428 to mention the new final operand. Fix GET_MODE_NUNITS call.
6429 Describe the scalar case too.
6430 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
6431 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
6432 instead of 2.
6433 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
6434 (get_conditional_internal_fn): Update comment.
6435 * tree-vect-loop.c (vectorizable_reduction): Pass the original
6436 accumulator value as a final argument to conditional functions.
6437 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
6438 a define_expand and add an "else" operand. Assert for now that
6439 the else operand is equal to operand 2. Use SVE_INT_BINARY and
6440 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
6441 (*cond_<optab><mode>): New patterns.
6442 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
6443 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
6444 (UNSPEC_COND_EOR): Delete.
6445 (optab): Remove associated mappings.
6446 (SVE_INT_BINARY): New code iterator.
6447 (sve_int_op): Remove int attribute and add "minus" to the code
6448 attribute.
6449 (SVE_COND_INT_OP): Delete.
6450 (SVE_COND_FP_OP): Rename to...
6451 (SVE_COND_FP_BINARY): ...this.
6452
6453 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6454
6455 * optabs.c (can_reuse_operands_p): New function.
6456 (maybe_legitimize_operands): Try to reuse the results for
6457 earlier operands.
6458
6459 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
6460
6461 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
6462 Add {q} suffix to insn mnemonic.
6463
6464 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6465
6466 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
6467 (msp430_warn_func_return): New.
6468
6469 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
6470
6471 * fold-const.c (tree_nonzero_bits): New function.
6472 * fold-const.h (tree_nonzero_bits): Likewise.
6473 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
6474 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
6475
6476 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6477
6478 PR target/85900
6479 PR target/85345
6480 * varasm.c (assemble_alias): Check ifunc_resolver only on
6481 FUNCTION_DECL.
6482
6483 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
6484
6485 PR target/85903
6486 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
6487 when memory input operand is handled.
6488
6489 2018-05-24 Luis Machado <luis.machado@linaro.org>
6490
6491 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
6492 global.
6493 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
6494
6495 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
6496
6497 * match.pd: Delay FMA folds until after vectorization.
6498
6499 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
6500
6501 PR target/83009
6502 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6503 address check not strict.
6504
6505 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
6506
6507 * gimple-match.h (gimple_match_op): New class.
6508 (mprts_hook): Replace parameters with a gimple_match_op *.
6509 (maybe_build_generic_op): Likewise.
6510 (gimple_simplified_result_is_gimple_val): Replace parameters with
6511 a const gimple_match_op *.
6512 (gimple_simplify): Replace code_helper * and tree * parameters with
6513 a gimple_match_op * parameter.
6514 (gimple_resimplify1): Replace code_helper *, tree and tree *
6515 parameters with a gimple_match_op * parameter.
6516 (gimple_resimplify2): Likewise.
6517 (gimple_resimplify3): Likewise.
6518 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
6519 parameters with a gimple_match_op * parameter.
6520 * gimple-match-head.c (gimple_simplify): Change prototypes of
6521 auto-generated functions to take a gimple_match_op * instead of
6522 separate code_helper * and tree * parameters. Make the same
6523 change in the top-level overload and update calls to the
6524 gimple_resimplify routines. Update calls to the auto-generated
6525 functions and to maybe_push_res_to_seq in the publicly-facing
6526 operation-specific gimple_simplify overloads.
6527 (gimple_match_op::MAX_NUM_OPS): Define.
6528 (gimple_resimplify1): Replace rcode and ops with a single res_op
6529 parameter. Update call to gimple_simplify.
6530 (gimple_resimplify2): Likewise.
6531 (gimple_resimplify3): Likewise.
6532 (mprts_hook): Replace parameters with a gimple_match_op *.
6533 (maybe_build_generic_op): Likewise.
6534 (build_call_internal): Replace type, nargs and ops with
6535 a gimple_match_op *.
6536 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
6537 with a single gimple_match_op *. Update calls to mprts_hook,
6538 build_call_internal and gimple_simplified_result_is_gimple_val.
6539 Factor out code that is common to the tree_code and combined_fn cases.
6540 * genmatch.c (expr::gen_transform): Replace tem_code and
6541 tem_ops with a gimple_match_op called tem_op. Update calls
6542 to the gimple_resimplify functions and maybe_push_res_to_seq.
6543 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
6544 res_ops. Update call to the gimple_resimplify functions.
6545 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
6546 (decision_tree::gen): Make the functions take a gimple_match_op *
6547 called res_op instead of separate res_code and res_ops parameters.
6548 Update call accordingly.
6549 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
6550 and ops with a single res_op parameter. Update calls to
6551 maybe_build_generic_op and maybe_push_res_to_seq.
6552 (fold_stmt_1): Update calls to gimple_simplify and
6553 replace_stmt_with_simplification.
6554 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
6555 and gimple_simplified_result_is_gimple_val.
6556 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
6557 gimple_simplify.
6558 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
6559 with a gimple_match_op *.
6560 (vn_nary_build_or_lookup): Likewise. Update call to
6561 vn_nary_build_or_lookup_1.
6562 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
6563 gimple_match_op *. Update calls to the gimple_resimplify routines
6564 and to gimple_simplified_result_is_gimple_val.
6565 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
6566 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
6567 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
6568 (visit_nary_op): Likewise.
6569 (visit_reference_op_load): Likewise.
6570
6571 2018-05-23 Luis Machado <luis.machado@linaro.org>
6572
6573 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
6574 modifier for printing the step amount.
6575
6576 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
6577
6578 PR target/78849
6579 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
6580 types.
6581
6582 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
6583
6584 * doc/sourcebuild.texi (Endianness): New subsubsection.
6585
6586 2018-05-23 Luis Machado <luis.machado@linaro.org>
6587
6588 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6589 <prefetch_dynamic_strides>: New const bool field.
6590 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6591 prefetch_dynamic_strides.
6592 (exynosm1_prefetch_tune): Likewise.
6593 (thunderxt88_prefetch_tune): Likewise.
6594 (thunderx_prefetch_tune): Likewise.
6595 (thunderx2t99_prefetch_tune): Likewise.
6596 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
6597 false.
6598 (aarch64_override_options_internal): Update to set
6599 PARAM_PREFETCH_DYNAMIC_STRIDES.
6600 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6601 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6602 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6603 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6604 prefetch-dynamic-strides setting.
6605
6606 2018-05-23 Luis Machado <luis.machado@linaro.org>
6607
6608 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6609 <minimum_stride>: New const int field.
6610 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6611 minimum_stride field defaulting to -1.
6612 (exynosm1_prefetch_tune): Likewise.
6613 (thunderxt88_prefetch_tune): Likewise.
6614 (thunderx_prefetch_tune): Likewise.
6615 (thunderx2t99_prefetch_tune): Likewise.
6616 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
6617 <default_opt_level>: Set to 3.
6618 (aarch64_override_options_internal): Update to set
6619 PARAM_PREFETCH_MINIMUM_STRIDE.
6620 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6621 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6622 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6623 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6624 stride is constant and is below the minimum stride threshold.
6625
6626 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6627
6628 * config/arm/arm-cpus.in (mode26): Delete.
6629 (armv4): Delete mode26 reference.
6630 * config/arm/arm.c (arm_configure_build_target): Delete use of
6631 isa_bit_mode26.
6632
6633 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
6634
6635 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
6636 New insn pattern.
6637 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
6638 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
6639 for non-SSE modes.
6640 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
6641 (floatunsdidf2): Ditto.
6642
6643 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
6644
6645 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
6646 (fixuns_trunc<mode>si2_avx512f): Ditto.
6647 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
6648 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
6649 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
6650
6651 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
6652
6653 PR rtl-optimization/79985
6654 * df-scan.c (df_insn_refs_collect): Remove special case for
6655 global registers and asm statements.
6656
6657 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
6658
6659 * extend.texi (Global Register Variables): Rewrite the bullet list.
6660 Note that the register is available for allocation. Note that access
6661 via inline asm must use constraints. Add note about async-signal
6662 handlers. Remove paragraph about automagic register selection.
6663
6664 2018-05-23 Richard Biener <rguenther@suse.de>
6665
6666 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
6667 of fixed offset from memset VN.
6668
6669 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
6670
6671 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
6672 first_interp field.
6673 (alloc_cand_and_find_basis): Initialize first_interp field.
6674 (slsr_process_mul): Modify first_interp field.
6675 (slsr_process_add): Likewise.
6676 (slsr_process_cast): Modify first_interp field for each new
6677 interpretation.
6678 (slsr_process_copy): Likewise.
6679 (dump_candidate): Dump first_interp field.
6680 (replace_mult_candidate): Process all interpretations, not just
6681 subsequent ones.
6682 (replace_rhs_if_not_dup): Likewise.
6683 (replace_one_candidate): Likewise.
6684
6685 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
6686
6687 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
6688 Add new boolean.
6689 (aarch64_needs_frame_chain): New function.
6690 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
6691
6692 2018-05-23 Sudakshina Das <sudi.das@arm.com>
6693
6694 PR target/84882
6695 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
6696 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
6697 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
6698 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
6699 as true for strict-align.
6700 (aarch64_can_inline_p): Perform checks even when callee has no
6701 attributes to check for strict alignment.
6702 * doc/extend.texi (AArch64 Function Attributes): Document
6703 no-strict-align.
6704 * doc/invoke.texi: (AArch64 Options): Likewise.
6705
6706 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
6707
6708 PR tree-optimization/85853
6709 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
6710 the handling of the root of the node to...
6711 (vect_slp_analyze_node_operations_1): ...this new function,
6712 and run the whole thing with the child nodes' def types
6713 set according to their SLP node's def type.
6714
6715 2018-05-23 Richard Biener <rguenther@suse.de>
6716
6717 PR middle-end/85874
6718 * tree-data-ref.c (create_runtime_alias_checks): Defer
6719 and ignore overflow warnings.
6720
6721 2018-05-23 Yury Gribov <tetra2005@gmail.com>
6722
6723 PR tree-optimization/85822
6724 * tree-vrp.c (is_masked_range_test): Fix handling of negative
6725 constants.
6726
6727 2018-05-23 Richard Biener <rguenther@suse.de>
6728
6729 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6730 memset constants via native_interpret_expr.
6731
6732 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
6733
6734 PR target/85345
6735 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
6736 attribute.
6737 (cgraph_node::create_alias): Likewise.
6738 (cgraph_node::get_availability): Check ifunc_resolver instead
6739 of looking up ifunc attribute.
6740 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6741 * varasm.c (do_assemble_alias): Likewise.
6742 (assemble_alias): Likewise.
6743 (default_binds_local_p_3): Likewise.
6744 * cgraph.h (cgraph_node): Add ifunc_resolver.
6745 (cgraph_node::only_called_directly_or_aliased_p): Return false
6746 for IFUNC resolver.
6747 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
6748 attribute.
6749 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
6750 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
6751 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
6752 instead of looking up ifunc attribute.
6753
6754 2018-05-22 Luis Machado <luis.machado@linaro.org>
6755
6756 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
6757
6758 2018-05-22 Martin Sebor <msebor@redhat.com>
6759
6760 PR middle-end/85359
6761 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
6762 only when expasion succeeds.
6763 (expand_builtin_strcmp): Same.
6764 (expand_builtin_strncmp): Same.
6765
6766 2018-05-22 Martin Sebor <msebor@redhat.com>
6767
6768 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
6769
6770 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6771 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6772
6773 * config/aarch64/aarch64-ldpstp.md: Replace uses of
6774 aarch64_mem_pair_operand with memory_operand and delete operand swapping
6775 code.
6776 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6777 Add check for legitimate_address.
6778 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
6779 (aarch64_swap_ldrstr_operands): New.
6780 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
6781 Define prototype.
6782
6783 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6784 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6785
6786 * config/aarch64/aarch64.md: New patterns to generate stp
6787 and ldp.
6788 (store_pair_sw, store_pair_dw): New patterns to generate stp for
6789 single words and double words.
6790 (load_pair_sw, load_pair_dw): Likewise.
6791 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
6792 Delete.
6793 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
6794 Delete.
6795 * config/aarch64/aarch64-ldpstp.md: Modify peephole
6796 for different mode ldpstp and add peephole for merged zero stores.
6797 Likewise for loads.
6798 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6799 Add size check.
6800 (aarch64_gen_store_pair): Rename calls to match new patterns.
6801 (aarch64_gen_load_pair): Rename calls to match new patterns.
6802 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
6803 (load_pair<DREG:mode><DREG2:mode>): ... This.
6804 (store_pair<mode>): Rename to...
6805 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
6806 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
6807 New mode iterators.
6808 (V_INT_EQUIV): Handle SImode.
6809 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
6810 New predicate.
6811
6812 2018-05-22 Martin Sebor <msebor@redhat.com>
6813
6814 PR c/85623
6815 * calls.c (maybe_warn_nonstring_arg): Use string length to set
6816 or ajust the presumed bound on an operation to avoid unnecessary
6817 warnings.
6818
6819 2018-05-22 Martin Sebor <msebor@redhat.com>
6820
6821 PR tree-optimization/85826
6822 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
6823 assuming that a DECL necesarily has a constant size.
6824
6825 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
6826
6827 PR middle-end/85862
6828 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
6829
6830 2018-05-22 Richard Biener <rguenther@suse.de>
6831
6832 PR tree-optimization/85834
6833 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
6834 non-constant and non-zero memset arguments.
6835
6836 2018-05-22 Martin Liska <mliska@suse.cz>
6837
6838 PR ipa/85607
6839 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
6840
6841 2018-05-22 Richard Biener <rguenther@suse.de>
6842
6843 PR tree-optimization/85863
6844 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
6845 comparisons when vectype is specified.
6846 (vectorizable_condition): Do not specify vectype for
6847 vect_is_simple_cond when SLP vectorizing.
6848
6849 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
6850
6851 PR target/85657
6852 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
6853 define __ibm128 as long double.
6854 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
6855 as a distinct type when IEEE 128-bit support is enabled.
6856 (init_float128_ieee): Fix up conversions between IFmode and IEEE
6857 128-bit types to use the correct functions.
6858 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
6859 convert between 128-bit floating point types that have different
6860 modes but the same representation, instead of using gen_lowpart to
6861 makean alias.
6862 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
6863 KFmode.
6864 (IFKF_reg): New attributes to give the register constraints for
6865 IFmode and KFmode.
6866 (extend<mode>tf2_internal): New insns to mark an explicit
6867 conversion between 128-bit floating point types that have a
6868 different mode but share the same representation.
6869
6870 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
6871
6872 PR tree-optimization/85814
6873 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
6874 a null return from get_strinfo when unsharing the next
6875 strinfo in the chain.
6876
6877 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6878
6879 PR gcc/84923
6880 * varasm.c (weak_finish): Clean up weak_decls.
6881
6882 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6883
6884 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
6885 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
6886 UNSPEC_UADALP values.
6887 * config/aarch64/iterators.md (ABAL): New int iterator.
6888 (ABDL2): Likewise.
6889 (ADALP): Likewise.
6890 (sur): Add mappings for the above.
6891 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
6892 New define_insn.
6893 (aarch64_<sur>abal<mode>_4): Likewise.
6894 (aarch64_<sur>adalp<mode>_3): Likewise.
6895 (<sur>sadv16qi): New define_expand.
6896
6897 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
6898
6899 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
6900 (*movdf_internal): Ditto.
6901 (*rcpsf2_sse): Ditto.
6902 (*rsqrtsf2_sse): Ditto.
6903 (*sqrt<mode>2_sse): Ditto.
6904
6905 2018-05-21 Tamar Christina <tamar.christina@arm.com>
6906
6907 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
6908 eor3q<mode>4.
6909 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
6910 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
6911 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
6912 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
6913 vbcaxq_s64): New.
6914 * config/aarch64/arm_neon.h: Likewise.
6915 * config/aarch64/iterators.md (VQ_I): New.
6916
6917 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
6918
6919 * config.gcc: Add arc/t-multilib-linux to tmake_file for
6920 arc*-*-linux*.
6921 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
6922 MULTILIB_DIRNAMES
6923
6924 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
6925
6926 * config/nds32/constraints.md (S): New constraint.
6927 * config/nds32/nds32.md (call_internal): Use constraint S.
6928 (call_value_internal): Likewise.
6929 (sibcall_internal): Likewise.
6930 (sibcall_value_internal): Likewise.
6931
6932 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
6933 Chung-Ju Wu <jasonwucj@gmail.com>
6934
6935 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
6936 into consideration.
6937
6938 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
6939 Chung-Ju Wu <jasonwucj@gmail.com>
6940
6941 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
6942 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
6943 (nds32_rtx_costs_impl): Simplify.
6944 (nds32_address_cost_impl): Simplify.
6945 (nds32_init_rtx_costs): New function.
6946 (nds32_rtx_costs_speed_prefer): Likewise.
6947 (nds32_rtx_costs_size_prefer): Likewise.
6948 (nds32_address_cost_speed_prefer): Likewise.
6949 (nds32_address_cost_speed_fwprop): Likewise.
6950 (nds32_address_cost_size_prefer): Likewise.
6951 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
6952 * config/nds32/nds32.c (nds32_option_override): Use
6953 nds32_init_rtx_costs function.
6954
6955 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
6956
6957 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
6958 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
6959 (TARGET_PIPELINE_N8): Likewise.
6960 (TARGET_PIPELINE_N10): Likewise.
6961 (TARGET_PIPELINE_N13): Likewise.
6962 (TARGET_PIPELINE_GRAYWOLF): Likewise.
6963
6964 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
6965
6966 * config/nds32/nds32-fpu.md: Update copyright year.
6967
6968 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6969
6970 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
6971
6972 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6973
6974 * config/nds32/nds32.c
6975 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
6976 * config/nds32/nds32.opt (minline-asm-r15): New option.
6977
6978 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6979
6980 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
6981 MASK_HW_ABS.
6982 * config/nds32/nds32.md (abssi2): New pattern.
6983
6984 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
6985
6986 * config/i386/i386.md (rex64namesuffix): New mode attribute.
6987 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
6988 Merge insn pattern from sse_cvtsi2ss<round_name> and
6989 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
6990 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
6991 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
6992 using SWI48 mode iterator.
6993 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
6994 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
6995 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
6996 pattern from sse_cvttss2si<round_saeonly_name>
6997 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
6998 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
6999 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
7000 using SWI48 mode iterator.
7001 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
7002 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
7003 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
7004 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
7005 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
7006 using SWI48 mode iterator.
7007 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
7008 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
7009 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
7010 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
7011 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
7012 SWI48 mode iterator.
7013 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
7014 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
7015 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
7016 pattern from sse_cvttsd2si<round_saeonly_name>
7017 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
7018
7019 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7020
7021 * config/nds32/nds32-md-auxiliary.c
7022 (nds32_valid_smw_lwm_base_p): Refine.
7023 (nds32_output_smw_single_word): Refine.
7024 (nds32_output_smw_double_word): New.
7025 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
7026
7027 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7028
7029 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
7030 (nds32_output_stack_pop): Refine.
7031 (nds32_expand_unaligned_load): Refine.
7032 (nds32_expand_unaligned_store): Refine.
7033
7034 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7035 Chung-Ju Wu <jasonwucj@gmail.com>
7036
7037 * config/nds32/constants.md: Add TP_REGNUM constant.
7038 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
7039 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
7040 UNSPEC_ADD32.
7041 * config/nds32/nds32-doubleword.md: Consider flag_pic.
7042 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
7043 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
7044 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
7045 and PIC code generation.
7046 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
7047 code generation.
7048 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
7049 optimization.
7050 * config/nds32/nds32.md: Support TLS and PIC.
7051 * config/nds32/nds32.c: Support TLS and PIC.
7052 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
7053 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
7054 predicate.
7055
7056 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7057
7058 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
7059 mode with E_ prefix.
7060
7061 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7062 Chung-Ju Wu <jasonwucj@gmail.com>
7063
7064 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
7065 * config/nds32/nds32-md-auxiliary.c
7066 (symbolic_reference_mentioned_p): New.
7067 (nds32_legitimize_ict_address): New.
7068 (nds32_expand_ict_move): New.
7069 (nds32_indirect_call_referenced_p): New.
7070 (nds32_symbol_binds_local_p): Delete.
7071 (nds32_long_call_p): Modify.
7072 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
7073 * config/nds32/nds32-protos.h
7074 (symbolic_reference_mentioned_p): Declare.
7075 (nds32_legitimize_ict_address): Declare.
7076 (nds32_expand_ict_move): Declare.
7077 (nds32_indirect_call_referenced_p): Declare.
7078 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
7079 (nds32_relax_group): Use nds32_ict_const_p as condition.
7080 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
7081 (nds32_asm_file_start): Output ict_model directive in asm code.
7082 (nds32_legitimate_address_p): Consider indirect call.
7083 (nds32_print_operand): Consider indirect call.
7084 (nds32_print_operand_address): Consider indirect call.
7085 (nds32_insert_attributes): Handle "indirect_call" attribute.
7086 (TARGET_LEGITIMATE_ADDRESS_P): Define.
7087 (TARGET_LEGITIMATE_CONSTANT_P): Define.
7088 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
7089 (TARGET_DELEGITIMIZE_ADDRESS): Define.
7090 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
7091 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
7092 (TARGET_ICT_MODEL_SMALL): Define.
7093 (TARGET_ICT_MODEL_LARGE): Define.
7094 * config/nds32/nds32.md (movsi): Consider ict model.
7095 (call, call_value): Consider ict model.
7096 (sibcall, sibcall_value): Consider ict model.
7097 * config/nds32/nds32.opt (mict-model): New option.
7098 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
7099 model.
7100
7101 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
7102 Monk Chiang <sh.chiang04@gmail.com>
7103 Jim Wilson <jimw@sifive.com>
7104
7105 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
7106 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
7107 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
7108 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
7109 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
7110 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
7111 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
7112 compute save_libcall_adjustment properly.
7113 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
7114 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
7115 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
7116 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
7117 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
7118 (ABI_SPEC): Handle mabi=ilp32e.
7119 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
7120 (RVE): Add RVE mask.
7121 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
7122 <-march>: Add rv32e as an example.
7123
7124 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
7125
7126 PR c++/82899
7127 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
7128 (intra_create_variable_infos): Handle C++ constructors.
7129
7130 2018-05-18 Martin Liska <mliska@suse.cz>
7131
7132 * passes.def: Remove a redundant pass.
7133
7134 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
7135
7136 PR bootstrap/85838
7137 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
7138
7139 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7140
7141 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
7142 (ARMv4): Update.
7143 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
7144 (ARMv6m): Update.
7145 (armv2, armv2a, armv3, armv3m): Delete architectures.
7146 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
7147 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
7148 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
7149 Delete cpus.
7150 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
7151 (*mulsidi3adddi): Likewise.
7152 (mulsidi3): Likewise.
7153 (*mulsidi3_nov6): Likewise.
7154 (umulsidi3): Likewise.
7155 (umulsidi3_nov6): Likewise.
7156 (umaddsidi4): Likewise.
7157 (*umulsidi3adddi): Likewise.
7158 (smulsi3_highpart): Likewise.
7159 (*smulsi3_highpart_nov6): Likewise.
7160 (umulsi3_highpart): Likewise.
7161 (*umulsi3_highpart_nov6): Likewise.
7162 * config/arm/arm.h (arm_arch3m): Delete.
7163 * config/arm/arm.c (arm_arch3m): Delete.
7164 (arm_option_override_internal): Update armv3-related comment.
7165 (arm_configure_build_target): Delete use of isa_bit_mode32.
7166 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
7167 (arm_rtx_costs_internal): Delete check of arm_arch3m.
7168 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
7169 (mulsa3): Likewise.
7170 (mulusa3): Likewise.
7171 * config/arm/arm-protos.h (arm_arch3m): Delete.
7172 * config/arm/arm-tables.opt: Regenerate.
7173 * config/arm/arm-tune.md: Likewise.
7174 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
7175 deleted architectures.
7176
7177 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7178
7179 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
7180 (armv5t, armv5te): New features.
7181 (ARMv5, ARMv5e): Delete fgroups.
7182 (ARMv5t, ARMv5te): Adjust for above changes.
7183 (ARMv6m): Likewise.
7184 (armv5, armv5e): Delete arches.
7185 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
7186 arm_arch5.
7187 (*call_reg_arm): Likewise.
7188 (*call_value_reg_armv5): Likewise.
7189 (*call_value_reg_arm): Likewise.
7190 (*call_symbol): Likewise.
7191 (*call_value_symbol): Likewise.
7192 (*sibcall_insn): Likewise.
7193 (*sibcall_value_insn): Likewise.
7194 (clzsi2): Likewise.
7195 (prefetch): Likewise.
7196 (define_split and define_peephole2 dependent on arm_arch5):
7197 Likewise.
7198 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
7199 arm_arch5e.
7200 (TARGET_ARM_QBIT): Likewise.
7201 (TARGET_DSP_MULTIPLY): Likewise.
7202 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
7203 (arm_arch5, arm_arch5e): Delete.
7204 (arm_arch5t, arm_arch5te): Declare.
7205 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
7206 (arm_arch5t): Declare.
7207 (arm_option_reconfigure_globals): Update for the above.
7208 (arm_options_perform_arch_sanity_checks): Update comment, replace
7209 use of arm_arch5 with arm_arch5t.
7210 (use_return_insn): Likewise.
7211 (arm_emit_call_insn): Likewise.
7212 (output_return_instruction): Likewise.
7213 (arm_final_prescan_insn): Likewise.
7214 (arm_coproc_builtin_available): Likewise.
7215 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
7216 arm_arch5e with arm_arch5t and arm_arch5te.
7217 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
7218 (arm_arch5t, arm_arch5te): Declare.
7219 * config/arm/arm-tables.opt: Regenerate.
7220 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
7221 * config/arm/t-multilib: Likewise.
7222 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
7223 instead of arm_arch5.
7224 (*call_reg_thumb1): Likewise.
7225 (*call_value_reg_thumb1_v5): Likewise.
7226 (*call_value_reg_thumb1): Likewise.
7227 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
7228 unreachable path.
7229 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
7230
7231 2018-05-18 Martin Liska <mliska@suse.cz>
7232
7233 PR gcov-profile/84846
7234 * doc/gcov.texi: Document -t option of gcov tool.
7235
7236 2018-05-18 Martin Liska <mliska@suse.cz>
7237
7238 PR gcov-profile/84846
7239 * gcov.c (print_usage): Add new -t option.
7240 (process_args): Handle the option.
7241 (generate_results): Use stdout as output when requested by
7242 the option.
7243
7244 2018-05-18 Martin Liska <mliska@suse.cz>
7245
7246 PR gcov-profile/84846
7247 * coverage.c (coverage_init): Write PWD to .gcno file.
7248 * doc/gcov.texi: Document how working directory is printed.
7249 * gcov-dump.c (dump_gcov_file): Print PWD.
7250 * gcov.c (output_intermediate_file): Likewise.
7251 (read_graph_file): Read PWD string.
7252 (output_lines): Print PWD.
7253
7254 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7255
7256 PR middle-end/85817
7257 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
7258 for retval and return false if all args to phi are zero.
7259
7260 2018-05-18 Richard Biener <rguenther@suse.de>
7261
7262 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
7263 method.
7264 (evrp_dom_walker::before_dom_children): Call it.
7265
7266 2018-05-18 Richard Biener <rguenther@suse.de>
7267
7268 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
7269 results when processing array refs with variable index.
7270
7271 2018-05-18 Toon Moene <toon@moene.org>
7272
7273 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
7274 directly after that of -floop-interchange. Indicate that both
7275 options are enabled by default when specifying -O3.
7276
7277 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7278
7279 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
7280 iterator. Delete separate integer-mode vec_set<mode> expander.
7281 (aarch64_simd_vec_setv2di): Delete.
7282 (vec_setv2di): Delete.
7283 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
7284 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
7285 the "w, r" alternative.
7286
7287 2018-05-18 Martin Liska <mliska@suse.cz>
7288
7289 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
7290 * tree-pass.h (make_pass_lower_switch_O0): New function.
7291 * tree-switch-conversion.c (node_has_low_bound): Remove.
7292 (node_has_high_bound): Likewise.
7293 (node_is_bounded): Likewise.
7294 (class pass_lower_switch): Make it a template type and create
7295 two instances.
7296 (pass_lower_switch::execute): Add template argument.
7297 (make_pass_lower_switch): New function.
7298 (make_pass_lower_switch_O0): New function.
7299 (do_jump_if_equal): Remove.
7300 (emit_case_nodes): Simplify to just handle all 3 cases and leave
7301 all the hard work to tree optimization passes.
7302
7303 2018-05-18 Martin Liska <mliska@suse.cz>
7304
7305 * dbgcnt.c (limit_low): Renamed from limit.
7306 (limit_high): New variable.
7307 (dbg_cnt_is_enabled): Check for upper limit.
7308 (dbg_cnt): Adjust dumping.
7309 (dbg_cnt_set_limit_by_index): Add new argument for high
7310 value.
7311 (dbg_cnt_set_limit_by_name): Likewise.
7312 (dbg_cnt_process_single_pair): Parse new format.
7313 (dbg_cnt_process_opt): Use strtok.
7314 (dbg_cnt_list_all_counters): Remove 'value' and add
7315 'limit_high'.
7316 * doc/invoke.texi: Document changes.
7317
7318 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
7319
7320 * doc/sourcebuild.texi (scalar_all_fma): Document.
7321 * tree.def (FMA_EXPR): Delete.
7322 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
7323 * internal-fn.c (ternary_direct): New macro.
7324 (expand_ternary_optab_fn): Likewise.
7325 (direct_ternary_optab_supported_p): Likewise.
7326 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
7327 * builtins.c (fold_builtin_fma): Delete.
7328 (fold_builtin_3): Don't call it.
7329 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
7330 * expr.c (expand_expr_real_2): Likewise.
7331 * fold-const.c (operand_equal_p): Likewise.
7332 (fold_ternary_loc): Likewise.
7333 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
7334 * gimple.c (DEFTREECODE): Likewise.
7335 * gimplify.c (gimplify_expr): Likewise.
7336 * optabs-tree.c (optab_for_tree_code): Likewise.
7337 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7338 * tree-eh.c (operation_could_trap_p): Likewise.
7339 (stmt_could_throw_1_p): Likewise.
7340 * tree-inline.c (estimate_operator_cost): Likewise.
7341 * tree-pretty-print.c (dump_generic_node): Likewise.
7342 (op_code_prio): Likewise.
7343 * tree-ssa-loop-im.c (stmt_cost): Likewise.
7344 * tree-ssa-operands.c (get_expr_operands): Likewise.
7345 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
7346 * fold-const-call.h (fold_fma): Delete.
7347 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
7348 CFN_FNMA and CFN_FNMS.
7349 (fold_fma): Delete.
7350 * genmatch.c (combined_fn): New enum.
7351 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
7352 (commutative_op): New function.
7353 (commutate): Use it. Handle more than 2 operands.
7354 (dt_operand::gen_gimple_expr): Use commutative_op.
7355 (parser::parse_expr): Allow :c to be used with non-binary
7356 operators if the commutative operand is known.
7357 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
7358 CFN_FMS, CFN_FNMA and CFN_FNMS.
7359 (backprop::process_assign_use): Remove FMA_EXPR handling.
7360 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
7361 (gen_hsa_fma): New function.
7362 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
7363 IFN_FNMA and IFN_FNMS.
7364 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
7365 * gimple-fold.h (follow_all_ssa_edges): Declare.
7366 * gimple-fold.c (follow_all_ssa_edges): New function.
7367 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
7368 gimple_build interface and use follow_all_ssa_edges to fold the result.
7369 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
7370 instead of checking for optabs directly.
7371 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
7372 rather than FMA_EXPRs.
7373 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
7374 call to IFN_FMA instead of an FMA_EXPR.
7375
7376 2018-05-17 Jim Wilson <jimw@sifive.com>
7377
7378 * expr.c (do_tablejump): When converting index to Pmode, if we have a
7379 sign extended promoted subreg, and the range does not have the sign bit
7380 set, then do a sign extend.
7381
7382 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
7383 test, check for sign extended subreg and/or constant operands, and
7384 do a sign extend in that case.
7385
7386 2018-05-17 Steve Ellcey <sellcey@cavium.com>
7387
7388 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
7389 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
7390 Add untyped.
7391 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
7392 Change logics_shift_reg to logics_shift_imm.
7393 (thunderx2t99_fp_loadpair_basic): Delete.
7394 (thunderx2t99_fp_storepair_basic): Delete.
7395 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
7396 (thunderx2t99_asimd_polynomial): Delete.
7397 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
7398 and neon_fp_mul_d_scalar_q.
7399 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
7400 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
7401 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
7402 (thunderx2t99_asimd_lut): Add missing tbl types.
7403 (thunderx2t99_asimd_ext): Delete.
7404 (thunderx2t99_asimd_load1_1_mult): Delete.
7405 (thunderx2t99_asimd_load1_2_mult): Delete.
7406 (thunderx2t99_asimd_load1_ldp): New.
7407 (thunderx2t99_asimd_load1): New.
7408 (thunderx2t99_asimd_load2): Add missing *load2* types.
7409 (thunderx2t99_asimd_load3): New.
7410 (thunderx2t99_asimd_load4): New.
7411 (thunderx2t99_asimd_store1_1_mult): Delete.
7412 (thunderx2t99_asimd_store1_2_mult): Delete.
7413 (thunderx2t99_asimd_store2_mult): Delete.
7414 (thunderx2t99_asimd_store2_onelane): Delete.
7415 (thunderx2t99_asimd_store_stp): New.
7416 (thunderx2t99_asimd_store1): New.
7417 (thunderx2t99_asimd_store2): New.
7418 (thunderx2t99_asimd_store3): New.
7419 (thunderx2t99_asimd_store4): New.
7420
7421 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
7422
7423 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
7424 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
7425
7426 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
7427 Segher Boessenkool <segher@kernel.crashing.org>
7428
7429 PR target/85698
7430 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
7431 operand.
7432
7433 2018-05-17 Richard Biener <rguenther@suse.de>
7434
7435 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
7436 for pruning loop and prune defs feeding only already visited PHIs.
7437
7438 2018-05-17 Richard Biener <rguenther@suse.de>
7439
7440 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
7441
7442 2018-05-17 Bin Cheng <bin.cheng@arm.com>
7443 Richard Biener <rguenther@suse.de>
7444
7445 PR tree-optimization/85793
7446 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
7447 for VMAT_ELEMENTWISE.
7448
7449 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
7450
7451 * internal-fn.h (lookup_internal_fn): Declare
7452 * internal-fn.c (lookup_internal_fn): New function.
7453 * gimple.c (gimple_build_call_from_tree): Handle calls to
7454 internal functions.
7455 * gimple-pretty-print.c (dump_gimple_call): Print "." before
7456 internal function names.
7457 * tree-pretty-print.c (dump_generic_node): Likewise.
7458 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
7459
7460 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
7461
7462 * gimple-fold.h (gimple_build): Make the function forms take
7463 combined_fn rather than built_in_function.
7464 (gimple_simplify): Likewise.
7465 * gimple-match-head.c (gimple_simplify): Likewise.
7466 * gimple-fold.c (gimple_build): Likewise.
7467 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
7468 rather than gimple_build_call_internal.
7469 (get_initial_defs_for_reduction): Likewise.
7470 (vect_create_epilog_for_reduction): Likewise.
7471 (vectorizable_live_operation): Likewise.
7472
7473 2018-05-17 Martin Liska <mliska@suse.cz>
7474
7475 * gimple-ssa-sprintf.c (format_directive): Do not use
7476 space in between 'G_' and '('.
7477
7478 2018-05-17 Jakub Jelinek <jakub@redhat.com>
7479
7480 PR target/85323
7481 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
7482 even if the mask is not all ones.
7483
7484 PR target/85323
7485 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
7486 vector.
7487 (ix86_gimple_fold_builtin): Likewise.
7488
7489 PR target/85323
7490 * config/i386/i386.c: Include tree-vector-builder.h.
7491 (ix86_vector_shift_count): New function.
7492 (ix86_fold_builtin): Fold shift builtins by scalar count.
7493 (ix86_gimple_fold_builtin): Likewise.
7494
7495 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
7496 _mm512_setzero): New intrinsics.
7497
7498 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
7499 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7500
7501 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
7502 code generation for cases where splatting a value is not useful.
7503 * simplify-rtx.c (simplify_ternary_operation): Simplify
7504 vec_merge across a vec_duplicate and a paradoxical subreg forming
7505 a vector mode to a vec_concat.
7506
7507 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
7508
7509 * config.gcc: Support "goldmont-plus".
7510 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7511 "goldmont-plus".
7512 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7513 PROCESSOR_GOLDMONT_PLUS.
7514 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
7515 (processor_target_table): Add "goldmont-plus".
7516 (PTA_GOLDMONT_PLUS): Define.
7517 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
7518 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
7519 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
7520 (fold_builtin_cpu): Add "goldmont-plus".
7521 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
7522 (ix86_option_override_internal): Add "goldmont-plus".
7523 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
7524 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
7525 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
7526 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
7527
7528 2018-05-17 Richard Biener <rguenther@suse.de>
7529
7530 PR tree-optimization/85757
7531 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
7532 remove defs that only feed that PHI from further processing.
7533
7534 2018-05-16 Jim Wilson <jimw@sifive.com>
7535
7536 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
7537 asterisk to name.
7538 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
7539
7540 2018-05-16 Mark Wielaard <mark@klomp.org>
7541
7542 * dwarf2out.c (count_index_strings): New function.
7543 (output_indirect_strings): Call count_index_strings and generate
7544 header for dwarf_version >= 5.
7545
7546 2018-05-16 Mark Wielaard <mark@klomp.org>
7547
7548 * dwarf2out.c (dwarf_FORM): New function.
7549 (set_indirect_string): Use dwarf_FORM.
7550 (reset_indirect_string): Likewise.
7551 (size_of_die): Likewise.
7552 (value_format): Likewise.
7553 (output_die): Likewise.
7554 (add_skeleton_AT_string): Likewise.
7555 (output_macinfo_op): Likewise.
7556 (index_string): Likewise.
7557 (output_index_string_offset): Likewise.
7558 (output_index_string): Likewise.
7559 (count_index_strings): Likewise.
7560
7561 2018-05-16 Carl Love <cel@us.ibm.com>
7562
7563 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7564 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
7565
7566 2018-05-16 Martin Jambor <mjambor@suse.cz>
7567
7568 * ipa-prop.c (ipa_free_all_edge_args): Remove.
7569 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
7570
7571 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
7572
7573 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
7574 (fnma<mode>4): Likewise.
7575 (fms<mode>4): Likewise.
7576 (fnms<mode>4): Likewise.
7577 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
7578 (aarch64_fnma<mode>4): Likewise.
7579 (aarch64_fms<mode>4): Likewise.
7580 (aarch64_fnms<mode>4): Likewise.
7581 (aarch64_fnmadd<mode>4): Likewise.
7582
7583 2018-05-16 Jason Merrill <jason@redhat.com>
7584
7585 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
7586
7587 2018-05-16 Richard Biener <rguenther@suse.de>
7588
7589 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
7590 (dump_stmt_cost): Declare.
7591 (add_stmt_cost): Dump cost we add.
7592 (add_stmt_costs): New function.
7593 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
7594 No longer exported.
7595 (vect_analyze_stmt): Adjust prototype.
7596 (vectorizable_condition): Likewise.
7597 (vectorizable_live_operation): Likewise.
7598 (vectorizable_reduction): Likewise.
7599 (vectorizable_induction): Likewise.
7600 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
7601 cost vector to pass to vectorizable_ and record afterwards.
7602 (vect_model_reduction_cost): Take cost vector argument and adjust.
7603 (vect_model_induction_cost): Likewise.
7604 (vectorizable_reduction): Likewise.
7605 (vectorizable_induction): Likewise.
7606 (vectorizable_live_operation): Likewise.
7607 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
7608 SLP_TREE_NUMBER_OF_VEC_STMTS.
7609 (vect_analyze_slp_cost_1): Remove.
7610 (vect_analyze_slp_cost): Likewise.
7611 (vect_slp_analyze_node_operations): Take visited args and
7612 a target cost vector. Avoid processing already visited stmt sets.
7613 (vect_slp_analyze_operations): Use a local cost vector to gather
7614 costs and register those of non-discarded instances.
7615 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
7616 (vect_schedule_slp_instance): Remove copying of
7617 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
7618 zero.
7619 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
7620 adding cost. Record cost entry location.
7621 (vect_prologue_cost_for_slp_op): Function to compute cost of
7622 a constant or invariant generated for SLP vect in the prologue,
7623 split out from vect_analyze_slp_cost_1.
7624 (vect_model_simple_cost): Make static. Adjust for SLP costing.
7625 (vect_model_promotion_demotion_cost): Likewise.
7626 (vect_model_store_cost): Likewise, make static.
7627 (vect_model_load_cost): Likewise.
7628 (vectorizable_bswap): Add cost vector arg and adjust.
7629 (vectorizable_call): Likewise.
7630 (vectorizable_simd_clone_call): Likewise.
7631 (vectorizable_conversion): Likewise.
7632 (vectorizable_assignment): Likewise.
7633 (vectorizable_shift): Likewise.
7634 (vectorizable_operation): Likewise.
7635 (vectorizable_store): Likewise.
7636 (vectorizable_load): Likewise.
7637 (vectorizable_condition): Likewise.
7638 (vectorizable_comparison): Likewise.
7639 (can_vectorize_live_stmts): Likewise.
7640 (vect_analyze_stmt): Likewise.
7641 (vect_transform_stmt): Adjust calls to vectorizable_*.
7642 * tree-vectorizer.c: Include gimple-pretty-print.h.
7643 (dump_stmt_cost): New function.
7644
7645 2018-05-16 Richard Biener <rguenther@suse.de>
7646
7647 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
7648 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
7649 * tree-ssa-dse.c: Include tree-ssa-loop.h.
7650 (check_name): New callback.
7651 (dse_classify_store): Track cycles via a visited bitmap of PHI
7652 defs and simplify handling of in-loop and across loop dead stores
7653 and properly fail for loop-variant refs. Handle byte-tracking with
7654 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
7655 limiting the walk.
7656
7657 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
7658
7659 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
7660 (vect_get_mask_type_for_stmt): Likewise.
7661 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
7662 split out from...
7663 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
7664 to determine the statement's vector type and the vector type that
7665 should be used for calculating nunits. Deal with cases in which
7666 the type has to be deferred.
7667 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
7668 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
7669 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
7670 (vect_determine_vf_for_stmt): New functions, split out from...
7671 (vect_determine_vectorization_factor): ...here.
7672 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
7673 (vect_get_mask_type_for_stmt): New functions, split out from
7674 vect_determine_vectorization_factor.
7675
7676 2018-05-16 Richard Biener <rguenther@suse.de>
7677
7678 * tree-cfg.c (verify_gimple_assign_ternary): Properly
7679 verify the [VEC_]COND_EXPR embedded comparison.
7680
7681 2018-05-15 Martin Sebor <msebor@redhat.com>
7682
7683 PR tree-optimization/85753
7684 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
7685 RECORD_TYPE in addition to ARRAY_TYPE.
7686
7687 2018-05-15 Martin Sebor <msebor@redhat.com>
7688
7689 PR middle-end/85643
7690 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
7691
7692 2018-05-15 Richard Biener <rguenther@suse.de>
7693
7694 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
7695 add by_clobber_p one. Change algorithm to collect all defs
7696 representing uses we need to walk and try reducing them to
7697 a single one before failing.
7698 (dse_dom_walker::dse_optimize_stmt): Adjust.
7699
7700 2018-05-13 Mark Wielaard <mark@klomp.org>
7701
7702 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
7703 (size_of_loc_descr): Likewise.
7704 (output_loc_operands): Likewise.
7705 (output_loc_operands_raw): Likewise.
7706 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
7707 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
7708 (hash_loc_operands): Likewise.
7709 (compare_loc_operands): Likewise.
7710
7711 2018-05-14 Mark Wielaard <mark@klomp.org>
7712
7713 * dwarf2out.c (count_index_addrs): New function.
7714 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
7715
7716 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7717
7718 PR tree-optimization/83648
7719 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
7720 return value as malloc candidate.
7721
7722 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7723
7724 PR ipa/85734
7725 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
7726 param as true in call to suggest_attribute.
7727
7728 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
7729
7730 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
7731 -mreadonly-in-sdata.
7732
7733 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7734
7735 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
7736 New pattern.
7737 (aarch64_crypto_aesd_fused): Likewise.
7738
7739 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
7740
7741 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
7742 (movsi_aarch64): Likewise.
7743 (load_pairsi): Likewise.
7744 (load_pairdi): Likewise.
7745 (store_pairsi): Likewise.
7746 (store_pairdi): Likewise.
7747 (load_pairsf): Likewise.
7748 (load_pairdf): Likewise.
7749 (store_pairsf): Likewise.
7750 (store_pairdf): Likewise.
7751 (zero_extend): Likewise.
7752 (trunc): Swap alternatives.
7753 (fcvt_target): Add '?' to prefer w over r.
7754
7755 2018-05-14 Jakub Jelinek <jakub@redhat.com>
7756
7757 PR target/85756
7758 * config/i386/i386.md: Disallow non-commutative arithmetics in
7759 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
7760 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
7761 in the peephole2 before it.
7762
7763 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
7764
7765 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
7766 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
7767 (ix86_handle_option): Handle -mcldemote.
7768 * config.gcc: New header.
7769 * config/i386/cldemoteintrin.h: New file.
7770 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
7771 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7772 -mcldemote.
7773 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7774 OPTION_MASK_ISA_CLDEMOTE.
7775 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
7776 (ix86_valid_target_attribute_inner_p): Ditto.
7777 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
7778 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
7779 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
7780 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
7781 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
7782 (cldemote): New.
7783 * config/i386/i386.opt: Add -mcldemote.
7784 * config/i386/x86intrin.h: New header.
7785 * doc/invoke.texi: Add -mcldemote.
7786
7787 2018-05-14 Richard Biener <rguenther@suse.de>
7788
7789 * doc/match-and-simplify.texi: Adjust :s documentation.
7790
7791 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
7792
7793 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
7794 intended memcpy size.
7795 (REORDER_45): Likewise.
7796
7797 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
7798
7799 * sort.cc: New file.
7800 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
7801 * vec.c (qsort_chk): Use gcc_qsort.
7802 * Makefile.in (OBJS-libcommon): Add sort.o.
7803 (build/sort.o): New target. Use it...
7804 (BUILD_RTL): ... here, and...
7805 (build/gencfn-macros): ... here, and...
7806 (build/genmatch): ... here.
7807
7808 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7809 Chung-Ju Wu <jasonwucj@gmail.com>
7810
7811 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
7812 * config/nds32/nds32-graywolf.md: New file.
7813 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
7814 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
7815 pipeline.
7816 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
7817 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
7818 * config/nds32/nds32.md (pipeline_model): Add graywolf.
7819 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
7820 * config/nds32/pipelines.md: Include n15 settings.
7821
7822 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7823 Chung-Ju Wu <jasonwucj@gmail.com>
7824
7825 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
7826 * config/nds32/nds32-n13.md: New file.
7827 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
7828 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
7829 pipeline.
7830 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
7831 * config/nds32/nds32.md (pipeline_model): Add n13.
7832 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
7833 * config/nds32/pipelines.md: Include n13 settings.
7834
7835 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7836 Chung-Ju Wu <jasonwucj@gmail.com>
7837
7838 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
7839 * config/nds32/nds32-n10.md: New file.
7840 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
7841 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
7842 pipeline.
7843 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
7844 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
7845 * config/nds32/nds32.md (pipeline_model): Add n10.
7846 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
7847 * config/nds32/pipelines.md: Include n10 settings.
7848
7849 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
7850 Kito Cheng <kito.cheng@gmail.com>
7851 Chung-Ju Wu <jasonwucj@gmail.com>
7852
7853 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
7854 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7855 Add enum values for DSP extension instructions.
7856 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
7857 New constraints.
7858 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
7859 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
7860 New code iterators.
7861 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
7862 * config/nds32/nds32-dspext.md: New file for DSP implementation.
7863 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
7864 * config/nds32/nds32-intrinsic.md: Likewise.
7865 * config/nds32/nds32_intrinsic.h: Likewise.
7866 * config/nds32/nds32-md-auxiliary.c: Likewise.
7867 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
7868 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
7869 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
7870 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
7871 * config/nds32/nds32-protos.h: New declarations for DSP extension.
7872 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
7873 TYPE_DMAC in switch statement.
7874 * config/nds32/nds32.c: New checking and implementation for DSP
7875 extension instructions.
7876 * config/nds32/nds32.h: Likewise.
7877 * config/nds32/nds32.md: Likewise.
7878 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
7879 * config/nds32/predicates.md: Implement new predicates for DSP
7880 extension.
7881
7882 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7883
7884 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
7885 Reformat alternatives and attributes so it is easier to identify
7886 which constraints/attributes go with which instruction.
7887 (mov<mode>_hardfloat32, FMOVE64): Likewise.
7888 (mov<mode>_softfloat32, FMOVE64): Likewise.
7889 (mov<mode>_hardfloat64, FMOVE64): Likewise.
7890 (mov<mode>_softfloat64, FMOVE64): Likewise.
7891
7892 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
7893
7894 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7895 subsection.
7896 (Basic PowerPC Built-in Functions): The new name of the
7897 subsection previously known as "PowerPC Built-in Functions".
7898 (Basic PowerPC Built-in Functions Available on all Configurations):
7899 New subsubsection.
7900 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
7901 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
7902 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
7903 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
7904
7905 2018-05-11 Martin Jambor <mjambor@suse.cz>
7906
7907 PR ipa/85655
7908 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
7909 single const.
7910
7911 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
7912
7913 PR target/85733
7914 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
7915
7916 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
7917
7918 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
7919 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
7920 (ix86_handle_option): Handle -mwaitpkg.
7921 * config.gcc: New header.
7922 * config/i386/cpuid.h (bit_WAITPKG): New bit.
7923 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
7924 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
7925 function type.
7926 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7927 OPTION_MASK_ISA_WAITPKG.
7928 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
7929 (ix86_option_override_internal): Add PTA_WAITPKG.
7930 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
7931 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
7932 IX86_BUILTIN_TPAUSE.
7933 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
7934 __builtin_ia32_umwait and __builtin_ia32_tpause.
7935 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
7936 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
7937 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
7938 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
7939 UNSPECV_TPAUSE): New.
7940 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
7941 * config/i386/i386.opt: Add -mwaitpkg.
7942 * config/i386/waitpkgintrin.h: New file.
7943 * config/i386/x86intrin.h: New header.
7944 * doc/invoke.texi: Add -mwaitpkg.
7945
7946 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
7947
7948 PR target/85606
7949 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
7950 equivalent.
7951 (cortex-m0): Use armv6s-m isa.
7952 (cortex-m0plus): Likewise.
7953 (cortex-m1): Likewise.
7954 (cortex-m0.small-multiply): Likewise.
7955 (cortex-m0plus.small-multiply): Likewise.
7956 (cortex-m1.small-multiply): Likewise.
7957
7958 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
7959 Jakub Jelinek <jakub@redhat.com>
7960
7961 PR tree-optimization/85692
7962 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
7963 source permute as well.
7964
7965 2018-05-11 Martin Liska <mliska@suse.cz>
7966
7967 PR sanitizer/85556
7968 * doc/extend.texi: Document LLVM style format for no_sanitize
7969 attribute.
7970
7971 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
7972
7973 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
7974 mode_supports_vsx_dform_quad to mode_supports_dq_form.
7975 (mode_supports_vsx_dform_quad): Likewise.
7976 (mode_supports_vmx_dform): Move these functions to be next to the
7977 other mode_supports functions.
7978 (mode_supports_dq_form): Likewise.
7979 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
7980 mode_supports_dq_form.
7981 (reg_offset_addressing_ok_p): Likewise.
7982 (offsettable_ok_by_alignment): Likewise.
7983 (rs6000_legitimate_offset_address_p): Likewise.
7984 (legitimate_lo_sum_address_p): Likewise.
7985 (rs6000_legitimize_address): Likewise.
7986 (rs6000_legitimize_reload_address): Likewise.
7987 (rs6000_secondary_reload_inner): Likewise.
7988 (rs6000_preferred_reload_class): Likewise.
7989 (rs6000_output_move_128bit): Likewise.
7990
7991 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
7992
7993 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
7994 Generate SImode target register for null target.
7995 <case IX86_BUILTIN_XGETBV>: Ditto.
7996 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
7997 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
7998
7999 2018-05-10 Carl Love <cel@us.ibm.com>
8000
8001 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8002 dcbtt and dcbtstt if operands[2] is 0.
8003
8004 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8005
8006 PR target/85693
8007 * config/i386/sse.md (usadv64qi): New expander.
8008
8009 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
8010
8011 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
8012 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
8013 -maltivec=be support.
8014 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
8015 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
8016 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
8017 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
8018 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
8019 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
8020 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
8021 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
8022 altivec_vsumsws): Adjust.
8023 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
8024 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
8025 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
8026 support.
8027 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
8028 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
8029 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
8030 (altivec_lve<VI_char>x): Delete expand.
8031 (*altivec_lve<VI_char>x_internal): Rename to...
8032 (altivec_lve<VI_char>x): ... this.
8033 (altivec_lvxl_<mode>): Delete expand.
8034 (*altivec_lvxl_<mode>_internal): Rename to ...
8035 (altivec_lvxl_<mode>): ... this.
8036 (altivec_stvxl_<mode>): Delete expand.
8037 (*altivec_stvxl_<mode>_internal): Rename to ...
8038 (altivec_stvxl_<mode>): ... this.
8039 (altivec_stve<VI_char>x): Delete expand.
8040 (*altivec_stve<VI_char>x_internal): Rename to ...
8041 (altivec_stve<VI_char>x): ... this.
8042 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
8043 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
8044 reduc_plus_scal_<mode>): Adjust.
8045 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
8046 comment.
8047 (rs6000_cpu_cpp_builtins): Adjust.
8048 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
8049 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
8050 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
8051 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
8052 -maltivec=be support.
8053 (rs6000_split_vec_extract_var): Adjust.
8054 (rs6000_split_v4si_init): Adjust.
8055 (swap_selector_for_mode): Delete.
8056 (altivec_expand_lvx_be, altivec_expand_stvx_be,
8057 altivec_expand_stvex_be): Delete.
8058 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
8059 -maltivec=be support.
8060 (rs6000_gimple_fold_builtin): Ditto.
8061 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
8062 Adjust.
8063 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
8064 (TARGET_DIRECT_MOVE_64BIT): Adjust.
8065 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
8066 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
8067 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
8068 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
8069 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
8070 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
8071 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
8072 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
8073 anonymous split): Adjust.
8074 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
8075 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
8076
8077 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
8078
8079 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
8080 when --with-gxx-include-dir is also specified.
8081 * configure: Regenerate.
8082
8083 2018-05-09 Jim Wilson <jimw@sifive.com>
8084
8085 PR target/84797
8086 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
8087 * config/riscv/t-withmultilib: New.
8088 * config/riscv/withmultilib.h: New.
8089 * doc/install.texi: Document RISC-V --with-multilib-list support.
8090
8091 2018-05-09 Richard Biener <rguenther@suse.de>
8092
8093 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
8094 vector.
8095 (vect_bb_vectorization_profitable_p): Adjust. Compute
8096 actual scalar cost using the cost vector and the add_stmt_cost
8097 machinery.
8098
8099 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8100
8101 PR rtl-optimization/85645
8102 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
8103 in the REG_CFA_REGISTER note for LR, don't leave it empty.
8104
8105 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8106
8107 PR rtl-optimization/85645
8108 * shrink-wrap.c (spread_components): Return a boolean saying if
8109 anything was changed.
8110 (try_shrink_wrapping_separate): Iterate spread_components until
8111 nothing changes anymore.
8112
8113 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8114
8115 PR rtl-optimization/85645
8116 * regrename.c (build_def_use): Also kill the chains that include the
8117 destination of a REG_CFA_REGISTER note.
8118
8119 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8120
8121 PR rtl-optimization/85645
8122 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
8123 insn that has a REG_CFA_REGISTER note.
8124
8125 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
8126
8127 * cfgexpand.c (expand_clobber): New function.
8128 (expand_gimple_stmt_1): Use it.
8129 * tree-vect-stmts.c (vect_clobber_variable): New function,
8130 split out from...
8131 (vectorizable_simd_clone_call): ...here.
8132 (vectorizable_store): Emit a clobber either side of an
8133 IFN_STORE_LANES sequence.
8134 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
8135
8136 2018-05-09 Tom de Vries <tom@codesourcery.com>
8137
8138 PR target/85626
8139 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
8140 (define_insn "trap_if_false"): Add exit after trap.
8141
8142 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
8143
8144 PR rtl-optimization/85638
8145 * bb-reorder.c: Include common/common-target.h.
8146 (create_forwarder_block): New function extracted from...
8147 (fix_up_crossing_landing_pad): ...here. Rename into...
8148 (dw2_fix_up_crossing_landing_pad): ...this.
8149 (sjlj_fix_up_crossing_landing_pad): New function.
8150 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
8151 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
8152 from both partitions and exit the loop after one iteration.
8153
8154 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8155
8156 Revert:
8157 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8158 subsection.
8159 (Basic PowerPC Built-in Functions): The new name of the
8160 subsection previously known as "PowerPC Built-in Functions".
8161 (Basic PowerPC Built-in Functions Available on all Configurations):
8162 New subsubsection.
8163 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8164 subsubsection.
8165 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8166 subsubsection.
8167 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8168 subsubsection.
8169 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8170 subsubsection.
8171
8172 2018-05-08 Jim Wilson <jimw@sifive.com>
8173
8174 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
8175 (LD_EMUL_SUFFIX): New.
8176 (LINK_SPEC): Use it.
8177
8178 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8179
8180 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8181 subsection.
8182 (Basic PowerPC Built-in Functions): The new name of the
8183 subsection previously known as "PowerPC Built-in Functions".
8184 (Basic PowerPC Built-in Functions Available on all Configurations):
8185 New subsubsection.
8186 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8187 subsubsection.
8188 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8189 subsubsection.
8190 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8191 subsubsection.
8192 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8193 subsubsection.
8194
8195 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8196
8197 PR target/85683
8198 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
8199 after cmpelim optimization.
8200
8201 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
8202
8203 * config.gcc: Support "goldmont".
8204 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
8205 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8206 PROCESSOR_GOLDMONT.
8207 * config/i386/i386.c (m_GOLDMONT): Define.
8208 (processor_target_table): Add "goldmont".
8209 (PTA_GOLDMONT): Define.
8210 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
8211 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
8212 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
8213 (fold_builtin_cpu): Add "goldmont".
8214 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
8215 (ix86_option_override_internal): Add "goldmont".
8216 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
8217 (processor_type): Add PROCESSOR_GOLDMONT.
8218 * config/i386/i386.md: Add CPU "glm".
8219 * config/i386/glm.md: New file.
8220 * config/i386/x86-tune.def: Add m_GOLDMONT.
8221 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
8222
8223 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8224
8225 PR target/85572
8226 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
8227 E_V4DImode.
8228 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
8229 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
8230 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
8231
8232 PR target/85317
8233 * config/i386/i386.c (ix86_fold_builtin): Handle
8234 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
8235
8236 PR target/85480
8237 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
8238 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
8239
8240 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
8241
8242 PR target/85658
8243 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
8244 (check_arch): Likewise.
8245 (check_fpu): Return the result rather than printing it.
8246 (end arch): Fix operator precedence.
8247 (end cpu): Likewise.
8248 (END): Print the result from check_fpu.
8249
8250 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8251 Alan Hayward <alan.hayward@arm.com>
8252 David Sherwood <david.sherwood@arm.com>
8253
8254 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
8255 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
8256 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
8257 (*fcmuo<mode>_and): New patterns.
8258
8259 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8260
8261 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
8262 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
8263 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
8264 (cmp_op, sve_imm_con): New code attributes.
8265 (SVE_COND_INT_CMP, imm_con): Delete.
8266 (cmp_op): Remove above unspecs from int attribute.
8267 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
8268 to...
8269 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
8270 comparison-specific unspecs.
8271 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
8272 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
8273 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
8274 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
8275 (*vec_fcm<cmp_op><mode>): Rename to...
8276 (*fcm<cmp_op><mode>): ...this and adjust likewise.
8277 (*vec_fcmuo<mode>): Rename to...
8278 (*fcmuo<mode>): ...this and adjust likewise.
8279 (*pred_fcm<cmp_op><mode>): New pattern.
8280 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
8281 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
8282 functions.
8283 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
8284 and UNORDERED.
8285 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
8286 (aarch64_emit_sve_predicated_cond): New function.
8287 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
8288 (aarch64_emit_unspec_cond_or): Replace with...
8289 (aarch64_emit_sve_or_conds): ...this new function. Use
8290 aarch64_emit_sve_ptrue_op for the individual comparisons and
8291 aarch64_emit_binop to OR them together.
8292 (aarch64_emit_inverted_unspec_cond): Replace with...
8293 (aarch64_emit_sve_inverted_cond): ...this new function. Use
8294 aarch64_emit_sve_ptrue_op for the comparison and
8295 aarch64_emit_unop to invert the result.
8296 (aarch64_expand_sve_vec_cmp_float): Update after the above
8297 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
8298
8299 2018-05-07 Nathan Sidwell <nathan@acm.org>
8300
8301 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
8302 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
8303 (Backwards Compatibility): Likewise.
8304
8305 2018-05-07 Luis Machado <luis.machado@linaro.org>
8306
8307 PR bootstrap/85681
8308 Revert:
8309 2018-05-07 Luis Machado <luis.machado@linaro.org>
8310
8311 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8312 <prefetch_dynamic_strides>: New const bool field.
8313 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8314 prefetch_dynamic_strides.
8315 (exynosm1_prefetch_tune): Likewise.
8316 (thunderxt88_prefetch_tune): Likewise.
8317 (thunderx_prefetch_tune): Likewise.
8318 (thunderx2t99_prefetch_tune): Likewise.
8319 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8320 to false.
8321 (aarch64_override_options_internal): Update to set
8322 PARAM_PREFETCH_DYNAMIC_STRIDES.
8323 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8324 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8325 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8326 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8327 prefetch-dynamic-strides setting.
8328
8329 2018-05-07 Luis Machado <luis.machado@linaro.org>
8330
8331 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8332 <minimum_stride>: New const int field.
8333 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8334 minimum_stride field.
8335 (exynosm1_prefetch_tune): Likewise.
8336 (thunderxt88_prefetch_tune): Likewise.
8337 (thunderx_prefetch_tune): Likewise.
8338 (thunderx2t99_prefetch_tune): Likewise.
8339 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8340 (aarch64_override_options_internal): Update to set
8341 PARAM_PREFETCH_MINIMUM_STRIDE.
8342 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8343 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8344 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8345 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8346 stride is constant and is below the minimum stride threshold.
8347
8348 2018-05-07 Luis Machado <luis.machado@linaro.org>
8349
8350 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
8351 to 512.
8352
8353 2018-05-07 Luis Machado <luis.machado@linaro.org>
8354
8355 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8356 <prefetch_dynamic_strides>: New const bool field.
8357 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8358 prefetch_dynamic_strides.
8359 (exynosm1_prefetch_tune): Likewise.
8360 (thunderxt88_prefetch_tune): Likewise.
8361 (thunderx_prefetch_tune): Likewise.
8362 (thunderx2t99_prefetch_tune): Likewise.
8363 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8364 to false.
8365 (aarch64_override_options_internal): Update to set
8366 PARAM_PREFETCH_DYNAMIC_STRIDES.
8367 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8368 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8369 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8370 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8371 prefetch-dynamic-strides setting.
8372
8373 2018-05-07 Luis Machado <luis.machado@linaro.org>
8374
8375 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8376 <minimum_stride>: New const int field.
8377 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8378 minimum_stride field.
8379 (exynosm1_prefetch_tune): Likewise.
8380 (thunderxt88_prefetch_tune): Likewise.
8381 (thunderx_prefetch_tune): Likewise.
8382 (thunderx2t99_prefetch_tune): Likewise.
8383 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8384 (aarch64_override_options_internal): Update to set
8385 PARAM_PREFETCH_MINIMUM_STRIDE.
8386 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8387 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8388 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8389 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8390 stride is constant and is below the minimum stride threshold.
8391
8392 2018-05-06 Jakub Jelinek <jakub@redhat.com>
8393
8394 PR c++/85659
8395 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
8396 the type is addressable. Don't force op into register if it has
8397 BLKmode.
8398
8399 2018-05-05 Roland McGrath <mcgrathr@google.com>
8400
8401 PR other/77609
8402 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
8403 any section for which we don't know a specific type it should have,
8404 regardless of name. Previously this was done only for the exact
8405 names ".init_array", ".fini_array", and ".preinit_array".
8406 (default_elf_asm_named_section): Add comment about
8407 relationship with default_section_type_flags and SECTION_NOTYPE.
8408 (get_section): Don't consider it a type conflict if one side has
8409 SECTION_NOTYPE and the other doesn't, as long as neither has the
8410 SECTION_BSS et al used in the default_section_type_flags logic.
8411
8412 2018-05-05 Tom de Vries <tom@codesourcery.com>
8413
8414 PR target/85653
8415 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
8416 (workaround_barsyncs): New function.
8417 (nvptx_reorg): Use workaround_barsyncs.
8418 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8419 (define_expand "nvptx_membar_cta"): New define_expand.
8420 (define_insn "*nvptx_membar_cta"): New insn.
8421
8422 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
8423
8424 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
8425 To improve optimization opportunities.
8426 * builtin-types.def: The new needed builtin types for the above.
8427
8428 2018-05-04 Richard Biener <rguenther@suse.de>
8429
8430 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
8431 * gimple-ssa-store-merging.c
8432 (imm_store_chain_info::output_merged_store): Remove redundant create,
8433 release split_store vector contents on failure.
8434 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
8435 scalar stmt vector on cache hit.
8436
8437 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
8438
8439 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
8440 Xilinx FP support.
8441 * config.gcc (powerpc-xilinx-eabi*): Remove.
8442 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
8443 support.
8444 (fusion_addis_mem_combo_load): Ditto.
8445 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
8446 FP support.
8447 (rs6000_cpu_cpp_builtins): Ditto.
8448 * config/rs6000/rs6000-linux.c
8449 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
8450 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
8451 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
8452 support.
8453 (rs6000_setup_reg_addr_masks): Ditto.
8454 (rs6000_init_hard_regno_mode_ok): Ditto.
8455 (rs6000_option_override_internal): Ditto.
8456 (legitimate_lo_sum_address_p): Ditto.
8457 (rs6000_legitimize_address): Ditto.
8458 (rs6000_legitimize_reload_address): Ditto.
8459 (rs6000_legitimate_address_p): Ditto.
8460 (abi_v4_pass_in_fpr): Ditto.
8461 (setup_incoming_varargs): Ditto.
8462 (rs6000_gimplify_va_arg): Ditto.
8463 (rs6000_split_multireg_move): Ditto.
8464 (rs6000_savres_strategy): Ditto.
8465 (rs6000_emit_prologue_components): Ditto.
8466 (rs6000_emit_epilogue_components): Ditto.
8467 (rs6000_emit_prologue): Ditto.
8468 (rs6000_emit_epilogue): Ditto.
8469 (rs6000_elf_file_end): Ditto.
8470 (rs6000_function_value): Ditto.
8471 (rs6000_libcall_value): Ditto.
8472 * config/rs6000/rs6000.h: Ditto.
8473 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
8474 (TARGET_MINMAX): ... this. New.
8475 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
8476 * config/rs6000/rs6000.md: Remove Xilinx FP support.
8477 (*movsi_internal1_single): Delete.
8478 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
8479 mfpu=, mxilinx-fpu): Delete.
8480 * config/rs6000/singlefp.h: Delete.
8481 * config/rs6000/sysv4.h: Remove Xilinx FP support.
8482 * config/rs6000/t-rs6000: Ditto.
8483 * config/rs6000/t-xilinx: Delete.
8484 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
8485 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
8486 (VStype_simple): Delete.
8487 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
8488 * config/rs6000/xfpu.h: Delete.
8489 * config/rs6000/xfpu.md: Delete.
8490 * config/rs6000/xilinx.h: Delete.
8491 * config/rs6000/xilinx.opt: Delete.
8492 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
8493 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
8494
8495 2018-05-04 Tom de Vries <tom@codesourcery.com>
8496
8497 PR libgomp/85639
8498 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
8499 if ignore == 0.
8500
8501 2018-05-04 Richard Biener <rguenther@suse.de>
8502
8503 PR middle-end/85627
8504 * tree-complex.c (update_complex_assignment): We are always in SSA form.
8505 (expand_complex_div_wide): Likewise.
8506 (expand_complex_operations_1): Likewise.
8507 (expand_complex_libcall): Preserve EH info of the original stmt.
8508 (tree_lower_complex): Handle removed blocks.
8509 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
8510 on complex multiplication and division libcall builtins.
8511
8512 2018-05-04 Richard Biener <rguenther@suse.de>
8513
8514 PR middle-end/85574
8515 * fold-const.c (negate_expr_p): Restrict negation of operand
8516 zero of a division to when we know that can happen without
8517 overflow.
8518 (fold_negate_expr_1): Likewise.
8519
8520 2018-05-04 Jakub Jelinek <jakub@redhat.com>
8521
8522 PR libstdc++/85466
8523 * real.h (real_nextafter): Declare.
8524 * real.c (real_nextafter): New function.
8525 * fold-const-call.c (fold_const_nextafter): New function.
8526 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
8527 CASE_CFN_NEXTTOWARD.
8528 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
8529 even when arg1_mode is different from arg0_mode.
8530
8531 2018-05-03 Nathan Sidwell <nathan@acm.org>
8532
8533 * doc/extend.texi (Deprecated Features): Remove
8534 -ffriend-injection.
8535 (Backwards Compatibility): Likewise.
8536 * doc/invoke.texi (C++ Language Options): Likewise.
8537 (C++ Dialect Options): Likewise.
8538
8539 2018-05-03 Jakub Jelinek <jakub@redhat.com>
8540
8541 PR target/85530
8542 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
8543 _mm512_mask_mullox_epi64): New intrinsics.
8544
8545 2018-05-03 Tom de Vries <tom@codesourcery.com>
8546
8547 PR testsuite/85106
8548 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8549 dump files): Add offload-tree.
8550
8551 2018-05-03 Richard Biener <rguenther@suse.de>
8552
8553 PR tree-optimization/85615
8554 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
8555 to loops not nested in BBs loop father to avoid creating multi-entry
8556 loops.
8557
8558 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8559
8560 PR tree-optimization/70291
8561 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
8562 arguments. Change return type to tree. Emit libcall as a new
8563 statement rather than replacing existing one when inplace_p is true.
8564 (expand_complex_multiplication_components): New function.
8565 (expand_complex_multiplication): Expand floating-point complex
8566 multiplication using the above.
8567 (expand_complex_division): Rename inner_type parameter to type.
8568 Update expand_complex_libcall call-site.
8569 (expand_complex_operations_1): Update expand_complex_multiplication
8570 and expand_complex_division call-sites.
8571
8572 2018-05-02 Jakub Jelinek <jakub@redhat.com>
8573
8574 PR target/85582
8575 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8576 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8577 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
8578 the highest significant bit of the shift count mask is clear. In
8579 check whether and[sq]i3 is needed verify that all significant bits
8580 of the shift count other than the highest are set.
8581
8582 2018-05-02 Tom de Vries <tom@codesourcery.com>
8583
8584 PR libgomp/82428
8585 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
8586 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
8587 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
8588 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
8589 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
8590 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
8591 __builtin_goacc_parlevel_size.
8592
8593 2018-05-02 Richard Biener <rguenther@suse.de>
8594
8595 PR tree-optimization/85597
8596 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
8597 do not use split vect_get_vec_defs call but call vect_get_slp_defs
8598 directly.
8599
8600 2018-05-02 Tom de Vries <tom@codesourcery.com>
8601
8602 PR testsuite/85106
8603 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8604 dump files): Add ltrans-tree.
8605
8606 2018-05-02 Tom de Vries <tom@codesourcery.com>
8607
8608 PR testsuite/85106
8609 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8610 dump files): Add wpa-ipa.
8611
8612 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
8613
8614 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
8615 powerpc*-*-linux*paired* target.
8616 * config/rs6000/750cl.h: Delete.
8617 * config/rs6000/paired.h: Delete.
8618 * config/rs6000/paired.md: Delete.
8619 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
8620 float support.
8621 * config/rs6000/rs6000-builtin.def: Remove paired float support.
8622 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
8623 comment. Remove paired float support.
8624 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
8625 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8626 VECTOR_PAIRED.
8627 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
8628 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
8629 declarations.
8630 * config/rs6000/rs6000.c: Remove paired float support.
8631 (paired_expand_vector_init, paired_expand_vector_move,
8632 paired_emit_vector_compare, paired_emit_vector_cond_expr,
8633 (paired_expand_lv_builtin, paired_expand_stv_builtin,
8634 paired_expand_builtin, paired_expand_predicate_builtin,
8635 paired_init_builtins): Delete.
8636 * config/rs6000/rs6000.h: Remove paired float support.
8637 * config/rs6000/rs6000.md: Remove paired float support.
8638 (move_from_CR_ov_bit): Delete.
8639 * config/rs6000/rs6000.opt (mpaired): Delete.
8640 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
8641 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
8642
8643 2018-05-02 Richard Biener <rguenther@suse.de>
8644
8645 PR middle-end/85567
8646 * gimplify.c (gimplify_save_expr): When in SSA form allow
8647 SAVE_EXPRs to compute to SSA vars.
8648
8649 2018-05-02 Jakub Jelinek <jakub@redhat.com>
8650
8651 PR target/85582
8652 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8653 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8654 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
8655 clobber operands[2], instead use a new pseudo. Formatting fixes.
8656
8657 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
8658
8659 PR tree-optimization/85586
8660 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
8661 exit early for statements in the same group if the accesses are
8662 not strided.
8663
8664 2018-05-02 Tom de Vries <tom@codesourcery.com>
8665
8666 PR lto/85451
8667 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
8668 error message.
8669
8670 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
8671
8672 PR tree-optimization/85143
8673 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
8674
8675 2018-05-01 Tom de Vries <tom@codesourcery.com>
8676
8677 PR lto/85451
8678 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
8679 not found" error message.
8680
8681 2018-05-01 Tom de Vries <tom@codesourcery.com>
8682
8683 PR other/83786
8684 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
8685 * vec.c (test_ordered_remove_if): New function.
8686 (vec_c_tests): Call test_ordered_remove_if.
8687 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
8688 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
8689 * tree-vect-patterns.c (vect_pattern_recog_1): Use
8690 VEC_ORDERED_REMOVE_IF.
8691
8692 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8693
8694 PR tree-optimization/82665
8695 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
8696 pointer subtraction where arguments come from a memchr call.
8697
8698 2018-05-01 Jakub Jelinek <jakub@redhat.com>
8699
8700 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
8701 --push-state --as-needed and --pop-state instead of --as-needed and
8702 --no-as-needed if ld supports it.
8703 * configure: Regenerated.
8704
8705 PR web/85578
8706 * doc/install.texi2html: Replace _002d with - and _002a with * in
8707 generated html files using sed.
8708
8709 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8710
8711 PR c++/85523
8712 * gcc-rich-location.c (blank_line_before_p): New function.
8713 (use_new_line): New function.
8714 (gcc_rich_location::add_fixit_insert_formatted): New function.
8715 * gcc-rich-location.h
8716 (gcc_rich_location::add_fixit_insert_formatted): New function.
8717
8718 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8719
8720 * selftest.c (assert_streq): Rename "expected" and "actual" to
8721 "val1" and "val2". Extend NULL-handling to cover both inputs
8722 symmetrically, while still requiring both to be non-NULL for a pass.
8723 * selftest.h (assert_streq): Rename "expected" and "actual" to
8724 "val1" and "val2".
8725 (ASSERT_EQ): Likewise.
8726 (ASSERT_EQ_AT): Likewise.
8727 (ASSERT_KNOWN_EQ): Likewise.
8728 (ASSERT_KNOWN_EQ_AT): Likewise.
8729 (ASSERT_NE): Likewise.
8730 (ASSERT_MAYBE_NE): Likewise.
8731 (ASSERT_MAYBE_NE_AT): Likewise.
8732 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
8733 the assertion to pass.
8734 (ASSERT_STREQ_AT): Likewise.
8735
8736 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8737
8738 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
8739 interaction with -pie.
8740
8741 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8742
8743 * selftest.h: Fix alphabetization of per-source-file selftest
8744 declarations.
8745
8746 2018-04-30 Jason Merrill <jason@redhat.com>
8747
8748 PR c++/61982 - dead stores to destroyed objects.
8749 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
8750 of clobber.
8751
8752 2018-04-30 Jason Merrill <jason@redhat.com>
8753
8754 * tree.c (build_clobber): New.
8755 * tree.h: Declare it.
8756 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
8757
8758 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8759
8760 * diagnostic-show-locus.c (layout::layout): Update for
8761 location_get_source_line returning a char_span.
8762 (struct char_span): Move to input.h.
8763 (struct correction): Update for fields in char_span becoming
8764 private.
8765 (struct source_line): Update for location_get_source_line
8766 returning a char_span.
8767 (layout::print_line): Likewise.
8768 * edit-context.c (edited_file::print_content): Likewise.
8769 (edited_file::print_diff_hunk): Likewise.
8770 (edited_file::print_run_of_changed_lines): Likewise.
8771 (edited_file::get_num_lines): Likewise.
8772 (edited_line::edited_line): Likewise.
8773 * final.c (asm_show_source): Likewise.
8774 * input.c (location_get_source_line): Convert return type
8775 from const char * to char_span, losing the final "line_len"
8776 param.
8777 (dump_location_info): Update for the above.
8778 (get_substring_ranges_for_loc): Likewise. Use a char_span
8779 when handling the literal within the line.
8780 (test_reading_source_line): Update for location_get_source_line
8781 returning a char_span.
8782 * input.h (class char_span): Move here from
8783 diagnostic-show-locus.c, converting from a struct to a class.
8784 Make data members private.
8785 (char_span::operator bool): New.
8786 (char_span::length): New.
8787 (char_span::get_buffer): New.
8788 (char_span::operator[]): New.
8789 (char_span::subspan): Make const.
8790 (char_span::xstrdup): New.
8791 (location_get_source_line): Convert return type from const char *
8792 to char_span, losing the final "line_size" param.
8793
8794 2018-04-30 Jan Hubicka <jh@suse.cz>
8795
8796 * lto-wrapper.c (ltrans_priorities): New static var.
8797 (cmp_priority): New.
8798 (run_gcc): Read priorities and if doing parallel build order
8799 the Makefile by them.
8800
8801 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8802
8803 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
8804
8805 2018-04-30 Richard Biener <rguenther@suse.de>
8806
8807 * tree-cfg.c (verify_address): Remove base argument, add
8808 flag whether to check TREE_ADDRESSABLE and do that.
8809 (verify_expr): Remove.
8810 (verify_types_in_gimple_reference): Add pieces from verify_expr.
8811 (verify_gimple_assign_single): Likewise.
8812 (verify_gimple_switch): Likewise.
8813 (verify_expr_location_1): Dereference tp once. Add (disabled)
8814 piece from verify_expr.
8815 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
8816
8817 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8818
8819 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
8820
8821 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8822
8823 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
8824 (small_data_pattern): Likewise.
8825 (arc_rewrite_small_data): Likewise.
8826 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
8827 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
8828 (get_symbol_alignment): New function.
8829 (legitimate_small_data_address_p): Likewise.
8830 (legitimate_scaled_address): Update, call
8831 legitimate_small_data_address_p.
8832 (output_sdata): New static variable.
8833 (arc_print_operand): Update how we handle small data operands.
8834 (arc_print_operand_address): Likewise.
8835 (arc_legitimate_address_p): Update, use
8836 legitimate_small_data_address_p.
8837 (arc_rewrite_small_data_p): Remove.
8838 (arc_rewrite_small_data_1): Likewise.
8839 (arc_rewrite_small_data): Likewise.
8840 (small_data_pattern): Likewise.
8841 (compact_sda_memory_operand): Update to use
8842 legitimate_small_data_address_p and get_symbol_alignment.
8843 (prepare_move_operands): Don't rewite sdata pattern.
8844 (prepare_extend_operands): Remove.
8845 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
8846 pattern.
8847 (zero_extendqisi2): Likewise.
8848 (zero_extendhisi2): Likewise.
8849 (extendqihi2): Likewise.
8850 (extendqisi2): Likewise.
8851 (extendhisi2): Likewise.
8852 (addsi3): Likewise.
8853 (subsi3): Likewise.
8854 (andsi3): Likewise.
8855 * config/arc/constraints.md (Usd): Change it to memory constraint.
8856
8857 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8858
8859 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
8860 as source of std instructions.
8861 * config/arc/arc.md (movsi_insn): Update pattern predicate to
8862 allow 6-bit constants as source for store instructions.
8863 (movdi_insn): Update instruction pattern to allow 6-bit constants
8864 as source for store instructions.
8865
8866 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8867
8868 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
8869
8870 2018-04-30 Nathan Sidwell <nathan@acm.org>
8871 Sandra Loosemore <sandra@codesourcery.com>
8872
8873 * dumpfile.c (dump_open): Allow '-' for stdout.
8874 * doc/invoke.texi (Developer Options): Document dump filename
8875 determination early. Document stdin/stdout selection.
8876
8877 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
8878
8879 Microblaze Target: PIC data text relative
8880
8881 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
8882 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
8883 Add declaration.
8884 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
8885 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
8886 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
8887 New addressing mode for data-text relative position indepenedent code.
8888 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
8889 'ADDRESS_SYMBOLIC_TXT_REL'.
8890 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
8891 (microblaze_legitimate_pic_operand): Exclude function calls from
8892 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
8893 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
8894 addresses cases.
8895 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8896 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8897 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
8898 for 'address + offset'.
8899 (microblaze_expand_prologue): Add new function prologue call for
8900 'r20' assignation.
8901 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
8902 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
8903 table in case of TARGET_PIC_DATA_TEXT_REL.
8904 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
8905 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
8906 Add new macros 'UNSPEC_TEXT',
8907 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
8908 + exclude function calls from 'UNSPEC_PLT' in case of data text
8909 relative mode.
8910 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8911 new target hook for generating address diff vector tables in case of
8912 flag_pic.
8913 * doc/tm.texi : Regenerate.
8914 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
8915 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
8916 of addr diff vector generation.
8917 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8918 target hook definition.
8919 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
8920 Add default function for generate_pic_addr_diff_vec -> flag_pic.
8921 * doc/invoke.texi (Add new pic option): Add new microblaze pic
8922 option for data text relative.
8923
8924 2018-04-30 Richard Biener <rguenther@suse.de>
8925
8926 * tree-chrec.h (evolution_function_is_constant_p): Remove
8927 redundant check.
8928 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
8929
8930 2018-04-30 Richard Biener <rguenther@suse.de>
8931
8932 PR bootstrap/85571
8933 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
8934
8935 2018-04-30 Richard Biener <rguenther@suse.de>
8936
8937 PR tree-optimization/28364
8938 PR tree-optimization/85275
8939 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
8940 copying first exit test.
8941
8942 2018-04-28 Mark Wielaard <mark@klomp.org>
8943
8944 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
8945 dwarf_version >= 5.
8946 (dwarf_AT): Handle DW_AT_addr_base.
8947 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
8948
8949 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
8950
8951 PR target/84431
8952 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
8953 (*ashl<dwi>3_doubleword_mask_1): Ditto.
8954 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
8955 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
8956
8957 2018-04-28 Richard Biener <rguenther@suse.de>
8958
8959 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
8960 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
8961 to reflect use. Only add interesting stmts.
8962
8963 2018-04-27 Martin Jambor <mjambor@suse.cz>
8964
8965 PR ipa/85549
8966 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
8967 the jump function allows for passing through aggregate values.
8968
8969 2018-04-27 David Malcolm <dmalcolm@redhat.com>
8970
8971 * input.h (in_system_header_at): Convert from macro to inline
8972 function.
8973 (from_macro_expansion_at): Likewise.
8974 (from_macro_definition_at): Likewise.
8975
8976 2018-04-27 Jeff Law <law@redhat.com>
8977
8978 * config.gcc: Mark tile* targets as deprecated/obsolete.
8979
8980 2018-04-27 Richard Biener <rguenther@suse.de>
8981
8982 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
8983 fix for ILP32.
8984
8985 2018-04-27 Richard Biener <rguenther@suse.de>
8986
8987 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
8988
8989 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
8990
8991 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
8992 with Yd constraint. Set "preferred_for_speed" attribute from
8993 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
8994 with Yd constraint.
8995 (*movdi_internal): Ditto.
8996 (movti_interunit splitters): Remove
8997 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
8998 (movdi_interunit splitters): Ditto.
8999 * config/i386/constraints.md (Ye): Remove.
9000 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
9001
9002 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9003
9004 PR target/85512
9005 * config/aarch64/constraints.md (Usg): Limit to 31.
9006 (Usj): Limit to 63.
9007
9008 2018-04-27 Jakub Jelinek <jakub@redhat.com>
9009
9010 PR tree-optimization/85529
9011 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
9012 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
9013 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
9014 zero extension or masking of the MSB bit.
9015 (optimize_range_tests): Add FIRST_BB argument, pass it through
9016 to optimize_range_tests_var_bound.
9017 (maybe_optimize_range_tests, reassociate_bb): Adjust
9018 optimize_range_tests callers.
9019
9020 2018-04-26 Richard Biener <rguenther@suse.de>
9021 Jakub Jelinek <jakub@redhat.com>
9022
9023 * cgraph.h (symbol_table): Just declare debug method here.
9024 * symtab.c (symbol_table::debug): Define.
9025
9026 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
9027
9028 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
9029
9030 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
9031
9032 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
9033 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
9034 (*movdi_internal): Substitute Yi and Yj constraint with x
9035 and Ym and Yn constraint with y constraint. Update "isa"
9036 attribute and set "preferred_for_speed" attribute from
9037 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
9038 (*movsi_internal): Ditto.
9039 (*movdf_internal): Ditto.
9040 (*movsf_internal): Ditto.
9041 (*zero_extendsidi2): Ditto.
9042 * config/i386/sse.md (vec_set<mode>_0): Ditto.
9043 (sse2_loadld): Ditto.
9044 (*vec_extract<ssevecmodelower>_0): Ditto.
9045 (*vec_extractv4si_0_zext_sse4): Ditto.
9046 (vec_concatv2di): Ditto.
9047 (*vec_dup<mode>): Ditto.
9048 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
9049 * config/i386/constraints.md (Yi): Remove.
9050 (Yj): Remove.
9051 (Ym): Remove.
9052 (Yn): Remove.
9053
9054 2018-04-26 Nathan Sidwell <nathan@acm.org>
9055
9056 * dumpfile.c (dump_open): New.
9057 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
9058 (dump_finish): Detect stdio/stderr by value not name.
9059
9060 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
9061
9062 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
9063
9064 2018-04-26 Tom de Vries <tom@codesourcery.com>
9065
9066 PR target/84952
9067 * config/nvptx/nvptx.c (verify_neutering_jumps)
9068 (verify_neutering_labels): New function
9069 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
9070
9071 2018-04-26 Tom de Vries <tom@codesourcery.com>
9072
9073 PR target/84025
9074 * config/nvptx/nvptx.c (needs_neutering_p): New function.
9075 (nvptx_single): Use needs_neutering_p to skip over insns that do not
9076 need neutering.
9077
9078 2018-04-26 Richard Biener <rguenther@suse.de>
9079 Tom de Vries <tom@codesourcery.com>
9080
9081 PR lto/85422
9082 * lto-streamer-out.c (output_function): Fixup loops if required to match
9083 discovery done in the reader.
9084
9085 2018-04-26 Richard Biener <rguenther@suse.de>
9086
9087 PR tree-optimization/85116
9088 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
9089 have a loop exit from the single latch predecessor. Remove
9090 case of header with just condition.
9091 (ch_base::copy_headers): Exclude infinite loops from any
9092 processing.
9093 (pass_ch::execute): Record exits.
9094
9095 2018-04-26 Richard Biener <rguenther@suse.de>
9096
9097 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
9098 prologue cost vector and pass it to vect_get_load_cost.
9099 (vect_get_peeling_costs_all_drs): Likewise.
9100 (vect_peeling_hash_get_lowest_cost): Likewise.
9101 (vect_enhance_data_refs_alignment): Likewise.
9102
9103 2018-04-26 Richard Biener <rguenther@suse.de>
9104
9105 PR middle-end/85450
9106 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
9107 checking of integer<->pointer conversions.
9108 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
9109 sign-/zero-extending pointer types.
9110 (expand_omp_for_static_chunk): Likewise.
9111
9112 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
9113 Jean Lee <xiaoyur347@gmail.com>
9114
9115 * config/mips/mips.c (mips_asan_shadow_offset): New function.
9116 (TARGET_ASAN_SHADOW_OFFSET): Define.
9117 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
9118 true for -fsanitize=address.
9119
9120 2018-04-25 Mark Wielaard <mark@klomp.org>
9121
9122 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
9123 shorter ones.
9124
9125 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9126
9127 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
9128 than "alu", remove explicit "memory" and "imm_disp" attributes.
9129 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
9130
9131 PR middle-end/85414
9132 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
9133 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
9134 gen_lowpart_no_emit.
9135
9136 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
9137
9138 PR target/85473
9139 * config/i386/i386.c (ix86_expand_builtin): Change memory
9140 operand to XI, extend p0 to Pmode.
9141 * config/i386/i386.md: Change unspec volatile and operand
9142 1 mode to XI, change operand 0 mode to P.
9143
9144 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9145
9146 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
9147 GET_MODE_MASK before any checking.
9148 (nds32_can_use_bset_p): Likewise.
9149 (nds32_can_use_btgl_p): Likewise.
9150
9151 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9152
9153 * config/nds32/nds32-doubleword.md: New define_split pattern for
9154 illegal register number.
9155
9156 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9157
9158 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
9159
9160 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9161
9162 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
9163
9164 2018-04-25 Richard Biener <rguenther@suse.de>
9165
9166 * lto-streamer.h (LTO_major_version): Bump to 8.
9167
9168 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9169
9170 * BASE-VER: Set to 9.0.0.
9171
9172 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
9173
9174 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
9175 in __abskf2 and __powikf2.
9176
9177 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9178
9179 PR target/85512
9180 * config/aarch64/constraints.md (Usg, Usj): New constraints.
9181 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
9182 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
9183 Use the above on operand 2. Reindent.
9184 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
9185
9186 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9187
9188 PR target/85485
9189 * common/config/i386/i386-common.c (ix86_handle_option): Don't
9190 handle OPT_mcet.
9191 * config/i386/i386.opt (mcet): Removed.
9192 * doc/install.texi: Remove -mcet documentation.
9193 * doc/invoke.texi: Likewise.
9194
9195 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9196
9197 PR target/85485
9198 * doc/install.texi: Remove -mcet from bootstrap-cet.
9199
9200 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9201
9202 PR target/85511
9203 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
9204 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
9205 if TARGET_64BIT.
9206
9207 PR target/85503
9208 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
9209 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
9210 containing a CONST_VECTOR.
9211
9212 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
9213
9214 * doc/install.texi: Update newlib dependency for nvptx.
9215
9216 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9217
9218 PR target/85508
9219 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
9220 instead of INTVAL when shifting x left.
9221
9222 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
9223
9224 PR tree-optimization/85478
9225 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
9226 vect_grouped_store_supported for single element vectors.
9227
9228 2018-04-24 Richard Biener <rguenther@suse.de>
9229
9230 PR target/85491
9231 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
9232 load cost increase to the case of non-constant step.
9233
9234 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9235
9236 PR target/84828
9237 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
9238 destination if any_malformed_asm.
9239
9240 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
9241
9242 PR middle-end/85496
9243 * expr.c (store_field): In the bitfield case, if the value comes from
9244 a function call and is returned in registers by means of a PARALLEL,
9245 do not change the mode of the temporary unless BLKmode and VOIDmode.
9246
9247 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
9248
9249 PR rtl-optimization/85423
9250 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
9251 dependencies to debug insns when the previous insn is non-debug.
9252
9253 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9254
9255 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
9256 enums into a single definition.
9257 (fls): Fix predicates and printing.
9258 (seti): Likewise.
9259
9260 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9261
9262 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
9263 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
9264 and short u6 immediate.
9265 (check_if_valid_sleep_operand): Remove.
9266 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
9267
9268 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9269
9270 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
9271 flag_always_save_lp condition.
9272 * config/nds32/nds32.opt (malways-save-lp): New option.
9273
9274 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9275
9276 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
9277 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
9278 * config/nds32/nds32.h
9279 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
9280 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
9281
9282 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9283
9284 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
9285 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
9286
9287 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9288 Chung-Ju Wu <jasonwucj@gmail.com>
9289
9290 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
9291 Declare.
9292 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
9293 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
9294
9295 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9296
9297 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
9298
9299 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9300
9301 * config/nds32/nds32-protos.h (nds32_data_alignment,
9302 nds32_local_alignment): Declare.
9303 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
9304 nds32_local_alignment): New functions.
9305 (TARGET_CONSTANT_ALIGNMENT): Define.
9306 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
9307
9308 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9309
9310 * config/nds32/nds32.c
9311 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
9312 (TARGET_MODES_TIEABLE_P): Likewise.
9313
9314 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9315
9316 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
9317 level Ofast and Og.
9318
9319 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
9320 Chung-Ju Wu <jasonwucj@gmail.com>
9321
9322 * config/nds32/constants.md (unspec_volatile_element): Add enum values
9323 for unaligned access.
9324 * config/nds32/nds32-intrinsic.c: Implementation of expanding
9325 unaligned access.
9326 * config/nds32/nds32-intrinsic.md: Likewise.
9327 * config/nds32/nds32_intrinsic.h: Likewise.
9328 * config/nds32/nds32.h (nds32_builtins): Likewise.
9329 * config/nds32/nds32.opt (munaligned-access): New option.
9330 * config/nds32/nds32.c (nds32_asm_file_start): Display
9331 flag_unaligned_access status.
9332
9333 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9334
9335 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
9336 -mno-relax is present.
9337 * config/riscv/linux.h (LINK_SPEC): Ditto.
9338
9339 2018-04-20 Martin Sebor <msebor@redhat.com>
9340
9341 PR c/85365
9342 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
9343 for null pointers.
9344 (gimple_fold_builtin_stxcpy_chk): Same.
9345 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
9346
9347 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
9348
9349 PR target/85456
9350 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
9351 __powikf2 when long double is IEEE 128-bit.
9352
9353 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9354
9355 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
9356 step to make sure stack always aligned.
9357
9358 2018-04-20 Carl Love <cel@us.ibm.com>
9359
9360 PR target/83402
9361 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
9362 size check for arg0.
9363
9364 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
9365 Tom de Vries <tom@codesourcery.com>
9366
9367 PR target/85445
9368 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
9369 Emit insns for calls too.
9370 (nvptx_find_par): Always look for worker-level predecessor insn.
9371 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
9372 calls.
9373 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
9374 (nvptx_process_pars): Propagate frames for calls.
9375
9376 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
9377
9378 PR target/85469
9379 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
9380 Removed.
9381 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
9382 (ix86_handle_option): Don't handle OPT_mibt.
9383 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
9384 __SHSTK__.
9385 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
9386 has_ibt and ibt.
9387 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
9388 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
9389 (ix86_target_macros): Define __CET__ with flag_cf_protection
9390 for -fcf-protection.
9391 * config/i386/i386.c (isa2_opts): Remove -mibt.
9392 * config/i386/i386.h (TARGET_IBT): Removed.
9393 (TARGET_IBT_P): Likewise.
9394 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
9395 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
9396 * config/i386/i386.opt (mcet): Update help message.
9397 (mshstk): Likewise.
9398 (mibt): Removed.
9399 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
9400 -mcet as an alias for -mshstk.
9401
9402 2018-04-20 Richard Biener <rguenther@suse.de>
9403
9404 PR middle-end/85475
9405 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
9406 complexity by forcing a single use of the multiply operand.
9407
9408 2018-04-20 Martin Jambor <mjambor@suse.cz>
9409
9410 ipa/85449
9411 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
9412 recursion dependency to only apply to non-clones.
9413
9414 2018-04-20 Martin Jambor <mjambor@suse.cz>
9415
9416 ipa/85447
9417 * ipa-cp.c (create_specialized_node): Check that clones of
9418 self-recursive edges exist during IPA-CP.
9419
9420 2018-04-19 Toon Moene <toon@moene.org>
9421
9422 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
9423 by -O3.
9424
9425 2018-04-19 Jakub Jelinek <jakub@redhat.com>
9426
9427 PR tree-optimization/85467
9428 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
9429 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
9430 VECTOR_CST element to type.
9431
9432 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9433
9434 PR target/85397
9435 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
9436 * config/i386/i386.md (builtin_setjmp_setup): Removed.
9437 (builtin_longjmp): Likewise.
9438 (save_stack_nonlocal): New pattern.
9439 (restore_stack_nonlocal): Likewise.
9440
9441 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9442
9443 PR target/85404
9444 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9445 Replace ASM_OUTPUT_LABEL with fprintf.
9446
9447 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9448
9449 PR target/85417
9450 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9451 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
9452 * config/i386/i386-c.c (ix86_target_macros_internal): Also
9453 define __IBT__ and __SHSTK__ for -fcf-protection.
9454 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
9455 TARGET_IBT.
9456 (ix86_trampoline_init): Likewise.
9457 (x86_output_mi_thunk): Likewise.
9458 (ix86_notrack_prefixed_insn_p): Likewise.
9459 (ix86_option_override_internal): Don't disallow -fcf-protection.
9460 * config/i386/i386.md (rdssp<mode>): Also enable for
9461 -fcf-protection.
9462 (incssp<mode>): Likewise.
9463 (nop_endbr): Likewise.
9464 * config/i386/i386.opt (mcet): Change help message to built-in
9465 functions only.
9466 (mibt): Likewise.
9467 (mshstk): Likewise.
9468 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
9469 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
9470 enable CET built-in functions.
9471
9472 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
9473
9474 * common/config/i386/i386-common.c
9475 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
9476 OPTION_MASK_ISA_MOVDIRI_UNSET,
9477 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
9478 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
9479 * config.gcc (movdirintrin.h): New header.
9480 * config/i386/cpuid.h (bit_MOVDIRI,
9481 bit_MOVDIR64B): New bits.
9482 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
9483 and -mmvodir64b.
9484 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
9485 (VOID, PVOID, PCVOID)): New function types.
9486 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
9487 __builtin_ia32_directstoreu_u64,
9488 __builtin_ia32_movdir64b): New builtins.
9489 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
9490 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
9491 and -mmovdiri.
9492 (ix86_valid_target_attribute_inner_p): Ditto.
9493 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
9494 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
9495 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
9496 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
9497 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
9498 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
9499 (movdiri<mode>, movdir64b_<mode>): New.
9500 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
9501 * config/i386/immintrin.h: Include movdirintrin.h.
9502 * config/i386/movdirintrin.h: New file.
9503 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
9504
9505 2018-04-19 Richard Biener <rguenther@suse.de>
9506
9507 PR middle-end/85455
9508 * cfg.c (clear_bb_flags): When loop state says we have
9509 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
9510
9511 2018-04-19 Richard Biener <rguenther@suse.de>
9512
9513 PR tree-optimization/84737
9514 * tree-vect-data-refs.c (vect_copy_ref_info): New function
9515 copying restrict info.
9516 (vect_setup_realignment): Use it.
9517 * tree-vectorizer.h (vect_copy_ref_info): Declare.
9518 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
9519 the first DR to all generated stores.
9520 (vectorizable_load): Likewise for loads.
9521
9522 2018-04-19 Jakub Jelinek <jakub@redhat.com>
9523
9524 PR tree-optimization/85446
9525 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
9526 the integral and pointer types to have the same precision.
9527
9528 * doc/install.texi: Document --disable-cet being the default and
9529 --enable-cet=auto.
9530
9531 2018-04-18 Martin Liska <mliska@suse.cz>
9532
9533 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
9534 style.
9535
9536 2018-04-18 Martin Liska <mliska@suse.cz>
9537
9538 Revert
9539 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
9540
9541 PR ipa/83983
9542 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9543 arguments if they are comparable.
9544
9545 2018-04-18 Martin Liska <mliska@suse.cz>
9546
9547 Revert
9548 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
9549
9550 PR lto/84805
9551 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9552 incomplete types.
9553
9554 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
9555
9556 PR target/85388
9557 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
9558 ENDBR after calling __morestack.
9559
9560 2018-04-18 David Malcolm <dmalcolm@redhat.com>
9561
9562 PR jit/85384
9563 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
9564 by using gcc_base_ver to generate a gcc_driver_version, and use
9565 it when generating GCC_DRIVER_NAME.
9566 * configure: Regenerate.
9567
9568 2018-04-18 Jakub Jelinek <jakub@redhat.com>
9569
9570 PR target/81084
9571 * config.gcc: Obsolete powerpc*-*-*spe*.
9572
9573 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9574
9575 PR debug/84637
9576 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
9577 (stabstr_D): Change type of unum from unsigned int to
9578 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
9579 type.
9580
9581 2018-04-17 Jim Wilson <jimw@sifive.com>
9582
9583 PR 84856
9584 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
9585 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
9586 Set arg_pointer_offset after using pretend_args_size.
9587
9588 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9589
9590 PR rtl-optimization/85431
9591 * dse.c (record_store): Ignore zero width stores.
9592
9593 PR sanitizer/85230
9594 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
9595 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
9596 __builtin_stack_restore rather than after it.
9597 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
9598 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
9599 argument instead of virtual_dynamic_stack_rtx.
9600
9601 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
9602
9603 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
9604 New prototype.
9605 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9606 Add note to error message to explain internal mapping of overloaded
9607 built-in function name to non-overloaded built-in function name.
9608 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
9609 function.
9610
9611 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
9612
9613 PR target/85424
9614 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
9615 where the inputs overlap with the output.
9616
9617 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9618
9619 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
9620 (=v, v) alternative and explicit "memory" attribute.
9621 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
9622 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9623 attributes.
9624 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
9625 "sselog1" type instead of "sselog".
9626 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
9627 "sselog". Remove explicit "memory" attribute.
9628 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
9629 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9630 attributes.
9631 (vec_extract_hi_v32hi): Merge all alternatives into one, use
9632 "sselog1" type instead of "sselog". Remove explicit "memory"
9633 attribute.
9634 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
9635 use "sselog1" type instead of "sselog". Remove explicit "memory"
9636 attribute.
9637 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
9638 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9639 attributes.
9640 (vec_extract_hi_v64qi): Merge all alternatives into one, use
9641 "sselog1" type instead of "sselog". Remove explicit "memory"
9642 attribute.
9643 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
9644 use "sselog1" type instead of "sselog". Remove explicit "memory"
9645 attribute.
9646
9647 PR target/85430
9648 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
9649
9650 PR middle-end/85414
9651 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
9652 on a SUBREG.
9653
9654 2018-04-17 Martin Jambor <mjambor@suse.cz>
9655
9656 PR ipa/85421
9657 * ipa-cp.c (create_specialized_node): Call
9658 expand_all_artificial_thunks if necessary.
9659
9660 2018-04-17 Martin Liska <mliska@suse.cz>
9661
9662 PR lto/85405
9663 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
9664 in message, remote space in between '_G' and '('.
9665
9666 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9667
9668 PR target/85281
9669 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
9670 avx512f_vmcmp<mode>3<round_saeonly_name>,
9671 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
9672 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
9673 avx512f_rndscale<mode><round_saeonly_name>,
9674 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
9675 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
9676 Use %<iptr>2 instead of %2 for -masm=intel.
9677 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
9678 avx512f_vcvttss2usi<round_saeonly_name>,
9679 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
9680 -masm=intel.
9681 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
9682 avx512f_vcvttsd2usi<round_saeonly_name>,
9683 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
9684 Use %q1 instead of %1 for -masm=intel.
9685 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
9686 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
9687 of %3 for -masm=intel.
9688 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
9689 -masm=intel.
9690 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
9691 -masm=intel.
9692 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
9693 -masm=intel.
9694 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
9695 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
9696 %g1.
9697 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
9698 -masm=intel.
9699 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
9700 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
9701 %g1 and one with %0 and %1.
9702 (avx512er_vmrcp28<mode><round_saeonly_name>,
9703 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
9704 %1 for -masm=intel.
9705 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
9706 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
9707 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
9708 of %0 and %{%4%} for -masm=intel.
9709 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
9710 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
9711 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
9712 order of %0 and %{%5%}%{z%} for -masm=intel.
9713
9714 2018-04-17 Jan Hubicka <jh@suse.cz>
9715
9716 PR lto/85405
9717 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
9718
9719 2018-04-17 Martin Liska <mliska@suse.cz>
9720
9721 PR ipa/85329
9722 * multiple_target.c (create_dispatcher_calls): Set apostrophes
9723 for target_clone error message. Make default implementation
9724 clone to be a local declaration.
9725 (separate_attrs): Add new argument and check for an empty
9726 string.
9727 (expand_target_clones): Handle it.
9728 (ipa_target_clone): Make redirection just for target_clones
9729 functions.
9730
9731 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
9732 Tom de Vries <tom@codesourcery.com>
9733
9734 PR middle-end/84955
9735 * omp-expand.c (expand_oacc_for): Add dummy false branch for
9736 tiled basic blocks without omp continue statements.
9737
9738 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
9739
9740 PR target/83660
9741 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
9742 vec_extract expression as having side effects to make sure it gets
9743 a cleanup point.
9744
9745 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
9746
9747 PR target/85403
9748 * config/i386/i386.c (get_builtin_code_for_version): Check
9749 error_mark_node.
9750
9751 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
9752
9753 PR target/84331
9754 * gcc/config.gcc: Support "skylake".
9755 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
9756 PROCESSOR_SKYLAKE.
9757 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
9758 (processor_target_table): Add "skylake".
9759 (ix86_option_override_internal): Add "skylake".
9760 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
9761 PROCESSOR_CANNONLAKE.
9762 (get_builtin_code_for_version): Fix priority for
9763 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
9764 PROCESSOR_SKYLAKE-AVX512.
9765 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
9766 (processor_type): Add PROCESSOR_SKYLAKE.
9767
9768 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
9769 Jason Merrill <jason@redhat.com>
9770
9771 PR c++/85112
9772 * convert.c (convert_to_integer_1): Use direct recursion for
9773 enumeral types and types with a precision less than the number
9774 of bits in their mode.
9775
9776 2018-04-16 Julia Koval <julia.koval@intel.com>
9777
9778 PR target/84413
9779 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
9780 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
9781
9782 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
9783
9784 PR target/85293
9785 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
9786 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
9787 and -mno-direct-move.
9788
9789 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
9790
9791 PR target/83402
9792 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
9793 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
9794 Ensure negative shifts result in {0}.
9795
9796 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
9797
9798 PR rtl-optimization/79916
9799 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
9800 regs (if any) to define how to gnerate SD moves when LRA is in
9801 progress.
9802
9803 2018-04-13 Jakub Jelinek <jakub@redhat.com>
9804
9805 PR rtl-optimization/85393
9806 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
9807 * except.c (expand_dw2_landing_pad_for_region): Make static.
9808 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
9809 a label and unconditional jump to old_bb, rather than
9810 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
9811 basic block.
9812
9813 PR rtl-optimization/85376
9814 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
9815 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
9816 instead of a specific value.
9817
9818 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9819 Bin Cheng <bin.cheng@arm.com>
9820
9821 PR tree-optimization/82965
9822 PR tree-optimization/83991
9823 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
9824 by_profile_only parameter.
9825 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
9826 information if the loop was predicted to iterate too many times.
9827 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
9828
9829 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9830
9831 PR lto/71991
9832 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
9833 always inline.
9834
9835 2018-04-13 Martin Liska <mliska@suse.cz>
9836 Jakub Jelinek <jakub@redhat.com>
9837
9838 PR middle-end/81657
9839 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
9840 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
9841 * builtins.c (expand_builtin_memory_copy_args): Use
9842 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
9843 handle dest_addr == pc_rtx.
9844
9845 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
9846
9847 PR target/85291
9848 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
9849 asked to not generate direct moves.
9850 (fix_trunc<mode>si2_stfiwx): Similar.
9851 (fix_trunc<mode>si2_internal): Similar.
9852
9853 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9854
9855 PR debug/83157
9856 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
9857 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
9858 lookup if dest in some wider mode is known to be const0_rtx and
9859 if so, record permanent equivalence for it to be ZERO_EXTEND of
9860 the narrower mode destination.
9861
9862 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9863
9864 * lto-streamer-out.c (output_function): Revert 259346.
9865 * omp-expand.c (expand_oacc_for): Likewise.
9866
9867 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
9868
9869 PR rtl-optimization/85354
9870 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
9871 * sel-sched.c (sel_global_init): ... here.
9872
9873 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
9874
9875 PR target/85238
9876 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
9877 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9878 mode for PE-COFF targets.
9879 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
9880 (i386_pe_asm_lto_end): Likewise.
9881 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
9882 (TARGET_ASM_LTO_END): Likewise.
9883 * config/i386/winnt.c (saved_debug_info_level): New static variable.
9884 (i386_pe_asm_lto_start): New function.
9885 (i386_pe_asm_lto_end): Likewise.
9886
9887 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9888 Richard Biener <rguenther@suse.de>
9889
9890 PR middle-end/84955
9891 * lto-streamer-out.c (output_function): Fix CFG loop state before
9892 streaming out.
9893 * omp-expand.c (expand_oacc_for): Handle calls to internal
9894 functions like regular functions.
9895
9896 2018-04-12 Richard Biener <rguenther@suse.de>
9897
9898 PR lto/85371
9899 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
9900 for the early LTO debug to properly generate references to it
9901 during DIE emission. Do not re-use that for the skeleton for
9902 split-dwarf.
9903 (dwarf2out_early_finish): Likewise.
9904
9905 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9906
9907 PR target/85328
9908 * config/i386/sse.md
9909 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
9910 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
9911 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
9912 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
9913 and output is a reg, avoid creating invalid lowpart subreg, but
9914 instead split into a 512-bit move. Don't split if not AVX512VL,
9915 input is xmm16+ reg and output is a mem.
9916 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
9917 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
9918 xmm16+ reg and output is a mem.
9919
9920 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9921
9922 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
9923 also for flag_dwarf2_cfi_asm.
9924
9925 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9926
9927 PR rtl-optimization/85342
9928 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
9929 a bool scalar var inside of the loop instead. Don't try to update
9930 recog_data.operand after failed apply_change_group.
9931
9932 2018-04-12 Tom de Vries <tom@codesourcery.com>
9933
9934 PR target/85296
9935 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
9936 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
9937 array with flexible array member as array without given dimension.
9938 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
9939 argument for undefined param to true.
9940
9941 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
9942
9943 PR target/85321
9944 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9945 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
9946 from PowerPC section.
9947 * config/rs6000/sysv4.opt (mcall-): Improve help text.
9948 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
9949 help text that is too long.
9950 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
9951 help text that is too long.
9952 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
9953 help text that is too long.
9954
9955 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
9956
9957 * config/alpha/alpha.md (stack_probe_internal): Rename
9958 from "probe_stack". Update all callers.
9959
9960 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9961
9962 PR rtl-optimization/84566
9963 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
9964 sched_macro_fuse_insns.
9965
9966 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9967
9968 PR target/84301
9969 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
9970 (compute_block_dependences): ... from here.
9971
9972 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9973
9974 PR tree-optimization/85331
9975 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
9976 from int to HOST_WIDE_INT.
9977
9978 2018-04-11 Martin Jambor <mjambor@suse.cz>
9979
9980 PR ipa/84149
9981 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
9982 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
9983 not the same as the source val.
9984 (cgraph_edge_brings_value_p): New parameter.
9985 (gather_edges_for_value): Pass destination value to
9986 cgraph_edge_brings_value_p.
9987 (perhaps_add_new_callers): Likewise.
9988 (get_info_about_necessary_edges): Likewise and exclude values brought
9989 only by self-recursive edges.
9990 (create_specialized_node): Redirect only clones of self-calling edges.
9991 (+self_recursive_pass_through_p): New function.
9992 (find_more_scalar_values_for_callers_subset): Use it.
9993 (find_aggregate_values_for_callers_subset): Likewise.
9994 (known_aggs_to_agg_replacement_list): Removed.
9995 (decide_whether_version_node): Re-calculate known constants for all
9996 remaining context clones.
9997
9998 2018-04-11 Richard Biener <rguenther@suse.de>
9999
10000 PR lto/85339
10001 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
10002 from early DWARF output.
10003 (dwarf2out_early_finish): Output line info unconditionally into
10004 early DWARF and add reference to it.
10005
10006 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10007
10008 PR target/85281
10009 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
10010 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
10011 other than V2DFmode using iptr mode attribute.
10012 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
10013
10014 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10015
10016 PR rtl-optimization/84659
10017 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
10018
10019 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10020
10021 PR debug/85302
10022 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
10023 SIZEP is NULL.
10024 (output_loc_list): Pass address of a dummy size variable even in the
10025 locview handling loop.
10026 (index_location_lists): Add comment on why skip_loc_list_entry can't
10027 call size_of_locs.
10028
10029 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
10030
10031 PR target/85261
10032 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
10033 into register.
10034
10035 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
10036
10037 PR target/85321
10038 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10039 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
10040 and -mstring-compare-inline-limit.
10041
10042 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10043
10044 PR target/85287
10045 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
10046 for stack clash protection in a register whenever we need it to be in
10047 a register.
10048
10049 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10050
10051 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
10052 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
10053
10054 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10055
10056 PR target/85321
10057 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
10058 the help text.
10059 (mlong-double-): Ditto.
10060 * config/rs6000/sysv4.opt (msdata=): Ditto.
10061 (mtls-size=): Ditto.
10062
10063 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
10064
10065 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10066 erroneous entries for
10067 "vector int vec_ldl (int, long int *)", and
10068 "vector unsigned int vec_ldl (int, unsigned long int *)".
10069 Add comments and entries for
10070 "vector bool char vec_ldl (int, bool char *)",
10071 "vector bool short vec_ldl (int, bool short *)",
10072 "vector bool int vec_ldl (int, bool int *)",
10073 "vector bool long long vec_ldl (int, bool long long *)",
10074 "vector pixel vec_ldl (int, pixel *)",
10075 "vector long long vec_ldl (int, long long *)",
10076 "vector unsigned long long vec_ldl (int, unsigned long long *)".
10077 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
10078 type tree bool_long_long_type_node and correct definition of
10079 bool_V2DI_type_node to make reference to this new type tree.
10080 (rs6000_mangle_type): Replace erroneous reference to
10081 bool_long_type_node with bool_long_long_type_node.
10082 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
10083 comments to emphasize sign distinctions for char and int types and
10084 replace RS6000_BTI_bool_long constant with
10085 RS6000_BTI_bool_long_long constant. Also add comment to restrict
10086 use of RS6000_BTI_pixel.
10087 (bool_long_type_node): Remove this macro definition.
10088 (bool_long_long_type_node): New macro definition
10089
10090 2018-04-10 Jakub Jelinek <jakub@redhat.com>
10091
10092 PR rtl-optimization/85300
10093 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
10094 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
10095 simplify_unary_operation fails.
10096
10097 2018-04-10 Martin Liska <mliska@suse.cz>
10098
10099 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
10100 cgraph_edge and ipa_ref.
10101
10102 2018-04-10 Jakub Jelinek <jakub@redhat.com>
10103
10104 PR target/85177
10105 PR target/85255
10106 * config/i386/sse.md
10107 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
10108 computation of the VEC_MERGE selector from mask.
10109 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
10110 Fix decoding of the VEC_MERGE selector into mask.
10111
10112 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10113
10114 PR tree-optimization/85286
10115 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
10116
10117 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10118
10119 * final.c (final_1): Set insn_last_address as well as
10120 insn_current_address.
10121
10122 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10123
10124 PR target/85173
10125 * explow.c (emit_stack_probe): Call validize_mem on memory location
10126 before passing it to gen_probe_stack. Create address operand and
10127 legitimize it for the probe_stack_address case.
10128
10129 2018-04-09 Jan Hubicka <jh@suse.cz>
10130
10131 PR lto/85078
10132 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
10133 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
10134 * tree.c (free_lang_data_in_type): Fix handling of binfos;
10135 walk basetypes.
10136 (free_lang_data): Rebuild type inheritance graph.
10137
10138 2018-04-09 Martin Sebor <msebor@redhat.com>
10139
10140 * invoke.texi (-finline-small-functions): Mention other optimization
10141 options.
10142 (-findirect-inlining, -fpartial-inlining): Same.
10143 (-finline-functions-called-once): Same.
10144 (-freorder-blocks-and-partition): Same.
10145
10146 2018-04-09 Jan Hubicka <jh@suse.cz>
10147
10148 PR rtl/84058
10149 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
10150 jumps; choose last target that matches the criteria (i.e.
10151 no partition changes for non-crossing jumps).
10152 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
10153 support for redirecting crossing jumps to non-crossing.
10154
10155 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
10156
10157 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
10158 also for naked functions.
10159
10160 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
10161
10162 * config/arc/arc.md (add_shift): New pattern.
10163 (add_shift2): Likewise.
10164 (sub_shift): Likewise.
10165 (sub_shift_cmp0_noout): Likewise.
10166 (compare_si_ashiftsi): Likewise.
10167 (xbfu_cmp0_noout): New combine pattern.
10168 (xbfu_cmp0"): Likewise.
10169 (movsi_set_cc_insn): Place the predicable variant first.
10170 (commutative_binary_cmp0_noout): Remove clobber.
10171 (commutative_binary_cmp0): New pattern.
10172 (noncommutative_binary_cmp0): Likewise.
10173 (noncommutative_binary_cmp0_noout): Likewise.
10174 (noncommutative_binary_comparison_result_used): Removed.
10175 (rsub_cmp0): New pattern.
10176 (rsub_cmp0_noout): Likewise.
10177 (extzvsi): Changed, keep only meaningful variants.
10178 (SQH, SEZ): New iterators.
10179 (SQH_postfix): New mode attribute.
10180 (SEZ_prefix): New code attribute.
10181 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
10182 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
10183 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
10184 of numerical value.
10185 (noncommutative_operator): Check the availability of barrel
10186 shifter option.
10187
10188 2018-04-09 Richard Biener <rguenther@suse.de>
10189
10190 PR tree-optimization/85284
10191 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
10192 Only use the niter constraining form of simple_iv when the exit
10193 is always executed.
10194
10195 2018-04-09 Tom de Vries <tom@codesourcery.com>
10196
10197 PR target/84041
10198 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10199 (define_expand "*memory_barrier"): New define_expand.
10200 (define_insn "memory_barrier"): New insn.
10201
10202 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10203
10204 PR rtl-optimization/80463
10205 PR rtl-optimization/83972
10206 PR rtl-optimization/83480
10207
10208 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
10209 correct producer for the insn.
10210 (tidy_control_flow): Fixup seqnos in case of debug insns.
10211
10212 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10213
10214 PR rtl-optimization/83913
10215
10216 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
10217 different sched-times when merging exprs.
10218
10219 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10220
10221 PR rtl-optimization/83962
10222
10223 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
10224 tidy_fallthru_edge and tidy_control_flow.
10225
10226 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10227
10228 PR rtl-optimization/83530
10229
10230 * sel-sched.c (force_next_insn): New global variable.
10231 (remove_insn_for_debug): When force_next_insn is true, also leave only
10232 next insn in the ready list.
10233 (sel_sched_region): When the region wasn't scheduled, make another pass
10234 over it with force_next_insn set to 1.
10235
10236 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10237
10238 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
10239 into tm_file.
10240 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10241 for interrupt control.
10242 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10243 functions for interrupt control.
10244 * config/nds32/nds32-intrinsic.md: Likewise.
10245 * config/nds32/nds32_intrinsic.h: Likewise.
10246 * config/nds32/nds32.h (nds32_builtins): Likewise.
10247
10248 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10249
10250 * config/nds32/nds32.c (nds32_init_machine_status,
10251 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
10252 strict_aligned_p field.
10253 (nds32_expand_to_rtl_hook): New function.
10254 (TARGET_EXPAND_TO_RTL_HOOK): Define.
10255 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
10256
10257 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10258 Chung-Ju Wu <jasonwucj@gmail.com>
10259
10260 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
10261 * config/nds32/nds32-n7.md: New file.
10262 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
10263 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
10264 pipeline.
10265 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
10266 * config/nds32/nds32.md (pipeline_model): Add n7.
10267 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
10268 * config/nds32/pipelines.md: Include n7 settings.
10269
10270 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10271 Chung-Ju Wu <jasonwucj@gmail.com>
10272
10273 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
10274 * config/nds32/nds32-e8.md: New file.
10275 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
10276 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
10277 pipeline.
10278 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
10279 * config/nds32/nds32.md (pipeline_model): Add e8.
10280 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
10281 * config/nds32/pipelines.md: Include e8 settings.
10282
10283 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10284 Chung-Ju Wu <jasonwucj@gmail.com>
10285
10286 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
10287 * config/nds32/nds32-n8.md: New file.
10288 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
10289 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
10290 pipeline.
10291 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
10292 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
10293 * config/nds32/nds32.md (pipeline_model): Add n8.
10294 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
10295 * config/nds32/pipelines.md: Include n8 settings.
10296
10297 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10298 Chung-Ju Wu <jasonwucj@gmail.com>
10299
10300 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
10301 * config/nds32/nds32-n9-2r1w.md: New file.
10302 * config/nds32/nds32-n9-3r2w.md: New file.
10303 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
10304 nds32_register_ports): New or modify for cpu n9.
10305 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
10306 pipeline.
10307 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
10308 * config/nds32/nds32-utils.c: New file.
10309 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
10310 TARGET_MUL_SLOW): Define.
10311 * config/nds32/nds32.md (pipeline_model): New attribute.
10312 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
10313 New options that support cpu n9.
10314 * config/nds32/pipelines.md: Include n9 settings.
10315 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
10316
10317 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10318
10319 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
10320 information if necessary.
10321 (output_cond_branch_compare_zero): Likewise.
10322 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
10323 (nds32_target_alignment): Refine for alignment.
10324 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
10325 (FUNCTION_BOUNDARY): Modify.
10326 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
10327 align case.
10328 * config/nds32/nds32.opt (malways-align, malign-functions): New.
10329
10330 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10331
10332 * config/nds32/constants.md (unspec_volatile_element): Add values for
10333 TLB operation and data prefetch.
10334 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10335 functions for TLB operation and data prefetch.
10336 * config/nds32/nds32-intrinsic.md: Likewise.
10337 * config/nds32/nds32_intrinsic.h: Likewise.
10338 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
10339 (nds32_print_operand): Likewise.
10340 * config/nds32/nds32.h (nds32_builtins): Likewise.
10341
10342 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
10343 Andrew Pinski <pinsika@gcc.gnu.org>
10344
10345 PR middle-end/82976
10346 * match.pd: Use constant_boolean_node of correct type instead of
10347 boolean_true_node or boolean_false_node for simplifying
10348 pointer comparisons to zero.
10349
10350 2018-04-07 Jakub Jelinek <jakub@redhat.com>
10351
10352 PR tree-optimization/80021
10353 * tree.c (verify_type_variant): Make error call in verify_variant_match
10354 translatable and remove final full stop.
10355
10356 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10357
10358 * config/nds32/constants.md (unspec_volatile_element): Add
10359 UNSPEC_VOLATILE_EH_RETURN.
10360 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
10361 nds32_output_stack_pop): Support dwarf exception handling process.
10362 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
10363 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
10364 exception handling process.
10365 (nds32_compute_stack_frame): Likewise.
10366 (nds32_return_addr_rtx): Likewise.
10367 (nds32_initial_elimination_offset): Likewise.
10368 (nds32_expand_prologue): Likewise.
10369 (nds32_expand_epilogue): Likewise.
10370 (nds32_dynamic_chain_address): New function.
10371 * config/nds32/nds32.h (machine_function): Add fields for dwarf
10372 exception handling.
10373 (DYNAMIC_CHAIN_ADDRESS): Define.
10374 (EH_RETURN_DATA_REGNO): Define.
10375 (EH_RETURN_STACKADJ_RTX): Define.
10376 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
10377 patterns for dwarf exception handling.
10378
10379 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10380
10381 * config/nds32/nds32.h: Clean up obsolete macros.
10382
10383 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10384
10385 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10386 Add enum values for particular instructions.
10387 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10388 particular intrinsic functions.
10389 * config/nds32/nds32-intrinsic.md: Likewise.
10390 * config/nds32/nds32_intrinsic.h: Likewise.
10391 * config/nds32/nds32.h (nds32_builtins): Likewise.
10392 * config/nds32/nds32.md (type): Add pbsad and pbsada.
10393 (btst, ave): New patterns for particular instructions.
10394
10395 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10396
10397 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10398 Add enum values for atomic load/store and memory sync.
10399 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
10400 and memory sync.
10401 * config/nds32/nds32-intrinsic.md: Likewise.
10402 * config/nds32/nds32_intrinsic.h: Likewise.
10403 * config/nds32/nds32.h (nds32_builtins): Likewise.
10404
10405 2018-04-07 Jakub Jelinek <jakub@redhat.com>
10406
10407 PR tree-optimization/85257
10408 * fold-const.c (native_encode_vector): If not all elts could fit
10409 and off is -1, return 0 rather than offset.
10410 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
10411 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
10412 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
10413 adjust buffer in native_interpret_expr call.
10414
10415 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10416
10417 * config/nds32/constants.md (unspec_volatile_element): Add cache
10418 control enum values.
10419 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
10420 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
10421 * config/nds32/nds32.c (nds32_cctl_names): New.
10422 (nds32_print_operand): Handle cache control register names.
10423 * config/nds32/nds32.h (nds32_builtins): New enum values.
10424 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
10425 macros.
10426 * config/nds32/nds32.md (type): Add mmu.
10427 * config/nds32/pipelines.md (simple_insn): Add mmu.
10428
10429 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10430
10431 * config/nds32/nds32.md (type): Remove call.
10432 * config/nds32/pipelines.md (simple_insn): Likewise.
10433
10434 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10435
10436 * config/nds32/constants.md (unspec_volatile_element): Add
10437 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
10438 UNSPEC_VOLATILE_FMFCFG.
10439 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
10440 description for fmfcfg and fmfcsr.
10441 (bdesc_1arg): Add fmtcsr.
10442 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
10443 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
10444 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
10445 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
10446 unspec_fmfcfg): New patterns.
10447 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
10448 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
10449 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
10450 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
10451 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
10452 __nds32__fmfcfg): Define.
10453
10454 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10455
10456 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
10457 intrinsic register names.
10458 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
10459 intrinsic register enum values and macros.
10460
10461 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10462
10463 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
10464 for load/store addressing form.
10465 (nds32_print_operand_address): Likewise.
10466
10467 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
10468
10469 PR target/85196
10470 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
10471 based on LABEL_REF. Remove useless assertion.
10472 (pic_address_needs_scratch): Fix formatting.
10473 (sparc_legitimize_pic_address): Minor tweaks.
10474 (sparc_delegitimize_address): Adjust assertion accordingly.
10475 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
10476 into symbolic_operand.
10477 (movsi_high_pic_label_ref): Likewise.
10478 (movsi_lo_sum_pic_label_ref): Likewise.
10479 (movdi_pic_label_ref): Likewise.
10480 (movdi_high_pic_label_ref): Likewise.
10481 (movdi_lo_sum_pic_label_ref): Likewise.
10482
10483 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
10484
10485 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
10486 custom LIB_SPEC setup.
10487
10488 2018-04-06 Ruslan Bukin <br@bsdpad.com>
10489 Kito Cheng <kito.cheng@gmail.com>
10490
10491 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
10492 * config/riscv/freebsd.h: New.
10493
10494 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10495
10496 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
10497 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
10498 file.
10499
10500 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10501 Kito Cheng <kito.cheng@gmail.com>
10502
10503 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
10504 nds32_output_call, nds32_symbol_binds_local_p): New functions.
10505 * config/nds32/nds32-protos.h (nds32_output_call,
10506 nds32_output_return): Declare.
10507 * config/nds32/nds32.md: Refine all the call and return patterns.
10508
10509 2018-04-06 Jakub Jelinek <jakub@redhat.com>
10510
10511 PR debug/85252
10512 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
10513 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
10514
10515 PR rtl-optimization/84872
10516 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
10517 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
10518 EDGE_CROSSING edge.
10519
10520 2018-04-06 Tamar Christina <tamar.christina@arm.com>
10521
10522 * expr.c (copy_blkmode_to_reg): Revert 254862.
10523 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
10524
10525 2018-04-06 Richard Biener <rguenther@suse.de>
10526
10527 PR middle-end/85244
10528 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
10529 after seeing a component reference with an adjacent field. Treat
10530 refs to arrays at struct end of external decls similar to
10531 refs to unconstrained commons.
10532
10533 2018-04-06 Jakub Jelinek <jakub@redhat.com>
10534
10535 PR sanitizer/85213
10536 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
10537 look through SAVE_EXPRs with non-side-effects argument. Adjust
10538 recursive calls.
10539 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
10540 save_p here.
10541
10542 2018-04-06 Richard Biener <rguenther@suse.de>
10543
10544 PR middle-end/85180
10545 * alias.c (find_base_term): New wrapper around find_base_term
10546 unwinding CSELIB_VAL_PTR changes.
10547 (find_base_term): Do not restore CSELIB_VAL_PTR during the
10548 recursion.
10549
10550 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10551
10552 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
10553 instructions.
10554 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
10555 constant definitions.
10556 ("nop"): lr 0,0 -> nopr r0
10557 ("nop_lr0", "nop_lr1"): New insn definitions.
10558
10559 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10560
10561 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
10562 NDS32_V3PUSH_AVAILABLE_P macro.
10563
10564 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
10565 Chung-Ju Wu <jasonwucj@gmail.com>
10566
10567 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
10568 (nds32*-*-*): Add float and fpu_config into supported_defaults.
10569 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
10570 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
10571 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
10572 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
10573 * config/nds32/constraints.md: New constraints and checking for hard
10574 float configuration.
10575 * config/nds32/iterators.md: New mode iterator and attribute for hard
10576 float configuration.
10577 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
10578 patterns.
10579 * config/nds32/nds32-fpu.md: New file.
10580 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
10581 deal with hard float code generation.
10582 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
10583 ARCH_V3S.
10584 (abi_type, float_reg_number): New enum type.
10585 * config/nds32/nds32-predicates.c: New predicates for hard float.
10586 * config/nds32/nds32-protos.h: Declare functions for hard float.
10587 * config/nds32/nds32.c: Implementation for hard float configuration.
10588 * config/nds32/nds32.h: Definitions for hard float configuration.
10589 * config/nds32/nds32.md: Include hard float machine description and
10590 modify patterns for hard float configuration.
10591 * config/nds32/nds32.opt: New options for hard float configuration.
10592 * config/nds32/predicates.md: New predicates for hard float
10593 configuration.
10594
10595 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10596
10597 * common/config/nds32/nds32-common.c
10598 (nds32_option_optimization_table): Enable -mreleax-hint by default.
10599
10600 2018-04-05 Jakub Jelinek <jakub@redhat.com>
10601
10602 PR middle-end/85195
10603 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
10604 CONSTRUCTOR_ELT (ctor, ...)->value.
10605
10606 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
10607
10608 PR target/85193
10609 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
10610
10611 2018-04-05 Tom de Vries <tom@codesourcery.com>
10612
10613 PR target/85204
10614 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
10615 cond jump.
10616
10617 2018-04-05 Shiva Chen <shiva0217@gmail.com>
10618 Kito Cheng <kito.cheng@gmail.com>
10619
10620 * config/nds32/constraints.md (U33): Fine-tune checking condition.
10621 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
10622 * config/nds32/nds32.h (nds32_16bit_address_type): Add
10623 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
10624
10625 2018-04-05 Shiva Chen <shiva0217@gmail.com>
10626 Kito Cheng <kito.cheng@gmail.com>
10627
10628 * config/nds32/constraints.md (Ufe): New memory constraint.
10629 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
10630 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
10631 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
10632 operands.
10633 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
10634 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
10635
10636 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10637
10638 * config/nds32/nds32.md: Use optimize_size in the condition for
10639 alu-shift instructions.
10640
10641 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10642
10643 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
10644
10645 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10646
10647 * config/nds32/nds32.md (negsi2): Refine pattern.
10648
10649 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
10650 Chung-Ju Wu <jasonwucj@gmail.com>
10651
10652 * config/nds32/iterators.md (shift_rotate): New code iterator.
10653 (shift): New code attribute.
10654 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
10655 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
10656 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
10657 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
10658 bit-wise operations.
10659 (andsi3, *andsi3): Ditto.
10660 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
10661 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
10662 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
10663 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
10664 nds32_ior_operand, nds32_xor_operand): New predicates.
10665
10666 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10667
10668 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
10669 (addsi3, subsi3): ... this.
10670
10671 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10672
10673 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
10674
10675 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10676
10677 * config/nds32/nds32.md: Adjust indention.
10678
10679 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
10680
10681 * config/nds32/nds32.md (feature): New attribute.
10682
10683 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10684
10685 * config/nds32/nds32.md (subtype): New attribute.
10686
10687 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
10688
10689 PR target/85203
10690 * config/arm/arm-builtins.c (arm_expand_builtin): Change
10691 expansion to perform a bitwise AND of the argument followed by a
10692 boolean negation of the result.
10693
10694 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
10695
10696 PR rtl-optimization/84878
10697 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
10698 the basic block. Assert the use reference is not artificial and that
10699 it has an associated insn.
10700
10701 2018-04-04 Michael Matz <matz@suse.de>
10702
10703 * builtins.c (compute_objsize): Pass correct operand
10704 to array_at_struct_end_p.
10705
10706 2018-04-04 Richard Biener <rguenther@suse.de>
10707
10708 PR lto/85176
10709 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
10710 from contexts for DINFO_LEVEL_TERSE and below.
10711
10712 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10713
10714 * config/nds32/nds32-doubleword.md (move_<mode>): Require
10715 resiter_operand condition.
10716 * config/nds32/nds32.md (*move<mode>): Ditto.
10717
10718 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10719 Monk Chiang <sh.chiang04@gmail.com>
10720
10721 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
10722
10723 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10724
10725 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
10726
10727 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10728 Kito Cheng <kito.cheng@gmail.com>
10729
10730 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
10731 nds32_cond_code_str, output_cond_branch,
10732 output_cond_branch_compare_zero, nds32_expand_cbranch,
10733 nds32_expand_cstore, nds32_expand_movcc,
10734 nds32_output_cbranchsi4_equality_zero,
10735 nds32_output_cbranchsi4_equality_reg,
10736 nds32_output_cbranchsi4_equality_reg_or_const_int,
10737 nds32_output_cbranchsi4_greater_less_zero: New functions.
10738 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
10739 nds32_expand_cstore, nds32_expand_movcc,
10740 nds32_output_cbranchsi4_equality_zero,
10741 nds32_output_cbranchsi4_equality_reg,
10742 nds32_output_cbranchsi4_equality_reg_or_const_int,
10743 nds32_output_cbranchsi4_greater_less_zero): Declare.
10744 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
10745 nds32_rimm11s_operand): New predicates.
10746 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
10747 * config/nds32/nds32.md: Rewrite all the branch and conditional move
10748 patterns.
10749
10750 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10751
10752 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
10753 * config/nds32/nds32.md: Ditto.
10754 * config/nds32/pipelines.md: Ditto.
10755
10756 2018-04-04 Richard Biener <rguenther@suse.de>
10757
10758 PR tree-optimization/85168
10759 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
10760 propagating abnormals.
10761
10762 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10763
10764 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
10765
10766 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10767 Kito Cheng <kito.cheng@gmail.com>
10768
10769 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
10770 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
10771 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
10772 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
10773 * config/nds32/nds32.md (sibcall_internal): New.
10774 (sibcall_register): Remove.
10775 (sibcall_immediate): Remove.
10776 (sibcall_value_internal): New.
10777 (sibcall_value_register): Remove.
10778 (sibcall_value_immediate): Remove.
10779 * config/nds32/predicates.md (nds32_general_register_operand): New.
10780 (nds32_call_address_operand): New.
10781
10782 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10783
10784 PR rtl-optimization/85167
10785 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
10786 bb_defs if *split_p, instead preinitialize it to NULL.
10787
10788 PR tree-optimization/85156
10789 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
10790 evaluating the argument multiple times.
10791
10792 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
10793
10794 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
10795 than vector.
10796 (_mm_cvtpd_ps): Likewise.
10797 (_mm_cvttpd_epi32): Likewise.
10798 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
10799 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
10800 vector, pixel, and bool following altivec.h include.
10801
10802 2018-04-03 Martin Sebor <msebor@redhat.com>
10803
10804 * doc/extend.texi (Common Function Attributes): Clarify.
10805 (const attribute): Likewise.
10806 (pure attribute): Likewise.
10807
10808 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10809
10810 PR target/85169
10811 * config/i386/i386.c (ix86_expand_vector_set): Use
10812 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
10813
10814 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
10815
10816 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
10817 instructions when changing rounding bits to preserve precision bits
10818 in the x87 control word.
10819
10820 2018-04-03 Martin Liska <mliska@suse.cz>
10821
10822 PR tree-optimization/82491
10823 * rtl.h (strip_offset_and_add): Replace += suboffset with
10824 poly_uint64 () + suboffset.
10825
10826 2018-03-29 Martin Liska <mliska@suse.cz>
10827 Martin Jambor <mjambor@suse.cz>
10828
10829 PR ipa/84947
10830 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
10831 param_type is not an integral or pointer type.
10832
10833 2018-04-03 Richard Biener <rguenther@suse.de>
10834
10835 * sese.h (recompute_all_dominators): Remove.
10836
10837 2018-04-02 Martin Sebor <msebor@redhat.com>
10838
10839 * doc/invoke.texi (-Wrestrict): Fix typos.
10840
10841 2018-04-02 Jim Wilson <jimw@sifive.com>
10842
10843 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
10844 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
10845 (<optab>di3, <optab>si3_extend): Likewise.
10846 (<optab>si3_mask, <optab>si3_mask_1): New.
10847 (<optab>di3_mask, <optab>di3_mask_1): New.
10848 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
10849 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
10850 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
10851
10852 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
10853
10854 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
10855 example.
10856
10857 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
10858
10859 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
10860 (nds32_canonicalize_comparison): New function.
10861
10862 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10863 Kito Cheng <kito.cheng@gmail.com>
10864 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10865
10866 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
10867 * config/nds32/constants.md (unspec_volatile_element): Add
10868 UNSPEC_VOLATILE_RELAX_GROUP.
10869 * config/nds32/nds32-relax-opt.c: New file.
10870 * config/nds32/nds32-predicates.c
10871 (nds32_symbol_load_store_p): New function.
10872 * config/nds32/nds32-protos.h
10873 (nds32_symbol_load_store_p): Declare function.
10874 (make_pass_nds32_relax_opt): Declare new rtl pass function.
10875 * config/nds32/nds32.c
10876 (nds32_register_pass): New function to register pass.
10877 (nds32_register_passes): New function to register passes.
10878 * config/nds32/nds32.md (relax_group): New pattern.
10879 * config/nds32/nds32.opt (mrelax-hint): New option.
10880 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
10881
10882 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
10883
10884 * config/nds32/t-nds32: Modify files dependency.
10885
10886 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10887
10888 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
10889 (PROFILE_HOOK): Define its implementation.
10890
10891 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10892
10893 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
10894 type and 32-bit size.
10895
10896 2018-04-01 Jakub Jelinek <jakub@redhat.com>
10897
10898 PR middle-end/85090
10899 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
10900 (V_128_256): New mode iterator.
10901 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
10902 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
10903 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
10904 of V.
10905 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
10906 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
10907
10908 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
10909
10910 PR target/83315
10911 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
10912 NaN inputs correctly.
10913
10914 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
10915
10916 PR target/80546
10917 * config/rs6000/vsx.md (??r): New mode attribute.
10918 (*vsx_mov<mode>_64bit): Use it.
10919 (*vsx_mov<mode>_32bit): Likewise.
10920
10921 2018-03-30 Martin Sebor <msebor@redhat.com>
10922
10923 PR tree-optimization/84818
10924 * builtins.c (check_access): Use warning_n.
10925
10926 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10927
10928 PR target/83822
10929 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
10930 condition.
10931 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
10932 condition.
10933
10934 2018-03-30 Julia Koval <julia.koval@intel.com>
10935
10936 PR target/84413
10937 * x86-tune.def (movx, partial_reg_dependency): Enable for
10938 m_SKYLAKE_AVX512.
10939
10940 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
10941
10942 PR inline-asm/84985
10943 * lra-constraints.c (process_alt_operands): Move setting
10944 this_alternative_matches below.
10945
10946 2018-03-29 Martin Liska <mliska@suse.cz>
10947
10948 PR lto/84995.
10949 * doc/invoke.texi: Document how LTO works with debug info.
10950 Describe auto-load support of binutils. Mention 'x86-64'
10951 as valid option value of -march option.
10952
10953 2018-03-29 Jakub Jelinek <jakub@redhat.com>
10954
10955 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
10956
10957 PR c/85094
10958 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
10959 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
10960 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
10961 checking.
10962
10963 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
10964
10965 PR target/84912
10966 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
10967 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
10968 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
10969 for RS6000_BTM_POWERPC64.
10970 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
10971 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
10972 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
10973 definition.
10974 (DIVDE): Use it.
10975 (DIVDEU): Likewise.
10976
10977 2018-03-28 Carl Love <cel@us.ibm.com>
10978
10979 Revert
10980 2017-09-27 Carl Love <cel@us.ibm.com>
10981
10982 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
10983 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
10984 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
10985 fctiw instruction.
10986
10987 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10988
10989 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
10990 instead of __vector bool.
10991 (_mm_max_pu8): Likewise.
10992 (_mm_min_pi16): Likewise.
10993
10994 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
10995
10996 PR target/84912
10997 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
10998 (DIVWEUO): Likewise.
10999 (DIVDEO): Likewise.
11000 (DIVDEUO): Likewise.
11001 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
11002 DIVWEUO and DIVDEUO.
11003 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
11004 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
11005 (div_extend): Likewise.
11006 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
11007 builtin function.
11008 (__builtin_divweuo): Likewise.
11009 (__builtin_divdeo): Likewise.
11010 (__builtin_divdeuo): Likewise.
11011
11012 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11013
11014 PR target/85095
11015 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
11016 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
11017
11018 PR tree-optimization/82004
11019 * gimple-match-head.c (optimize_pow_to_exp): New function.
11020 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
11021 Don't fold to exp if optimize_pow_to_exp is false.
11022
11023 2018-03-28 Martin Liska <mliska@suse.cz>
11024
11025 PR other/84819
11026 * calls.c (initialize_argument_information): Fix trailing space.
11027 * common.opt: Fix typo and provide better explanation for
11028 -fsanitize-coverage option.
11029 * config/i386/i386.opt: Fix typo.
11030
11031 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11032 Martin Liska <mliska@suse.cz>
11033
11034 PR sanitizer/85081
11035 * gimplify.c (asan_poison_variable): Don't do the check for
11036 gimplify_omp_ctxp here.
11037 (gimplify_decl_expr): Do it here.
11038 (gimplify_target_expr): Likewise.
11039
11040 2018-03-28 Martin Liska <mliska@suse.cz>
11041
11042 PR target/84988
11043 * config/i386/i386.c (ix86_function_arg_advance): Do not call
11044 chkp_type_bounds_count if MPX is not enabled.
11045
11046 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
11047
11048 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
11049
11050 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
11051
11052 PR target/84914
11053 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
11054 function to create the function decl for complex long double
11055 multiply and divide for -mabi=ieeelongdouble.
11056 (init_float128_ieee): Call it.
11057
11058 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
11059
11060 PR target/85044
11061 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
11062 -fcf-protection=branch -mibt.
11063 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
11064
11065 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11066
11067 PR target/81863
11068 * config/arm/arm.c (arm_valid_symbolic_address): Handle
11069 arm_word_relocations.
11070
11071 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
11072
11073 PR target/85056
11074 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
11075 extern array declarations.
11076
11077 2018-03-27 Richard Biener <rguenther@suse.de>
11078
11079 PR middle-end/84067
11080 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
11081 explicit single_use checks.
11082
11083 2018-03-27 Richard Biener <rguenther@suse.de>
11084
11085 PR tree-optimization/85082
11086 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
11087 Valueize the VUSE.
11088
11089 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11090
11091 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
11092 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
11093 Turn on fasynchronous-unwind-tables and funwind-tables.
11094
11095 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
11096
11097 PR target/85073
11098 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
11099 (*bmi_blsr_<mode>_ccz): Ditto.
11100
11101 2018-03-26 Tom de Vries <tom@codesourcery.com>
11102
11103 PR tree-optimization/85063
11104 * omp-general.c (offloading_function_p): New function. Factor out
11105 of ...
11106 * omp-offload.c (pass_omp_target_link::gate): ... here.
11107 * omp-general.h (offloading_function_p): Declare.
11108 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
11109 with attribute omp declare target for offloading functions.
11110
11111 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
11112
11113 PR tree-optimization/84005
11114 * tree-data-ref.h (get_base_for_alignment): Declare.
11115 * tree-data-ref.c (get_base_for_alignment_1): New function.
11116 (get_base_for_alignment): Likewise.
11117 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
11118 get_base_for_alignment to find a suitable base object, instead
11119 of always using drb->base_address.
11120
11121 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11122
11123 PR inline-asm/85022
11124 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
11125 known size by default.
11126
11127 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
11128
11129 PR inline-asm/85030
11130 * lra-constraints.c (process_alt_operands): Don't match BLKmode
11131 and non BLKmode operands.
11132
11133 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11134
11135 PR target/85026
11136 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
11137 Clean up attributes.
11138
11139 2018-03-23 Richard Biener <rguenther@suse.de>
11140
11141 PR debug/85020
11142 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
11143 we are going to emit early debug for LTO.
11144
11145 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11146
11147 PR inline-asm/85034
11148 * function.c (match_asm_constraints_1): Don't optimize if input
11149 doesn't satisfy general_operand predicate for output's mode.
11150
11151 PR inline-asm/85022
11152 * alias.c (write_dependence_p): Don't require for x_canonicalized
11153 non-VOIDmode if x has VOIDmode.
11154
11155 PR sanitizer/85029
11156 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
11157 just don't try to optimize it rather than assert it never happens.
11158
11159 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11160
11161 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
11162 macro expansions for definition of ST_INTERNAL_<mode> and
11163 LD_INTERNAL_<mode> builtins.
11164 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
11165 Remove prototype.
11166 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
11167 function.
11168 (altivec_expand_st_builtin): Likewise.
11169 (altivec_expand_builtin): Remove calls to deleted functions.
11170 (rs6000_address_for_altivec): Delete this function.
11171 * config/rs6000/vector.md: Remove expands for
11172 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
11173
11174 2018-03-22 Sudakshina Das <sudi.das@arm.com>
11175
11176 PR target/84826
11177 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
11178 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
11179 re-computing once computed.
11180 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
11181 (arm_init_machine_status): Initialize
11182 machine->static_chain_stack_bytes.
11183
11184 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11185
11186 PR target/84760
11187 * doc/extend.texi: Add four new prototypes for vec_ld.
11188 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
11189 definitions for more logical presentation.
11190 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
11191 entries for V1TI variants of __builtin_altivec_ld builtin.
11192 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
11193 handling of V1TI variant of LVX icode pattern.
11194 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
11195 (rs6000_gimple_fold_builtin): Likewise.
11196 (altivec_init_builtins): Add code to define
11197 __builtin_altivec_lvx_v1ti function.
11198
11199 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11200
11201 PR inline-asm/84941
11202 * function.c (match_asm_constraints_1): Don't do the optimization
11203 if input isn't a REG, SUBREG, MEM or constant.
11204
11205 2018-03-22 Tom de Vries <tom@codesourcery.com>
11206
11207 PR tree-optimization/84956
11208 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
11209 bb_has_abnormal_pred.
11210
11211 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11212
11213 PR sanitizer/85018
11214 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
11215 DECL_INITIAL (decl) to decl at the end.
11216 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
11217 adjust the comment.
11218
11219 2018-03-21 Joseph Myers <joseph@codesourcery.com>
11220
11221 * doc/extend.texi (__builtin_tgmath): Document when complex
11222 integer types are treated as _Complex _Float64.
11223
11224 2018-03-21 Tom de Vries <tom@codesourcery.com>
11225
11226 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
11227
11228 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11229
11230 PR tree-optimization/84960
11231 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
11232 if it is ENTRY block, move them into single succ of ENTRY in that case.
11233
11234 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
11235
11236 PR tree-optimization/84811
11237 * poly-int.h (poly_span_traits): Remove the T3 parameter and
11238 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
11239 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
11240 (known_subrange_p): Update accordingly. Cast each value involved
11241 in the size comparison, rather than casting the result of the
11242 subtraction.
11243
11244 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11245
11246 PR tree-optimization/84982
11247 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
11248 by flipping the least significant bit rather than all bits from
11249 bitpos to bitpos + bitsize - 1.
11250
11251 2018-03-21 Nathan Sidwell <nathan@acm.org>
11252
11253 * doc/extend.texi (Deprecated Features): Remove mention of
11254 long-deleted deprecations.
11255
11256 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11257
11258 PR jit/84288
11259 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
11260 * configure: Regenerate.
11261
11262 2018-03-21 Tom de Vries <tom@codesourcery.com>
11263
11264 PR tree-optimization/83126
11265 * tree-parloops.c (num_phis): New function.
11266 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
11267
11268 2018-03-21 Nathan Sidwell <nathan@acm.org>
11269
11270 * doc/extend.texi (Deprecated Features): Update deprecated flags,
11271 mention anon-struct/union members and trailing attributes.
11272
11273 2018-03-21 Bin Cheng <bin.cheng@arm.com>
11274
11275 PR tree-optimization/84969
11276 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
11277 builtin memset partitions if they set different rhs values.
11278
11279 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11280
11281 PR rtl-optimization/84989
11282 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
11283 VEC_DUPLICATE with scalar result mode.
11284
11285 2018-03-21 Martin Liska <mliska@suse.cz>
11286
11287 PR ipa/84963
11288 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
11289 not intended return statement.
11290
11291 2018-03-21 Martin Liska <mliska@suse.cz>
11292
11293 PR target/84988
11294 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
11295 (chkp_find_bound_slots_1): Limit number of iterations.
11296
11297 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
11298
11299 PR target/84838
11300 * Minor grammar fixes for x86 options.
11301
11302 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11303
11304 PR debug/84875
11305 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
11306 holding REG_CFA_RESTORE notes, instead turn them into a USE.
11307
11308 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
11309
11310 PR target/83789
11311 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
11312 (altivec_lvx_<mode>_1op): Likewise.
11313 (altivec_stvx_<mode>_2op): Likewise.
11314 (altivec_stvx_<mode>_1op): Likewise.
11315 (altivec_lvx_<VM2:mode>): New define_expand.
11316 (altivec_stvx_<VM2:mode>): Likewise.
11317 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
11318 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11319 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
11320 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11321 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
11322 (rs6000_gen_lvx): Likewise.
11323 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
11324 (altivec_expand_stv_builtin): Likewise.
11325 (altivec_expand_builtin): Likewise.
11326 * config/rs6000/vector.md: Likewise.
11327
11328 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11329
11330 PR target/82518
11331 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
11332 BYTES_BIG_ENDIAN.
11333
11334 2018-03-20 Richard Biener <rguenther@suse.de>
11335
11336 PR target/84986
11337 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
11338 sign-conversions as zero, fall back to standard scalar_stmt
11339 cost for the rest.
11340
11341 2018-03-20 Martin Liska <mliska@suse.cz>
11342
11343 PR ipa/84825
11344 * predict.c (rebuild_frequencies): Handle case when we have
11345 PROFILE_ABSENT, but flag_guess_branch_prob is false.
11346
11347 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11348
11349 PR target/84990
11350 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
11351 flag_section_anchors.
11352 * varasm.c (use_blocks_for_decl_p): Remove hack for
11353 dw2_force_const_mem.
11354
11355 PR target/84845
11356 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
11357 to ...
11358 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
11359 be created, use lowpart_subreg of operands[0] rather than operands[0]
11360 itself.
11361 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
11362 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
11363 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
11364 and n constraint instead of aarch64_shift_imm_di and Usd.
11365 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
11366 (*aarch64_<optab>_reg_minus<mode>3): ... this.
11367
11368 2018-03-20 Sudakshina Das <sudi.das@arm.com>
11369
11370 PR target/82989
11371 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
11372 to favor GPR over NEON registers.
11373 (<shift>di3_neon): Likewise.
11374
11375 2018-03-20 Tom de Vries <tom@codesourcery.com>
11376
11377 PR target/84952
11378 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
11379 (nvptx_process_pars): Emit bar.sync asap and alap.
11380
11381 2018-03-20 Tom de Vries <tom@codesourcery.com>
11382
11383 PR target/84954
11384 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
11385 seen_label if seen_label is already set.
11386
11387 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11388
11389 PR target/84945
11390 * config/i386/i386.c (fold_builtin_cpu): For features above 31
11391 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
11392 Use 1U instead of 1. Formatting fixes.
11393
11394 PR c/84953
11395 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
11396 instead of TREE_TYPE (s1) for the return value.
11397
11398 2018-03-19 Jakub Jelinek <jakub@redhat.com>
11399
11400 PR tree-optimization/84946
11401 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
11402 bitsize + bitsize in poly_uint64 rather than poly_int64.
11403
11404 PR sanitizer/78651
11405 * dwarf2asm.c: Include fold-const.c.
11406 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
11407 of decl rather than decl itself.
11408
11409 PR rtl-optimization/84643
11410 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
11411
11412 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
11413
11414 PR sanitizer/78651
11415 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
11416 calling assemble_variable.
11417
11418 2018-03-19 Sudakshina Das <sudi.das@arm.com>
11419
11420 PR target/81647
11421 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
11422 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
11423
11424 2018-03-19 Jim Wilson <jimw@sifive.com>
11425
11426 PR bootstrap/84856
11427 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
11428 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
11429 (riscv_first_stack_step): Likewise.
11430 (riscv_option_override): Use STACK_BOUNDARY instead of
11431 MIN_STACK_BOUNDARY.
11432 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
11433 MIN_STACK_BOUNDARY.
11434 (BIGGEST_ALIGNMENT): Set to 128.
11435 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
11436 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
11437 STACK_BOUNDARY.
11438
11439 2018-03-19 Richard Biener <rguenther@suse.de>
11440
11441 PR tree-optimization/84933
11442 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
11443 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
11444
11445 2018-03-19 Richard Biener <rguenther@suse.de>
11446
11447 PR tree-optimization/84859
11448 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
11449 (cond_if_else_store_replacement): Perform sinking operation on
11450 single-store BBs regardless of MAX_STORES_TO_SINK setting.
11451 Generalize what a BB with a single eligible store is.
11452
11453 2018-03-19 Richard Biener <rguenther@suse.de>
11454
11455 PR tree-optimization/84929
11456 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
11457 chrec_is_positive against non-chrec arg.
11458
11459 2018-03-19 Tamar Christina <tamar.christina@arm.com>
11460
11461 PR target/84711
11462 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
11463
11464 2018-03-18 Martin Liska <mliska@suse.cz>
11465
11466 PR rtl-optimization/84635
11467 * regrename.c (build_def_use): Use matches_mode only when
11468 matches >= 0.
11469
11470 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
11471
11472 PR tree-optimization/84913
11473 * tree-vect-loop.c (vectorizable_reduction): Don't try to
11474 vectorize chains of COND_EXPRs.
11475
11476 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11477
11478 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
11479
11480 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11481
11482 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
11483
11484 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11485
11486 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
11487
11488 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
11489 Kito Cheng <kito.cheng@gmail.com>
11490
11491 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
11492 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
11493 (nds32_adjust_reg_alloc_order): New function.
11494 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
11495
11496 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
11497
11498 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
11499 nds32_print_operand, nds32_print_operand_address): Use
11500 HOST_WIDE_INT_PRINT_DEC instead.
11501
11502 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
11503
11504 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
11505
11506 2018-03-17 Jakub Jelinek <jakub@redhat.com>
11507
11508 PR target/84902
11509 * config/i386/i386.c (initial_ix86_tune_features,
11510 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
11511 unsigned long long.
11512 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
11513 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
11514 rather than 1u << ix86_tune. Formatting fix.
11515 (ix86_option_override_internal): Change ix86_arch_mask from
11516 unsigned int to unsigned HOST_WIDE_INT, initialize to
11517 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
11518 (ix86_function_specific_restore): Likewise.
11519
11520 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11521
11522 PR target/84899
11523 * postreload.c (reload_combine_recognize_pattern): Perform
11524 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
11525 truncate_int_for_mode the result for the destination's mode.
11526
11527 PR c/84909
11528 * hsa-gen.c (mem_type_for_type): Fix comment typo.
11529 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
11530 Likewise.
11531 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11532 Likewise.
11533
11534 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
11535
11536 PR target/84876
11537 * lra-assigns.c (lra_split_hard_reg_for): Don't use
11538 regno_allocno_class_array and sorted_pseudos.
11539 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
11540 insns where regno is used.
11541
11542 2018-03-16 Martin Liska <mliska@suse.cz>
11543
11544 PR ipa/84833
11545 * multiple_target.c (create_dispatcher_calls): Redirect
11546 reference in the symbol table.
11547
11548 2018-03-16 Martin Liska <mliska@suse.cz>
11549
11550 PR ipa/84722
11551 * multiple_target.c (create_dispatcher_calls): Redirect also
11552 an alias.
11553
11554 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11555
11556 PR c++/79937
11557 PR c++/82410
11558 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
11559 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
11560 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
11561
11562 2018-03-16 Julia Koval <julia.koval@intel.com>
11563
11564 * doc/invoke.texi (Skylake Server): Add CLWB.
11565 Cannonlake): Remove CLWB.
11566
11567 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11568
11569 PR tree-optimization/84841
11570 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
11571 1 << 3.
11572 (FLOAT_ONE_CONST_TYPE): Define.
11573 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
11574 (sort_by_operand_rank): Put entries with higher constant_type last
11575 rather than first to match comments.
11576
11577 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
11578
11579 * config/nios2/nios2.md (movsi_internal): Fix thinko in
11580 split predicate.
11581
11582 2018-03-15 Jakub Jelinek <jakub@redhat.com>
11583
11584 PR c++/79085
11585 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
11586 check and use address of target always.
11587
11588 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
11589
11590 PR target/84574
11591 * config/i386/i386.c (indirect_thunk_needed): Update comments.
11592 (indirect_thunk_bnd_needed): Likewise.
11593 (indirect_thunks_used): Likewise.
11594 (indirect_thunks_bnd_used): Likewise.
11595 (indirect_return_needed): New.
11596 (indirect_return_bnd_needed): Likewise.
11597 (output_indirect_thunk_function): Add a bool argument for
11598 function return.
11599 (output_indirect_thunk_function): Don't generate alias for
11600 function return thunk.
11601 (ix86_code_end): Call output_indirect_thunk_function to generate
11602 function return thunks.
11603 (ix86_output_function_return): Set indirect_return_bnd_needed
11604 and indirect_return_needed instead of indirect_thunk_bnd_needed
11605 and indirect_thunk_needed.
11606
11607 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
11608
11609 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
11610 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
11611 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
11612
11613 2018-03-15 David Malcolm <dmalcolm@redhat.com>
11614 Paul Hua <paul.hua.gm@gmail.com>
11615
11616 PR c/84852
11617 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
11618
11619 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
11620
11621 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
11622 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
11623 resp. SFmode cases.
11624
11625 2018-03-15 Tamar Christina <tamar.christina@arm.com>
11626
11627 PR target/84711
11628 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11629 instead of GET_MODE_SIZE when comparing Units.
11630
11631 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11632
11633 PR target/68256
11634 * varasm.c (hash_section): Return an unchangeble hash value
11635 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
11636 Return !aarch64_can_use_per_function_literal_pools_p ().
11637
11638 2018-03-15 Jakub Jelinek <jakub@redhat.com>
11639
11640 PR target/84860
11641 * optabs.c (emit_conditional_move): Pass address of cmode's copy
11642 rather than address of cmode as last argument to prepare_cmp_insn.
11643
11644 2018-03-15 Julia Koval <julia.koval@intel.com>
11645
11646 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
11647 F_AVX512VNNI, F_AVX512BITALG): New.
11648
11649 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
11650
11651 PR target/83451
11652 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
11653 insn for floating-point loads and stores.
11654
11655 2018-03-14 Carl Love <cel@us.ibm.com>
11656
11657 * config/rs6000/rs6000-c.c: Add macro definitions for
11658 ALTIVEC_BUILTIN_VEC_PERMXOR.
11659 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
11660 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
11661 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
11662 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
11663 UNSPEC_VPERMXOR.
11664 * config/doc/extend.texi: Add prototypes for vec_permxor.
11665
11666 2018-03-14 David Malcolm <dmalcolm@redhat.com>
11667
11668 PR c/84852
11669 * diagnostic-show-locus.c (class layout_point): Convert m_line
11670 from int to linenum_type.
11671 (line_span::comparator): Use linenum "compare" function when
11672 comparing line numbers.
11673 (test_line_span): New function.
11674 (layout_range::contains_point): Convert param "row" from int to
11675 linenum_type.
11676 (layout_range::intersects_line_p): Likewise.
11677 (layout::will_show_line_p): Likewise.
11678 (layout::print_source_line): Likewise.
11679 (layout::should_print_annotation_line_p): Likewise.
11680 (layout::print_annotation_line): Likewise.
11681 (layout::print_leading_fixits): Likewise.
11682 (layout::annotation_line_showed_range_p): Likewise.
11683 (struct line_corrections): Likewise for field m_row.
11684 (line_corrections::line_corrections): Likewise for param "row".
11685 (layout::print_trailing_fixits): Likewise.
11686 (layout::get_state_at_point): Likewise.
11687 (layout::get_x_bound_for_row): Likewise.
11688 (layout::print_line): Likewise.
11689 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
11690 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
11691 * input.c (selftest::test_linenum_comparisons): New function.
11692 (selftest::input_c_tests): Call it.
11693 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
11694 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
11695 * selftest.h (ASSERT_GT): New macro.
11696 (ASSERT_GT_AT): New macro.
11697 (ASSERT_LT): New macro.
11698 (ASSERT_LT_AT): New macro.
11699
11700 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
11701
11702 PR rtl-optimization/84780
11703 * combine.c (distribute_links): Don't make a link based on pc_rtx.
11704
11705 2018-03-14 Martin Liska <mliska@suse.cz>
11706
11707 * tree.c (record_node_allocation_statistics): Use
11708 get_stats_node_kind.
11709 (get_stats_node_kind): New function extracted from
11710 record_node_allocation_statistics.
11711 (free_node): Use get_stats_node_kind.
11712
11713 2018-03-14 Richard Biener <rguenther@suse.de>
11714
11715 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
11716 that the value-set of ANTIC_IN doesn't grow.
11717
11718 Revert
11719 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11720 member.
11721 (BB_VISITED_WITH_VISITED_SUCCS): New define.
11722 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11723
11724 2018-03-14 Julia Koval <julia.koval@intel.com>
11725
11726 * config.gcc (icelake-client, icelake-server): New.
11727 (icelake): Remove.
11728 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
11729 (initial_ix86_arch_features): Ditto.
11730 (PTA_SKYLAKE): Add SGX.
11731 (PTA_ICELAKE): Remove.
11732 (PTA_ICELAKE_CLIENT): New.
11733 (PTA_ICELAKE_SERVER): New.
11734 (ix86_option_override_internal): Split up icelake on icelake client and
11735 icelake server.
11736 (get_builtin_code_for_version): Ditto.
11737 (fold_builtin_cpu): Ditto.
11738 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
11739 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
11740 * config/i386/i386.h (processor_type): Ditto.
11741 * doc/invoke.texi: Ditto.
11742
11743 2018-03-14 Jakub Jelinek <jakub@redhat.com>
11744
11745 PR sanitizer/83392
11746 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
11747 INTEGER_CST offset, add it together with bitpos / 8 and
11748 sign extend based on POINTER_SIZE.
11749
11750 PR target/84844
11751 Revert
11752 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
11753
11754 PR target/78090
11755 * config/i386/constraints.md (Yc): New register constraint.
11756 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
11757 Use Yc constraint for alternative 2 of operand 0. Remove
11758 preferred_for_speed attribute.
11759
11760 2018-03-14 Richard Biener <rguenther@suse.de>
11761
11762 PR tree-optimization/84830
11763 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
11764 with the old one to avoid oscillations.
11765
11766 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
11767
11768 PR target/83712
11769 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
11770 pseudos.
11771 (assign_by_spills): Return a flag of reload assignment failure.
11772 Do not process the reload assignment failures. Do not spill other
11773 reload pseudos if they has the same reg class. Update n if
11774 necessary.
11775 (lra_assign): Add a return arg. Set up from the result of
11776 assign_by_spills call.
11777 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11778 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11779 usage_insns if it is not NULL.
11780 (spill_hard_reg_in_range): New function.
11781 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11782 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11783 function prototypes.
11784 (lra_assign): Change prototype.
11785 * lra.c (lra): Add code to deal with fails by splitting hard reg
11786 live ranges.
11787
11788 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
11789
11790 * config/riscv/riscv.opt (mrelax): New option.
11791 * config/riscv/riscv.c (riscv_file_start): Emit ".option
11792 "norelax" when riscv_mrelax is disabled.
11793 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
11794
11795 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11796
11797 PR target/84743
11798 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
11799 reassociation for int modes.
11800
11801 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11802
11803 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
11804 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
11805 for big-endian.
11806 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
11807 * config/aarch64/aarch64-sve.md
11808 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
11809 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
11810 (*extend<mode><Vwide>2): Rename to...
11811 (aarch64_sve_extend<mode><Vwide>2): ...this.
11812 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
11813 renaming the old pattern to...
11814 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
11815 unsigned packs.
11816 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
11817 define_expand, renaming the old pattern to...
11818 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
11819 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
11820 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
11821 account when deciding which SVE instruction the optab should use.
11822 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
11823
11824 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11825
11826 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
11827 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
11828 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
11829 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
11830 (tlsdesc_small_<mode>): Turn a define_expand and use
11831 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
11832 (tlsdesc_small_advsimd_<mode>): ...this.
11833 (tlsdesc_small_sve_<mode>): New pattern.
11834
11835 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11836
11837 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
11838 (UNSPEC_UMUL_HIGHPART): New constants.
11839 (MUL_HIGHPART): New int iteraor.
11840 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
11841 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
11842 define_expand.
11843 (*<su>mul<mode>3_highpart): New define_insn.
11844
11845 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11846
11847 PR lto/84805
11848 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11849 incomplete types.
11850
11851 2018-03-13 Martin Liska <mliska@suse.cz>
11852
11853 PR ipa/84658.
11854 * (sem_item_optimizer::sem_item_optimizer): Initialize new
11855 vector.
11856 (sem_item_optimizer::~sem_item_optimizer): Release it.
11857 (sem_item_optimizer::merge_classes): Register variable aliases.
11858 (sem_item_optimizer::fixup_pt_set): New function.
11859 (sem_item_optimizer::fixup_points_to_sets): Likewise.
11860 * ipa-icf.h: Declare new variables and functions.
11861
11862 2018-03-13 Jakub Jelinek <jakub@redhat.com>
11863
11864 PR middle-end/84834
11865 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
11866 integer_pow2p@2 and test integer_pow2p in condition.
11867 (A < 0 ? C : 0): Similarly for @1.
11868
11869 PR middle-end/84831
11870 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
11871 characters starting at p contain '\0' character, don't look beyond
11872 that.
11873
11874 PR target/84827
11875 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
11876 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
11877
11878 PR target/84828
11879 * reg-stack.c (change_stack): Change update_end var from int to
11880 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
11881 also call set_block_for_insn on the newly added insns and rescan.
11882
11883 PR target/84786
11884 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
11885 on the last operand.
11886
11887 PR c++/84704
11888 * tree.c (stabilize_reference_1): Return save_expr (e) for
11889 STATEMENT_LIST even if it doesn't have side-effects.
11890
11891 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
11892
11893 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
11894
11895 2018-03-12 Renlin Li <renlin.li@arm.com>
11896
11897 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
11898 aarch64_output_scalar_simd_mov_immediate.
11899
11900 2018-03-12 Martin Sebor <msebor@redhat.com>
11901
11902 PR tree-optimization/83456
11903 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
11904 for perfectly overlapping calls to memcpy.
11905 (gimple_fold_builtin_memory_chk): Same.
11906 (gimple_fold_builtin_strcpy): Handle no-warning.
11907 (gimple_fold_builtin_stxcpy_chk): Same.
11908 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
11909
11910 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11911
11912 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
11913 parameter. Use it for SFmode.
11914 (rs6000_function_arg_advance_1): Adjust.
11915 (rs6000_function_arg): Adjust.
11916 (rs6000_gimplify_va_arg): Pass false for that new parameter.
11917
11918 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11919
11920 PR rtl-optimization/84169
11921 PR rtl-optimization/84780
11922 * combine.c (can_combine_p): Check for a 2-insn combination whether
11923 the destination register is used between the two insns, too.
11924
11925 2018-03-12 Richard Biener <rguenther@suse.de>
11926
11927 PR tree-optimization/84803
11928 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
11929 for refs DR analysis didn't process.
11930
11931 2018-03-12 Richard Biener <rguenther@suse.de>
11932
11933 PR tree-optimization/84777
11934 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
11935 force-vectorize loops ignore whether we are optimizing for size.
11936
11937 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
11938
11939 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
11940 (TARGET_MD_ASM_ADJUST): Define.
11941
11942 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
11943 Kito Cheng <kito.cheng@gmail.com>
11944 Chung-Ju Wu <jasonwucj@gmail.com>
11945
11946 * config/nds32/nds32.c (nds32_compute_stack_frame,
11947 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
11948 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
11949 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
11950 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
11951 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
11952 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
11953 * config/nds32/nds32.md (prologue, epilogue): Use macro
11954 NDS32_V3PUSH_AVAILABLE_P to do checking.
11955
11956 2018-03-11 Jakub Jelinek <jakub@redhat.com>
11957
11958 PR debug/58150
11959 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
11960 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
11961 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
11962 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
11963 addition of most attributes on !orig_type_die or the attribute not
11964 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
11965
11966 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11967 Chung-Ju Wu <jasonwucj@gmail.com>
11968
11969 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
11970 __NDS32_VH__ macro.
11971 * config/nds32/nds32.opt (mvh): New option.
11972
11973 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11974 Chung-Ju Wu <jasonwucj@gmail.com>
11975
11976 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
11977 function.
11978 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
11979 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
11980 definition.
11981
11982 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11983 Chung-Ju Wu <jasonwucj@gmail.com>
11984
11985 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
11986 function.
11987 * config/nds32/nds32-multiple.md (strlensi): New pattern.
11988 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
11989
11990 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
11991 Kito Cheng <kito.cheng@gmail.com>
11992 Chung-Ju Wu <jasonwucj@gmail.com>
11993
11994 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
11995 UNSPEC_FFMISM and UNSPEC_FLMISM.
11996 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
11997 for ffb, ffmism and flmism.
11998 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
11999 (unspec_ffmism): Ditto.
12000 (unspec_flmism): Ditto.
12001 (nds32_expand_builtin_impl): Check if string extension is available.
12002 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
12003 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
12004
12005 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
12006
12007 Reverting patch:
12008 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12009
12010 PR target/83712
12011 * lra-assigns.c (assign_by_spills): Return a flag of reload
12012 assignment failure. Do not process the reload assignment
12013 failures. Do not spill other reload pseudos if they has the same
12014 reg class.
12015 (lra_assign): Add a return arg. Set up from the result of
12016 assign_by_spills call.
12017 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12018 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12019 usage_insns if it is not NULL.
12020 (spill_hard_reg_in_range): New function.
12021 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12022 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12023 function prototypes.
12024 (lra_assign): Change prototype.
12025 * lra.c (lra): Add code to deal with fails by splitting hard reg
12026 live ranges.
12027
12028 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
12029
12030 PR target/84807
12031 * config/i386/i386.opt: Replace Enforcment with Enforcement.
12032
12033 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
12034
12035 PR debug/84620
12036 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
12037 (dw_val_node): Add val_symbolic_view.
12038 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
12039 (symview_upper_bound): New.
12040 (new_line_info_table): Initialize symviews_since_reset.
12041 (dwarf2out_source_line): Count symviews_since_reset and set
12042 symview_upper_bound.
12043 (dw_val_equal_p): Handle symview.
12044 (add_AT_symview): New.
12045 (print_dw_val): Handle symview.
12046 (attr_checksum, attr_checksum_ordered): Likewise.
12047 (same_dw_val_p, size_of_die): Likewise.
12048 (value_format, output_die): Likewise.
12049 (add_high_low_attributes): Use add_AT_symview for entry_view.
12050 (dwarf2out_finish): Reset symview_upper_bound, clear
12051 zero_view_p.
12052
12053 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
12054
12055 PR target/83969
12056 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
12057 Add strict argument and use it.
12058 (rs6000_split_multireg_move): Update for new strict argument.
12059 (mem_operand_gpr): Disallow all non-offsettable addresses.
12060 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
12061
12062 2018-03-09 Jakub Jelinek <jakub@redhat.com>
12063
12064 PR target/84772
12065 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
12066 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
12067 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
12068
12069 PR c++/84767
12070 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
12071 decl, use remap_type if we want to use the type.
12072
12073 2018-03-09 Martin Sebor <msebor@redhat.com>
12074
12075 PR tree-optimization/84526
12076 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12077 Remove dead code.
12078 (builtin_access::generic_overlap): Be prepared to handle non-array
12079 base objects.
12080
12081 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
12082
12083 PR rtl-optimization/84682
12084 * lra-constraints.c (process_address_1): Check is_address flag
12085 for address constraints.
12086 (process_alt_operands): Likewise.
12087 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
12088 preprocess_constraints.
12089 * recog.h (preprocess_constraints): Add oploc parameter.
12090 Adjust callers.
12091 * recog.c (preprocess_constraints): Test address_operand for
12092 CT_ADDRESS constraints.
12093
12094 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12095
12096 PR target/83712
12097 * lra-assigns.c (assign_by_spills): Return a flag of reload
12098 assignment failure. Do not process the reload assignment
12099 failures. Do not spill other reload pseudos if they has the same
12100 reg class.
12101 (lra_assign): Add a return arg. Set up from the result of
12102 assign_by_spills call.
12103 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12104 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12105 usage_insns if it is not NULL.
12106 (spill_hard_reg_in_range): New function.
12107 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12108 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12109 function prototypes.
12110 (lra_assign): Change prototype.
12111 * lra.c (lra): Add code to deal with fails by splitting hard reg
12112 live ranges.
12113
12114 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12115
12116 PR target/83193
12117 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
12118 Accept complain bool parameter. Only emit errors if it is true.
12119 (arm_parse_cpu_option_name): Likewise.
12120 (arm_target_thumb_only): Adjust callers of the above.
12121 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
12122 prototype to take a default true bool parameter.
12123 (arm_parse_arch_option_name): Likewise.
12124
12125 2018-03-09 David Malcolm <dmalcolm@redhat.com>
12126 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12127
12128 PR jit/64089
12129 PR jit/84288
12130 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
12131 * configure: Regenerate.
12132 * configure.ac ("linker --version-script option"): New.
12133 ("linker soname option"): New.
12134
12135 2018-03-09 Richard Biener <rguenther@suse.de>
12136
12137 PR tree-optimization/84775
12138 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
12139 immediate uses of predicate stmts and mark them modified.
12140
12141 Revert
12142 PR tree-optimization/84178
12143 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12144 to caller.
12145 (version_loop_for_if_conversion): Delay update_ssa call.
12146 (tree_if_conversion): Delay update_ssa until after predicate
12147 insertion.
12148
12149 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
12150
12151 PR target/84763
12152 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
12153 when the function accesses prior frames.
12154
12155 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12156
12157 PR debug/84456
12158 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
12159 gen_llsym, otherwise call maybe_gen_llsym.
12160
12161 PR inline-asm/84742
12162 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
12163 has ',' character inside of it.
12164
12165 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12166
12167 PR target/84748
12168 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
12169 as clobbering CC_REGNUM.
12170
12171 2018-03-08 Richard Biener <rguenther@suse.de>
12172
12173 PR middle-end/84552
12174 * tree-scalar-evolution.c: Include tree-into-ssa.h.
12175 (follow_copies_to_constant): Do not follow SSA names registered
12176 for update.
12177
12178 2018-03-08 Richard Biener <rguenther@suse.de>
12179
12180 PR tree-optimization/84178
12181 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12182 to caller.
12183 (version_loop_for_if_conversion): Delay update_ssa call.
12184 (tree_if_conversion): Delay update_ssa until after predicate
12185 insertion.
12186
12187 2018-03-08 David Malcolm <dmalcolm@redhat.com>
12188
12189 PR tree-optimization/84178
12190 * tree-if-conv.c (release_bb_predicate): Remove the
12191 the assertion that the stmts have NULL use_ops.
12192 Discard the statements, asserting that they haven't
12193 yet been added to a BB.
12194
12195 2018-03-08 Richard Biener <rguenther@suse.de>
12196
12197 PR tree-optimization/84746
12198 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
12199 (phi_translate): Pass in destination ANTIC_OUT set.
12200 (phi_translate_1): Likewise. For a simplified result lookup
12201 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
12202 (phi_translate_set): Adjust.
12203 (do_pre_regular_insertion): Likewise.
12204 (do_pre_partial_partial_insertion): Likewise.
12205
12206 2018-03-08 Martin Liska <mliska@suse.cz>
12207
12208 PR gcov-profile/84735
12209 * doc/gcov.texi: Document usage of profile files.
12210 * gcov-io.h: Document changes in the format.
12211
12212 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
12213
12214 PR debug/84404
12215 PR debug/84408
12216 * dwarf2out.c (struct dw_line_info_table): Update comments for
12217 view == -1.
12218 (FORCE_RESET_NEXT_VIEW): New.
12219 (FORCE_RESETTING_VIEW_P): New.
12220 (RESETTING_VIEW_P): Check for -1 too.
12221 (ZERO_VIEW_P): Likewise.
12222 (new_line_info_table): Force-reset next view.
12223 (dwarf2out_begin_function): Likewise.
12224 (dwarf2out_source_line): Simplify zero_view_p initialization.
12225 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
12226 view directly. Omit view when omitting .loc at line 0.
12227
12228 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12229
12230 PR tree-optimization/84740
12231 * tree-switch-conversion.c (process_switch): Call build_constructors
12232 only if info.phi_count is non-zero.
12233
12234 PR tree-optimization/84739
12235 * tree-tailcall.c (find_tail_calls): Check call arguments against
12236 DECL_ARGUMENTS (current_function_decl) rather than
12237 DECL_ARGUMENTS (func) when checking for tail recursion.
12238
12239 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12240
12241 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
12242 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
12243 Volker Reichelt's entry and add entries for people that perform
12244 GCC fuzzy testing and report numerous bugs.
12245
12246 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
12247
12248 PR target/82411
12249 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
12250 readonly data in sdata, if that is disabled.
12251 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
12252 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
12253 -mreadonly-in-sdata option.
12254
12255 2018-03-07 Martin Sebor <msebor@redhat.com>
12256
12257 PR tree-optimization/84468
12258 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
12259 basic block when looking for nul assignment.
12260
12261 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
12262
12263 PR target/84277
12264 * except.h (output_function_exception_table): Adjust prototype.
12265 * except.c (output_function_exception_table): Remove FNNAME parameter
12266 and add SECTION parameter. Ouput one part of the table at a time.
12267 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
12268 the first part of the exception table and emit unwind directives.
12269 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
12270 (i386_pe_seh_cold_init): Likewise.
12271 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
12272 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
12273 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
12274 (ix86_output_call_insn): Emit a nop in one more case for SEH.
12275 * config/i386/winnt.c: Include except.h.
12276 (struct seh_frame_state): Add reg_offset, after_prologue and
12277 in_cold_section fields.
12278 (i386_pe_seh_end_prologue): Set seh->after_prologue.
12279 (i386_pe_seh_cold_init): New function.
12280 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
12281 to seh->in_cold_section.
12282 (seh_emit_push): Record the offset of the push.
12283 (seh_emit_save): Record the offet of the save.
12284 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
12285 Test seh->after_prologue to disregard the epilogue.
12286 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
12287 (i386_pe_end_cold_function): New function.
12288
12289 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12290
12291 PR fortran/84565
12292 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
12293 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
12294
12295 PR c++/84704
12296 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
12297 on tmp_var.
12298 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
12299 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
12300
12301 PR middle-end/84723
12302 * multiple_target.c: Include tree-inline.h and intl.h.
12303 (expand_target_clones): Diagnose and fail if node->definition and
12304 !tree_versionable_function_p (node->decl).
12305
12306 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
12307
12308 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
12309 sprint_ul.
12310 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
12311 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
12312 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
12313
12314 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12315
12316 PR target/84710
12317 * combine.c (try_combine): Use reg_or_subregno instead of handling
12318 just paradoxical SUBREGs and REGs.
12319
12320 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
12321
12322 * config/arc/arc.c (arc_finalize_pic): Remove function.
12323 (arc_must_save_register): We use single base PIC register, remove
12324 checks to save/restore the PIC register.
12325 (arc_expand_prologue): Likewise.
12326 * config/arc/arc-protos.h (arc_set_default_type_attributes):
12327 Remove.
12328 (arc_verify_short): Likewise.
12329 (arc_attr_type): Likewise.
12330 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
12331 (walk_stores): Likewise.
12332 (arc_address_cost): Make it static.
12333 (arc_verify_short): Likewise.
12334 (branch_dest): Likewise.
12335 (arc_attr_type): Likewise.
12336 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
12337 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
12338 (arc_final_prescan_insn): Remove inserting the nops due to
12339 hardware hazards. It is done in reorg step.
12340 (insn_length_variant_t): Remove.
12341 (insn_length_parameters_t): Likewise.
12342 (arc_insn_length_parameters): Likewise.
12343 (arc_get_insn_variants): Likewise.
12344 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
12345
12346 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12347
12348 PR inline-asm/84683
12349 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
12350 assertion failure.
12351
12352 PR tree-optimization/84687
12353 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
12354 on new_node->decl.
12355 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
12356
12357 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12358
12359 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
12360 Rename to ppc_speculation_barrier.
12361 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
12362 __builtin_ppc_speculation_barrier.
12363
12364 2018-03-05 Jakub Jelinek <jakub@redhat.com>
12365
12366 PR target/84700
12367 * combine.c (combine_simplify_rtx): Don't try to simplify if
12368 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
12369 are equal to x.
12370
12371 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
12372
12373 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
12374 to 32 bytes when compiling for POWER9.
12375
12376 2018-03-05 Jakub Jelinek <jakub@redhat.com>
12377
12378 PR target/84564
12379 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
12380 regparm >= 3 with no arg reg available also for calls with
12381 flag_force_indirect_call. Pass decl to ix86_function_regparm.
12382
12383 PR target/84524
12384 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
12385 orig,vex.
12386 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
12387
12388 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
12389
12390 PR target/84264
12391 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
12392
12393 2018-03-05 Richard Biener <rguenther@suse.de>
12394
12395 PR tree-optimization/84486
12396 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
12397 When inserting a __builtin_assume_aligned call set the LHS
12398 SSA name alignment info accordingly.
12399
12400 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
12401
12402 PR tree-optimization/84114
12403 * config/aarch64/aarch64.c (aarch64_reassociation_width)
12404 Avoid reassociation of FLOAT_MODE addition.
12405
12406 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
12407
12408 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
12409 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
12410 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
12411 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
12412 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
12413 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
12414 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
12415 and -mwbnoinvd.
12416 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
12417 __builtin_ia32_wbinvd): New builtins.
12418 (SPECIAL_ARGS2): New.
12419 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
12420 (SPECIAL_ARGS2): New.
12421 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
12422 (ix86_valid_target_attribute_inner_p): Ditto.
12423 (ix86_init_mmx_sse_builtins): Add special_args2.
12424 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
12425 TARGET_WBNOINVD_P): New.
12426 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
12427 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
12428 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
12429 * config/i386/immintrin.h (_wbinvd): New intrinsic.
12430 * config/i386/pconfigintrin.h: New file.
12431 * config/i386/wbnoinvdintrin.h: Ditto.
12432 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
12433 wbnoinvdintrin.h.
12434 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
12435
12436 2018-03-05 Richard Biener <rguenther@suse.de>
12437
12438 PR tree-optimization/84670
12439 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12440 member.
12441 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12442 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12443 (compute_antic_aux): Only assert the number of values in ANTIC_IN
12444 doesn't grow if all successors (recursively) were visited at least
12445 once.
12446
12447 2018-03-05 Richard Biener <rguenther@suse.de>
12448
12449 PR tree-optimization/84650
12450 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
12451 if executed in the loop pipeline.
12452
12453 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
12454
12455 * doc/configfiles.texi (Configuration Files): Move info about
12456 conditionalizing $target-protos.h to...
12457 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
12458 differs from $target-protos.h.
12459
12460 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
12461 Chung-Ju Wu <jasonwucj@gmail.com>
12462
12463 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
12464 * config/nds32/nds32-multiple.md (setmemsi): Define.
12465 * config/nds32/nds32-memory-manipulation.c
12466 (nds32_gen_dup_4_byte_to_word_value): New.
12467 (emit_setmem_word_loop): New.
12468 (emit_setmem_byte_loop): New.
12469 (nds32_expand_setmem_loop): New.
12470 (nds32_expand_setmem_loop_v3m): New.
12471 (nds32_expand_setmem_unroll): New.
12472 (nds32_expand_setmem): New.
12473
12474 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12475 Chung-Ju Wu <jasonwucj@gmail.com>
12476
12477 * config/nds32/nds32-memory-manipulation.c
12478 (nds32_emit_load_store): New.
12479 (nds32_emit_post_inc_load_store): New.
12480 (nds32_emit_mem_move): New.
12481 (nds32_emit_mem_move_block): New.
12482 (nds32_expand_movmemsi_loop_unknown_size): New.
12483 (nds32_expand_movmemsi_loop_known_size): New.
12484 (nds32_expand_movmemsi_loop): New.
12485 (nds32_expand_movmemsi_unroll): New.
12486 (nds32_expand_movmemqi): Rename ...
12487 (nds32_expand_movmemsi): ... to this.
12488 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
12489 (movmemsi): ... to this.
12490 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
12491 (nds32_expand_movmemsi): ... to this.
12492
12493 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12494 Monk Chiang <sh.chiang04@gmail.com>
12495 Chung-Ju Wu <jasonwucj@gmail.com>
12496
12497 * config/nds32/nds32-protos.h
12498 (nds32_expand_load_multiple): New arguments.
12499 (nds32_expand_store_multiple): Ditto.
12500 (nds32_valid_multiple_load_store): Rename ...
12501 (nds32_valid_multiple_load_store_p): ... to this.
12502 * config/nds32/nds32-memory-manipulation.c
12503 (nds32_expand_load_multiple): Refine implementation.
12504 (nds32_expand_store_multiple): Ditto.
12505 * config/nds32/nds32-multiple.md
12506 (load_multiple): Update nds32_expand_load_multiple interface.
12507 (store_multiple): Update nds32_expand_store_multiple interface.
12508 * config/nds32/nds32-predicates.c
12509 (nds32_valid_multiple_load_store): Rename ...
12510 (nds32_valid_multiple_load_store_p): ... to this and refine
12511 implementation.
12512 * config/nds32/predicates.md
12513 (nds32_load_multiple_and_update_address_operation): New predicate.
12514 (nds32_store_multiple_and_update_address_operation): New predicate.
12515
12516 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12517 Chung-Ju Wu <jasonwucj@gmail.com>
12518
12519 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
12520 (combo): New attribute.
12521 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
12522
12523 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
12524
12525 * config/nds32/nds32.opt: Change -mcmodel= default value.
12526
12527 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
12528 Monk Chiang <sh.chiang04@gmail.com>
12529 Chung-Ju Wu <jasonwucj@gmail.com>
12530
12531 * config/nds32/constants.md (unspec_element): New enum.
12532 * config/nds32/constraints.md (Umw): New constraint.
12533 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
12534 * config/nds32/nds32-intrinsic.md: Likewise.
12535 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
12536 (nds32_valid_smw_lwm_base_p): New.
12537 (nds32_output_smw_single_word): New.
12538 (nds32_output_lmw_single_word): New.
12539 (nds32_expand_unaligned_load): New.
12540 (nds32_expand_unaligned_store): New.
12541 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
12542 (nds32_output_smw_single_word): Declare.
12543 (nds32_output_lmw_single_word): Declare.
12544 (nds32_expand_unaligned_load): Declare.
12545 (nds32_expand_unaligned_store): Declare.
12546 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
12547 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
12548 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
12549 NDS32_BUILTIN_UASTORE_DW.
12550 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
12551 predicate.
12552
12553 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
12554 Kito Cheng <kito.cheng@gmail.com>
12555 Chung-Ju Wu <jasonwucj@gmail.com>
12556
12557 * config/nds32/nds32-intrinsic.c
12558 (nds32_expand_builtin_null_ftype_reg): Delete.
12559 (nds32_expand_builtin_reg_ftype_imm): Ditto.
12560 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
12561 (nds32_read_argument): New.
12562 (nds32_legitimize_target): Ditto.
12563 (nds32_legitimize_argument): Ditto.
12564 (nds32_check_constant_argument): Ditto.
12565 (nds32_expand_unop_builtin): Ditto.
12566 (nds32_expand_unopimm_builtin): Ditto.
12567 (nds32_expand_binop_builtin): Ditto.
12568 (nds32_builtin_decl_impl): Ditto.
12569 (builtin_description): Ditto.
12570 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
12571 (nds32_init_builtins_impl): Ditto.
12572 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
12573 (nds32_builtin_decl): New.
12574 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
12575 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
12576
12577 2018-03-02 Jeff Law <law@redhat.com>
12578
12579 * reorg.c (stop_search_p): Handle DEBUG_INSN.
12580 (redundant_insn, fill_simple_delay_slots): Likewise.
12581 (fill_slots_from_thread): Likewise.
12582 * resource.c (mark_referenced_resources): Likewise.
12583 (mark_set_resources, find_dead_or_set_registers): Likewise.
12584
12585 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12586
12587 * substring-locations.h (format_warning_va): Formatting fix for
12588 ATTRIBUTE_GCC_DIAG.
12589 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
12590 argument.
12591 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
12592 * substring-locations.c: Include intl.h.
12593 (format_warning_va): Turned into small wrapper around
12594 format_warning_n_va, renamed to ...
12595 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
12596 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
12597 use ngettext.
12598 (format_warning_at_substring_n): New function.
12599 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
12600 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
12601 format_warning_at_substring with just a shorter name instead of
12602 const function pointer.
12603 (fmtwarn_n): New function.
12604 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
12605 appropriate, get rid of all the fmtstr temporaries, move conditionals
12606 with G_() wrapped string literals directly into fmtwarn arguments,
12607 cast dir.len to (int), formatting fixes.
12608
12609 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
12610
12611 * doc/invoke.texi: Remove "Cilk Plus" references.
12612
12613 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12614 Richard Biener <rguenther@suse.de>
12615
12616 PR ipa/84628
12617 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
12618 for error or warning attributes if CALL_FROM_THUNK_P is set.
12619 Formatting fixes.
12620
12621 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12622
12623 PR target/56540
12624 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
12625 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
12626
12627 PR target/56540
12628 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
12629 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
12630
12631 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
12632 instead of -1U in last predictors element's probability member.
12633
12634 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
12635
12636 PR ipa/83983
12637 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12638 arguments if they are comparable.
12639
12640 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
12641
12642 PR tree-optimization/84634
12643 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
12644 masks and masked_loop_p with a single loop_masks, making sure it's
12645 null for bb vectorization.
12646
12647 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
12648
12649 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12650 (vect_analyze_data_ref_access): Use loop->safe_len rather than
12651 loop->force_vectorize to check whether there is no alias.
12652
12653 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12654
12655 PR target/84614
12656 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
12657 prototypes.
12658 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
12659 comments.
12660 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
12661 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
12662 instead of a loop around prev_real_insn.
12663 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
12664 prev_real_insn.
12665
12666 PR inline-asm/84625
12667 * config/i386/i386.c (ix86_print_operand): Use conditional
12668 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
12669 zero vector.
12670
12671 2018-03-02 Richard Biener <rguenther@suse.de>
12672
12673 PR tree-optimization/84427
12674 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
12675 (bitmap_set_subtract_values): Rewrite to handle multiple
12676 exprs per value.
12677 (clean): Likewise.
12678 (prune_clobbered_mems): Likewise.
12679 (phi_translate): Take edge instead of pred/phiblock.
12680 (phi_translate_1): Likewise.
12681 (phi_translate_set): Likewise. Insert all translated
12682 exprs for a value into the set, keeping possibly multiple
12683 expressions per value.
12684 (compute_antic_aux): Adjust for phi_translate changes.
12685 When intersecting union the expressions and prune those
12686 not in the final value set, keeping possibly multiple
12687 expressions per value. Do not use value-insertion
12688 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
12689 all expressions. Add verification that the value-sets
12690 only shrink during iteration.
12691 (compute_partial_antic_aux): Adjust for the phi_translate changes.
12692 (do_pre_regular_insertion): Likewise.
12693 (do_pre_partial_partial_insertion): Likewise.
12694
12695 2018-03-02 Richard Biener <rguenther@suse.de>
12696
12697 PR target/82005
12698 * config/darwin.c (saved_debug_info_level): New static global.
12699 (darwin_asm_lto_start): Disable debug info generation for LTO out.
12700 (darwin_asm_lto_end): Restore debug info generation settings.
12701
12702 2018-03-01 Martin Liska <mliska@suse.cz>
12703
12704 PR sanitizer/82484
12705 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
12706 volatile arguments.
12707
12708 2018-03-01 Richard Biener <rguenther@suse.de>
12709
12710 PR debug/84645
12711 * dwarf2out.c (gen_variable_die): Properly handle late VLA
12712 type annotation with LTO when debug was disabled at compile-time.
12713
12714 2018-03-01 Matthew Fortune <mfortune@gmail.com>
12715
12716 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
12717 XINT with INTVAL.
12718 (mips_final_postscan_insn): Likewise.
12719
12720 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
12721
12722 PR rtl-optimization/84528
12723 * alias.c (init_alias_target): Add commentary.
12724 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
12725 a unique base value if the frame pointer is not eliminated
12726 to the stack pointer.
12727
12728 2018-03-01 Tom de Vries <tom@codesourcery.com>
12729
12730 PR rtl-optimization/83327
12731 * lra-int.h (hard_regs_spilled_into): Declare.
12732 * lra.c (hard_regs_spilled_into): Define.
12733 (init_reg_info): Init hard_regs_spilled_into.
12734 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
12735 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
12736 (process_bb_lives): Handle hard_regs_spilled_into.
12737 (lra_create_live_ranges_1): Before doing liveness propagation, clear
12738 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
12739
12740 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
12741
12742 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
12743 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
12744 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
12745 * config/rs6000/aix72.h: New file.
12746
12747 2018-02-28 Jakub Jelinek <jakub@redhat.com>
12748
12749 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
12750 instead of warning_at with conditional singular and plural messages
12751 where possible.
12752
12753 PR target/52991
12754 * stor-layout.c (update_alignment_for_field): For
12755 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
12756 && !DECL_PACKED (field), do the alignment update, just use
12757 only desired_align instead of MAX (type_align, desired_align)
12758 as the alignment.
12759 (place_field): Don't do known_align < desired_align handling
12760 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
12761 is non-NULL, instead do it after rli->prev_field handling and
12762 only if not within a bitfield word. For DECL_PACKED (field)
12763 use type_align of BITS_PER_UNIT.
12764
12765 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
12766
12767 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
12768 superfluous parentheses and trailing spaces.
12769
12770 2018-02-28 Richard Biener <rguenther@suse.de>
12771
12772 PR tree-optimization/84584
12773 * graphite-scop-detection.c (scop_detection::add_scop): Discard
12774 SCoPs with fake exit edge.
12775
12776 2018-02-28 Martin Liska <mliska@suse.cz>
12777
12778 PR testsuite/84597
12779 * timevar.c (timer::print): Fix format to properly print 100%
12780 values.
12781
12782 2018-02-28 Richard Biener <rguenther@suse.de>
12783
12784 PR middle-end/84607
12785 * genmatch.c (capture_info::walk_match): Do not mark
12786 captured expressions without operands as expr_p given
12787 they act more like predicates and should be subject to
12788 "lost tail" side-effect preserving.
12789
12790 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
12791
12792 PR rtl-optimization/81611
12793 * auto-inc-dec.c (attempt_change): Move dead note from
12794 mem_insn if it's the next use of regno
12795 (find_address): Take address use of reg holding
12796 non-incremented value. Add parm to limit search to the named
12797 reg only.
12798 (merge_in_block): Attempt to use a mem insn that is the next
12799 use of the original regno.
12800
12801 2018-02-27 Martin Sebor <msebor@redhat.com>
12802
12803 PR c++/83871
12804 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
12805 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
12806
12807 2018-02-27 Martin Sebor <msebor@redhat.com>
12808
12809 PR translation/84207
12810 * diagnostic-core.h (warning_n, error_n, inform_n): Change
12811 n argument to unsigned HOST_WIDE_INT.
12812 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
12813 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
12814 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
12815 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
12816
12817 2018-02-27 Richard Biener <rguenther@suse.de>
12818
12819 PR tree-optimization/84512
12820 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
12821 Do not use the estimate returned from record_stmt_cost for
12822 the scalar iteration cost but sum properly using add_stmt_cost.
12823
12824 2018-02-27 Richard Biener <rguenther@suse.de>
12825
12826 PR tree-optimization/84466
12827 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12828 Adjust last change to less strictly validate use operands.
12829
12830 2018-02-27 Martin Liska <mliska@suse.cz>
12831
12832 PR gcov-profile/84548
12833 * gcov.c (process_file): Allow partial overlap and consider it
12834 also as group functions.
12835 (output_lines): Properly calculate range of lines for a group.
12836
12837 2018-02-27 Martin Liska <mliska@suse.cz>
12838
12839 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
12840 'ggc' suffixes. Change first column width.
12841 (timer::print): Fix formatting of the column.
12842
12843 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
12844
12845 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
12846 preserve inline entry blocks for the sake of debug inline
12847 entry point markers alone.
12848 (remove_unused_locals): Suggest in comments a better place to
12849 force the preservation of inline entry blocks that are
12850 otherwise unused, but do not preserve them.
12851
12852 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12853
12854 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
12855
12856 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12857
12858 PR target/84039
12859 * config/i386/constraints.md (Bs): Replace
12860 ix86_indirect_branch_register with
12861 TARGET_INDIRECT_BRANCH_REGISTER.
12862 (Bw): Likewise.
12863 * config/i386/i386.md (indirect_jump): Likewise.
12864 (tablejump): Likewise.
12865 (*sibcall_memory): Likewise.
12866 (*sibcall_value_memory): Likewise.
12867 Peepholes of indirect call and jump via memory: Likewise.
12868 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
12869 (*sibcall_value_GOT_32): Likewise.
12870 * config/i386/predicates.md (indirect_branch_operand): Likewise.
12871 (GOT_memory_operand): Likewise.
12872 (call_insn_operand): Likewise.
12873 (sibcall_insn_operand): Likewise.
12874 (GOT32_symbol_operand): Likewise.
12875 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
12876
12877 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12878
12879 PR rtl-optimization/83496
12880 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
12881 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
12882 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
12883 redundant insn, if any.
12884 (relax_delay_slots): Likewise.
12885 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
12886
12887 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
12888
12889 PR tree-optimization/83965
12890 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
12891 that grouped statements are part of a reduction chain. Return
12892 true if the statement is not marked as a reduction itself but
12893 is part of a group.
12894 (vect_recog_dot_prod_pattern): Don't check whether the statement
12895 is part of a group here.
12896 (vect_recog_sad_pattern): Likewise.
12897 (vect_recog_widen_sum_pattern): Likewise.
12898
12899 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12900
12901 PR debug/84545
12902 * final.c (rest_of_clean_state): Also look for calls inside sequences.
12903
12904 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12905
12906 PR target/84530
12907 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
12908 the bool argument.
12909 (ix86_output_indirect_function_return): New prototype.
12910 (ix86_split_simple_return_pop_internal): Likewise.
12911 * config/i386/i386.c (indirect_return_via_cx): New.
12912 (indirect_return_via_cx_bnd): Likewise.
12913 (indirect_thunk_name): Handle return va CX_REG.
12914 (output_indirect_thunk_function): Create alias for
12915 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
12916 (ix86_output_indirect_jmp): Remove the bool argument.
12917 (ix86_output_indirect_function_return): New function.
12918 (ix86_split_simple_return_pop_internal): Likewise.
12919 * config/i386/i386.md (*indirect_jump): Don't pass false
12920 to ix86_output_indirect_jmp.
12921 (*tablejump_1): Likewise.
12922 (simple_return_pop_internal): Change it to define_insn_and_split.
12923 Call ix86_split_simple_return_pop_internal to split it for
12924 -mfunction-return=.
12925 (simple_return_indirect_internal): Call
12926 ix86_output_indirect_function_return instead of
12927 ix86_output_indirect_jmp.
12928
12929 2018-02-26 Jakub Jelinek <jakub@redhat.com>
12930
12931 PR bootstrap/84405
12932 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
12933 memset and value initialization afterwards.
12934
12935 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
12936
12937 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
12938
12939 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12940
12941 PR target/84521
12942 * common/config/aarch64/aarch64-common.c
12943 (aarch_option_optimization_table[]): Switch
12944 off fomit-frame-pointer
12945
12946 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
12947 Chung-Ju Wu <jasonwucj@gmail.com>
12948
12949 * config/nds32/nds32-multiple.md (load_multiple): Disallow
12950 volatile memory.
12951 (store_multiple): Ditto.
12952
12953 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
12954
12955 * config.gcc: Add --with-cpu support for nds32 target.
12956 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
12957 * config/nds32/nds32.opt: Add -mcpu= option.
12958
12959 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
12960
12961 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
12962 isel=yes): Warn for these deprecated options.
12963
12964 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
12965
12966 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
12967 ISA_2_5_MASKS_EMBEDDED.
12968
12969 2018-02-23 Jakub Jelinek <jakub@redhat.com>
12970
12971 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
12972 p->max as pointers rather than using iterative_hash_expr.
12973
12974 2018-02-23 Carl Love <cel@us.ibm.com>
12975
12976 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
12977 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
12978 BU_P8V_OVERLOAD_2.
12979 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
12980 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
12981 P8V_BUILTIN_VEC_VUNSIGNED2.
12982
12983 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
12984
12985 PR target/81572
12986 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
12987 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
12988 LRA_UNKNOWN_ALT.
12989 * lra-constraints.c (curr_insn_transform): Set up
12990 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
12991 LRA_UNKNOWN_ALT.
12992 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
12993 * lra-eliminations.c (spill_pseudos): Ditto.
12994 (process_insn_for_elimination): Ditto.
12995 * lra-lives.c (reg_early_clobber_p): Use the new macros.
12996 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
12997 LRA_NON_CLOBBERED_ALT.
12998
12999 2018-02-22 Martin Sebor <msebor@redhat.com>
13000
13001 PR tree-optimization/84480
13002 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
13003 to maybe_diag_stxncpy_trunc. Call it.
13004 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
13005 from gimple_fold_builtin_strcpy. Print inlining stack.
13006 (handle_builtin_stxncpy): Print inlining stack.
13007 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
13008
13009 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
13010
13011 PR target/84176
13012 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
13013 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
13014 and -fcheck-pointer-bounds are used together.
13015 (indirect_thunk_prefix): New enum.
13016 (indirect_thunk_need_prefix): New function.
13017 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
13018 "_nt" instead of "_bnd" for NOTRACK prefix.
13019 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
13020 (output_indirect_thunk_function): Likewise.
13021 (): Likewise.
13022 (ix86_code_end): Update output_indirect_thunk_function calls.
13023 (ix86_output_indirect_branch_via_reg): Replace
13024 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
13025 (ix86_output_indirect_branch_via_push): Likewise.
13026 (ix86_output_function_return): Likewise.
13027 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
13028 incompatible with -fcf-protection=branch and
13029 -fcheck-pointer-bounds.
13030
13031 2018-02-22 Steve Ellcey <sellcey@cavium.com>
13032
13033 PR target/83335
13034 * config/aarch64/aarch64.c (aarch64_print_address_internal):
13035 Change gcc_assert call to output_operand_lossage.
13036
13037 2018-02-22 Steve Ellcey <sellcey@cavium.com>
13038
13039 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
13040
13041 2018-02-22 DJ Delorie <dj@redhat.com>
13042 Sebastian Perta <sebastian.perta@renesas.com>
13043 Oleg Endo <olegendo@gcc.gnu.org>
13044
13045 * config/rx/rx.c (rx_rtx_costs): New function.
13046 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
13047
13048 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
13049
13050 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
13051
13052 2018-02-22 Martin Liska <mliska@suse.cz>
13053
13054 PR driver/83193
13055 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
13056 Add "native" as a possible value.
13057
13058 2018-02-22 Martin Liska <mliska@suse.cz>
13059
13060 PR driver/83193
13061 * config/i386/i386.c (ix86_option_override_internal):
13062 Add "native" as a possible value for -march and -mtune.
13063
13064 2018-02-22 Jakub Jelinek <jakub@redhat.com>
13065
13066 PR target/84502
13067 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
13068 to all type variants.
13069
13070 PR tree-optimization/84503
13071 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
13072 width as info->bitpos + info->bitsize - start.
13073 (merged_store_group::merge_overlapping): Simplify width computation.
13074 (check_no_overlap): New function.
13075 (imm_store_chain_info::try_coalesce_bswap): Compute expected
13076 start + width and last_order of the group, fail if check_no_overlap
13077 fails.
13078 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
13079 to group if check_no_overlap fails.
13080
13081 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
13082
13083 * config/rs6000/altivec.md: Delete contraint arguments to
13084 define_expand, define_split, and define_peephole2, and in
13085 define_insn_and_split if always unused.
13086 * config/rs6000/darwin.md: Ditto.
13087 * config/rs6000/dfp.md: Ditto.
13088 * config/rs6000/rs6000.md: Ditto.
13089 * config/rs6000/sync.md: Ditto.
13090 * config/rs6000/vector.md: Ditto.
13091 * config/rs6000/vsx.md: Ditto.
13092
13093 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
13094
13095 * config/rs6000/altivec.md: Write output control strings as braced
13096 blocks instead of double-quoted strings.
13097 * config/rs6000/darwin.md: Ditto.
13098 * config/rs6000/rs6000.md: Ditto.
13099 * config/rs6000/vector.md: Ditto.
13100 * config/rs6000/vsx.md: Ditto.
13101
13102 2018-02-21 Jason Merrill <jason@redhat.com>
13103
13104 PR c++/84314 - ICE with templates and fastcall attribute.
13105 * attribs.c (build_type_attribute_qual_variant): Remove assert.
13106
13107 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
13108
13109 * ipa-cp.c (determine_versionability): Fix comment typos.
13110
13111 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
13112
13113 PR c/84229
13114 * ipa-cp.c (determine_versionability): Do not version functions caling
13115 va_arg_pack.
13116
13117 2018-02-21 Martin Liska <mliska@suse.cz>
13118
13119 PR driver/83193
13120 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
13121 Add "native" as a possible value.
13122 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
13123 the macro when native cpu detection is available.
13124
13125 2018-02-21 Martin Liska <mliska@suse.cz>
13126
13127 PR driver/83193
13128 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
13129 Add "native" as a possible value.
13130 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
13131 when native cpu detection is available.
13132
13133 2018-02-21 Jakub Jelinek <jakub@redhat.com>
13134 Martin Sebor <msebor@redhat.com>
13135
13136 PR tree-optimization/84478
13137 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
13138 false.
13139 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
13140 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
13141 support which is conservatively correct, for 2 only stay conservative
13142 for maxlen. Formatting and comment capitalization fixes. Add STRICT
13143 argument to the 2 argument get_range_strlen, adjust 6 arg
13144 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
13145 false.
13146 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
13147 (gimple_fold_builtin_strlen): Pass true as last argument to
13148 get_range_strlen.
13149
13150 2018-02-20 Martin Sebor <msebor@redhat.com>
13151
13152 PR middle-end/84095
13153 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
13154 (builtin_memref::set_base_and_offset): Same. Handle inner references.
13155 (builtin_memref::builtin_memref): Factor out parts into
13156 set_base_and_offset and call it.
13157
13158 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13159
13160 PR middle-end/84406
13161 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
13162 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
13163 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
13164 search at the associated MODE_INT.
13165
13166 2018-02-20 Jeff Law <law@redhat.com>
13167
13168 PR middle-end/82123
13169 PR tree-optimization/81592
13170 PR middle-end/79257
13171 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
13172 for range data rather than using global data.
13173 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
13174 range data rather than using global data.
13175 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
13176 pass it to children as needed.
13177 (struct directive::fmtresult): Similarly.
13178 (struct directive::set_width): Similarly.
13179 (struct directive::set_precision): Similarly.
13180 (format_integer, format_directive, parse_directive): Similarly.
13181 (format_none): Accept unnamed vr_values parameter.
13182 (format_percent, format_floating, format_character): Similarly.
13183 (format_string, format_plain): Similarly.
13184 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
13185 the EVRP range analyzer for range data rather than using global data.
13186 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
13187 gimple-ssa-evrp-analyze.h
13188 (class sprintf_dom_walker): Add after_dom_children member function.
13189 Add evrp_range_analyzer member.
13190 (sprintf_dom_walker::before_dom_children): Call into the EVRP
13191 range analyzer as needed.
13192 (sprintf_dom_walker::after_dom_children): New member function.
13193 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
13194 if not optimizing.
13195 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
13196 (evrp_range_analyzer::pop_to_marker): Likewise.
13197
13198 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13199
13200 PR tree-optimization/84419
13201 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
13202 with the required type if its current type is compatible but
13203 different.
13204
13205 2018-02-20 Jakub Jelinek <jakub@redhat.com>
13206
13207 PR middle-end/82004
13208 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
13209 after vectorization.
13210
13211 2018-02-20 Martin Liska <mliska@suse.cz>
13212
13213 PR driver/83193
13214 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
13215 possible values if we don't have a hint.
13216
13217 2018-02-20 Martin Liska <mliska@suse.cz>
13218
13219 PR c/84310
13220 PR target/79747
13221 * final.c (shorten_branches): Build align_tab array with one
13222 more element.
13223 * opts.c (finish_options): Add alignment option limit check.
13224 (MAX_CODE_ALIGN): Likewise.
13225 (MAX_CODE_ALIGN_VALUE): Likewise.
13226 * doc/invoke.texi: Document maximum allowed option value for
13227 all -falign-* options.
13228
13229 2018-02-19 Jakub Jelinek <jakub@redhat.com>
13230
13231 PR target/84146
13232 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
13233 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
13234 * var-tracking.c (emit_note_insn_var_location): Remove all references
13235 to NOTE_INSN_CALL_ARG_LOCATION.
13236 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
13237 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
13238 Use copy_rtx_if_shared.
13239 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
13240 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
13241 (dwarf2out_var_location): Remove handling of
13242 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
13243 on call_insn.
13244 * final.c (final_scan_insn): Remove all references to
13245 NOTE_INSN_CALL_ARG_LOCATION.
13246 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
13247 before dumping final insns.
13248 * except.c (emit_note_eh_region_end): Remove all references to
13249 NOTE_INSN_CALL_ARG_LOCATION.
13250 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
13251 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
13252 * config/arc/arc.c (hwloop_optimize): Likewise.
13253 * config/arm/arm.c (create_fix_barrier): Likewise.
13254 * config/s390/s390.c (s390_chunkify_start): Likewise.
13255 * config/sh/sh.c (find_barrier): Likewise.
13256 * config/i386/i386.c (rest_of_insert_endbranch,
13257 ix86_seh_fixup_eh_fallthru): Likewise.
13258 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
13259 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
13260 * config/frv/frv.c (frv_function_prologue): Likewise.
13261 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
13262 reg note.
13263 (note_outside_basic_block_p): Remove all references to
13264 NOTE_INSN_CALL_ARG_LOCATION.
13265 * gengtype.c (adjust_field_rtx_def): Likewise.
13266 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
13267 Likewise.
13268 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
13269 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
13270
13271 PR c++/84444
13272 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
13273 is ADDR_EXPR.
13274
13275 PR tree-optimization/84452
13276 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
13277 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
13278 is NULL.
13279
13280 2018-02-19 Martin Liska <mliska@suse.cz>
13281
13282 PR sanitizer/82183
13283 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
13284
13285 2018-02-19 Martin Liska <mliska@suse.cz>
13286 Richard Sandiford <richard.sandiford@linaro.org>
13287
13288 PR tree-optimization/82491
13289 * gimple-fold.c (get_base_constructor): Make earlier bail out
13290 to prevent ubsan.
13291
13292 2018-02-19 Carl Love <cel@us.ibm.com>
13293
13294 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
13295 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
13296 BU_P8V_OVERLOAD_1.
13297 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
13298 P8V_BUILTIN_VEC_NEG.
13299
13300 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
13301
13302 * config/rl78/rl78.md (movdf): New define expand.
13303
13304 2018-02-19 Martin Liska <mliska@suse.cz>
13305
13306 PR other/80589
13307 * doc/invoke.texi: Fix typo.
13308 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
13309
13310 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
13311
13312 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
13313 handle rs6000_single_float and rs6000_double_float specially for
13314 e500 family CPUs.
13315
13316 2018-02-16 Jeff Law <law@redhat.com>
13317
13318 * config/rx/rx.c (add_pop_cfi_notes): New function.;
13319 (pop_regs): Use it.
13320
13321 2018-02-16 Jakub Jelinek <jakub@redhat.com>
13322
13323 PR ipa/84425
13324 * ipa-inline.c (inline_small_functions): Fix a typo.
13325
13326 2018-02-16 Nathan Sidwell <nathan@acm.org>
13327
13328 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
13329
13330 2018-02-16 Carl Love <cel@us.ibm.com>
13331
13332 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
13333 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
13334 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
13335 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
13336 expansion to P8V_BUILTIN_VEC_FLOAT2.
13337
13338 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
13339
13340 PR rtl-optimization/70023
13341 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
13342 src_regno into account.
13343
13344 2018-02-16 Carl Love <cel@us.ibm.com>
13345
13346 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
13347 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
13348 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
13349 * config/rs6000/rs6000.c: Remove case statements for
13350 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
13351 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
13352 and P9V_BUILTIN_VEC_VINSERT4B.
13353 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
13354 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
13355 * config/rs6000/vsx.md:
13356 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
13357 vec_insert4b.
13358
13359 2018-02-16 Carl Love <cel@us.ibm.com>
13360
13361 * config/rs6000/altivec.h: Add builtin names vec_extract4b
13362 vec_insert4b.
13363 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
13364 definitions.
13365 * config/rs6000/rs6000-c.c: Add the definitions for
13366 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
13367 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
13368 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
13369 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
13370 definition for insert4b and define insn *insert3b_internal.
13371 * doc/extend.texi: Add documentation for vec_extract4b.
13372
13373 2018-02-16 Nathan Sidwell <nathan@acm.org>
13374
13375 * doc/extend.texi (Backwards Compatibility): Mention friend
13376 injection. Note for-scope is deprecated.
13377 * doc/invoke.texi (-ffriend-injection): Deprecate.
13378
13379 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
13380
13381 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
13382 that moved to I2, also allow destinations that are a paradoxical
13383 subreg (instead of a normal reg).
13384
13385 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
13386
13387 PR target/83831
13388 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
13389 to QImode.
13390
13391 2018-02-16 Richard Biener <rguenther@suse.de>
13392
13393 PR tree-optimization/84037
13394 PR tree-optimization/84016
13395 PR target/82862
13396 * config/i386/i386.c (ix86_builtin_vectorization_cost):
13397 Adjust vec_construct for the fact we need additional higher latency
13398 128bit inserts for AVX256 and AVX512 vector builds.
13399 (ix86_add_stmt_cost): Scale vector construction cost for
13400 elementwise loads.
13401
13402 2018-02-16 Richard Biener <rguenther@suse.de>
13403
13404 PR tree-optimization/84417
13405 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
13406 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
13407 (non_rewritable_lvalue_p): Likewise, use poly-ints.
13408
13409 2018-02-16 Martin Liska <mliska@suse.cz>
13410
13411 PR sanitizer/84307
13412 * internal-fn.def (ASAN_CHECK): Set proper flags.
13413 (ASAN_MARK): Likewise.
13414
13415 2018-02-16 Julia Koval <julia.koval@intel.com>
13416
13417 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
13418 from PTA_CANNONLAKE.
13419
13420 2018-02-16 Jakub Jelinek <jakub@redhat.com>
13421
13422 PR target/84272
13423 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
13424 Use ++iter rather than iter++ for std::list iterators.
13425 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
13426 defer deleting them until all nodes in the forest are processed. Do
13427 free even leaf nodes. Change to_process into auto_vec.
13428
13429 PR bootstrap/84405
13430 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
13431 * vec.h (vec_default_construct): Use memset instead of placement new
13432 if BROKEN_VALUE_INITIALIZATION is defined.
13433 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
13434 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
13435 is defined.
13436
13437 PR rtl-optimization/83723
13438 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
13439 * lra.c (lra_substitute_pseudo): Likewise. If true, use
13440 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
13441 recursive calls.
13442 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
13443 callers.
13444 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
13445
13446 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
13447
13448 PR rtl-optimization/81443
13449 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
13450 from inner REGs to paradoxical SUBREGs.
13451
13452 2018-02-16 Richard Biener <rguenther@suse.de>
13453
13454 PR tree-optimization/84399
13455 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13456 For operands we can analyze at their definition make sure we can
13457 analyze them at each use as well.
13458
13459 2018-02-16 Richard Biener <rguenther@suse.de>
13460
13461 PR tree-optimization/84190
13462 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
13463 volatile accesses if the decl isn't volatile.
13464
13465 2018-02-15 Jason Merrill <jason@redhat.com>
13466
13467 PR c++/84314 - ICE with templates and fastcall attribute.
13468 * attribs.c (build_type_attribute_qual_variant): Don't clobber
13469 TYPE_CANONICAL on an existing type.
13470
13471 2018-02-15 Jakub Jelinek <jakub@redhat.com>
13472
13473 PR tree-optimization/84383
13474 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
13475 dstoff nor call operand_equal_p if dstbase is NULL.
13476
13477 PR tree-optimization/84334
13478 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
13479 also a CONSTANT_CLASS_P, punt.
13480
13481 2018-02-14 Jim Wilson <jimw@sifive.com>
13482
13483 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
13484 first SMALL_OPERAND check. New local min_second_step. Move assert
13485 to where locals are set. Add TARGET_RVC support.
13486 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
13487
13488 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
13489
13490 * doc/invoke.texi: Correct -Wformat-overflow code sample.
13491
13492 2018-02-14 Martin Sebor <msebor@redhat.com>
13493
13494 PR tree-optimization/83698
13495 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
13496 arrays constrain the offset range to their bounds.
13497 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
13498 (builtin_access::overlap): Avoid setting the size of overlap if it's
13499 already been set.
13500 (maybe_diag_overlap): Also consider arrays when deciding what values
13501 of offsets to include in diagnostics.
13502
13503 2018-02-14 Martin Sebor <msebor@redhat.com>
13504
13505 PR c/84108
13506 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
13507 that correspond to the kind of a declaration.
13508
13509 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
13510
13511 PR target/83984
13512 * config/pa/pa.md: Load address of PIC label using the linkage table
13513 if the label is nonlocal.
13514
13515 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
13516
13517 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
13518 warning message if user requests -maltivec=be.
13519 * doc/invoke.texi: Document deprecation of -maltivec=be.
13520
13521 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
13522
13523 PR target/84220
13524 * config/rs6000/rs6000-c.c: Update definitions for
13525 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
13526 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
13527
13528 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13529
13530 PR target/84239
13531 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
13532 add _get_ssp intrinsics. Remove argument from
13533 __builtin_ia32_rdssp[d|q].
13534 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
13535 * config/i386/i386-builtin.def: Remove argument from
13536 __builtin_ia32_rdssp[d|q].
13537 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
13538 ix86_expand_special_args_builtin for _rdssp[d|q].
13539 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
13540 Clear register before usage.
13541 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
13542 Add documentation for new _get_ssp and _inc_ssp intrinsics.
13543
13544 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
13545
13546 PR tree-optimization/84357
13547 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
13548 operand 1 of an ARRAY_REF too.
13549
13550 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
13551
13552 PR target/83831
13553 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
13554 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13555 declarations.
13556 (set_of_reg): New struct.
13557 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
13558 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
13559 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13560 functions.
13561 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
13562 Split into bitclr, bitset, bitinvert patterns if appropriate.
13563 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
13564 use rx_fuse_in_memory_bitop.
13565 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
13566 to named insn, correct maximum insn length.
13567
13568 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
13569
13570 PR target/79242
13571 * machmode.def: Define a complex mode for PARTIAL_INT.
13572 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
13573 MODE_PARTIAL_INT.
13574 * doc/rtl.texi: Document CSPImode.
13575 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
13576 handling.
13577 (msp430_hard_regno_nregs_with_padding): Likewise.
13578
13579 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
13580
13581 PR target/84279
13582 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
13583
13584 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
13585
13586 PR rtl-optimization/84169
13587 * combine.c (try_combine): New variable split_i2i3. Set it to true if
13588 we generated a parallel as new i3 and we split that to new i2 and i3
13589 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
13590 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
13591 those to i2, not i1. Partially rewrite this scan code.
13592
13593 2018-02-13 Jakub Jelinek <jakub@redhat.com>
13594
13595 PR c/82210
13596 * stor-layout.c (place_field): For variable length fields, adjust
13597 offset_align afterwards not just based on the field's alignment,
13598 but also on the size.
13599
13600 PR middle-end/84309
13601 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
13602 of exps and logs in the use_exp2 case.
13603
13604 2018-02-13 Jeff Law <law@redhat.com>
13605
13606 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
13607 entry for "vector".
13608
13609 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
13610 ARGS as unused.
13611
13612 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
13613
13614 PR debug/84342
13615 PR debug/84319
13616 * common.opt (gas-loc-support, gas-locview-support): New.
13617 (ginline-points, ginternal-reset-location-views): New.
13618 * doc/invoke.texi: Document them. Use @itemx where intended.
13619 (gvariable-location-views): Adjust.
13620 * target.def (reset_location_view): New.
13621 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
13622 (TARGET_RESET_LOCATION_VIEW): New.
13623 * doc/tm.texi: Rebuilt.
13624 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
13625 (dwarf2out_default_as_locview_support): New.
13626 (output_asm_line_debug_info): Use option variables.
13627 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
13628 (output_loc_list): Likewise.
13629 (add_high_low_attributes): Check option variables.
13630 Don't output entry view attribute in strict mode.
13631 (gen_inlined_subroutine_die): Check option variables.
13632 (dwarf2out_inline_entry): Likewise.
13633 (init_sections_and_labels): Likewise.
13634 (dwarf2out_early_finish): Likewise.
13635 (maybe_reset_location_view): New, from...
13636 (dwarf2out_var_location): ... here. Call it.
13637 * debug.h (dwarf2out_default_as_loc_support): Declare.
13638 (dwarf2out_default_as_locview_support): Declare.
13639 * hooks.c (hook_int_rtx_insn_0): New.
13640 * hooks.h (hook_int_rtx_insn_0): Declare.
13641 * toplev.c (process_options): Take -gas-loc-support and
13642 -gas-locview-support from dwarf2out. Enable
13643 -gvariable-location-views by default only with locview
13644 assembler support. Enable -ginternal-reset-location-views by
13645 default only if the target defines the corresponding hook.
13646 Enable -ginline-points by default if location views are
13647 enabled; force it disabled if statement frontiers are
13648 disabled.
13649 * tree-inline.c (expand_call_inline): Check option variables.
13650 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
13651
13652 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
13653
13654 PR tree-optimization/84321
13655 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
13656 handling. Also check whether the anti-range contains any values
13657 that satisfy the mask; switch to a VR_RANGE if not.
13658
13659 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
13660
13661 PR sanitizer/84340
13662 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
13663
13664 2018-02-13 Martin Jambor <mjambor@suse.cz>
13665
13666 PR c++/83990
13667 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
13668 of call statements, also set location of a load to a temporary.
13669
13670 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
13671
13672 * config/rl78/rl78.c (add_vector_labels): New function.
13673 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
13674 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
13675 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
13676 which checks that no arguments are passed.
13677 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
13678 * doc/extend.texi: Documentation for the new attribute.
13679
13680 2018-02-13 Andreas Schwab <schwab@suse.de>
13681
13682 * config/riscv/linux.h (CPP_SPEC): Define.
13683
13684 2018-02-13 Jakub Jelinek <jakub@redhat.com>
13685
13686 PR target/84335
13687 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
13688 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
13689 OPTION_MASK_ISA_AES as first argument to def_builtin_const
13690 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
13691 instead of OPTION_MASK_ISA_PCLMUL as first argument to
13692 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
13693 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
13694 temporarily for AES and PCLMUL builtins.
13695
13696 PR tree-optimization/84339
13697 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
13698 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
13699 Formatting fixes.
13700
13701 PR middle-end/84309
13702 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
13703 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
13704 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
13705 inline function.
13706 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
13707 inline function.
13708 * omp-simd-clone.h: New file.
13709 * omp-simd-clone.c: Include omp-simd-clone.h.
13710 (expand_simd_clones): No longer static.
13711 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
13712 cgraph.h and omp-simd-clone.h.
13713 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
13714 (vect_recog_widen_shift_pattern): Formatting fix.
13715 (vect_pattern_recog_1): Don't check optab for calls.
13716
13717 PR target/84336
13718 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
13719 operands[2] into a REG before using gen_lowpart on it.
13720
13721 2018-02-12 Jeff Law <law@redhat.com>
13722
13723 PR target/83760
13724 * config/sh/sh.c (find_barrier): Consider a sibling call
13725 a barrier as well.
13726
13727 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
13728 successfully back substituting a reg.
13729
13730 2018-02-12 Richard Biener <rguenther@suse.de>
13731
13732 PR tree-optimization/84037
13733 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
13734 parameter, move visited init to caller.
13735 (vect_slp_analyze_operations): Separate cost from validity
13736 check, initialize visited once for all instances.
13737 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
13738 for all instances.
13739 * tree-vect-stmts.c (vect_model_simple_cost): Make early
13740 out an assert.
13741 (vect_model_promotion_demotion_cost): Likewise.
13742 (vectorizable_bswap): Guard cost modeling with !slp_node
13743 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
13744 SLP stmts.
13745 (vectorizable_call): Likewise.
13746 (vectorizable_conversion): Likewise.
13747 (vectorizable_assignment): Likewise.
13748 (vectorizable_shift): Likewise.
13749 (vectorizable_operation): Likewise.
13750 (vectorizable_store): Likewise.
13751 (vectorizable_load): Likewise.
13752 (vectorizable_condition): Likewise.
13753 (vectorizable_comparison): Likewise.
13754
13755 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
13756
13757 PR sanitizer/84307
13758 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
13759 (ASAN_MARK): Fix fnspec to account for return value, change pointer
13760 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
13761
13762 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
13763
13764 PR middle-end/83665
13765 * params.def (inline-min-speedup): Increase from 8 to 15.
13766 (max-inline-insns-auto): Decrease from 40 to 30.
13767 * ipa-split.c (consider_split): Add some buffer for function to
13768 be considered inlining candidate.
13769 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
13770 default values.
13771
13772 2018-02-12 Richard Biener <rguenther@suse.de>
13773
13774 PR tree-optimization/84037
13775 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
13776 matched stmts if we cannot swap the non-matched ones.
13777
13778 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13779
13780 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
13781 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
13782 _mm_maskz_scalef_round_ss): New intrinsics.
13783 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
13784 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
13785 __builtin_ia32_scalefss_round): Remove.
13786 (__builtin_ia32_scalefsd_mask_round,
13787 __builtin_ia32_scalefss_mask_round): New intrinsics.
13788 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
13789 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
13790 ((match_operand:VF_128 2 "<round_nimm_predicate>"
13791 "<round_constraint>")): Changed to ...
13792 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
13793 "<round_scalar_constraint>")): ... this.
13794 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
13795 %0, %1, %2<round_op3>}"): Changed to ...
13796 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
13797 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
13798 %2<round_scalar_mask_op3>}"): ... this.
13799 * config/i386/subst.md (round_scalar_nimm_predicate): New.
13800
13801 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13802
13803 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
13804 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
13805 (_mm_maskz_sqrt_round_ss): New intrinsics.
13806 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
13807 (__builtin_ia32_sqrtsd_mask_round)
13808 (__builtin_ia32_sqrtss_mask_round): New builtins.
13809 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
13810 (__builtin_ia32_sqrtss_round): Remove.
13811 (__builtin_ia32_sqrtsd_mask_round)
13812 (__builtin_ia32_sqrtss_mask_round): New builtins.
13813 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
13814 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
13815 ((match_operand:VF_128 1 "vector_operand"
13816 "xBm,<round_constraint>")): Changed to ...
13817 ((match_operand:VF_128 1 "vector_operand"
13818 "xBm,<round_scalar_constraint>")): ... this.
13819 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
13820 %0, %2, %<iptr>1<round_op3>}): Changed to ...
13821 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
13822 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
13823 %<iptr>1<round_scalar_mask_op3>}): ... this.
13824 ((set_attr "prefix" "<round_prefix>")): Changed to ...
13825 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
13826
13827 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
13828
13829 PR target/84266
13830 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
13831 Cast vec_cmpeq result to correct type.
13832 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
13833 Cast vec_cmpgt result to correct type.
13834
13835 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
13836
13837 * final.c (final_scan_insn_1): Renamed from...
13838 (final_scan_insn): ... this. New wrapper, to recover
13839 seen from the outermost call in recursive ones.
13840 * config/sparc/sparc.c (output_return): Drop seen from call.
13841 (output_sibcall): Likewise.
13842 * config/visium/visium.c (output_branch): Likewise.
13843
13844 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
13845
13846 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
13847 function label.
13848
13849 2018-02-10 Alan Modra <amodra@gmail.com>
13850
13851 PR target/84300
13852 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
13853 Specify LR as an input.
13854
13855 2018-02-10 Jakub Jelinek <jakub@redhat.com>
13856
13857 PR sanitizer/83987
13858 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
13859 remove_member_access_dummy_vars): New functions.
13860 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
13861 lower_omp_1, execute_lower_omp): Use them.
13862
13863 PR rtl-optimization/84308
13864 * shrink-wrap.c (spread_components): Release todo vector.
13865
13866 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
13867
13868 PR rtl-optimization/57193
13869 * ira-color.c (struct allocno_color_data): Add member
13870 conflict_allocno_hard_prefs.
13871 (update_conflict_allocno_hard_prefs): New.
13872 (bucket_allocno_compare_func): Add a preference based on
13873 conflict_allocno_hard_prefs.
13874 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
13875 (color_allocnos): Remove a dead code. Initiate
13876 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
13877
13878 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13879
13880 PR target/84226
13881 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
13882 constraint from =wa to wa. Avoid a subreg on the output operand,
13883 instead use a pseudo and subreg it in a move.
13884 (p9_xxbrd_<mode>): Changed to ...
13885 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
13886 (p9_xxbrd_v2df): New expander.
13887 (p9_xxbrw_<mode>): Changed to ...
13888 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
13889 (p9_xxbrw_v4sf): New expander.
13890
13891 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13892
13893 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
13894
13895 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
13896
13897 PR target/83926
13898 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
13899 multiply in 32-bit mode.
13900 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
13901 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
13902 mode.
13903
13904 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13905
13906 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
13907 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
13908 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
13909 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
13910
13911 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
13912
13913 PR lto/84213
13914 * dwarf2out.c (is_trivial_indirect_ref): New function.
13915 (dwarf2out_late_global_decl): Do not generate a location
13916 attribute for variables that have a non-trivial DECL_VALUE_EXPR
13917 and that are not defined in the current unit.
13918
13919 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
13920
13921 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
13922 instead of a libcall for UNORDERED.
13923
13924 2018-02-09 Tamar Christina <tamar.christina@arm.com>
13925
13926 PR target/82641
13927 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
13928 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
13929
13930 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13931
13932 PR target/PR84295
13933 * config/s390/s390.c (s390_set_current_function): Invoke
13934 s390_indirect_branch_settings also if fndecl didn't change.
13935
13936 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
13937
13938 * config/rs6000/rs6000.md (blockage): Set length to zero.
13939
13940 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
13941
13942 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
13943
13944 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13945
13946 PR sanitizer/84285
13947 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
13948 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
13949 -static-lib*san.
13950
13951 PR debug/84252
13952 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
13953 PARALLEL incoming that failed vt_get_decl_and_offset check.
13954
13955 PR middle-end/84237
13956 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
13957 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
13958 TREE_READONLY bit.
13959 (get_variable_section): For decls in named .bss* sections pass true as
13960 second argument to bss_initializer_p.
13961
13962 2018-02-09 Marek Polacek <polacek@redhat.com>
13963 Jakub Jelinek <jakub@redhat.com>
13964
13965 PR c++/83659
13966 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
13967 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
13968 Sync some changes from cxx_fold_indirect_ref.
13969
13970 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
13971
13972 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
13973 markers.
13974 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
13975 (BLOCK_INLINE_ENTRY_LABEL): New.
13976 (dwarf2out_var_location): Disregard inline entry markers.
13977 (inline_entry_data): New struct.
13978 (inline_entry_data_hasher): New hashtable type.
13979 (inline_entry_data_hasher::hash): New.
13980 (inline_entry_data_hasher::equal): New.
13981 (inline_entry_data_table): New variable.
13982 (add_high_low_attributes): Add DW_AT_entry_pc and
13983 DW_AT_GNU_entry_view attributes if a pending entry is found
13984 in inline_entry_data_table. Add old entry_pc attribute only
13985 if debug nonbinding markers are disabled.
13986 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
13987 markers are enabled.
13988 (block_within_block_p, dwarf2out_inline_entry): New.
13989 (dwarf2out_finish): Check that no entries remained in
13990 inline_entry_data_table.
13991 * final.c (reemit_insn_block_notes): Handle inline entry notes.
13992 (final_scan_insn, notice_source_line): Likewise.
13993 (rest_of_clean_state): Skip inline entry markers.
13994 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
13995 markers.
13996 * gimple.c (gimple_build_debug_inline_entry): New.
13997 * gimple.h (enum gimple_debug_subcode): Add
13998 GIMPLE_DEBUG_INLINE_ENTRY.
13999 (gimple_build_debug_inline_entry): Declare.
14000 (gimple_debug_inline_entry_p): New.
14001 (gimple_debug_nonbind_marker_p): Adjust.
14002 * insn-notes.def (INLINE_ENTRY): New.
14003 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
14004 inline entry marker notes.
14005 (print_insn): Likewise.
14006 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
14007 (INSN_DEBUG_MARKER_KIND): Likewise.
14008 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
14009 * tree-inline.c (expand_call_inline): Build and insert
14010 debug_inline_entry stmt.
14011 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
14012 inline entry blocks early, if nonbind markers are enabled.
14013 (dump_scope_block): Dump fragment info.
14014 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
14015 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
14016 (gimple_build_debug_inline_entry): New.
14017 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
14018 Enable/disable inline entry points too.
14019 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
14020 (DEBUG_INSN): Describe inline entry markers.
14021
14022 * common.opt (gvariable-location-views): New.
14023 (gvariable-location-views=incompat5): New.
14024 * config.in: Rebuilt.
14025 * configure: Rebuilt.
14026 * configure.ac: Test assembler for view support.
14027 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
14028 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
14029 * dwarf2out.c (var_loc_view): New typedef.
14030 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
14031 (dwarf2out_locviews_in_attribute): New.
14032 (dwarf2out_locviews_in_loclist): New.
14033 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
14034 (enum dw_line_info_opcode): Add LI_adv_address.
14035 (struct dw_line_info_table): Add view.
14036 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
14037 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
14038 (zero_view_p): New variable.
14039 (ZERO_VIEW_P): New macro.
14040 (output_asm_line_debug_info): New.
14041 (struct var_loc_node): Add view.
14042 (add_AT_view_list, AT_loc_list): New.
14043 (add_var_loc_to_decl): Add view param. Test it against last.
14044 (new_loc_list): Add view params. Record them.
14045 (AT_loc_list_ptr): Handle loc and view lists.
14046 (view_list_to_loc_list_val_node): New.
14047 (print_dw_val): Handle dw_val_class_view_list.
14048 (size_of_die): Likewise.
14049 (value_format): Likewise.
14050 (loc_list_has_views): New.
14051 (gen_llsym): Set vl_symbol too.
14052 (maybe_gen_llsym, skip_loc_list_entry): New.
14053 (dwarf2out_maybe_output_loclist_view_pair): New.
14054 (output_loc_list): Output view list or entries too.
14055 (output_view_list_offset): New.
14056 (output_die): Handle dw_val_class_view_list.
14057 (output_dwarf_version): New.
14058 (output_compilation_unit_header): Use it.
14059 (output_skeleton_debug_sections): Likewise.
14060 (output_rnglists, output_line_info): Likewise.
14061 (output_pubnames, output_aranges): Update version comments.
14062 (output_one_line_info_table): Output view numbers in asm comments.
14063 (dw_loc_list): Determine current endview, pass it to new_loc_list.
14064 Call maybe_gen_llsym.
14065 (loc_list_from_tree_1): Adjust.
14066 (add_AT_location_description): Create view list attribute if
14067 needed, check it's absent otherwise.
14068 (convert_cfa_to_fb_loc_list): Adjust.
14069 (maybe_emit_file): Call output_asm_line_debug_info for test.
14070 (dwarf2out_var_location): Reset views as needed. Precompute
14071 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
14072 attribute. Set view.
14073 (new_line_info_table): Reset next view.
14074 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
14075 (dwarf2out_source_line): Likewise. Output view resets and labels to
14076 the assembler, or select appropriate line info opcodes.
14077 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
14078 (optimize_string_length): Catch it. Adjust.
14079 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
14080 dw_val_class_view_list, and remove it if no longer needed.
14081 (hash_loc_list): Hash view numbers.
14082 (loc_list_hasher::equal): Compare them.
14083 (optimize_location_lists): Check whether a view list symbol is
14084 needed, and whether the locview attribute is present, and
14085 whether they match. Remove the locview attribute if no longer
14086 needed.
14087 (index_location_lists): Call skip_loc_list_entry for test.
14088 (dwarf2out_finish): Call output_asm_line_debug_info for test.
14089 Use output_dwarf_version.
14090 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
14091 (struct dw_val_node): Add val_view_list.
14092 * final.c (SEEN_NEXT_VIEW): New.
14093 (set_next_view_needed): New.
14094 (clear_next_view_needed): New.
14095 (maybe_output_next_view): New.
14096 (final_start_function): Rename to...
14097 (final_start_function_1): ... this. Take pointer to FIRST,
14098 add SEEN parameter. Emit param bindings in the initial view.
14099 (final_start_function): Reintroduce SEEN-less interface.
14100 (final): Rename to...
14101 (final_1): ... this. Take SEEN parameter. Output final pending
14102 next view at the end.
14103 (final): Reintroduce seen-less interface.
14104 (final_scan_insn): Output pending next view before switching
14105 sections or ending a block. Mark the next view as needed when
14106 outputting variable locations. Notify debug backend of section
14107 changes, and of location view changes.
14108 (rest_of_handle_final): Adjust.
14109 * toplev.c (process_options): Autodetect value for debug variable
14110 location views option. Warn on incompat5 without -gdwarf-5.
14111 * doc/invoke.texi (gvariable-location-views): New.
14112 (gvariable-location-views=incompat5): New.
14113 (gno-variable-location-views): New.
14114
14115 2018-02-08 David Malcolm <dmalcolm@redhat.com>
14116
14117 PR tree-optimization/84136
14118 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
14119 that the result of find_edge is non-NULL.
14120
14121 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14122
14123 PR target/83008
14124 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
14125 storing integer register in SImode. Fix cost of 256 and 512
14126 byte aligned SSE register store.
14127
14128 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14129
14130 * config/i386/i386.c (ix86_multiplication_cost): Fix
14131 multiplication cost for TARGET_AVX512DQ.
14132
14133 2018-02-08 Marek Polacek <polacek@redhat.com>
14134
14135 PR tree-optimization/84238
14136 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
14137 get_range_strlen.
14138
14139 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14140
14141 PR tree-optimization/84265
14142 * tree-vect-stmts.c (vectorizable_store): Don't treat
14143 VMAT_CONTIGUOUS accesses as grouped.
14144 (vectorizable_load): Likewise.
14145
14146 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14147
14148 PR tree-optimization/81635
14149 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
14150 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
14151 (test_round_for_mask): New functions.
14152 (wide_int_cc_tests): Call test_round_for_mask.
14153 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
14154 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
14155 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
14156 range returned by get_range_info.
14157
14158 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
14159
14160 PR ipa/81360
14161 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
14162 * symtab.c: Include builtins.h
14163 (symtab_node::output_to_lto_symbol_table_p): Move here
14164 from lto-streamer-out.c:output_symbol_p.
14165 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
14166 (output_symbol_p): Move all logic to symtab.c
14167 (produce_symtab): Update.
14168
14169 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14170
14171 * config/s390/s390-opts.h (enum indirect_branch): Define.
14172 * config/s390/s390-protos.h (s390_return_addr_from_memory)
14173 (s390_indirect_branch_via_thunk)
14174 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
14175 (enum s390_indirect_branch_type): Define.
14176 * config/s390/s390.c (struct s390_frame_layout, struct
14177 machine_function): Remove.
14178 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
14179 (indirect_branch_table_label_no, indirect_branch_table_name):
14180 Define variables.
14181 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
14182 (enum s390_indirect_branch_option): Define.
14183 (s390_return_addr_from_memory): New function.
14184 (s390_handle_string_attribute): New function.
14185 (s390_attribute_table): Add new attribute handler.
14186 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
14187 (s390_indirect_branch_via_thunk): New function.
14188 (s390_indirect_branch_via_inline_thunk): New function.
14189 (s390_function_ok_for_sibcall): When jumping via thunk disallow
14190 sibling call optimization for non z10 compiles.
14191 (s390_emit_call): Force indirect branch target to be a single
14192 register. Add r1 clobber for non-z10 compiles.
14193 (s390_emit_epilogue): Emit return jump via return_use expander.
14194 (s390_reorg): Handle JUMP_INSNs as execute targets.
14195 (s390_option_override_internal): Perform validity checks for the
14196 new command line options.
14197 (s390_indirect_branch_attrvalue): New function.
14198 (s390_indirect_branch_settings): New function.
14199 (s390_set_current_function): Invoke s390_indirect_branch_settings.
14200 (s390_output_indirect_thunk_function): New function.
14201 (s390_code_end): Implement target hook.
14202 (s390_case_values_threshold): Implement target hook.
14203 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
14204 macros.
14205 * config/s390/s390.h (struct s390_frame_layout)
14206 (struct machine_function): Move here from s390.c.
14207 (TARGET_INDIRECT_BRANCH_NOBP_RET)
14208 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
14209 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
14210 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
14211 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
14212 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
14213 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
14214 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
14215 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
14216 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
14217 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
14218 (mnemonic attribute): Add values which aren't recognized
14219 automatically.
14220 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
14221 pattern for branch conversion. Fix mnemonic attribute.
14222 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
14223 indirect branch via thunk if requested.
14224 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
14225 ("*indirect_jump"): Disable for branch conversion using out of
14226 line thunks.
14227 ("indirect_jump_via_thunk<mode>_z10")
14228 ("indirect_jump_via_thunk<mode>")
14229 ("indirect_jump_via_inlinethunk<mode>_z10")
14230 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
14231 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
14232 ("casesi_jump_via_inlinethunk<mode>_z10")
14233 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
14234 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
14235 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
14236 ("*indirect2_jump"): Disable for branch conversion.
14237 ("casesi_jump"): Turn into expander and expand patterns for branch
14238 conversion.
14239 ("return_use"): New expander.
14240 ("*return"): Emit return via thunk and rename it to ...
14241 ("*return<mode>"): ... this one.
14242 * config/s390/s390.opt: Add new options and and enum for the
14243 option values.
14244
14245 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14246
14247 * lra-constraints.c (match_reload): Unconditionally use
14248 gen_lowpart_SUBREG, rather than selecting between that
14249 and equivalent gen_rtx_SUBREG code.
14250
14251 2018-02-08 Richard Biener <rguenther@suse.de>
14252
14253 PR tree-optimization/84233
14254 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
14255 changed flag instead of boguously re-using phi_inserted.
14256
14257 2018-02-08 Martin Jambor <mjambor@suse.cz>
14258
14259 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
14260 static local variables.
14261
14262 2018-02-08 Richard Biener <rguenther@suse.de>
14263
14264 PR tree-optimization/84278
14265 * tree-vect-stmts.c (vectorizable_store): When looking for
14266 smaller vector types to perform grouped strided loads/stores
14267 make sure the mode is supported by the target.
14268 (vectorizable_load): Likewise.
14269
14270 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14271
14272 * config/aarch64/aarch64.c (aarch64_components_for_bb):
14273 Increase LDP/STP opportunities by adding adjacent callee-saves.
14274
14275 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14276
14277 PR rtl-optimization/84068
14278 PR rtl-optimization/83459
14279 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
14280
14281 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
14282
14283 PR tree-optimization/84224
14284 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
14285 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
14286 non-zero arguments.
14287
14288 2018-02-07 Iain Sandoe <iain@codesourcery.com>
14289
14290 PR target/84113
14291 * config/rs6000/altivec.md (*restore_world): Remove LR use.
14292 * config/rs6000/predicates.md (restore_world_operation): Adjust op
14293 count, remove one USE.
14294
14295 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
14296
14297 * doc/install.texi (Configuration): Document the
14298 --with-long-double-format={ibm,ieee} PowerPC configuration
14299 options.
14300
14301 PR target/84154
14302 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
14303 Convert from define_expand to be define_insn_and_split. Rework
14304 float/double/_Float128 conversions to QI/HI/SImode to work with
14305 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
14306 conversions to QI/HImode types did a store and then a load to
14307 truncate the value. For conversions to VSX registers, don't split
14308 the insn, instead emit the code directly. Use the code iterator
14309 any_fix to combine signed and unsigned conversions.
14310 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
14311 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
14312 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14313 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
14314 (fix_<mode>di2_hw): Likewise.
14315 (fixuns_<mode>di2_hw): Likewise.
14316 (fix_<mode>si2_hw): Likewise.
14317 (fixuns_<mode>si2_hw): Likewise.
14318 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
14319 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14320 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
14321 fix<uns>_trunc<SFDF:mode>si2_p8.
14322 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
14323 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
14324 (fix<uns>_<mode>_mem): Likewise.
14325 (fctiw<u>z_<mode>_mem): Likewise.
14326 (fix<uns>_<mode>_mem): Likewise.
14327 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
14328 the register allocator from doing a direct move to the GPRs to do
14329 a store, and instead use the ISA 3.0 store byte/half-word from
14330 vector register instruction. For IEEE 128-bit floating point,
14331 also optimize stores of 32-bit ints.
14332 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
14333
14334 2018-02-07 Alan Hayward <alan.hayward@arm.com>
14335
14336 * genextract.c (push_pathstr_operand): New function to support
14337 [a-zA-Z].
14338 (walk_rtx): Call push_pathstr_operand.
14339 (print_path): Support [a-zA-Z].
14340
14341 2018-02-07 Richard Biener <rguenther@suse.de>
14342
14343 PR tree-optimization/84037
14344 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
14345 (cse_and_gimplify_to_preheader): Declare.
14346 (vect_get_place_in_interleaving_chain): Likewise.
14347 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14348 ivexpr_map.
14349 (_loop_vec_info::~_loop_vec_info): Delete it.
14350 (cse_and_gimplify_to_preheader): New function.
14351 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
14352 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
14353 (vectorizable_load): Likewise. For grouped stores always base
14354 the IV on the first element.
14355 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
14356 condition before gimplifying.
14357
14358 2018-02-07 Jakub Jelinek <jakub@redhat.com>
14359
14360 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
14361 *DIV_EXPR and *MOD_EXPR.
14362
14363 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
14364
14365 PR target/84248
14366 * config/i386/i386.c (ix86_option_override_internal): Mask out
14367 the CF_SET bit when checking -fcf-protection.
14368
14369 2018-02-07 Tom de Vries <tom@codesourcery.com>
14370
14371 PR libgomp/84217
14372 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
14373 enough.
14374
14375 2018-02-07 Richard Biener <rguenther@suse.de>
14376
14377 PR tree-optimization/84204
14378 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
14379 this place.
14380
14381 PR tree-optimization/84205
14382 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
14383 special-case isl_ast_op_zdiv_r.
14384
14385 PR tree-optimization/84223
14386 * graphite-scop-detection.c (gather_bbs::before_dom_children):
14387 Only add conditions from within the region.
14388 (gather_bbs::after_dom_children): Adjust.
14389
14390 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
14391
14392 PR target/84209
14393 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
14394 * config/avr/avr.md: Only post-reload split REG-REG moves if
14395 either register is GENERAL_REG_P.
14396
14397 2018-02-07 Jakub Jelinek <jakub@redhat.com>
14398
14399 PR tree-optimization/84235
14400 * tree-ssa-scopedtables.c
14401 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
14402 if the subtraction is performed in floating point type where NaNs are
14403 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
14404 build 1. Formatting fix.
14405
14406 2018-02-06 Jakub Jelinek <jakub@redhat.com>
14407
14408 PR target/84146
14409 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
14410 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
14411 and skip it regardless of bb boundaries. Use CALL_P macro,
14412 don't test INSN_P (insn) together with CALL_P or JUMP_P check
14413 unnecessarily, formatting fix.
14414
14415 2018-02-06 Michael Collison <michael.collison@arm.com>
14416
14417 * config/arm/thumb2.md:
14418 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
14419 (*thumb_mov_notscc): Ditto.
14420
14421 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
14422
14423 PR target/84154
14424 * config/rs6000/rs6000.md (su code attribute): Use "u" for
14425 unsigned_fix, not "s".
14426
14427 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14428
14429 * configure.ac (gcc_fn_eh_frame_ro): New function.
14430 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
14431 correct .eh_frame permissions.
14432 * configure: Regenerate.
14433
14434 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
14435
14436 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
14437 irrelevant options.
14438
14439 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14440
14441 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14442 Display warning message for -mno-speculate-indirect-jumps.
14443
14444 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
14445
14446 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
14447 Undocumented.
14448 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
14449
14450 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
14451
14452 PR tree-optimization/84225
14453 * tree-eh.c (find_trapping_overflow): Only call
14454 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
14455
14456 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14457
14458 PR target/84145
14459 * config/i386/i386.c: Reimplement the check of possible options
14460 -mibt/-mshstk conbination. Change error messages.
14461 * doc/invoke.texi: Fix a typo: remove extra '='.
14462
14463 2018-02-06 Marek Polacek <polacek@redhat.com>
14464
14465 PR tree-optimization/84228
14466 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
14467
14468 2018-02-06 Tamar Christina <tamar.christina@arm.com>
14469
14470 PR target/82641
14471 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
14472 emitted arch directives.
14473 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
14474 __ARM_FEATURE_COPROC before changing architectures.
14475
14476 2018-02-06 Richard Biener <rguenther@suse.de>
14477
14478 * config/i386/i386.c (print_reg): Fix typo.
14479 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
14480
14481 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
14482
14483 * configure: Regenerate.
14484
14485 2018-02-05 Martin Sebor <msebor@redhat.com>
14486
14487 PR tree-optimization/83369
14488 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
14489 inlining context.
14490
14491 2018-02-05 Martin Liska <mliska@suse.cz>
14492
14493 * doc/invoke.texi: Cherry-pick upstream r323995.
14494
14495 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
14496
14497 * ira.c (ira_init_register_move_cost): Adjust comment.
14498
14499 2018-02-05 Martin Liska <mliska@suse.cz>
14500
14501 PR gcov-profile/84137
14502 * doc/gcov.texi: Fix typo in documentation.
14503
14504 2018-02-05 Martin Liska <mliska@suse.cz>
14505
14506 PR gcov-profile/83879
14507 * doc/gcov.texi: Document necessity of --dynamic-list-data when
14508 using dlopen functionality.
14509
14510 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
14511
14512 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
14513 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
14514 _mm_maskz_range_ss, _mm_mask_range_round_ss,
14515 _mm_maskz_range_round_ss): New intrinsics.
14516 (__builtin_ia32_rangesd128_round)
14517 (__builtin_ia32_rangess128_round): Remove.
14518 (__builtin_ia32_rangesd128_mask_round,
14519 __builtin_ia32_rangess128_mask_round): New builtins.
14520 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
14521 __builtin_ia32_rangess128_round): Remove.
14522 (__builtin_ia32_rangesd128_mask_round,
14523 __builtin_ia32_rangess128_mask_round): New builtins.
14524 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
14525 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
14526 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
14527 "<round_saeonly_constraint>")): Changed to ...
14528 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
14529 "<round_saeonly_scalar_constraint>")): ... this.
14530 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
14531 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
14532 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
14533 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
14534 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
14535
14536 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
14537
14538 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
14539 options.
14540 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
14541 Remove all values except native, 8540 and 8548.
14542
14543 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
14544
14545 * config/i386/i386.c (ix86_output_function_return): Pass
14546 INVALID_REGNUM, instead of -1, as invalid register number to
14547 indirect_thunk_name and output_indirect_thunk.
14548
14549 2018-02-02 Julia Koval <julia.koval@intel.com>
14550
14551 * config.gcc: Add -march=icelake.
14552 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
14553 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
14554 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
14555 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
14556 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
14557 (processor_target_table): Add icelake.
14558 (ix86_option_override_internal): Handle new PTAs.
14559 (get_builtin_code_for_version): Handle icelake.
14560 (M_INTEL_COREI7_ICELAKE): New.
14561 (fold_builtin_cpu): Handle icelake.
14562 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
14563 * doc/invoke.texi: Add -march=icelake.
14564
14565 2018-02-02 Julia Koval <julia.koval@intel.com>
14566
14567 * config/i386/i386.c (ix86_option_override_internal): Change flags type
14568 to wide_int_bitmask.
14569 * wide-int-bitmask.h: New.
14570
14571 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14572
14573 PR target/84066
14574 * config/i386/i386.md: Replace Pmode with word_mode in
14575 builtin_setjmp_setup and builtin_longjmp to support x32.
14576
14577 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
14578
14579 PR target/56010
14580 PR target/83743
14581 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
14582 #include "opts.h".
14583 (rs6000_supported_cpu_names): New static variable.
14584 (linux_cpu_translation_table): Likewise.
14585 (elf_platform) <cpu>: Define new static variable and use it.
14586 Translate kernel AT_PLATFORM name to canonical name if needed.
14587 Error if platform name is unknown.
14588
14589 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
14590
14591 PR target/84089
14592 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
14593
14594 2018-02-01 Jeff Law <law@redhat.com>
14595
14596 PR target/84128
14597 * config/i386/i386.c (release_scratch_register_on_entry): Add new
14598 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
14599 the scratch if RELEASE_VIA_POP is false.
14600 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
14601 If we have to save a temporary register, decrement SIZE appropriately.
14602 Pass new arguments to release_scratch_register_on_entry.
14603 (ix86_adjust_stack_and_probe): Likewise.
14604 (ix86_emit_probe_stack_range): Pass new arguments to
14605 release_scratch_register_on_entry.
14606
14607 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
14608
14609 PR rtl-optimization/84157
14610 * combine.c (change_zero_ext): Use REG_P predicate in
14611 front of HARD_REGISTER_P predicate.
14612
14613 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
14614
14615 * config/avr/avr.c (avr_option_override): Move disabling of
14616 -fdelete-null-pointer-checks to...
14617 * common/config/avr/avr-common.c (avr_option_optimization_table):
14618 ...here.
14619
14620 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14621
14622 PR tree-optimization/81635
14623 * tree-data-ref.c (split_constant_offset_1): For types that
14624 wrap on overflow, try to use range info to prove that wrapping
14625 cannot occur.
14626
14627 2018-02-01 Renlin Li <renlin.li@arm.com>
14628
14629 PR target/83370
14630 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
14631 TAILCALL_ADDR_REGS.
14632 (aarch64_register_move_cost): Likewise.
14633 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
14634 TAILCALL_ADDR_REGS.
14635 (REG_CLASS_NAMES): Likewise.
14636 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
14637 TAILCALL_ADDR_REGS. Remove IP registers.
14638 * config/aarch64/aarch64.md (Ucs): Update register constraint.
14639
14640 2018-02-01 Richard Biener <rguenther@suse.de>
14641
14642 * domwalk.h (dom_walker::dom_walker): Add additional constructor
14643 for specifying RPO order and allow NULL for that.
14644 * domwalk.c (dom_walker::dom_walker): Likewise.
14645 (dom_walker::walk): Handle NULL RPO order.
14646 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
14647 in RPO order.
14648 (rewrite_update_dom_walker): Likewise.
14649 (mark_def_dom_walker): Likewise.
14650
14651 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14652
14653 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
14654 (aarch64_maybe_expand_sve_subreg_move): Declare.
14655 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
14656 * config/aarch64/predicates.md (aarch64_any_register_operand): New
14657 predicate.
14658 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
14659 that are semantically a reverse operation.
14660 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
14661 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
14662 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
14663 functions.
14664 (aarch64_can_change_mode_class): For big-endian, forbid changes
14665 between two SVE modes if they have different element sizes.
14666
14667 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14668
14669 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
14670 the TImode handling for big-endian targets.
14671
14672 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14673
14674 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
14675 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
14676 not just bytes.
14677 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
14678 Remove BSWAP handing for big-endian targets and use the form of
14679 LD1RQ appropariate for the mode.
14680
14681 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14682
14683 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
14684 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
14685 duplicated element.
14686
14687 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14688
14689 PR tearget/83845
14690 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
14691 check for operands that need to go through aarch64_sve_reload_be.
14692
14693 2018-02-01 Jakub Jelinek <jakub@redhat.com>
14694
14695 PR tree-optimization/81661
14696 PR tree-optimization/84117
14697 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
14698 * tree-eh.c: Include gimplify.h.
14699 (find_trapping_overflow, replace_trapping_overflow,
14700 rewrite_to_non_trapping_overflow): New functions.
14701 * tree-vect-loop.c: Include tree-eh.h.
14702 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
14703 * tree-data-ref.c: Include tree-eh.h.
14704 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
14705
14706 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
14707
14708 PR rtl-optimization/84123
14709 * combine.c (change_zero_ext): Check if hard register satisfies
14710 can_change_dest_mode before calling gen_lowpart_SUBREG.
14711
14712 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
14713
14714 PR target/82444
14715 * ira.c (ira_init_register_move_cost): Remove assert.
14716
14717 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14718
14719 PR rtl-optimization/84071
14720 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
14721 * doc/tm.texi: Regenerate.
14722
14723 2018-01-31 Richard Biener <rguenther@suse.de>
14724
14725 PR tree-optimization/84132
14726 * tree-data-ref.c (analyze_miv_subscript): Properly
14727 check whether evolution_function_is_affine_multivariate_p
14728 before calling gcd_of_steps_may_divide_p.
14729
14730 2018-01-31 Julia Koval <julia.koval@intel.com>
14731
14732 PR target/83618
14733 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
14734 * config/i386/i386.md (rdpid_rex64) New.
14735 (rdpid): Make 32bit only.
14736
14737 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
14738
14739 PR lto/84105
14740 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
14741 an IDENTIFIER_NODE for FUNCTION_TYPE's.
14742
14743 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14744
14745 Revert
14746 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
14747
14748 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14749
14750 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14751
14752 PR rtl-optimization/84071
14753 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
14754 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
14755
14756 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14757
14758 * config/arc/arc.c (arc_handle_aux_attribute): New function.
14759 (arc_attribute_table): Add 'aux' attribute.
14760 (arc_in_small_data_p): Consider aux like variables.
14761 (arc_is_aux_reg_p): New function.
14762 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
14763 (arc_get_aux_arg): New function.
14764 (prepare_move_operands): Handle aux-register access.
14765 (arc_handle_aux_attribute): New function.
14766 * doc/extend.texi (ARC Variable attributes): Add subsection.
14767
14768 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14769
14770 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
14771 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
14772 (arc_attribute_table): Add 'uncached' attribute.
14773 (arc_print_operand): Print '.di' flag for uncached memory
14774 accesses.
14775 (arc_in_small_data_p): Do not consider for small data the uncached
14776 types.
14777 (arc_is_uncached_mem_p): New function.
14778 * config/arc/predicates.md (compact_store_memory_operand): Check
14779 for uncached memory accesses.
14780 (nonvol_nonimm_operand): Likewise.
14781 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
14782
14783 2018-01-31 Jakub Jelinek <jakub@redhat.com>
14784
14785 PR c/84100
14786 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
14787 falign-loops=): Add Optimization flag.
14788
14789 2018-01-30 Jeff Law <law@redhat.com>
14790
14791 PR target/84064
14792 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
14793 INT_REGISTERS_SAVED. Check it prior to calling
14794 get_scratch_register_on_entry.
14795 (ix86_adjust_stack_and_probe): Similarly.
14796 (ix86_emit_probe_stack_range): Similarly.
14797 (ix86_expand_prologue): Corresponding changes.
14798
14799 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14800
14801 PR target/40411
14802 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
14803 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
14804
14805 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
14806
14807 PR target/84112
14808 * lra-constraints.c (curr_insn_transform): Process AND in the
14809 address.
14810
14811 2018-01-30 Jakub Jelinek <jakub@redhat.com>
14812
14813 PR rtl-optimization/83986
14814 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
14815 dependence against last_pending_memory_flush in addition to
14816 pending_jump_insns.
14817
14818 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
14819
14820 PR tree-optimization/81611
14821 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
14822 copies.
14823
14824 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14825
14826 PR target/83758
14827 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
14828 a reg rtx.
14829
14830 2018-01-30 Richard Biener <rguenther@suse.de>
14831 Jakub Jelinek <jakub@redhat.com>
14832
14833 PR tree-optimization/84111
14834 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
14835 inner loops added during recursion, as they don't have up-to-date
14836 SSA form.
14837
14838 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14839
14840 PR ipa/81360
14841 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
14842 (can_inline_edge_by_limits_p): ... here.
14843 (can_early_inline_edge_p, check_callers,
14844 update_caller_keys, update_callee_keys, recursive_inlining,
14845 add_new_edges_to_heap, speculation_useful_p,
14846 inline_small_functions,
14847 inline_small_functions, flatten_function,
14848 inline_to_all_callers_1): Update.
14849
14850 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14851
14852 * profile-count.c (profile_count::combine_with_ipa_count): Handle
14853 zeros correctly.
14854
14855 2018-01-30 Richard Biener <rguenther@suse.de>
14856
14857 PR tree-optimization/83008
14858 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
14859 invariant and constant vector uses in stmts when they need
14860 more than one stmt.
14861
14862 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14863
14864 PR bootstrap/84017
14865 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
14866 * configure: Regenerate.
14867
14868 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14869
14870 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
14871 pattern.
14872 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
14873 Use gen_rtx_REG rather than gen_lowpart.
14874
14875 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14876
14877 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
14878 rather than 0 when creating partial subregs.
14879
14880 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14881
14882 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
14883 of usage.
14884
14885 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
14886
14887 PR target/81550
14888 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
14889 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
14890 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
14891 flags. This restores the settings used before the 2017-07-24.
14892 Turning off pre increment/decrement/modify allows IVOPTS to
14893 optimize DF/SF loops where the index is an int.
14894
14895 2018-01-29 Richard Biener <rguenther@suse.de>
14896 Kelvin Nilsen <kelvin@gcc.gnu.org>
14897
14898 PR bootstrap/80867
14899 * tree-vect-stmts.c (vectorizable_call): Don't call
14900 targetm.vectorize_builtin_md_vectorized_function if callee is
14901 NULL.
14902
14903 2018-01-22 Carl Love <cel@us.ibm.com>
14904
14905 * doc/extend.tex: Fix typo in second arg in
14906 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
14907
14908 2018-01-29 Richard Biener <rguenther@suse.de>
14909
14910 PR tree-optimization/84086
14911 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
14912 (flush_ssaname_freelist): When SSA names were released reset
14913 the SCEV hash table.
14914
14915 2018-01-29 Richard Biener <rguenther@suse.de>
14916
14917 PR tree-optimization/84057
14918 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
14919 removed paths when removing edges.
14920
14921 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
14922
14923 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
14924 -mfunction-return=@var{choice}.
14925
14926 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
14927
14928 PR diagnostic/84034
14929 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
14930 Handle CR like TAB.
14931 (layout::print_source_line): Likewise.
14932 (test_get_line_width_without_trailing_whitespace): Add test cases.
14933
14934 2018-01-27 Jakub Jelinek <jakub@redhat.com>
14935
14936 PR middle-end/84040
14937 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
14938 debug insns.
14939
14940 2018-01-26 Jim Wilson <jimw@sifive.com>
14941
14942 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
14943
14944 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
14945 specified.
14946
14947 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14948
14949 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
14950 and CMP + SUB-immediate -> SUBS.
14951
14952 2018-01-26 Martin Sebor <msebor@redhat.com>
14953
14954 PR tree-optimization/83896
14955 * tree-ssa-strlen.c (get_string_len): Rename...
14956 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
14957 Avoid assuming length is constant.
14958 (handle_char_store): Use HOST_WIDE_INT for string length.
14959
14960 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
14961
14962 PR target/81763
14963 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
14964 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
14965
14966 2018-01-26 Richard Biener <rguenther@suse.de>
14967
14968 PR rtl-optimization/84003
14969 * dse.c (record_store): Only record redundant stores when
14970 the earlier store aliases at least all accesses the later one does.
14971
14972 2018-01-26 Jakub Jelinek <jakub@redhat.com>
14973
14974 PR rtl-optimization/83985
14975 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
14976 REG_CFA_RESTORE insns.
14977 (delete_unmarked_insns): Don't ignore separate shrink wrapping
14978 REG_CFA_RESTORE insns here.
14979
14980 PR c/83989
14981 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
14982 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
14983
14984 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14985
14986 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
14987 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
14988 (arc_init): Likewise.
14989 (arc_override_options): Likewise.
14990 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
14991 value.
14992 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
14993 support.
14994 * config/arc/arc.h (TARGET_DBNZ): Define.
14995 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
14996 properly set the tune attribute.
14997 (dbnz): Use TARGET_DBNZ guard.
14998 * config/arc/arc.opt (mtune): Add core3 option.
14999
15000 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15001
15002 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
15003 recognize new pic like addresses.
15004 (arc_delegitimize_address): Clean up.
15005
15006 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15007
15008 * config/arc/arc-arches.def: Option mrf16 valid for all
15009 architectures.
15010 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
15011 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
15012 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
15013 * config/arc/arc-tables.opt: Regenerate.
15014 * config/arc/arc.c (arc_conditional_register_usage): Handle
15015 reduced register file case.
15016 (arc_file_start): Set must have build attributes.
15017 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
15018 mrf16 option value.
15019 * config/arc/arc.opt (mrf16): Add new option.
15020 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
15021 * config/arc/genmultilib.awk: Handle new mrf16 option.
15022 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
15023 * config/arc/t-multilib: Regenerate.
15024 * doc/invoke.texi (ARC Options): Document mrf16 option.
15025
15026 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15027
15028 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
15029 * config/arc/arc.c (arc_handle_secure_attribute): New function.
15030 (arc_attribute_table): Add 'secure_call' attribute.
15031 (arc_print_operand): Print secure call operand.
15032 (arc_function_ok_for_sibcall): Don't optimize tail calls when
15033 secure.
15034 (arc_is_secure_call_p): New function. * config/arc/arc.md
15035 (call_i): Add support for sjli instruction.
15036 (call_value_i): Likewise.
15037 * config/arc/constraints.md (Csc): New constraint.
15038
15039 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15040 John Eric Martin <John.Martin@emmicro-us.com>
15041
15042 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
15043 * config/arc/arc.c (_arc_jli_section): New struct.
15044 (arc_jli_section): New type.
15045 (rc_jli_sections): New static variable.
15046 (arc_handle_jli_attribute): New function.
15047 (arc_attribute_table): Add jli_always and jli_fixed attribute.
15048 (arc_file_end): New function.
15049 (TARGET_ASM_FILE_END): Define.
15050 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
15051 (arc_add_jli_section): New function.
15052 (jli_call_scan): Likewise.
15053 (arc_reorg): Call jli_call_scan.
15054 (arc_output_addsi): Remove 'S' from printing asm operand.
15055 (arc_is_jli_call_p): New function.
15056 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
15057 operand.
15058 (movhi_insn): Likewise.
15059 (movsi_insn): Likewise.
15060 (movsi_set_cc_insn): Likewise.
15061 (loadqi_update): Likewise.
15062 (load_zeroextendqisi_update): Likewise.
15063 (load_signextendqisi_update): Likewise.
15064 (loadhi_update): Likewise.
15065 (load_zeroextendhisi_update): Likewise.
15066 (load_signextendhisi_update): Likewise.
15067 (loadsi_update): Likewise.
15068 (loadsf_update): Likewise.
15069 (movsicc_insn): Likewise.
15070 (bset_insn): Likewise.
15071 (bxor_insn): Likewise.
15072 (bclr_insn): Likewise.
15073 (bmsk_insn): Likewise.
15074 (bicsi3_insn): Likewise.
15075 (cmpsi_cc_c_insn): Likewise.
15076 (movsi_ne): Likewise.
15077 (movsi_cond_exec): Likewise.
15078 (clrsbsi2): Likewise.
15079 (norm_f): Likewise.
15080 (normw): Likewise.
15081 (swap): Likewise.
15082 (divaw): Likewise.
15083 (flag): Likewise.
15084 (sr): Likewise.
15085 (kflag): Likewise.
15086 (ffs): Likewise.
15087 (ffs_f): Likewise.
15088 (fls): Likewise.
15089 (call_i): Remove 'S' asm letter, add jli instruction.
15090 (call_value_i): Likewise.
15091 * config/arc/arc.op (mjli-always): New option.
15092 * config/arc/constraints.md (Cji): New constraint.
15093 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
15094 operand.
15095 (subsf3_fpx): Likewise.
15096 (mulsf3_fpx): Likewise.
15097 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
15098 asm operand.
15099 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
15100 function attrbutes.
15101 * doc/invoke.texi (ARC): Document mjli-always option.
15102
15103 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
15104
15105 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
15106 avoid addition with 0 and use incw and decw where possible.
15107
15108 2018-01-26 Richard Biener <rguenther@suse.de>
15109
15110 PR tree-optimization/81082
15111 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
15112 association if it requires casting to unsigned.
15113 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
15114 from fold_plusminus_mult_expr to catch important cases late when
15115 range info is available.
15116
15117 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15118
15119 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
15120 * configure.ac (hidden_linkonce): New test.
15121 * configure: Regenerate.
15122 * config.in: Regenerate.
15123
15124 2018-01-26 Julia Koval <julia.koval@intel.com>
15125
15126 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
15127 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
15128 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
15129 _mm_mask_bitshuffle_epi64_mask): Fix type.
15130 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
15131 USI_FTYPE_V4DI_V4DI_USI): Remove.
15132 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
15133 __builtin_ia32_vpshufbitqmb256_mask,
15134 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
15135 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
15136 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
15137
15138 2018-01-26 Alan Modra <amodra@gmail.com>
15139
15140 PR target/84033
15141 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
15142 UNSPEC_VBPERMQ. Sort other unspecs.
15143
15144 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
15145
15146 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
15147
15148 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
15149
15150 PR middle-end/83055
15151 * predict.c (drop_profile): Do not push/pop cfun; update also
15152 node->count.
15153 (handle_missing_profiles): Fix logic looking for zero profiles.
15154
15155 2018-01-25 Jakub Jelinek <jakub@redhat.com>
15156
15157 PR middle-end/83977
15158 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
15159 on functions with #pragma omp declare simd or functions with simd
15160 attribute.
15161 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
15162 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
15163 Remove trailing \n from warning_at calls.
15164
15165 2018-01-25 Tom de Vries <tom@codesourcery.com>
15166
15167 PR target/84028
15168 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15169 for neutered workers.
15170
15171 2018-01-24 Joseph Myers <joseph@codesourcery.com>
15172
15173 PR target/68467
15174 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
15175 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
15176
15177 2018-01-24 Jeff Law <law@redhat.com>
15178
15179 PR target/83994
15180 * i386.c (get_probe_interval): Move to earlier point.
15181 (ix86_compute_frame_layout): If -fstack-clash-protection and
15182 the frame is larger than the probe interval, then use pushes
15183 to save registers rather than reg->mem moves.
15184 (ix86_expand_prologue): Remove conditional for int_registers_saved
15185 assertion.
15186
15187 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
15188
15189 PR target/84014
15190 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
15191 min/max for never referenced object.
15192
15193 2018-01-24 Jakub Jelinek <jakub@redhat.com>
15194
15195 PR middle-end/83977
15196 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
15197 here.
15198 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
15199 attributes from DECL_ATTRIBUTES (decl) without affecting
15200 DECL_ATTRIBUTES (current_function_decl).
15201 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
15202 functions with non-NULL DECL_ABSTRACT_ORIGIN.
15203
15204 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
15205
15206 PR tree-optimization/83979
15207 * fold-const.c (fold_comparison): Use constant_boolean_node
15208 instead of boolean_{true,false}_node.
15209
15210 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
15211
15212 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
15213 with zero counts.
15214
15215 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15216
15217 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15218 Simplify the clause that sets the length attribute.
15219 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15220 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
15221 clause that sets the length attribute.
15222 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15223
15224 2018-01-24 Tom de Vries <tom@codesourcery.com>
15225
15226 PR target/83589
15227 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
15228 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
15229 Add strict parameter.
15230 (prevent_branch_around_nothing): Insert dummy insn between branch to
15231 label and label with no ptx insn inbetween.
15232 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
15233
15234 2018-01-24 Tom de Vries <tom@codesourcery.com>
15235
15236 PR target/81352
15237 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15238 for neutered threads in warp.
15239 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
15240
15241 2018-01-24 Richard Biener <rguenther@suse.de>
15242
15243 PR tree-optimization/83176
15244 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
15245 operands.
15246
15247 2018-01-24 Richard Biener <rguenther@suse.de>
15248
15249 PR tree-optimization/82819
15250 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
15251 code generating pluses that are no-ops in the target precision.
15252
15253 2018-01-24 Richard Biener <rguenther@suse.de>
15254
15255 PR middle-end/84000
15256 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
15257
15258 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15259
15260 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
15261 to merge probabilities.
15262 * predict.c (probably_never_executed): Also mark as cold functions
15263 with global 0 profile and guessed local profile.
15264 * profile-count.c (profile_probability::combine_with_count): New
15265 member function.
15266 * profile-count.h (profile_probability::operator*,
15267 profile_probability::operator*=, profile_probability::operator/,
15268 profile_probability::operator/=): Reduce precision to adjusted
15269 and set value to guessed on contradictory divisions.
15270 (profile_probability::combine_with_freq): Remove.
15271 (profile_probability::combine_wiht_count): Declare.
15272 (profile_count::force_nonzero):: Set to adjusted.
15273 (profile_count::probability_in):: Set quality to adjusted.
15274 * tree-ssa-tail-merge.c (replace_block_by): Use
15275 combine_with_count.
15276
15277 2018-01-23 Andrew Waterman <andrew@sifive.com>
15278 Jim Wilson <jimw@sifive.com>
15279
15280 * config/riscv/riscv.c (riscv_stack_boundary): New.
15281 (riscv_option_override): Set riscv_stack_boundary. Handle
15282 riscv_preferred_stack_boundary_arg.
15283 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
15284 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
15285 (STACK_BOUNDARY): Set to riscv_stack_boundary.
15286 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
15287 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
15288 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
15289
15290 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
15291
15292 PR target/83905
15293 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
15294 of struct ix86_frame.
15295 (ix86_expand_epilogue): Likewise. Add a local variable for
15296 the reg_save_offset field in struct ix86_frame.
15297
15298 2018-01-23 Bin Cheng <bin.cheng@arm.com>
15299
15300 PR tree-optimization/82604
15301 * tree-loop-distribution.c (enum partition_kind): New enum item
15302 PKIND_PARTIAL_MEMSET.
15303 (partition_builtin_p): Support above new enum item.
15304 (generate_code_for_partition): Ditto.
15305 (compute_access_range): Differentiate cases that equality can be
15306 proven at all loops, the innermost loops or no loops.
15307 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
15308 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
15309 (finalize_partitions, distribute_loop): Don't fuse partition of
15310 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
15311 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
15312 parloop is enabled.
15313
15314 2018-01-23 Martin Liska <mliska@suse.cz>
15315
15316 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
15317 order to ignore the predictor.
15318 (PRED_POLYMORPHIC_CALL): Likewise.
15319 (PRED_RECURSIVE_CALL): Likewise.
15320
15321 2018-01-23 Martin Liska <mliska@suse.cz>
15322
15323 * tree-profile.c (tree_profiling): Print function header to
15324 aware reader which function we are working on.
15325 * value-prof.c (gimple_find_values_to_profile): Do not print
15326 not interesting value histograms.
15327
15328 2018-01-23 Martin Liska <mliska@suse.cz>
15329
15330 * profile-count.h (enum profile_quality): Add
15331 profile_uninitialized as the first value. Do not number values
15332 as they are zero based.
15333 (profile_count::verify): Update sanity check.
15334 (profile_probability::verify): Likewise.
15335
15336 2018-01-23 Nathan Sidwell <nathan@acm.org>
15337
15338 * doc/invoke.texi (ffor-scope): Deprecate.
15339
15340 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15341
15342 PR tree-optimization/83510
15343 * domwalk.c (set_all_edges_as_executable): New function.
15344 (dom_walker::dom_walker): Convert bool param
15345 "skip_unreachable_blocks" to enum reachability. Move setup of
15346 edge flags to set_all_edges_as_executable and only do it when
15347 reachability is REACHABLE_BLOCKS.
15348 * domwalk.h (enum dom_walker::reachability): New enum.
15349 (dom_walker::dom_walker): Convert bool param
15350 "skip_unreachable_blocks" to enum reachability.
15351 (set_all_edges_as_executable): New decl.
15352 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
15353 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
15354 "reachability".
15355 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
15356 but converting true to REACHABLE_BLOCKS.
15357 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
15358 * tree-vrp.c
15359 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
15360 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
15361 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
15362 REACHABLE_BLOCKS.
15363 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
15364 if check_all_array_refs will be called.
15365
15366 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15367
15368 * tree.c (selftest::test_location_wrappers): Add more test
15369 coverage.
15370
15371 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15372
15373 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
15374 (selftest::test_bit_in_range): Likewise.
15375
15376 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
15377
15378 PR testsuite/83888
15379 * doc/sourcebuild.texi (vect_float): Say that the selector
15380 only describes the situation when -funsafe-math-optimizations is on.
15381 (vect_float_strict): Document.
15382
15383 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
15384
15385 PR tree-optimization/83965
15386 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15387 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
15388 instead of checking only for a reduction.
15389 (vect_recog_widen_sum_pattern): Likewise.
15390
15391 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15392
15393 * predict.c (probably_never_executed): Only use precise profile info.
15394 (compute_function_frequency): Skip after inlining hack since we now
15395 have quality checking.
15396
15397 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15398
15399 * profile-count.h (profile_probability::very_unlikely,
15400 profile_probability::unlikely, profile_probability::even): Set
15401 precision to guessed.
15402
15403 2018-01-23 Richard Biener <rguenther@suse.de>
15404
15405 PR tree-optimization/83963
15406 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
15407 Properly terminate dominator walk when crossing the exit edge not
15408 when visiting its source block.
15409
15410 2018-01-23 Jakub Jelinek <jakub@redhat.com>
15411
15412 PR c++/83918
15413 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
15414 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
15415
15416 2018-01-22 Jakub Jelinek <jakub@redhat.com>
15417
15418 PR tree-optimization/83957
15419 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
15420 semicolon after for body surrounded by braces.
15421
15422 PR tree-optimization/83081
15423 * profile-count.h (profile_probability::split): New method.
15424 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
15425 Use profile_probability::split.
15426 (do_compare_rtx_and_jump): Fix adjustment of probabilities
15427 when splitting a single conditional jump into 2.
15428
15429 2018-01-22 David Malcolm <dmalcolm@redhat.com>
15430
15431 PR tree-optimization/69452
15432 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
15433 decl.
15434
15435 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15436
15437 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
15438 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
15439 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
15440
15441 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15442
15443 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
15444 declaration.
15445 * config/rl78/rl78.md (movdi): New define_expand.
15446 * config/rl78/rl78.c (rl78_split_movdi): New function.
15447
15448 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
15449
15450 PR target/83862
15451 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
15452 no longer used.
15453 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
15454 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
15455 128-bit to produce an UNSPEC move to get the double word with the
15456 signbit and then a shift directly to do signbit.
15457 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
15458 implementation with a new version that just does either a direct
15459 move or a regular move. Move memory interface to separate insns.
15460 Move insns so they are next to the expander.
15461 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
15462 with signbit move. Split big and little endian case.
15463 (signbit<mode>2_dm_mem_le): Likewise.
15464 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
15465 (signbit<mode>2_dm2): Likewise.
15466
15467 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15468
15469 * config/rl78/rl78.md (anddi3): New define_expand.
15470
15471 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15472
15473 * config/rl78/rl78.md (umindi3): New define_expand.
15474
15475 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15476
15477 * config/rl78/rl78.md (smindi3): New define_expand.
15478
15479 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15480
15481 * config/rl78/rl78.md (smaxdi3): New define_expand.
15482
15483 2018-01-22 Carl Love <cel@us.ibm.com>
15484
15485 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
15486 LVX_V1TI): Add macro expansion.
15487 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
15488 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
15489 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
15490 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
15491 Change check to determine if the instruction is a byte reversing
15492 entry. Fix typo in comment.
15493 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
15494 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
15495 Add def_builtin calls for new builtins.
15496 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
15497 Add define_insn expansion.
15498
15499 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15500
15501 * config/rl78/rl78.md (umaxdi3): New define_expand.
15502
15503 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15504
15505 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
15506 for non-QImode registers.
15507
15508 2018-01-22 Richard Biener <rguenther@suse.de>
15509
15510 PR tree-optimization/83963
15511 * graphite-scop-detection.c (scop_detection::get_sese): Delay
15512 including the loop exit block.
15513 (scop_detection::merge_sese): Likewise.
15514 (scop_detection::add_scop): Do it here instead.
15515
15516 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15517
15518 * doc/sourcebuild.texi (arm_softfloat): Document.
15519
15520 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
15521
15522 PR gcc/77734
15523 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
15524 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
15525 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
15526
15527 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15528 David Edelsohn <dje.gcc@gmail.com>
15529
15530 PR target/83946
15531 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15532 Change "crset eq" to "crset 2".
15533 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15534 (*call_indirect_aix<mode>_nospec): Likewise.
15535 (*call_value_indirect_aix<mode>_nospec): Likewise.
15536 (*call_indirect_elfv2<mode>_nospec): Likewise.
15537 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
15538 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
15539 change assembly output from . to $.
15540 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15541 (indirect_jump<mode>_nospec): Change assembly output from . to $.
15542 (*tablejump<mode>_internal1_nospec): Likewise.
15543
15544 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
15545
15546 PR target/80870
15547 * config/sh/sh_optimize_sett_clrt.cc:
15548 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
15549
15550 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
15551
15552 PR tree-optimization/83940
15553 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
15554 offset_dt to vect_constant_def rather than vect_unknown_def_type.
15555 (vect_check_load_store_mask): Add a mask_dt_out parameter and
15556 use it to pass back the definition type.
15557 (vect_check_store_rhs): Likewise rhs_dt_out.
15558 (vect_build_gather_load_calls): Add a mask_dt argument and use
15559 it instead of a call to vect_is_simple_use.
15560 (vectorizable_store): Update calls to vect_check_load_store_mask
15561 and vect_check_store_rhs. Use the dt returned by the latter instead
15562 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
15563 instead of calls to vect_is_simple_use. Pass the scalar rather
15564 than the vector operand to vect_is_simple_use when handling
15565 second and subsequent copies of an rhs value.
15566 (vectorizable_load): Update calls to vect_check_load_store_mask
15567 and vect_build_gather_load_calls. Use the cached mask_dt and
15568 gs_info.offset_dt instead of calls to vect_is_simple_use.
15569
15570 2018-01-20 Jakub Jelinek <jakub@redhat.com>
15571
15572 PR middle-end/83945
15573 * tree-emutls.c: Include gimplify.h.
15574 (lower_emutls_2): New function.
15575 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
15576 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
15577 it before further processing.
15578
15579 PR target/83930
15580 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
15581 UINTVAL (trueop1) instead of INTVAL (op1).
15582
15583 2018-01-19 Jakub Jelinek <jakub@redhat.com>
15584
15585 PR debug/81570
15586 PR debug/83728
15587 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
15588 INCOMING_FRAME_SP_OFFSET if not defined.
15589 (scan_trace): Add ENTRY argument. If true and
15590 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
15591 emit a note to adjust the CFA offset.
15592 (create_cfi_notes): Adjust scan_trace callers.
15593 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
15594 INCOMING_FRAME_SP_OFFSET in the CIE.
15595 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
15596 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
15597 Likewise.
15598 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
15599 * doc/tm.texi: Regenerated.
15600
15601 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15602
15603 PR rtl-optimization/83147
15604 * lra-constraints.c (remove_inheritance_pseudos): Use
15605 lra_substitute_pseudo_within_insn.
15606
15607 2018-01-19 Tom de Vries <tom@codesourcery.com>
15608 Cesar Philippidis <cesar@codesourcery.com>
15609
15610 PR target/83920
15611 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
15612
15613 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
15614
15615 PR target/83790
15616 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
15617 spaces for function labels.
15618
15619 2018-01-19 Martin Liska <mliska@suse.cz>
15620
15621 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
15622 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
15623 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
15624 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
15625 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
15626 (PRED_CONST_RETURN): Change from 69 to 65.
15627 (PRED_NULL_RETURN): Change from 91 to 71.
15628 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
15629 (PRED_LOOP_GUARD): Change from 66 to 73.
15630
15631 2018-01-19 Martin Liska <mliska@suse.cz>
15632
15633 * predict.c (predict_insn_def): Add new assert.
15634 (struct branch_predictor): Change type to signed integer.
15635 (test_prediction_value_range): Amend test to cover
15636 PROB_UNINITIALIZED.
15637 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
15638 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
15639 (PRED_LOOP_ITERATIONS_MAX): Likewise.
15640 (PRED_LOOP_IV_COMPARE): Likewise.
15641 * predict.h (PROB_UNINITIALIZED): Define new constant.
15642
15643 2018-01-19 Martin Liska <mliska@suse.cz>
15644
15645 * predict.c (dump_prediction): Add new format for
15646 analyze_brprob.py script which is enabled with -details
15647 suboption.
15648 * profile-count.h (precise_p): New function.
15649
15650 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
15651
15652 PR tree-optimization/83922
15653 * tree-vect-loop.c (vect_verify_full_masking): Return false if
15654 there are no statements that need masking.
15655 (vect_active_double_reduction_p): New function.
15656 (vect_analyze_loop_operations): Use it when handling phis that
15657 are not in the loop header.
15658
15659 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
15660
15661 PR tree-optimization/83914
15662 * tree-vect-loop.c (vectorizable_induction): Don't convert
15663 init_expr or apply the peeling adjustment for inductions
15664 that are nested within the vectorized loop.
15665
15666 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15667
15668 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
15669 instead of NEG.
15670
15671 2018-01-18 Jakub Jelinek <jakub@redhat.com>
15672
15673 PR sanitizer/81715
15674 PR testsuite/83882
15675 * function.h (gimplify_parameters): Add gimple_seq * argument.
15676 * function.c: Include gimple.h and options.h.
15677 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
15678 for the added local temporaries if needed.
15679 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
15680 if there are any parameter cleanups, wrap whole body into a
15681 try/finally with the cleanups.
15682
15683 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
15684
15685 PR target/82964
15686 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
15687 Use GET_MODE_CLASS for scalar floating point.
15688
15689 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
15690
15691 PR ipa/82256
15692 patch by PaX Team
15693 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
15694 Fix call of call_cgraph_insertion_hooks.
15695
15696 2018-01-18 Martin Sebor <msebor@redhat.com>
15697
15698 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
15699
15700 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
15701
15702 PR ipa/83619
15703 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
15704 frequencies.
15705
15706 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
15707
15708 PR other/70268
15709 * common.opt: (-ffile-prefix-map): New option.
15710 * opts.c (common_handle_option): Defer it.
15711 * opts-global.c (handle_common_deferred_options): Handle it.
15712 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
15713 * file-prefix-map.h: New file.
15714 (remap_debug_filename, add_debug_prefix_map): ...here.
15715 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
15716 * final.c (debug_prefix_map, add_debug_prefix_map
15717 remap_debug_filename): Move to...
15718 * file-prefix-map.c: New file.
15719 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
15720 generalize, get rid of alloca(), use strrchr() instead of strchr().
15721 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
15722 Implement in terms of add_prefix_map().
15723 (remap_macro_filename, remap_debug_filename): Implement in term of
15724 remap_filename().
15725 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
15726 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
15727 * dbxout.c: Include file-prefix-map.h.
15728 * varasm.c: Likewise.
15729 * vmsdbgout.c: Likewise.
15730 * xcoffout.c: Likewise.
15731 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
15732 * doc/cppopts.texi (-fmacro-prefix-map): Document.
15733 * doc/invoke.texi (-ffile-prefix-map): Document.
15734 (-fdebug-prefix-map): Update description.
15735
15736 2018-01-18 Martin Liska <mliska@suse.cz>
15737
15738 * config/i386/i386.c (indirect_thunk_name): Document that also
15739 lfence is emitted.
15740 (output_indirect_thunk): Document why both instructions
15741 (pause and lfence) are generated.
15742
15743 2018-01-18 Richard Biener <rguenther@suse.de>
15744
15745 PR tree-optimization/83887
15746 * graphite-scop-detection.c
15747 (scop_detection::get_nearest_dom_with_single_entry): Remove.
15748 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
15749 (scop_detection::merge_sese): Re-implement with a flood-fill
15750 algorithm that properly finds a SESE region if it exists.
15751
15752 2018-01-18 Jakub Jelinek <jakub@redhat.com>
15753
15754 PR c/61240
15755 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
15756 pointer_diff optimizations use view_convert instead of convert.
15757
15758 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15759
15760 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15761 Generate different code for -mno-speculate-indirect-jumps.
15762 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15763 (*call_indirect_aix<mode>): Disable for
15764 -mno-speculate-indirect-jumps.
15765 (*call_indirect_aix<mode>_nospec): New define_insn.
15766 (*call_value_indirect_aix<mode>): Disable for
15767 -mno-speculate-indirect-jumps.
15768 (*call_value_indirect_aix<mode>_nospec): New define_insn.
15769 (*sibcall_nonlocal_sysv<mode>): Generate different code for
15770 -mno-speculate-indirect-jumps.
15771 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15772
15773 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
15774
15775 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
15776 long double type, set the flags for noting the default long double
15777 type, even if we don't pass or return a long double type.
15778
15779 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
15780
15781 PR ipa/83051
15782 * ipa-inline.c (flatten_function): Do not overwrite final inlining
15783 failure.
15784
15785 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
15786
15787 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
15788 support for merge[hl].
15789 (fold_mergehl_helper): New helper function.
15790 (tree-vector-builder.h): New #include for tree_vector_builder usage.
15791 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
15792 (altivec_vmrglw_direct): Add xxmrglw insn.
15793
15794 2018-01-17 Andrew Waterman <andrew@sifive.com>
15795
15796 * config/riscv/riscv.c (riscv_conditional_register_usage): If
15797 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
15798
15799 2018-01-17 David Malcolm <dmalcolm@redhat.com>
15800
15801 PR lto/83121
15802 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
15803 call the lto_location_cache before reading the
15804 DECL_SOURCE_LOCATION of the types.
15805
15806 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
15807 Richard Sandiford <richard.sandiford@linaro.org>
15808
15809 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
15810 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
15811 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
15812 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
15813 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
15814 Add declaration.
15815 * config/aarch64/constraints.md (aarch64_movti_operand):
15816 Limit immediates.
15817 * config/aarch64/predicates.md (Uti): Add new constraint.
15818
15819 2018-01-17 Carl Love <cel@us.ibm.com>
15820
15821 * config/rs6000/vsx.md (define_expand xl_len_r,
15822 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
15823 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
15824 lxvll.
15825 (define_expand, define_insn): Move the shift left from the
15826 define_insn to the define_expand for lxvl and stxvl instructions.
15827 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
15828 and XL_LEN_R definitions to PURE.
15829
15830 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
15831
15832 * config/i386/i386.c (indirect_thunk_name): Declare regno
15833 as unsigned int. Compare regno with INVALID_REGNUM.
15834 (output_indirect_thunk): Ditto.
15835 (output_indirect_thunk_function): Ditto.
15836 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
15837 in the call to output_indirect_thunk_function.
15838
15839 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
15840
15841 PR middle-end/83884
15842 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
15843 rather than the size of inner_type to determine the stack slot size
15844 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
15845
15846 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
15847
15848 PR target/83546
15849 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
15850 to PTA_SILVERMONT.
15851
15852 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
15853
15854 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
15855 endian Linux systems to optionally enable multilibs for selecting
15856 the long double type if the user configured an explicit type.
15857 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
15858 have no long double multilibs if not defined.
15859 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
15860 warn if the user used -mabi={ieee,ibm}longdouble and we built
15861 multilibs for long double.
15862 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
15863 appropriate multilib option.
15864 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
15865 multilib options.
15866 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
15867 for building long double multilibs.
15868 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
15869
15870 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
15871
15872 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
15873 copies.
15874
15875 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
15876 64 bits.
15877 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
15878 128 bits.
15879
15880 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
15881 variables.
15882
15883 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
15884 return value.
15885
15886 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15887
15888 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
15889 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
15890
15891 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
15892
15893 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
15894 different rtl trees depending on TARGET_64BIT.
15895 (rs6000_gen_lvx): Likewise.
15896
15897 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15898
15899 * config/visium/visium.md (nop): Tweak comment.
15900 (hazard_nop): Likewise.
15901
15902 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15903
15904 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
15905 -mspeculate-indirect-jumps.
15906 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
15907 for -mno-speculate-indirect-jumps.
15908 (*call_indirect_elfv2<mode>_nospec): New define_insn.
15909 (*call_value_indirect_elfv2<mode>): Disable for
15910 -mno-speculate-indirect-jumps.
15911 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
15912 (indirect_jump): Emit different RTL for
15913 -mno-speculate-indirect-jumps.
15914 (*indirect_jump<mode>): Disable for
15915 -mno-speculate-indirect-jumps.
15916 (*indirect_jump<mode>_nospec): New define_insn.
15917 (tablejump): Emit different RTL for
15918 -mno-speculate-indirect-jumps.
15919 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
15920 (tablejumpsi_nospec): New define_expand.
15921 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
15922 (tablejumpdi_nospec): New define_expand.
15923 (*tablejump<mode>_internal1): Disable for
15924 -mno-speculate-indirect-jumps.
15925 (*tablejump<mode>_internal1_nospec): New define_insn.
15926 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
15927 option.
15928
15929 2018-01-16 Artyom Skrobov tyomitch@gmail.com
15930
15931 * caller-save.c (insert_save): Drop unnecessary parameter. All
15932 callers updated.
15933
15934 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15935 Richard Biener <rguenth@suse.de>
15936
15937 PR libgomp/83590
15938 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
15939 return early, inline manually is_gimple_sizepos. Make sure if we
15940 call gimplify_expr we don't end up with a gimple constant.
15941 * tree.c (variably_modified_type_p): Don't return true for
15942 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
15943 * gimplify.h (is_gimple_sizepos): Remove.
15944
15945 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15946
15947 PR tree-optimization/83857
15948 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
15949 vectorizable_live_operation for pure SLP statements.
15950 (vectorizable_live_operation): Handle PHIs.
15951
15952 2018-01-16 Richard Biener <rguenther@suse.de>
15953
15954 PR tree-optimization/83867
15955 * tree-vect-stmts.c (vect_transform_stmt): Precompute
15956 nested_in_vect_loop_p since the scalar stmt may get invalidated.
15957
15958 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15959
15960 PR c/83844
15961 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
15962 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
15963 If off is not INTEGER_CST, issue a may not be aligned warning
15964 rather than isn't aligned. Use isn%'t rather than isn't.
15965 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
15966 into MULT_EXPR.
15967 <case MULT_EXPR>: Improve the case when bottom and one of the
15968 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
15969 operand, in that case check if the other operand is multiple of
15970 bottom divided by the INTEGER_CST operand.
15971
15972 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15973
15974 PR target/83858
15975 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
15976 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
15977 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
15978 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
15979 * config/pa/pa.c (pa_function_arg_advance): Likewise.
15980 (pa_function_arg, pa_arg_partial_bytes): Likewise.
15981 (pa_function_arg_size): New function.
15982
15983 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15984
15985 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
15986 in a separate statement.
15987
15988 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15989
15990 PR tree-optimization/83847
15991 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
15992 group gathers and scatters.
15993
15994 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15995
15996 PR rtl-optimization/86620
15997 * params.def (max-sched-ready-insns): Bump minimum value to 1.
15998
15999 PR rtl-optimization/83213
16000 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
16001 to last if both are JUMP_INSNs.
16002
16003 PR tree-optimization/83843
16004 * gimple-ssa-store-merging.c
16005 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
16006 store_immediate_info for bswap/nop orig_stores.
16007
16008 2018-01-15 Andrew Waterman <andrew@sifive.com>
16009
16010 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
16011 !TARGET_MUL.
16012 <UDIV>: Increase cost if !TARGET_DIV.
16013
16014 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
16015
16016 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
16017 (define_attr "cr_logical_3op"): New.
16018 (cceq_ior_compare): Adjust.
16019 (cceq_ior_compare_complement): Adjust.
16020 (*cceq_rev_compare): Adjust.
16021 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
16022 (is_cracked_insn): Adjust.
16023 (insn_must_be_first_in_group): Adjust.
16024 * config/rs6000/40x.md: Adjust.
16025 * config/rs6000/440.md: Adjust.
16026 * config/rs6000/476.md: Adjust.
16027 * config/rs6000/601.md: Adjust.
16028 * config/rs6000/603.md: Adjust.
16029 * config/rs6000/6xx.md: Adjust.
16030 * config/rs6000/7450.md: Adjust.
16031 * config/rs6000/7xx.md: Adjust.
16032 * config/rs6000/8540.md: Adjust.
16033 * config/rs6000/cell.md: Adjust.
16034 * config/rs6000/e300c2c3.md: Adjust.
16035 * config/rs6000/e500mc.md: Adjust.
16036 * config/rs6000/e500mc64.md: Adjust.
16037 * config/rs6000/e5500.md: Adjust.
16038 * config/rs6000/e6500.md: Adjust.
16039 * config/rs6000/mpc.md: Adjust.
16040 * config/rs6000/power4.md: Adjust.
16041 * config/rs6000/power5.md: Adjust.
16042 * config/rs6000/power6.md: Adjust.
16043 * config/rs6000/power7.md: Adjust.
16044 * config/rs6000/power8.md: Adjust.
16045 * config/rs6000/power9.md: Adjust.
16046 * config/rs6000/rs64.md: Adjust.
16047 * config/rs6000/titan.md: Adjust.
16048
16049 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16050
16051 * config/i386/predicates.md (indirect_branch_operand): Rewrite
16052 ix86_indirect_branch_register logic.
16053
16054 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16055
16056 * config/i386/constraints.md (Bs): Update
16057 ix86_indirect_branch_register check. Don't check
16058 ix86_indirect_branch_register with GOT_memory_operand.
16059 (Bw): Likewise.
16060 * config/i386/predicates.md (GOT_memory_operand): Don't check
16061 ix86_indirect_branch_register here.
16062 (GOT32_symbol_operand): Likewise.
16063
16064 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16065
16066 * config/i386/predicates.md (constant_call_address_operand):
16067 Rewrite ix86_indirect_branch_register logic.
16068 (sibcall_insn_operand): Likewise.
16069
16070 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16071
16072 * config/i386/constraints.md (Bs): Replace
16073 ix86_indirect_branch_thunk_register with
16074 ix86_indirect_branch_register.
16075 (Bw): Likewise.
16076 * config/i386/i386.md (indirect_jump): Likewise.
16077 (tablejump): Likewise.
16078 (*sibcall_memory): Likewise.
16079 (*sibcall_value_memory): Likewise.
16080 Peepholes of indirect call and jump via memory: Likewise.
16081 * config/i386/i386.opt: Likewise.
16082 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16083 (GOT_memory_operand): Likewise.
16084 (call_insn_operand): Likewise.
16085 (sibcall_insn_operand): Likewise.
16086 (GOT32_symbol_operand): Likewise.
16087
16088 2018-01-15 Jakub Jelinek <jakub@redhat.com>
16089
16090 PR middle-end/83837
16091 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
16092 type rather than type addr's type points to.
16093 (expand_omp_atomic_mutex): Likewise.
16094 (expand_omp_atomic): Likewise.
16095
16096 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16097
16098 PR target/83839
16099 * config/i386/i386.c (output_indirect_thunk_function): Use
16100 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
16101 for __x86_return_thunk.
16102
16103 2018-01-15 Richard Biener <rguenther@suse.de>
16104
16105 PR middle-end/83850
16106 * expmed.c (extract_bit_field_1): Fix typo.
16107
16108 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16109
16110 PR target/83687
16111 * config/arm/iterators.md (VF): New mode iterator.
16112 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
16113 Remove integer-related logic from pattern.
16114 (neon_vabd<mode>_3): Likewise.
16115
16116 2018-01-15 Jakub Jelinek <jakub@redhat.com>
16117
16118 PR middle-end/82694
16119 * common.opt (fstrict-overflow): No longer an alias.
16120 (fwrapv-pointer): New option.
16121 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
16122 also for pointer types based on flag_wrapv_pointer.
16123 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
16124 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
16125 opts->x_flag_wrapv got set.
16126 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
16127 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
16128 POINTER_TYPE_OVERFLOW_UNDEFINED.
16129 * match.pd: Likewise in address comparison pattern.
16130 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
16131
16132 2018-01-15 Richard Biener <rguenther@suse.de>
16133
16134 PR lto/83804
16135 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
16136 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
16137 Reset type names to their identifier if their TYPE_DECL doesn't
16138 have linkage (and thus is used for ODR and devirt).
16139 (save_debug_info_for_decl): Remove.
16140 (save_debug_info_for_type): Likewise.
16141 (add_tree_to_fld_list): Adjust.
16142 * tree-pretty-print.c (dump_generic_node): Make dumping of
16143 type names more robust.
16144
16145 2018-01-15 Richard Biener <rguenther@suse.de>
16146
16147 * BASE-VER: Bump to 8.0.1.
16148
16149 2018-01-14 Martin Sebor <msebor@redhat.com>
16150
16151 PR other/83508
16152 * builtins.c (check_access): Avoid warning when the no-warning bit
16153 is set.
16154
16155 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
16156
16157 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
16158 * ira-color (allocno_hard_regs_compare): Likewise.
16159
16160 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
16161
16162 PR target/83013
16163 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
16164 Use .pushsection/.popsection.
16165
16166 2018-01-14 Martin Sebor <msebor@redhat.com>
16167
16168 PR c++/81327
16169 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
16170
16171 2018-01-14 Jakub Jelinek <jakub@redhat.com>
16172
16173 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
16174 entry from extra_headers.
16175 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
16176 extra_headers, make the list bitwise identical to the i?86-*-* one.
16177
16178 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16179
16180 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
16181 -mcmodel=large with -mindirect-branch=thunk,
16182 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
16183 -mfunction-return=thunk-extern.
16184 * doc/invoke.texi: Document -mcmodel=large is incompatible with
16185 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
16186 -mfunction-return=thunk and -mfunction-return=thunk-extern.
16187
16188 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16189
16190 * config/i386/i386.c (print_reg): Print the name of the full
16191 integer register without '%'.
16192 (ix86_print_operand): Handle 'V'.
16193 * doc/extend.texi: Document 'V' modifier.
16194
16195 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16196
16197 * config/i386/constraints.md (Bs): Disallow memory operand for
16198 -mindirect-branch-register.
16199 (Bw): Likewise.
16200 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16201 (GOT_memory_operand): Likewise.
16202 (call_insn_operand): Likewise.
16203 (sibcall_insn_operand): Likewise.
16204 (GOT32_symbol_operand): Likewise.
16205 * config/i386/i386.md (indirect_jump): Call convert_memory_address
16206 for -mindirect-branch-register.
16207 (tablejump): Likewise.
16208 (*sibcall_memory): Likewise.
16209 (*sibcall_value_memory): Likewise.
16210 Disallow peepholes of indirect call and jump via memory for
16211 -mindirect-branch-register.
16212 (*call_pop): Replace m with Bw.
16213 (*call_value_pop): Likewise.
16214 (*sibcall_pop_memory): Replace m with Bs.
16215 * config/i386/i386.opt (mindirect-branch-register): New option.
16216 * doc/invoke.texi: Document -mindirect-branch-register option.
16217
16218 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16219
16220 * config/i386/i386-protos.h (ix86_output_function_return): New.
16221 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
16222 set function_return_type.
16223 (indirect_thunk_name): Add ret_p to indicate thunk for function
16224 return.
16225 (output_indirect_thunk_function): Pass false to
16226 indirect_thunk_name.
16227 (ix86_output_indirect_branch_via_reg): Likewise.
16228 (ix86_output_indirect_branch_via_push): Likewise.
16229 (output_indirect_thunk_function): Create alias for function
16230 return thunk if regno < 0.
16231 (ix86_output_function_return): New function.
16232 (ix86_handle_fndecl_attribute): Handle function_return.
16233 (ix86_attribute_table): Add function_return.
16234 * config/i386/i386.h (machine_function): Add
16235 function_return_type.
16236 * config/i386/i386.md (simple_return_internal): Use
16237 ix86_output_function_return.
16238 (simple_return_internal_long): Likewise.
16239 * config/i386/i386.opt (mfunction-return=): New option.
16240 (indirect_branch): Mention -mfunction-return=.
16241 * doc/extend.texi: Document function_return function attribute.
16242 * doc/invoke.texi: Document -mfunction-return= option.
16243
16244 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16245
16246 * config/i386/i386-opts.h (indirect_branch): New.
16247 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
16248 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
16249 with local indirect jump when converting indirect call and jump.
16250 (ix86_set_indirect_branch_type): New.
16251 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
16252 (indirectlabelno): New.
16253 (indirect_thunk_needed): Likewise.
16254 (indirect_thunk_bnd_needed): Likewise.
16255 (indirect_thunks_used): Likewise.
16256 (indirect_thunks_bnd_used): Likewise.
16257 (INDIRECT_LABEL): Likewise.
16258 (indirect_thunk_name): Likewise.
16259 (output_indirect_thunk): Likewise.
16260 (output_indirect_thunk_function): Likewise.
16261 (ix86_output_indirect_branch_via_reg): Likewise.
16262 (ix86_output_indirect_branch_via_push): Likewise.
16263 (ix86_output_indirect_branch): Likewise.
16264 (ix86_output_indirect_jmp): Likewise.
16265 (ix86_code_end): Call output_indirect_thunk_function if needed.
16266 (ix86_output_call_insn): Call ix86_output_indirect_branch if
16267 needed.
16268 (ix86_handle_fndecl_attribute): Handle indirect_branch.
16269 (ix86_attribute_table): Add indirect_branch.
16270 * config/i386/i386.h (machine_function): Add indirect_branch_type
16271 and has_local_indirect_jump.
16272 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
16273 to true.
16274 (tablejump): Likewise.
16275 (*indirect_jump): Use ix86_output_indirect_jmp.
16276 (*tablejump_1): Likewise.
16277 (simple_return_indirect_internal): Likewise.
16278 * config/i386/i386.opt (mindirect-branch=): New option.
16279 (indirect_branch): New.
16280 (keep): Likewise.
16281 (thunk): Likewise.
16282 (thunk-inline): Likewise.
16283 (thunk-extern): Likewise.
16284 * doc/extend.texi: Document indirect_branch function attribute.
16285 * doc/invoke.texi: Document -mindirect-branch= option.
16286
16287 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
16288
16289 PR ipa/83051
16290 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
16291
16292 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
16293
16294 * ipa-inline.c (want_inline_small_function_p): Return false if
16295 inlining has already failed with CIF_FINAL_ERROR.
16296 (update_caller_keys): Call want_inline_small_function_p before
16297 can_inline_edge_p.
16298 (update_callee_keys): Likewise.
16299
16300 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
16301
16302 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
16303 New function.
16304 (rs6000_quadword_masked_address_p): Likewise.
16305 (quad_aligned_load_p): Likewise.
16306 (quad_aligned_store_p): Likewise.
16307 (const_load_sequence_p): Add comment to describe the outer-most loop.
16308 (mimic_memory_attributes_and_flags): New function.
16309 (rs6000_gen_stvx): Likewise.
16310 (replace_swapped_aligned_store): Likewise.
16311 (rs6000_gen_lvx): Likewise.
16312 (replace_swapped_aligned_load): Likewise.
16313 (replace_swapped_load_constant): Capitalize argument name in
16314 comment describing this function.
16315 (rs6000_analyze_swaps): Add a third pass to search for vector loads
16316 and stores that access quad-word aligned addresses and replace
16317 with stvx or lvx instructions when appropriate.
16318 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
16319 New function prototype.
16320 (rs6000_quadword_masked_address_p): Likewise.
16321 (rs6000_gen_lvx): Likewise.
16322 (rs6000_gen_stvx): Likewise.
16323 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
16324 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
16325 when memory address is aligned.
16326 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
16327 this split to select lvx instruction when memory address is aligned.
16328 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
16329 instruction when memory address is aligned.
16330 (*vsx_le_perm_load_v16qi): Likewise.
16331 (four unnamed splitters): Modify to select the stvx instruction
16332 when memory is aligned.
16333
16334 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
16335
16336 * predict.c (determine_unlikely_bbs): Handle correctly BBs
16337 which appears in the queue multiple times.
16338
16339 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16340 Alan Hayward <alan.hayward@arm.com>
16341 David Sherwood <david.sherwood@arm.com>
16342
16343 * tree-vectorizer.h (vec_lower_bound): New structure.
16344 (_loop_vec_info): Add check_nonzero and lower_bounds.
16345 (LOOP_VINFO_CHECK_NONZERO): New macro.
16346 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
16347 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
16348 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
16349 fields. Make seg_len the distance travelled, not including the
16350 access size.
16351 (dr_direction_indicator): Declare.
16352 (dr_zero_step_indicator): Likewise.
16353 (dr_known_forward_stride_p): Likewise.
16354 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
16355 tree-ssanames.h.
16356 (runtime_alias_check_p): Allow runtime alias checks with
16357 variable strides.
16358 (operator ==): Compare access_size and align.
16359 (prune_runtime_alias_test_list): Rework for new distinction between
16360 the access_size and seg_len.
16361 (create_intersect_range_checks_index): Likewise. Cope with polynomial
16362 segment lengths.
16363 (get_segment_min_max): New function.
16364 (create_intersect_range_checks): Use it.
16365 (dr_step_indicator): New function.
16366 (dr_direction_indicator): Likewise.
16367 (dr_zero_step_indicator): Likewise.
16368 (dr_known_forward_stride_p): Likewise.
16369 * tree-loop-distribution.c (data_ref_segment_size): Return
16370 DR_STEP * (niters - 1).
16371 (compute_alias_check_pairs): Update call to the dr_with_seg_len
16372 constructor.
16373 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
16374 (vect_preserves_scalar_order_p): New function, split out from...
16375 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
16376 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
16377 (vect_vfa_access_size): New function.
16378 (vect_vfa_align): Likewise.
16379 (vect_compile_time_alias): Take access_size_a and access_b arguments.
16380 (dump_lower_bound): New function.
16381 (vect_check_lower_bound): Likewise.
16382 (vect_small_gap_p): Likewise.
16383 (vectorizable_with_step_bound_p): Likewise.
16384 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
16385 depencies if the vectorization factor is 1. Convert the checks
16386 for nonzero steps into checks on the bounds of DR_STEP. Try using
16387 a bunds check for variable steps if the minimum required step is
16388 relatively small. Update calls to the dr_with_seg_len
16389 constructor and to vect_compile_time_alias.
16390 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
16391 function.
16392 (vect_loop_versioning): Call it.
16393 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
16394 when retrying.
16395 (vect_estimate_min_profitable_iters): Account for any bounds checks.
16396
16397 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16398 Alan Hayward <alan.hayward@arm.com>
16399 David Sherwood <david.sherwood@arm.com>
16400
16401 * doc/sourcebuild.texi (vect_scatter_store): Document.
16402 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
16403 optabs.
16404 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
16405 Document.
16406 * genopinit.c (main): Add supports_vec_scatter_store and
16407 supports_vec_scatter_store_cached to target_optabs.
16408 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
16409 IFN_MASK_SCATTER_STORE.
16410 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
16411 functions.
16412 * internal-fn.h (internal_store_fn_p): Declare.
16413 (internal_fn_stored_value_index): Likewise.
16414 * internal-fn.c (scatter_store_direct): New macro.
16415 (expand_scatter_store_optab_fn): New function.
16416 (direct_scatter_store_optab_supported_p): New macro.
16417 (internal_store_fn_p): New function.
16418 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
16419 IFN_MASK_SCATTER_STORE.
16420 (internal_fn_mask_index): Likewise.
16421 (internal_fn_stored_value_index): New function.
16422 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
16423 for scatter stores.
16424 * optabs-query.h (supports_vec_scatter_store_p): Declare.
16425 * optabs-query.c (supports_vec_scatter_store_p): New function.
16426 * tree-vectorizer.h (vect_get_store_rhs): Declare.
16427 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
16428 true for scatter stores.
16429 (vect_gather_scatter_fn_p): Handle scatter stores too.
16430 (vect_check_gather_scatter): Consider using scatter stores if
16431 supports_vec_scatter_store_p.
16432 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
16433 scatter stores too.
16434 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16435 internal_fn_stored_value_index.
16436 (check_load_store_masking): Handle scatter stores too.
16437 (vect_get_store_rhs): Make public.
16438 (vectorizable_call): Use internal_store_fn_p.
16439 (vectorizable_store): Handle scatter store internal functions.
16440 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
16441 when deciding whether the end of the group has been reached.
16442 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
16443 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
16444 (mask_scatter_store<mode>): New insns.
16445
16446 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16447 Alan Hayward <alan.hayward@arm.com>
16448 David Sherwood <david.sherwood@arm.com>
16449
16450 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
16451 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
16452 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
16453 function.
16454 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
16455 Use vect_truncate_gather_scatter_offset if we can't treat the
16456 operation as a normal gather load or scatter store.
16457 (get_group_load_store_type): Take the gather_scatter_info
16458 as argument. Try using a gather load or scatter store for
16459 single-element groups.
16460 (get_load_store_type): Update calls to get_group_load_store_type
16461 and vect_use_strided_gather_scatters_p.
16462
16463 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16464 Alan Hayward <alan.hayward@arm.com>
16465 David Sherwood <david.sherwood@arm.com>
16466
16467 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
16468 optional tree argument.
16469 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
16470 null target hooks.
16471 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
16472 but continue to use the current value as a fallback.
16473 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
16474 to compare the updates.
16475 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
16476 (get_load_store_type): Use it when handling a strided access.
16477 (vect_get_strided_load_store_ops): New function.
16478 (vect_get_data_ptr_increment): Likewise.
16479 (vectorizable_load): Handle strided gather loads. Always pass
16480 a step to vect_create_data_ref_ptr and bump_vector_ptr.
16481
16482 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16483 Alan Hayward <alan.hayward@arm.com>
16484 David Sherwood <david.sherwood@arm.com>
16485
16486 * doc/md.texi (gather_load@var{m}): Document.
16487 (mask_gather_load@var{m}): Likewise.
16488 * genopinit.c (main): Add supports_vec_gather_load and
16489 supports_vec_gather_load_cached to target_optabs.
16490 * optabs-tree.c (init_tree_optimization_optabs): Use
16491 ggc_cleared_alloc to allocate target_optabs.
16492 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
16493 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
16494 functions.
16495 * internal-fn.h (internal_load_fn_p): Declare.
16496 (internal_gather_scatter_fn_p): Likewise.
16497 (internal_fn_mask_index): Likewise.
16498 (internal_gather_scatter_fn_supported_p): Likewise.
16499 * internal-fn.c (gather_load_direct): New macro.
16500 (expand_gather_load_optab_fn): New function.
16501 (direct_gather_load_optab_supported_p): New macro.
16502 (direct_internal_fn_optab): New function.
16503 (internal_load_fn_p): Likewise.
16504 (internal_gather_scatter_fn_p): Likewise.
16505 (internal_fn_mask_index): Likewise.
16506 (internal_gather_scatter_fn_supported_p): Likewise.
16507 * optabs-query.c (supports_at_least_one_mode_p): New function.
16508 (supports_vec_gather_load_p): Likewise.
16509 * optabs-query.h (supports_vec_gather_load_p): Declare.
16510 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
16511 and memory_type field.
16512 (NUM_PATTERNS): Bump to 15.
16513 * tree-vect-data-refs.c: Include internal-fn.h.
16514 (vect_gather_scatter_fn_p): New function.
16515 (vect_describe_gather_scatter_call): Likewise.
16516 (vect_check_gather_scatter): Try using internal functions for
16517 gather loads. Recognize existing calls to a gather load function.
16518 (vect_analyze_data_refs): Consider using gather loads if
16519 supports_vec_gather_load_p.
16520 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
16521 (vect_get_gather_scatter_offset_type): Likewise.
16522 (vect_convert_mask_for_vectype): Likewise.
16523 (vect_add_conversion_to_patterm): Likewise.
16524 (vect_try_gather_scatter_pattern): Likewise.
16525 (vect_recog_gather_scatter_pattern): New pattern recognizer.
16526 (vect_vect_recog_func_ptrs): Add it.
16527 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16528 internal_fn_mask_index and internal_gather_scatter_fn_p.
16529 (check_load_store_masking): Take the gather_scatter_info as an
16530 argument and handle gather loads.
16531 (vect_get_gather_scatter_ops): New function.
16532 (vectorizable_call): Check internal_load_fn_p.
16533 (vectorizable_load): Likewise. Handle gather load internal
16534 functions.
16535 (vectorizable_store): Update call to check_load_store_masking.
16536 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
16537 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
16538 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
16539 (aarch64_gather_scale_operand_d): New predicates.
16540 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
16541 (mask_gather_load<mode>): New insns.
16542
16543 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16544 Alan Hayward <alan.hayward@arm.com>
16545 David Sherwood <david.sherwood@arm.com>
16546
16547 * optabs.def (fold_left_plus_optab): New optab.
16548 * doc/md.texi (fold_left_plus_@var{m}): Document.
16549 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
16550 * internal-fn.c (fold_left_direct): Define.
16551 (expand_fold_left_optab_fn): Likewise.
16552 (direct_fold_left_optab_supported_p): Likewise.
16553 * fold-const-call.c (fold_const_fold_left): New function.
16554 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
16555 * tree-parloops.c (valid_reduction_p): New function.
16556 (gather_scalar_reductions): Use it.
16557 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
16558 (vect_finish_replace_stmt): Declare.
16559 * tree-vect-loop.c (fold_left_reduction_fn): New function.
16560 (needs_fold_left_reduction_p): New function, split out from...
16561 (vect_is_simple_reduction): ...here. Accept reductions that
16562 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
16563 (vect_force_simple_reduction): Also store the reduction type in
16564 the assignment's STMT_VINFO_REDUC_TYPE.
16565 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
16566 (merge_with_identity): New function.
16567 (vect_expand_fold_left): Likewise.
16568 (vectorize_fold_left_reduction): Likewise.
16569 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
16570 scalar phi in place for it. Check for target support and reject
16571 cases that would reassociate the operation. Defer the transform
16572 phase to vectorize_fold_left_reduction.
16573 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
16574 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
16575 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
16576
16577 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16578
16579 * tree-if-conv.c (predicate_mem_writes): Remove redundant
16580 call to ifc_temp_var.
16581
16582 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16583 Alan Hayward <alan.hayward@arm.com>
16584 David Sherwood <david.sherwood@arm.com>
16585
16586 * target.def (legitimize_address_displacement): Take the original
16587 offset as a poly_int.
16588 * targhooks.h (default_legitimize_address_displacement): Update
16589 accordingly.
16590 * targhooks.c (default_legitimize_address_displacement): Likewise.
16591 * doc/tm.texi: Regenerate.
16592 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
16593 as an argument, moving assert of ad->disp == ad->disp_term to...
16594 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
16595 Try calling targetm.legitimize_address_displacement before expanding
16596 the address rather than afterwards, and adjust for the new interface.
16597 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
16598 Match the new hook interface. Handle SVE addresses.
16599 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
16600 new hook interface.
16601
16602 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16603
16604 * Makefile.in (OBJS): Add early-remat.o.
16605 * target.def (select_early_remat_modes): New hook.
16606 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
16607 * doc/tm.texi: Regenerate.
16608 * targhooks.h (default_select_early_remat_modes): Declare.
16609 * targhooks.c (default_select_early_remat_modes): New function.
16610 * timevar.def (TV_EARLY_REMAT): New timevar.
16611 * passes.def (pass_early_remat): New pass.
16612 * tree-pass.h (make_pass_early_remat): Declare.
16613 * early-remat.c: New file.
16614 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
16615 function.
16616 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
16617
16618 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16619 Alan Hayward <alan.hayward@arm.com>
16620 David Sherwood <david.sherwood@arm.com>
16621
16622 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
16623 vfm1 with a bound_epilog parameter.
16624 (vect_do_peeling): Update calls accordingly, and move the prologue
16625 call earlier in the function. Treat the base bound_epilog as 0 for
16626 fully-masked loops and retain vf - 1 for other loops. Add 1 to
16627 this base when peeling for gaps.
16628 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
16629 with fully-masked loops.
16630 (vect_estimate_min_profitable_iters): Handle the single peeled
16631 iteration in that case.
16632
16633 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16634 Alan Hayward <alan.hayward@arm.com>
16635 David Sherwood <david.sherwood@arm.com>
16636
16637 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
16638 single-element interleaving even if the size is not a power of 2.
16639 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
16640 accesses for single-element interleaving if the group size is
16641 not a power of 2.
16642
16643 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16644 Alan Hayward <alan.hayward@arm.com>
16645 David Sherwood <david.sherwood@arm.com>
16646
16647 * doc/md.texi (fold_extract_last_@var{m}): Document.
16648 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
16649 * optabs.def (fold_extract_last_optab): New optab.
16650 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
16651 * internal-fn.c (fold_extract_direct): New macro.
16652 (expand_fold_extract_optab_fn): Likewise.
16653 (direct_fold_extract_optab_supported_p): Likewise.
16654 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
16655 * tree-vect-loop.c (vect_model_reduction_cost): Handle
16656 EXTRACT_LAST_REDUCTION.
16657 (get_initial_def_for_reduction): Do not create an initial vector
16658 for EXTRACT_LAST_REDUCTION reductions.
16659 (vectorizable_reduction): Leave the scalar phi in place for
16660 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
16661 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
16662 epilogue code for EXTRACT_LAST_REDUCTION and defer the
16663 transform phase to vectorizable_condition.
16664 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
16665 split out from...
16666 (vect_finish_stmt_generation): ...here.
16667 (vect_finish_replace_stmt): New function.
16668 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
16669 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
16670 pattern.
16671 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
16672
16673 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16674 Alan Hayward <alan.hayward@arm.com>
16675 David Sherwood <david.sherwood@arm.com>
16676
16677 * doc/md.texi (extract_last_@var{m}): Document.
16678 * optabs.def (extract_last_optab): New optab.
16679 * internal-fn.def (EXTRACT_LAST): New internal function.
16680 * internal-fn.c (cond_unary_direct): New macro.
16681 (expand_cond_unary_optab_fn): Likewise.
16682 (direct_cond_unary_optab_supported_p): Likewise.
16683 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
16684 loops using EXTRACT_LAST.
16685 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
16686 (extract_last_<mode>): ...this optab.
16687 (vec_extract<mode><Vel>): Update accordingly.
16688
16689 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16690 Alan Hayward <alan.hayward@arm.com>
16691 David Sherwood <david.sherwood@arm.com>
16692
16693 * target.def (empty_mask_is_expensive): New hook.
16694 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
16695 * doc/tm.texi: Regenerate.
16696 * targhooks.h (default_empty_mask_is_expensive): Declare.
16697 * targhooks.c (default_empty_mask_is_expensive): New function.
16698 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
16699 if the target says that empty masks are expensive.
16700 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
16701 New function.
16702 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
16703
16704 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16705 Alan Hayward <alan.hayward@arm.com>
16706 David Sherwood <david.sherwood@arm.com>
16707
16708 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
16709 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
16710 (vect_use_loop_mask_for_alignment_p): New function.
16711 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
16712 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
16713 niters_skip argument. Make sure that the first niters_skip elements
16714 of the first iteration are inactive.
16715 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
16716 Update call to vect_set_loop_masks_directly.
16717 (get_misalign_in_elems): New function, split out from...
16718 (vect_gen_prolog_loop_niters): ...here.
16719 (vect_update_init_of_dr): Take a code argument that specifies whether
16720 the adjustment should be added or subtracted.
16721 (vect_update_init_of_drs): Likewise.
16722 (vect_prepare_for_masked_peels): New function.
16723 (vect_do_peeling): Skip prologue peeling if we're using a mask
16724 instead. Update call to vect_update_inits_of_drs.
16725 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16726 mask_skip_niters.
16727 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
16728 alignment. Do not include the number of peeled iterations in
16729 the minimum threshold in that case.
16730 (vectorizable_induction): Adjust the start value down by
16731 LOOP_VINFO_MASK_SKIP_NITERS iterations.
16732 (vect_transform_loop): Call vect_prepare_for_masked_peels.
16733 Take the number of skipped iterations into account when calculating
16734 the loop bounds.
16735 * tree-vect-stmts.c (vect_gen_while_not): New function.
16736
16737 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16738 Alan Hayward <alan.hayward@arm.com>
16739 David Sherwood <david.sherwood@arm.com>
16740
16741 * doc/sourcebuild.texi (vect_fully_masked): Document.
16742 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
16743 default value to 0.
16744 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
16745 split out from...
16746 (vect_analyze_loop_2): ...here. Don't check the vectorization
16747 factor against the number of loop iterations if the loop is
16748 fully-masked.
16749
16750 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16751 Alan Hayward <alan.hayward@arm.com>
16752 David Sherwood <david.sherwood@arm.com>
16753
16754 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
16755 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
16756 (dump_groups): Update accordingly.
16757 (iv_use::mem_type): New member variable.
16758 (address_p): New function.
16759 (record_use): Add a mem_type argument and initialize the new
16760 mem_type field.
16761 (record_group_use): Add a mem_type argument. Use address_p.
16762 Remove obsolete null checks of base_object. Update call to record_use.
16763 (find_interesting_uses_op): Update call to record_group_use.
16764 (find_interesting_uses_cond): Likewise.
16765 (find_interesting_uses_address): Likewise.
16766 (get_mem_type_for_internal_fn): New function.
16767 (find_address_like_use): Likewise.
16768 (find_interesting_uses_stmt): Try find_address_like_use before
16769 calling find_interesting_uses_op.
16770 (addr_offset_valid_p): Use the iv mem_type field as the type
16771 of the addressed memory.
16772 (add_autoinc_candidates): Likewise.
16773 (get_address_cost): Likewise.
16774 (split_small_address_groups_p): Use address_p.
16775 (split_address_groups): Likewise.
16776 (add_iv_candidate_for_use): Likewise.
16777 (autoinc_possible_for_pair): Likewise.
16778 (rewrite_groups): Likewise.
16779 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
16780 (determine_group_iv_cost): Update after split of USE_ADDRESS.
16781 (get_alias_ptr_type_for_ptr_address): New function.
16782 (rewrite_use_address): Rewrite address uses in calls that were
16783 identified by find_address_like_use.
16784
16785 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16786 Alan Hayward <alan.hayward@arm.com>
16787 David Sherwood <david.sherwood@arm.com>
16788
16789 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
16790 TARGET_MEM_REFs.
16791 * gimple-expr.h (is_gimple_addressable: Likewise.
16792 * gimple-expr.c (is_gimple_address): Likewise.
16793 * internal-fn.c (expand_call_mem_ref): New function.
16794 (expand_mask_load_optab_fn): Use it.
16795 (expand_mask_store_optab_fn): Likewise.
16796
16797 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16798 Alan Hayward <alan.hayward@arm.com>
16799 David Sherwood <david.sherwood@arm.com>
16800
16801 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
16802 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
16803 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
16804 (cond_umax@var{mode}): Document.
16805 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
16806 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
16807 (cond_umin_optab, cond_umax_optab): New optabs.
16808 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
16809 (COND_IOR, COND_XOR): New internal functions.
16810 * internal-fn.h (get_conditional_internal_fn): Declare.
16811 * internal-fn.c (cond_binary_direct): New macro.
16812 (expand_cond_binary_optab_fn): Likewise.
16813 (direct_cond_binary_optab_supported_p): Likewise.
16814 (get_conditional_internal_fn): New function.
16815 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
16816 Cope with reduction statements that are vectorized as calls rather
16817 than assignments.
16818 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
16819 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
16820 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
16821 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16822 (UNSPEC_COND_EOR): New unspecs.
16823 (optab): Add mappings for them.
16824 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
16825 (sve_int_op, sve_fp_op): New int attributes.
16826
16827 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16828 Alan Hayward <alan.hayward@arm.com>
16829 David Sherwood <david.sherwood@arm.com>
16830
16831 * optabs.def (while_ult_optab): New optab.
16832 * doc/md.texi (while_ult@var{m}@var{n}): Document.
16833 * internal-fn.def (WHILE_ULT): New internal function.
16834 * internal-fn.h (direct_internal_fn_supported_p): New override
16835 that takes two types as argument.
16836 * internal-fn.c (while_direct): New macro.
16837 (expand_while_optab_fn): New function.
16838 (convert_optab_supported_p): Likewise.
16839 (direct_while_optab_supported_p): New macro.
16840 * wide-int.h (wi::udiv_ceil): New function.
16841 * tree-vectorizer.h (rgroup_masks): New structure.
16842 (vec_loop_masks): New typedef.
16843 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
16844 and fully_masked_p.
16845 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
16846 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
16847 (vect_max_vf): New function.
16848 (slpeel_make_loop_iterate_ntimes): Delete.
16849 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
16850 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
16851 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
16852 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
16853 internal-fn.h, stor-layout.h and optabs-query.h.
16854 (vect_set_loop_mask): New function.
16855 (add_preheader_seq): Likewise.
16856 (add_header_seq): Likewise.
16857 (interleave_supported_p): Likewise.
16858 (vect_maybe_permute_loop_masks): Likewise.
16859 (vect_set_loop_masks_directly): Likewise.
16860 (vect_set_loop_condition_masked): Likewise.
16861 (vect_set_loop_condition_unmasked): New function, split out from
16862 slpeel_make_loop_iterate_ntimes.
16863 (slpeel_make_loop_iterate_ntimes): Rename to..
16864 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
16865 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
16866 (vect_do_peeling): Update call accordingly.
16867 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
16868 loops.
16869 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16870 mask_compare_type, can_fully_mask_p and fully_masked_p.
16871 (release_vec_loop_masks): New function.
16872 (_loop_vec_info): Use it to free the loop masks.
16873 (can_produce_all_loop_masks_p): New function.
16874 (vect_get_max_nscalars_per_iter): Likewise.
16875 (vect_verify_full_masking): Likewise.
16876 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
16877 retries, and free the mask rgroups before retrying. Check loop-wide
16878 reasons for disallowing fully-masked loops. Make the final decision
16879 about whether use a fully-masked loop or not.
16880 (vect_estimate_min_profitable_iters): Do not assume that peeling
16881 for the number of iterations will be needed for fully-masked loops.
16882 (vectorizable_reduction): Disable fully-masked loops.
16883 (vectorizable_live_operation): Likewise.
16884 (vect_halve_mask_nunits): New function.
16885 (vect_double_mask_nunits): Likewise.
16886 (vect_record_loop_mask): Likewise.
16887 (vect_get_loop_mask): Likewise.
16888 (vect_transform_loop): Handle the case in which the final loop
16889 iteration might handle a partial vector. Call vect_set_loop_condition
16890 instead of slpeel_make_loop_iterate_ntimes.
16891 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
16892 (check_load_store_masking): New function.
16893 (prepare_load_store_mask): Likewise.
16894 (vectorizable_store): Handle fully-masked loops.
16895 (vectorizable_load): Likewise.
16896 (supportable_widening_operation): Use vect_halve_mask_nunits for
16897 booleans.
16898 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
16899 (vect_gen_while): New function.
16900 * config/aarch64/aarch64.md (umax<mode>3): New expander.
16901 (aarch64_uqdec<mode>): New insn.
16902
16903 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16904 Alan Hayward <alan.hayward@arm.com>
16905 David Sherwood <david.sherwood@arm.com>
16906
16907 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
16908 (reduc_xor_scal_optab): New optabs.
16909 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
16910 (reduc_xor_scal_@var{m}): Document.
16911 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
16912 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
16913 internal functions.
16914 * fold-const-call.c (fold_const_call): Handle them.
16915 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
16916 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
16917 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
16918 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
16919 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
16920 (UNSPEC_XORV): New unspecs.
16921 (optab): Add entries for them.
16922 (BITWISEV): New int iterator.
16923 (bit_reduc_op): New int attributes.
16924
16925 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16926 Alan Hayward <alan.hayward@arm.com>
16927 David Sherwood <david.sherwood@arm.com>
16928
16929 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
16930 * internal-fn.def (VEC_SHL_INSERT): New internal function.
16931 * optabs.def (vec_shl_insert_optab): New optab.
16932 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
16933 (duplicate_and_interleave): Likewise.
16934 * tree-vect-loop.c: Include internal-fn.h.
16935 (neutral_op_for_slp_reduction): New function, split out from
16936 get_initial_defs_for_reduction.
16937 (get_initial_def_for_reduction): Handle option 2 for variable-length
16938 vectors by loading the neutral value into a vector and then shifting
16939 the initial value into element 0.
16940 (get_initial_defs_for_reduction): Replace the code argument with
16941 the neutral value calculated by neutral_op_for_slp_reduction.
16942 Use gimple_build_vector for constant-length vectors.
16943 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
16944 but the first group_size elements have a neutral value.
16945 Use duplicate_and_interleave otherwise.
16946 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
16947 Update call to get_initial_defs_for_reduction. Handle SLP
16948 reductions for variable-length vectors by creating one vector
16949 result for each scalar result, with the elements associated
16950 with other scalar results stubbed out with the neutral value.
16951 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
16952 Require IFN_VEC_SHL_INSERT for double reductions on
16953 variable-length vectors, or SLP reductions that have
16954 a neutral value. Require can_duplicate_and_interleave_p
16955 support for variable-length unchained SLP reductions if there
16956 is no neutral value, such as for MIN/MAX reductions. Also require
16957 the number of vector elements to be a multiple of the number of
16958 SLP statements when doing variable-length unchained SLP reductions.
16959 Update call to vect_create_epilog_for_reduction.
16960 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
16961 and remove initial values.
16962 (duplicate_and_interleave): Make public.
16963 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
16964 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
16965
16966 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16967 Alan Hayward <alan.hayward@arm.com>
16968 David Sherwood <david.sherwood@arm.com>
16969
16970 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
16971 (can_duplicate_and_interleave_p): New function.
16972 (vect_get_and_check_slp_defs): Take the vector of statements
16973 rather than just the current one. Remove excess parentheses.
16974 Restriction rejectinon of vect_constant_def and vect_external_def
16975 for variable-length vectors to boolean types, or types for which
16976 can_duplicate_and_interleave_p is false.
16977 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
16978 (duplicate_and_interleave): New function.
16979 (vect_get_constant_vectors): Use gimple_build_vector for
16980 constant-length vectors and suitable variable-length constant
16981 vectors. Use duplicate_and_interleave for other variable-length
16982 vectors. Don't defer the update when inserting new statements.
16983
16984 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16985 Alan Hayward <alan.hayward@arm.com>
16986 David Sherwood <david.sherwood@arm.com>
16987
16988 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
16989 min_profitable_iters doesn't go negative.
16990
16991 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16992 Alan Hayward <alan.hayward@arm.com>
16993 David Sherwood <david.sherwood@arm.com>
16994
16995 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
16996 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
16997 * optabs.def (vec_mask_load_lanes_optab): New optab.
16998 (vec_mask_store_lanes_optab): Likewise.
16999 * internal-fn.def (MASK_LOAD_LANES): New internal function.
17000 (MASK_STORE_LANES): Likewise.
17001 * internal-fn.c (mask_load_lanes_direct): New macro.
17002 (mask_store_lanes_direct): Likewise.
17003 (expand_mask_load_optab_fn): Handle masked operations.
17004 (expand_mask_load_lanes_optab_fn): New macro.
17005 (expand_mask_store_optab_fn): Handle masked operations.
17006 (expand_mask_store_lanes_optab_fn): New macro.
17007 (direct_mask_load_lanes_optab_supported_p): Likewise.
17008 (direct_mask_store_lanes_optab_supported_p): Likewise.
17009 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
17010 parameter.
17011 (vect_load_lanes_supported): Likewise.
17012 * tree-vect-data-refs.c (strip_conversion): New function.
17013 (can_group_stmts_p): Likewise.
17014 (vect_analyze_data_ref_accesses): Use it instead of checking
17015 for a pair of assignments.
17016 (vect_store_lanes_supported): Take a masked_p parameter.
17017 (vect_load_lanes_supported): Likewise.
17018 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
17019 vect_store_lanes_supported and vect_load_lanes_supported.
17020 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
17021 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
17022 parameter. Don't allow gaps for masked accesses.
17023 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
17024 and vect_load_lanes_supported.
17025 (get_load_store_type): Take a masked_p parameter and update
17026 call to get_group_load_store_type.
17027 (vectorizable_store): Update call to get_load_store_type.
17028 Handle IFN_MASK_STORE_LANES.
17029 (vectorizable_load): Update call to get_load_store_type.
17030 Handle IFN_MASK_LOAD_LANES.
17031
17032 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17033 Alan Hayward <alan.hayward@arm.com>
17034 David Sherwood <david.sherwood@arm.com>
17035
17036 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
17037 modes for SVE.
17038 * config/aarch64/aarch64-protos.h
17039 (aarch64_sve_struct_memory_operand_p): Declare.
17040 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
17041 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
17042 (VPRED, vpred): Handle SVE structure modes.
17043 * config/aarch64/constraints.md (Utx): New constraint.
17044 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
17045 (aarch64_sve_struct_nonimmediate_operand): New predicates.
17046 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
17047 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
17048 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
17049 structure modes. Split into pieces after RA.
17050 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
17051 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
17052 New patterns.
17053 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
17054 SVE structure modes.
17055 (aarch64_classify_address): Likewise.
17056 (sizetochar): Move earlier in file.
17057 (aarch64_print_operand): Handle SVE register lists.
17058 (aarch64_array_mode): New function.
17059 (aarch64_sve_struct_memory_operand_p): Likewise.
17060 (TARGET_ARRAY_MODE): Redefine.
17061
17062 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17063 Alan Hayward <alan.hayward@arm.com>
17064 David Sherwood <david.sherwood@arm.com>
17065
17066 * target.def (array_mode): New target hook.
17067 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
17068 * doc/tm.texi: Regenerate.
17069 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
17070 * hooks.c (hook_optmode_mode_uhwi_none): New function.
17071 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
17072 targetm.array_mode.
17073 * stor-layout.c (mode_for_array): Likewise. Support polynomial
17074 type sizes.
17075
17076 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17077 Alan Hayward <alan.hayward@arm.com>
17078 David Sherwood <david.sherwood@arm.com>
17079
17080 * fold-const.c (fold_binary_loc): Check the argument types
17081 rather than the result type when testing for a vector operation.
17082
17083 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17084
17085 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
17086 * doc/tm.texi: Regenerate.
17087
17088 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17089 Alan Hayward <alan.hayward@arm.com>
17090 David Sherwood <david.sherwood@arm.com>
17091
17092 * doc/invoke.texi (-msve-vector-bits=): Document new option.
17093 (sve): Document new AArch64 extension.
17094 * doc/md.texi (w): Extend the description of the AArch64
17095 constraint to include SVE vectors.
17096 (Upl, Upa): Document new AArch64 predicate constraints.
17097 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
17098 enum.
17099 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
17100 (msve-vector-bits=): New option.
17101 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
17102 SVE when these are disabled.
17103 (sve): New extension.
17104 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
17105 modes. Adjust their number of units based on aarch64_sve_vg.
17106 (MAX_BITSIZE_MODE_ANY_MODE): Define.
17107 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
17108 aarch64_addr_query_type.
17109 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
17110 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
17111 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
17112 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
17113 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
17114 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
17115 (aarch64_simd_imm_zero_p): Delete.
17116 (aarch64_check_zero_based_sve_index_immediate): Declare.
17117 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17118 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17119 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17120 (aarch64_sve_float_mul_immediate_p): Likewise.
17121 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17122 rather than an rtx.
17123 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
17124 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
17125 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
17126 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
17127 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
17128 (aarch64_regmode_natural_size): Likewise.
17129 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
17130 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
17131 left one place.
17132 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
17133 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
17134 for VG and the SVE predicate registers.
17135 (V_ALIASES): Add a "z"-prefixed alias.
17136 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
17137 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
17138 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
17139 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
17140 (REG_CLASS_NAMES): Add entries for them.
17141 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
17142 and the predicate registers.
17143 (aarch64_sve_vg): Declare.
17144 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
17145 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
17146 (REGMODE_NATURAL_SIZE): Define.
17147 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
17148 SVE macros.
17149 * config/aarch64/aarch64.c: Include cfgrtl.h.
17150 (simd_immediate_info): Add a constructor for series vectors,
17151 and an associated step field.
17152 (aarch64_sve_vg): New variable.
17153 (aarch64_dbx_register_number): Handle VG and the predicate registers.
17154 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
17155 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
17156 (VEC_ANY_DATA, VEC_STRUCT): New constants.
17157 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
17158 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
17159 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
17160 (aarch64_get_mask_mode): New functions.
17161 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
17162 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
17163 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
17164 predicate modes and predicate registers. Explicitly restrict
17165 GPRs to modes of 16 bytes or smaller. Only allow FP registers
17166 to store a vector mode if it is recognized by
17167 aarch64_classify_vector_mode.
17168 (aarch64_regmode_natural_size): New function.
17169 (aarch64_hard_regno_caller_save_mode): Return the original mode
17170 for predicates.
17171 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
17172 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
17173 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
17174 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
17175 functions.
17176 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
17177 does not overlap dest if the function is frame-related. Handle
17178 SVE constants.
17179 (aarch64_split_add_offset): New function.
17180 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
17181 them aarch64_add_offset.
17182 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
17183 and update call to aarch64_sub_sp.
17184 (aarch64_add_cfa_expression): New function.
17185 (aarch64_expand_prologue): Pass extra temporary registers to the
17186 functions above. Handle the case in which we need to emit new
17187 DW_CFA_expressions for registers that were originally saved
17188 relative to the stack pointer, but now have to be expressed
17189 relative to the frame pointer.
17190 (aarch64_output_mi_thunk): Pass extra temporary registers to the
17191 functions above.
17192 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
17193 IP0 and IP1 values for SVE frames.
17194 (aarch64_expand_vec_series): New function.
17195 (aarch64_expand_sve_widened_duplicate): Likewise.
17196 (aarch64_expand_sve_const_vector): Likewise.
17197 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
17198 Handle SVE constants. Use emit_move_insn to move a force_const_mem
17199 into the register, rather than emitting a SET directly.
17200 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
17201 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
17202 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
17203 (offset_9bit_signed_scaled_p): New functions.
17204 (aarch64_replicate_bitmask_imm): New function.
17205 (aarch64_bitmask_imm): Use it.
17206 (aarch64_cannot_force_const_mem): Reject expressions involving
17207 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
17208 (aarch64_classify_index): Handle SVE indices, by requiring
17209 a plain register index with a scale that matches the element size.
17210 (aarch64_classify_address): Handle SVE addresses. Assert that
17211 the mode of the address is VOIDmode or an integer mode.
17212 Update call to aarch64_classify_symbol.
17213 (aarch64_classify_symbolic_expression): Update call to
17214 aarch64_classify_symbol.
17215 (aarch64_const_vec_all_in_range_p): New function.
17216 (aarch64_print_vector_float_operand): Likewise.
17217 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
17218 "vN" for FP registers with SVE modes. Handle (const ...) vectors
17219 and the FP immediates 1.0 and 0.5.
17220 (aarch64_print_address_internal): Handle SVE addresses.
17221 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
17222 (aarch64_regno_regclass): Handle predicate registers.
17223 (aarch64_secondary_reload): Handle big-endian reloads of SVE
17224 data modes.
17225 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
17226 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
17227 (aarch64_convert_sve_vector_bits): New function.
17228 (aarch64_override_options): Use it to handle -msve-vector-bits=.
17229 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17230 rather than an rtx.
17231 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
17232 Handle SVE vector and predicate modes. Accept VL-based constants
17233 that need only one temporary register, and VL offsets that require
17234 no temporary registers.
17235 (aarch64_conditional_register_usage): Mark the predicate registers
17236 as fixed if SVE isn't available.
17237 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
17238 Return true for SVE vector and predicate modes.
17239 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
17240 rather than an unsigned int. Handle SVE modes.
17241 (aarch64_preferred_simd_mode): Update call accordingly. Handle
17242 SVE modes.
17243 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
17244 if SVE is enabled.
17245 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17246 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17247 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17248 (aarch64_sve_float_mul_immediate_p): New functions.
17249 (aarch64_sve_valid_immediate): New function.
17250 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
17251 Explicitly reject structure modes. Check for INDEX constants.
17252 Handle PTRUE and PFALSE constants.
17253 (aarch64_check_zero_based_sve_index_immediate): New function.
17254 (aarch64_simd_imm_zero_p): Delete.
17255 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
17256 vector modes. Accept constants in the range of CNT[BHWD].
17257 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
17258 ask for an Advanced SIMD mode.
17259 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
17260 (aarch64_simd_vector_alignment): Handle SVE predicates.
17261 (aarch64_vectorize_preferred_vector_alignment): New function.
17262 (aarch64_simd_vector_alignment_reachable): Use it instead of
17263 the vector size.
17264 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
17265 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
17266 functions.
17267 (MAX_VECT_LEN): Delete.
17268 (expand_vec_perm_d): Add a vec_flags field.
17269 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
17270 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
17271 (aarch64_evpc_ext): Don't apply a big-endian lane correction
17272 for SVE modes.
17273 (aarch64_evpc_rev): Rename to...
17274 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
17275 (aarch64_evpc_rev_global): New function.
17276 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
17277 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
17278 MAX_VECT_LEN.
17279 (aarch64_evpc_sve_tbl): New function.
17280 (aarch64_expand_vec_perm_const_1): Update after rename of
17281 aarch64_evpc_rev. Handle SVE permutes too, trying
17282 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
17283 than aarch64_evpc_tbl.
17284 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
17285 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
17286 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
17287 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
17288 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
17289 (aarch64_expand_sve_vcond): New functions.
17290 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
17291 of aarch64_vector_mode_p.
17292 (aarch64_dwarf_poly_indeterminate_value): New function.
17293 (aarch64_compute_pressure_classes): Likewise.
17294 (aarch64_can_change_mode_class): Likewise.
17295 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
17296 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
17297 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
17298 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
17299 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
17300 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
17301 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
17302 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
17303 constraints.
17304 (Dn, Dl, Dr): Accept const as well as const_vector.
17305 (Dz): Likewise. Compare against CONST0_RTX.
17306 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
17307 of "vector" where appropriate.
17308 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
17309 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
17310 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
17311 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
17312 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
17313 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
17314 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
17315 (v_int_equiv): Extend to SVE modes.
17316 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
17317 mode attributes.
17318 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
17319 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
17320 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
17321 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
17322 (SVE_COND_FP_CMP): New int iterators.
17323 (perm_hilo): Handle the new unpack unspecs.
17324 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
17325 attributes.
17326 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
17327 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
17328 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
17329 (aarch64_equality_operator, aarch64_constant_vector_operand)
17330 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
17331 (aarch64_sve_nonimmediate_operand): Likewise.
17332 (aarch64_sve_general_operand): Likewise.
17333 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
17334 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
17335 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
17336 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
17337 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
17338 (aarch64_sve_float_arith_immediate): Likewise.
17339 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
17340 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
17341 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
17342 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
17343 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
17344 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
17345 (aarch64_sve_float_arith_operand): Likewise.
17346 (aarch64_sve_float_arith_with_sub_operand): Likewise.
17347 (aarch64_sve_float_mul_operand): Likewise.
17348 (aarch64_sve_vec_perm_operand): Likewise.
17349 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
17350 (aarch64_mov_operand): Accept const_poly_int and const_vector.
17351 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
17352 as well as const_vector.
17353 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
17354 in file. Use CONST0_RTX and CONSTM1_RTX.
17355 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
17356 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
17357 Use aarch64_simd_imm_zero.
17358 * config/aarch64/aarch64-sve.md: New file.
17359 * config/aarch64/aarch64.md: Include it.
17360 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
17361 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
17362 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
17363 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
17364 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
17365 (sve): New attribute.
17366 (enabled): Disable instructions with the sve attribute unless
17367 TARGET_SVE.
17368 (movqi, movhi): Pass CONST_POLY_INT operaneds through
17369 aarch64_expand_mov_immediate.
17370 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
17371 CNT[BHSD] immediates.
17372 (movti): Split CONST_POLY_INT moves into two halves.
17373 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
17374 Split additions that need a temporary here if the destination
17375 is the stack pointer.
17376 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
17377 (*add<mode>3_poly_1): New instruction.
17378 (set_clobber_cc): New expander.
17379
17380 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17381
17382 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
17383 parameter and use it instead of GET_MODE_SIZE (innermode). Use
17384 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
17385 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
17386 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
17387 Change innermode from fixed_mode_size to machine_mode.
17388 (simplify_subreg): Update call accordingly. Handle a constant-sized
17389 subreg of a variable-length CONST_VECTOR.
17390
17391 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17392 Alan Hayward <alan.hayward@arm.com>
17393 David Sherwood <david.sherwood@arm.com>
17394
17395 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
17396 (add_offset_to_base): New function, split out from...
17397 (create_mem_ref): ...here. When handling a scale other than 1,
17398 check first whether the address is valid without the offset.
17399 Add it into the base if so, leaving the index and scale as-is.
17400
17401 2018-01-12 Jakub Jelinek <jakub@redhat.com>
17402
17403 PR c++/83778
17404 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
17405 fold_for_warn before checking if arg2 is INTEGER_CST.
17406
17407 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
17408
17409 * config/rs6000/predicates.md (load_multiple_operation): Delete.
17410 (store_multiple_operation): Delete.
17411 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
17412 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
17413 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
17414 guarded by TARGET_STRING.
17415 (rs6000_output_load_multiple): Delete.
17416 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
17417 OPTION_MASK_STRING / TARGET_STRING handling.
17418 (print_operand) <'N', 'O'>: Add comment that these are unused now.
17419 (const rs6000_opt_masks) <"string">: Change mask to 0.
17420 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
17421 (MASK_STRING): Delete.
17422 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
17423 parts. Simplify.
17424 (load_multiple): Delete.
17425 (*ldmsi8): Delete.
17426 (*ldmsi7): Delete.
17427 (*ldmsi6): Delete.
17428 (*ldmsi5): Delete.
17429 (*ldmsi4): Delete.
17430 (*ldmsi3): Delete.
17431 (store_multiple): Delete.
17432 (*stmsi8): Delete.
17433 (*stmsi7): Delete.
17434 (*stmsi6): Delete.
17435 (*stmsi5): Delete.
17436 (*stmsi4): Delete.
17437 (*stmsi3): Delete.
17438 (movmemsi_8reg): Delete.
17439 (corresponding unnamed define_insn): Delete.
17440 (movmemsi_6reg): Delete.
17441 (corresponding unnamed define_insn): Delete.
17442 (movmemsi_4reg): Delete.
17443 (corresponding unnamed define_insn): Delete.
17444 (movmemsi_2reg): Delete.
17445 (corresponding unnamed define_insn): Delete.
17446 (movmemsi_1reg): Delete.
17447 (corresponding unnamed define_insn): Delete.
17448 * config/rs6000/rs6000.opt (mno-string): New.
17449 (mstring): Replace by deprecation warning stub.
17450 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
17451
17452 2018-01-12 Jakub Jelinek <jakub@redhat.com>
17453
17454 * regrename.c (regrename_do_replace): If replacing the same
17455 reg multiple times, try to reuse last created gen_raw_REG.
17456
17457 PR debug/81155
17458 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
17459 main to workaround a bug in GDB.
17460
17461 2018-01-12 Tom de Vries <tom@codesourcery.com>
17462
17463 PR target/83737
17464 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
17465
17466 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
17467
17468 PR rtl-optimization/80481
17469 * ira-color.c (get_cap_member): New function.
17470 (allocnos_conflict_by_live_ranges_p): Use it.
17471 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
17472 (setup_slot_coalesced_allocno_live_ranges): Ditto.
17473
17474 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
17475
17476 PR target/83628
17477 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
17478 (*saddl_se_1): Ditto.
17479 (*ssubsi_1): Ditto.
17480 (*ssubl_se_1): Ditto.
17481
17482 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17483
17484 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
17485 rather than wi::to_widest for DR_INITs.
17486 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
17487 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
17488 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
17489 INTEGER_CSTs.
17490 (vect_analyze_group_access_1): Note that here.
17491
17492 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17493
17494 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
17495 polynomial type sizes.
17496
17497 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17498
17499 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
17500 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
17501 (gimple_add_tmp_var): Likewise.
17502
17503 2018-01-12 Martin Liska <mliska@suse.cz>
17504
17505 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
17506 (gimple_alloc_sizes): Likewise.
17507 (dump_gimple_statistics): Use PRIu64 in printf format.
17508 * gimple.h: Change uint64_t to int.
17509
17510 2018-01-12 Martin Liska <mliska@suse.cz>
17511
17512 * tree-core.h: Use uint64_t instead of int.
17513 * tree.c (tree_node_counts): Likewise.
17514 (tree_node_sizes): Likewise.
17515 (dump_tree_statistics): Use PRIu64 in printf format.
17516
17517 2018-01-12 Martin Liska <mliska@suse.cz>
17518
17519 * Makefile.in: As qsort_chk is implemented in vec.c, add
17520 vec.o to linkage of gencfn-macros.
17521 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
17522 passing the info to record_node_allocation_statistics.
17523 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
17524 and pass the info.
17525 * ggc-common.c (struct ggc_usage): Add operator== and use
17526 it in operator< and compare function.
17527 * mem-stats.h (struct mem_usage): Likewise.
17528 * vec.c (struct vec_usage): Remove operator< and compare
17529 function. Can be simply inherited.
17530
17531 2018-01-12 Martin Jambor <mjambor@suse.cz>
17532
17533 PR target/81616
17534 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
17535 * tree-ssa-math-opts.c: Include domwalk.h.
17536 (convert_mult_to_fma_1): New function.
17537 (fma_transformation_info): New type.
17538 (fma_deferring_state): Likewise.
17539 (cancel_fma_deferring): New function.
17540 (result_of_phi): Likewise.
17541 (last_fma_candidate_feeds_initial_phi): Likewise.
17542 (convert_mult_to_fma): Added deferring logic, split actual
17543 transformation to convert_mult_to_fma_1.
17544 (math_opts_dom_walker): New type.
17545 (math_opts_dom_walker::after_dom_children): New method, body moved
17546 here from pass_optimize_widening_mul::execute, added deferring logic
17547 bits.
17548 (pass_optimize_widening_mul::execute): Moved most of code to
17549 math_opts_dom_walker::after_dom_children.
17550 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
17551 * config/i386/i386.c (ix86_option_override_internal): Added
17552 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
17553
17554 2018-01-12 Richard Biener <rguenther@suse.de>
17555
17556 PR debug/83157
17557 * dwarf2out.c (gen_variable_die): Do not reset old_die for
17558 inline instance vars.
17559
17560 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
17561
17562 PR target/81819
17563 * config/rx/rx.c (rx_is_restricted_memory_address):
17564 Handle SUBREG case.
17565
17566 2018-01-12 Richard Biener <rguenther@suse.de>
17567
17568 PR tree-optimization/80846
17569 * target.def (split_reduction): New target hook.
17570 * targhooks.c (default_split_reduction): New function.
17571 * targhooks.h (default_split_reduction): Declare.
17572 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
17573 target requests first reduce vectors by combining low and high
17574 parts.
17575 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
17576 (get_vectype_for_scalar_type_and_size): Export.
17577 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
17578 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
17579 * doc/tm.texi: Regenerate.
17580 * config/i386/i386.c (ix86_split_reduction): Implement
17581 TARGET_VECTORIZE_SPLIT_REDUCTION.
17582
17583 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17584
17585 PR target/83368
17586 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
17587 in PIC mode except for TARGET_VXWORKS_RTP.
17588 * config/sparc/sparc.c: Include cfgrtl.h.
17589 (TARGET_INIT_PIC_REG): Define.
17590 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
17591 (sparc_pic_register_p): New predicate.
17592 (sparc_legitimate_address_p): Use it.
17593 (sparc_legitimize_pic_address): Likewise.
17594 (sparc_delegitimize_address): Likewise.
17595 (sparc_mode_dependent_address_p): Likewise.
17596 (gen_load_pcrel_sym): Remove 4th parameter.
17597 (load_got_register): Adjust call to above. Remove obsolete stuff.
17598 (sparc_expand_prologue): Do not call load_got_register here.
17599 (sparc_flat_expand_prologue): Likewise.
17600 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
17601 (sparc_use_pseudo_pic_reg): New function.
17602 (sparc_init_pic_reg): Likewise.
17603 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17604 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
17605
17606 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
17607
17608 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
17609 Add item for branch_cost.
17610
17611 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17612
17613 PR rtl-optimization/83565
17614 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
17615 not extend the result to a larger mode for rotate operations.
17616 (num_sign_bit_copies1): Likewise.
17617
17618 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17619
17620 PR target/40411
17621 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
17622 -symbolic.
17623 Use values-Xc.o for -pedantic.
17624 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
17625
17626 2018-01-12 Martin Liska <mliska@suse.cz>
17627
17628 PR ipa/83054
17629 * ipa-devirt.c (final_warning_record::grow_type_warnings):
17630 New function.
17631 (possible_polymorphic_call_targets): Use it.
17632 (ipa_devirt): Likewise.
17633
17634 2018-01-12 Martin Liska <mliska@suse.cz>
17635
17636 * profile-count.h (enum profile_quality): Use 0 as invalid
17637 enum value of profile_quality.
17638
17639 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
17640
17641 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
17642 -mext-string options.
17643
17644 2018-01-12 Richard Biener <rguenther@suse.de>
17645
17646 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
17647 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
17648 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
17649 Likewise.
17650 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
17651
17652 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17653
17654 * configure.ac (--with-long-double-format): Add support for the
17655 configuration option to change the default long double format on
17656 PowerPC systems.
17657 * config.gcc (powerpc*-linux*-*): Likewise.
17658 * configure: Regenerate.
17659 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
17660 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
17661 used without modification.
17662
17663 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17664
17665 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
17666 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
17667 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
17668 MISC_BUILTIN_SPEC_BARRIER.
17669 (rs6000_init_builtins): Likewise.
17670 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
17671 enum value.
17672 (speculation_barrier): New define_insn.
17673 * doc/extend.texi: Document __builtin_speculation_barrier.
17674
17675 2018-01-11 Jakub Jelinek <jakub@redhat.com>
17676
17677 PR target/83203
17678 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
17679 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
17680 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
17681 iterators.
17682 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
17683 integral modes instead of "ss" and "sd".
17684 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
17685 vectors with 32-bit and 64-bit elements.
17686 (vecdupssescalarmodesuffix): New mode attribute.
17687 (vec_dup<mode>): Use it.
17688
17689 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
17690
17691 PR target/83330
17692 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
17693 frame if argument is passed on stack.
17694
17695 2018-01-11 Jakub Jelinek <jakub@redhat.com>
17696
17697 PR target/82682
17698 * ree.c (combine_reaching_defs): Optimize also
17699 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
17700 reg2=any_extend(exp); reg1=reg2;, formatting fix.
17701
17702 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
17703
17704 PR middle-end/83189
17705 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
17706
17707 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
17708
17709 PR middle-end/83718
17710 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
17711 after they are computed.
17712
17713 2018-01-11 Bin Cheng <bin.cheng@arm.com>
17714
17715 PR tree-optimization/83695
17716 * gimple-loop-linterchange.cc
17717 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
17718 reset cached scev information after interchange.
17719 (pass_linterchange::execute): Remove call to scev_reset_htab.
17720
17721 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17722
17723 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
17724 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
17725 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
17726 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
17727 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
17728 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
17729 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
17730 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
17731 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
17732 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
17733 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
17734 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
17735 (V_lane_reg): Likewise.
17736 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
17737 New define_expand.
17738 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
17739 (vfmal_lane_low<mode>_intrinsic,
17740 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
17741 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
17742 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
17743 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
17744 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
17745 vfmsl_lane_high<mode>_intrinsic): New define_insns.
17746
17747 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17748
17749 * config/arm/arm-cpus.in (fp16fml): New feature.
17750 (ALL_SIMD): Add fp16fml.
17751 (armv8.2-a): Add fp16fml as an option.
17752 (armv8.3-a): Likewise.
17753 (armv8.4-a): Add fp16fml as part of fp16.
17754 * config/arm/arm.h (TARGET_FP16FML): Define.
17755 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
17756 when appropriate.
17757 * config/arm/arm-modes.def (V2HF): Define.
17758 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
17759 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
17760 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
17761 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
17762 vfmsl_low, vfmsl_high): New set of builtins.
17763 * config/arm/iterators.md (PLUSMINUS): New code iterator.
17764 (vfml_op): New code attribute.
17765 (VFMLHALVES): New int iterator.
17766 (VFML, VFMLSEL): New mode attributes.
17767 (V_reg): Define mapping for V2HF.
17768 (V_hi, V_lo): New mode attributes.
17769 (VF_constraint): Likewise.
17770 (vfml_half, vfml_half_selector): New int attributes.
17771 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
17772 define_expand.
17773 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
17774 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
17775 New define_insn.
17776 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
17777 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
17778 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
17779 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
17780 documentation.
17781 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
17782 Document new effective target and option set.
17783
17784 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17785
17786 * config/arm/arm-cpus.in (armv8_4): New feature.
17787 (ARMv8_4a): New fgroup.
17788 (armv8.4-a): New arch.
17789 * config/arm/arm-tables.opt: Regenerate.
17790 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
17791 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
17792 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
17793 Add matching rules for -march=armv8.4-a and extensions.
17794 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
17795
17796 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
17797
17798 PR target/81821
17799 * config/rx/rx.md (BW): New mode attribute.
17800 (sync_lock_test_and_setsi): Add mode suffix to insn output.
17801
17802 2018-01-11 Richard Biener <rguenther@suse.de>
17803
17804 PR tree-optimization/83435
17805 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
17806 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
17807 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
17808
17809 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17810 Alan Hayward <alan.hayward@arm.com>
17811 David Sherwood <david.sherwood@arm.com>
17812
17813 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
17814 field.
17815 (aarch64_classify_address): Initialize it. Track polynomial offsets.
17816 (aarch64_print_address_internal): Use it to check for a zero offset.
17817
17818 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17819 Alan Hayward <alan.hayward@arm.com>
17820 David Sherwood <david.sherwood@arm.com>
17821
17822 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
17823 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
17824 Return a poly_int64 rather than a HOST_WIDE_INT.
17825 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
17826 rather than a HOST_WIDE_INT.
17827 * config/aarch64/aarch64.h (aarch64_frame): Protect with
17828 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
17829 hard_fp_offset, frame_size, initial_adjust, callee_offset and
17830 final_offset from HOST_WIDE_INT to poly_int64.
17831 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
17832 to_constant when getting the number of units in an Advanced SIMD
17833 mode.
17834 (aarch64_builtin_vectorized_function): Check for a constant number
17835 of units.
17836 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
17837 GET_MODE_SIZE.
17838 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
17839 attribute instead of GET_MODE_NUNITS.
17840 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
17841 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
17842 GET_MODE_SIZE for fixed-size registers.
17843 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
17844 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
17845 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
17846 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
17847 (aarch64_print_operand, aarch64_print_address_internal)
17848 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
17849 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
17850 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
17851 Handle polynomial GET_MODE_SIZE.
17852 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
17853 wider than SImode without modification.
17854 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
17855 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
17856 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
17857 passing and returning SVE modes.
17858 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
17859 rather than GEN_INT.
17860 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
17861 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
17862 (aarch64_allocate_and_probe_stack_space): Likewise.
17863 (aarch64_layout_frame): Cope with polynomial offsets.
17864 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
17865 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
17866 polynomial offsets.
17867 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
17868 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
17869 poly_int64 rather than a HOST_WIDE_INT.
17870 (aarch64_get_separate_components, aarch64_process_components)
17871 (aarch64_expand_prologue, aarch64_expand_epilogue)
17872 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
17873 (aarch64_anchor_offset): New function, split out from...
17874 (aarch64_legitimize_address): ...here.
17875 (aarch64_builtin_vectorization_cost): Handle polynomial
17876 TYPE_VECTOR_SUBPARTS.
17877 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
17878 GET_MODE_NUNITS.
17879 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
17880 number of elements from the PARALLEL rather than the mode.
17881 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
17882 rather than GET_MODE_BITSIZE.
17883 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
17884 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
17885 (aarch64_expand_vec_perm_const_1): Handle polynomial
17886 d->perm.length () and d->perm elements.
17887 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
17888 Apply to_constant to d->perm elements.
17889 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
17890 polynomial CONST_VECTOR_NUNITS.
17891 (aarch64_move_pointer): Take amount as a poly_int64 rather
17892 than an int.
17893 (aarch64_progress_pointer): Avoid temporary variable.
17894 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
17895 the mode attribute instead of GET_MODE.
17896
17897 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17898 Alan Hayward <alan.hayward@arm.com>
17899 David Sherwood <david.sherwood@arm.com>
17900
17901 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
17902 x exists before using it.
17903 (aarch64_add_constant_internal): Rename to...
17904 (aarch64_add_offset_1): ...this. Replace regnum with separate
17905 src and dest rtxes. Handle the case in which they're different,
17906 including when the offset is zero. Replace scratchreg with an rtx.
17907 Use 2 additions if there is no spare register into which we can
17908 move a 16-bit constant.
17909 (aarch64_add_constant): Delete.
17910 (aarch64_add_offset): Replace reg with separate src and dest
17911 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
17912 Use aarch64_add_offset_1.
17913 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
17914 an rtx rather than an int. Take the delta as a poly_int64
17915 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
17916 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
17917 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
17918 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
17919 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
17920 and aarch64_add_sp.
17921 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
17922 aarch64_add_constant.
17923
17924 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17925
17926 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
17927 Use scalar_float_mode.
17928
17929 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17930
17931 * config/aarch64/aarch64-simd.md
17932 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
17933 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
17934 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
17935 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
17936 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
17937 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
17938 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
17939 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
17940 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
17941 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
17942
17943 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17944
17945 PR target/83514
17946 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
17947 targ_options->x_arm_arch_string is non NULL.
17948
17949 2018-01-11 Tamar Christina <tamar.christina@arm.com>
17950
17951 * config/aarch64/aarch64.h
17952 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
17953
17954 2018-01-11 Sudakshina Das <sudi.das@arm.com>
17955
17956 PR target/82096
17957 * expmed.c (emit_store_flag_force): Swap if const op0
17958 and change VOIDmode to mode of op0.
17959
17960 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17961
17962 PR rtl-optimization/83761
17963 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
17964 than bytes to mode_for_size.
17965
17966 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17967
17968 PR middle-end/83189
17969 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
17970 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
17971 profile.
17972
17973 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17974
17975 PR middle-end/83575
17976 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
17977 when in layout mode.
17978 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
17979 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
17980 partition fixup.
17981
17982 2018-01-10 Michael Collison <michael.collison@arm.com>
17983
17984 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
17985 * config/aarch64/aarch64-option-extension.def: Add
17986 AARCH64_OPT_EXTENSION of 'fp16fml'.
17987 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17988 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
17989 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
17990 * config/aarch64/constraints.md (Ui7): New constraint.
17991 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
17992 (VFMLA_SEL_W): Ditto.
17993 (f16quad): Ditto.
17994 (f16mac1): Ditto.
17995 (VFMLA16_LOW): New int iterator.
17996 (VFMLA16_HIGH): Ditto.
17997 (UNSPEC_FMLAL): New unspec.
17998 (UNSPEC_FMLSL): Ditto.
17999 (UNSPEC_FMLAL2): Ditto.
18000 (UNSPEC_FMLSL2): Ditto.
18001 (f16mac): New code attribute.
18002 * config/aarch64/aarch64-simd-builtins.def
18003 (aarch64_fmlal_lowv2sf): Ditto.
18004 (aarch64_fmlsl_lowv2sf): Ditto.
18005 (aarch64_fmlalq_lowv4sf): Ditto.
18006 (aarch64_fmlslq_lowv4sf): Ditto.
18007 (aarch64_fmlal_highv2sf): Ditto.
18008 (aarch64_fmlsl_highv2sf): Ditto.
18009 (aarch64_fmlalq_highv4sf): Ditto.
18010 (aarch64_fmlslq_highv4sf): Ditto.
18011 (aarch64_fmlal_lane_lowv2sf): Ditto.
18012 (aarch64_fmlsl_lane_lowv2sf): Ditto.
18013 (aarch64_fmlal_laneq_lowv2sf): Ditto.
18014 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
18015 (aarch64_fmlalq_lane_lowv4sf): Ditto.
18016 (aarch64_fmlsl_lane_lowv4sf): Ditto.
18017 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
18018 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
18019 (aarch64_fmlal_lane_highv2sf): Ditto.
18020 (aarch64_fmlsl_lane_highv2sf): Ditto.
18021 (aarch64_fmlal_laneq_highv2sf): Ditto.
18022 (aarch64_fmlsl_laneq_highv2sf): Ditto.
18023 (aarch64_fmlalq_lane_highv4sf): Ditto.
18024 (aarch64_fmlsl_lane_highv4sf): Ditto.
18025 (aarch64_fmlalq_laneq_highv4sf): Ditto.
18026 (aarch64_fmlsl_laneq_highv4sf): Ditto.
18027 * config/aarch64/aarch64-simd.md:
18028 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
18029 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18030 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
18031 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18032 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
18033 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
18034 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
18035 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
18036 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
18037 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
18038 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
18039 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
18040 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
18041 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
18042 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
18043 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
18044 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
18045 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
18046 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
18047 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
18048 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
18049 (vfmlsl_low_u32): Ditto.
18050 (vfmlalq_low_u32): Ditto.
18051 (vfmlslq_low_u32): Ditto.
18052 (vfmlal_high_u32): Ditto.
18053 (vfmlsl_high_u32): Ditto.
18054 (vfmlalq_high_u32): Ditto.
18055 (vfmlslq_high_u32): Ditto.
18056 (vfmlal_lane_low_u32): Ditto.
18057 (vfmlsl_lane_low_u32): Ditto.
18058 (vfmlal_laneq_low_u32): Ditto.
18059 (vfmlsl_laneq_low_u32): Ditto.
18060 (vfmlalq_lane_low_u32): Ditto.
18061 (vfmlslq_lane_low_u32): Ditto.
18062 (vfmlalq_laneq_low_u32): Ditto.
18063 (vfmlslq_laneq_low_u32): Ditto.
18064 (vfmlal_lane_high_u32): Ditto.
18065 (vfmlsl_lane_high_u32): Ditto.
18066 (vfmlal_laneq_high_u32): Ditto.
18067 (vfmlsl_laneq_high_u32): Ditto.
18068 (vfmlalq_lane_high_u32): Ditto.
18069 (vfmlslq_lane_high_u32): Ditto.
18070 (vfmlalq_laneq_high_u32): Ditto.
18071 (vfmlslq_laneq_high_u32): Ditto.
18072 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
18073 (AARCH64_FL_FOR_ARCH8_4): New.
18074 (AARCH64_ISA_F16FML): New ISA flag.
18075 (TARGET_F16FML): New feature flag for fp16fml.
18076 (doc/invoke.texi): Document new fp16fml option.
18077
18078 2018-01-10 Michael Collison <michael.collison@arm.com>
18079
18080 * config/aarch64/aarch64-builtins.c:
18081 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
18082 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18083 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
18084 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
18085 (AARCH64_ISA_SHA3): New ISA flag.
18086 (TARGET_SHA3): New feature flag for sha3.
18087 * config/aarch64/iterators.md (sha512_op): New int attribute.
18088 (CRYPTO_SHA512): New int iterator.
18089 (UNSPEC_SHA512H): New unspec.
18090 (UNSPEC_SHA512H2): Ditto.
18091 (UNSPEC_SHA512SU0): Ditto.
18092 (UNSPEC_SHA512SU1): Ditto.
18093 * config/aarch64/aarch64-simd-builtins.def
18094 (aarch64_crypto_sha512hqv2di): New builtin.
18095 (aarch64_crypto_sha512h2qv2di): Ditto.
18096 (aarch64_crypto_sha512su0qv2di): Ditto.
18097 (aarch64_crypto_sha512su1qv2di): Ditto.
18098 (aarch64_eor3qv8hi): Ditto.
18099 (aarch64_rax1qv2di): Ditto.
18100 (aarch64_xarqv2di): Ditto.
18101 (aarch64_bcaxqv8hi): Ditto.
18102 * config/aarch64/aarch64-simd.md:
18103 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
18104 (aarch64_crypto_sha512su0qv2di): Ditto.
18105 (aarch64_crypto_sha512su1qv2di): Ditto.
18106 (aarch64_eor3qv8hi): Ditto.
18107 (aarch64_rax1qv2di): Ditto.
18108 (aarch64_xarqv2di): Ditto.
18109 (aarch64_bcaxqv8hi): Ditto.
18110 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
18111 (vsha512h2q_u64): Ditto.
18112 (vsha512su0q_u64): Ditto.
18113 (vsha512su1q_u64): Ditto.
18114 (veor3q_u16): Ditto.
18115 (vrax1q_u64): Ditto.
18116 (vxarq_u64): Ditto.
18117 (vbcaxq_u16): Ditto.
18118 * config/arm/types.md (crypto_sha512): New type attribute.
18119 (crypto_sha3): Ditto.
18120 (doc/invoke.texi): Document new sha3 option.
18121
18122 2018-01-10 Michael Collison <michael.collison@arm.com>
18123
18124 * config/aarch64/aarch64-builtins.c:
18125 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
18126 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18127 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
18128 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
18129 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
18130 (AARCH64_ISA_SM4): New ISA flag.
18131 (TARGET_SM4): New feature flag for sm4.
18132 * config/aarch64/aarch64-simd-builtins.def
18133 (aarch64_sm3ss1qv4si): Ditto.
18134 (aarch64_sm3tt1aq4si): Ditto.
18135 (aarch64_sm3tt1bq4si): Ditto.
18136 (aarch64_sm3tt2aq4si): Ditto.
18137 (aarch64_sm3tt2bq4si): Ditto.
18138 (aarch64_sm3partw1qv4si): Ditto.
18139 (aarch64_sm3partw2qv4si): Ditto.
18140 (aarch64_sm4eqv4si): Ditto.
18141 (aarch64_sm4ekeyqv4si): Ditto.
18142 * config/aarch64/aarch64-simd.md:
18143 (aarch64_sm3ss1qv4si): Ditto.
18144 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
18145 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
18146 (aarch64_sm4eqv4si): Ditto.
18147 (aarch64_sm4ekeyqv4si): Ditto.
18148 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
18149 (sm3part_op): Ditto.
18150 (CRYPTO_SM3TT): Ditto.
18151 (CRYPTO_SM3PART): Ditto.
18152 (UNSPEC_SM3SS1): New unspec.
18153 (UNSPEC_SM3TT1A): Ditto.
18154 (UNSPEC_SM3TT1B): Ditto.
18155 (UNSPEC_SM3TT2A): Ditto.
18156 (UNSPEC_SM3TT2B): Ditto.
18157 (UNSPEC_SM3PARTW1): Ditto.
18158 (UNSPEC_SM3PARTW2): Ditto.
18159 (UNSPEC_SM4E): Ditto.
18160 (UNSPEC_SM4EKEY): Ditto.
18161 * config/aarch64/constraints.md (Ui2): New constraint.
18162 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
18163 * config/arm/types.md (crypto_sm3): New type attribute.
18164 (crypto_sm4): Ditto.
18165 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
18166 (vsm3tt1aq_u32): Ditto.
18167 (vsm3tt1bq_u32): Ditto.
18168 (vsm3tt2aq_u32): Ditto.
18169 (vsm3tt2bq_u32): Ditto.
18170 (vsm3partw1q_u32): Ditto.
18171 (vsm3partw2q_u32): Ditto.
18172 (vsm4eq_u32): Ditto.
18173 (vsm4ekeyq_u32): Ditto.
18174 (doc/invoke.texi): Document new sm4 option.
18175
18176 2018-01-10 Michael Collison <michael.collison@arm.com>
18177
18178 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
18179 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
18180 (AARCH64_FL_FOR_ARCH8_4): New.
18181 (AARCH64_FL_V8_4): New flag.
18182 (doc/invoke.texi): Document new armv8.4-a option.
18183
18184 2018-01-10 Michael Collison <michael.collison@arm.com>
18185
18186 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18187 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
18188 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
18189 * config/aarch64/aarch64-option-extension.def: Add
18190 AARCH64_OPT_EXTENSION of 'sha2'.
18191 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
18192 (crypto): Disable sha2 and aes if crypto disabled.
18193 (crypto): Enable aes and sha2 if enabled.
18194 (simd): Disable sha2 and aes if simd disabled.
18195 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
18196 New flags.
18197 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
18198 (TARGET_SHA2): New feature flag for sha2.
18199 (TARGET_AES): New feature flag for aes.
18200 * config/aarch64/aarch64-simd.md:
18201 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
18202 conditional on TARGET_AES.
18203 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
18204 (aarch64_crypto_sha1hsi): Make pattern conditional
18205 on TARGET_SHA2.
18206 (aarch64_crypto_sha1hv4si): Ditto.
18207 (aarch64_be_crypto_sha1hv4si): Ditto.
18208 (aarch64_crypto_sha1su1v4si): Ditto.
18209 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
18210 (aarch64_crypto_sha1su0v4si): Ditto.
18211 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
18212 (aarch64_crypto_sha256su0v4si): Ditto.
18213 (aarch64_crypto_sha256su1v4si): Ditto.
18214 (doc/invoke.texi): Document new aes and sha2 options.
18215
18216 2018-01-10 Martin Sebor <msebor@redhat.com>
18217
18218 PR tree-optimization/83781
18219 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
18220 as string arrays.
18221
18222 2018-01-11 Martin Sebor <msebor@gmail.com>
18223 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18224
18225 PR tree-optimization/83501
18226 PR tree-optimization/81703
18227
18228 * tree-ssa-strlen.c (get_string_cst): Rename...
18229 (get_string_len): ...to this. Handle global constants.
18230 (handle_char_store): Adjust.
18231
18232 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
18233 Jim Wilson <jimw@sifive.com>
18234
18235 * config/riscv/riscv-protos.h (riscv_output_return): New.
18236 * config/riscv/riscv.c (struct machine_function): New naked_p field.
18237 (riscv_attribute_table, riscv_output_return),
18238 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
18239 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
18240 (riscv_compute_frame_info): Only compute frame->mask if not a naked
18241 function.
18242 (riscv_expand_prologue): Add early return for naked function.
18243 (riscv_expand_epilogue): Likewise.
18244 (riscv_function_ok_for_sibcall): Return false for naked function.
18245 (riscv_set_current_function): New.
18246 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
18247 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
18248 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
18249 * doc/extend.texi (RISC-V Function Attributes): New.
18250
18251 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
18252
18253 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
18254 check for 128-bit long double before checking TCmode.
18255 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
18256 128-bit long doubles before checking TFmode or TCmode.
18257 (FLOAT128_IBM_P): Likewise.
18258
18259 2018-01-10 Martin Sebor <msebor@redhat.com>
18260
18261 PR tree-optimization/83671
18262 * builtins.c (c_strlen): Unconditionally return zero for the empty
18263 string.
18264 Use -Warray-bounds for warnings.
18265 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
18266 for non-constant array indices with COMPONENT_REF, arrays of
18267 arrays, and pointers to arrays.
18268 (gimple_fold_builtin_strlen): Determine and set length range for
18269 non-constant character arrays.
18270
18271 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
18272
18273 PR middle-end/81897
18274 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
18275 empty blocks.
18276
18277 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
18278
18279 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
18280
18281 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18282
18283 PR target/83399
18284 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
18285 VECTOR_MEM_ALTIVEC_OR_VSX_P.
18286 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
18287 indexed_or_indirect_operand predicate.
18288 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
18289 (*vsx_le_perm_load_v8hi): Likewise.
18290 (*vsx_le_perm_load_v16qi): Likewise.
18291 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
18292 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
18293 (*vsx_le_perm_store_v8hi): Likewise.
18294 (*vsx_le_perm_store_v16qi): Likewise.
18295 (eight unnamed splitters): Likewise.
18296
18297 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18298
18299 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
18300 * config/rs6000/emmintrin.h: Likewise.
18301 * config/rs6000/mmintrin.h: Likewise.
18302 * config/rs6000/xmmintrin.h: Likewise.
18303
18304 2018-01-10 David Malcolm <dmalcolm@redhat.com>
18305
18306 PR c++/43486
18307 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
18308 "public_flag".
18309 * tree.c (tree_nop_conversion): Return true for location wrapper
18310 nodes.
18311 (maybe_wrap_with_location): New function.
18312 (selftest::check_strip_nops): New function.
18313 (selftest::test_location_wrappers): New function.
18314 (selftest::tree_c_tests): Call it.
18315 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
18316 (maybe_wrap_with_location): New decl.
18317 (EXPR_LOCATION_WRAPPER_P): New macro.
18318 (location_wrapper_p): New inline function.
18319 (tree_strip_any_location_wrapper): New inline function.
18320
18321 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
18322
18323 PR target/83735
18324 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
18325 stack_realign_offset for the largest alignment of stack slot
18326 actually used.
18327 (ix86_find_max_used_stack_alignment): New function.
18328 (ix86_finalize_stack_frame_flags): Use it. Set
18329 max_used_stack_alignment if we don't realign stack.
18330 * config/i386/i386.h (machine_function): Add
18331 max_used_stack_alignment.
18332
18333 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
18334
18335 * config/arm/arm.opt (-mbranch-cost): New option.
18336 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
18337 account.
18338
18339 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
18340
18341 PR target/83629
18342 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
18343 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
18344
18345 2018-01-10 Richard Biener <rguenther@suse.de>
18346
18347 PR debug/83765
18348 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
18349 early out so it also covers the case where we have a non-NULL
18350 origin.
18351
18352 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
18353
18354 PR tree-optimization/83753
18355 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
18356 for non-strided grouped accesses if the number of elements is 1.
18357
18358 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18359
18360 PR target/81616
18361 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
18362 * i386.h (TARGET_USE_GATHER): Define.
18363 * x86-tune.def (X86_TUNE_USE_GATHER): New.
18364
18365 2018-01-10 Martin Liska <mliska@suse.cz>
18366
18367 PR bootstrap/82831
18368 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
18369 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
18370 partitioning.
18371 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
18372 CLEANUP_NO_PARTITIONING is not set.
18373
18374 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
18375
18376 * doc/rtl.texi: Remove documentation of (const ...) wrappers
18377 for vectors, as a partial revert of r254296.
18378 * rtl.h (const_vec_p): Delete.
18379 (const_vec_duplicate_p): Don't test for vector CONSTs.
18380 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
18381 * expmed.c (make_tree): Likewise.
18382
18383 Revert:
18384 * common.md (E, F): Use CONSTANT_P instead of checking for
18385 CONST_VECTOR.
18386 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
18387 checking for CONST_VECTOR.
18388
18389 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18390
18391 PR middle-end/83575
18392 * predict.c (force_edge_cold): Handle in more sane way edges
18393 with no prediction.
18394
18395 2018-01-09 Carl Love <cel@us.ibm.com>
18396
18397 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
18398 V4SI, V4SF types.
18399 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
18400 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
18401 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
18402 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
18403 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
18404 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
18405 * config/rs6000/rs6000-protos.h: Add extern defition for
18406 rs6000_generate_float2_double_code.
18407 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
18408 function.
18409 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
18410 (float2_v2df): Add define_expand.
18411
18412 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
18413
18414 PR target/83628
18415 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
18416 op_mode in the force_to_mode call.
18417
18418 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18419
18420 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
18421 instead of checking each element individually.
18422 (aarch64_evpc_uzp): Likewise.
18423 (aarch64_evpc_zip): Likewise.
18424 (aarch64_evpc_ext): Likewise.
18425 (aarch64_evpc_rev): Likewise.
18426 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
18427 instead of checking each element individually. Return true without
18428 generating rtl if
18429 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
18430 whether all selected elements come from the same input, instead of
18431 checking each element individually. Remove calls to gen_rtx_REG,
18432 start_sequence and end_sequence and instead assert that no rtl is
18433 generated.
18434
18435 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18436
18437 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
18438 order of HIGH and CONST checks.
18439
18440 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18441
18442 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
18443 if the destination isn't an SSA_NAME.
18444
18445 2018-01-09 Richard Biener <rguenther@suse.de>
18446
18447 PR tree-optimization/83668
18448 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
18449 move prologue...
18450 (canonicalize_loop_form): ... here, renamed from ...
18451 (canonicalize_loop_closed_ssa_form): ... this and amended to
18452 swap successor edges for loop exit blocks to make us use
18453 the RPO order we need for initial schedule generation.
18454
18455 2018-01-09 Joseph Myers <joseph@codesourcery.com>
18456
18457 PR tree-optimization/64811
18458 * match.pd: When optimizing comparisons with Inf, avoid
18459 introducing or losing exceptions from comparisons with NaN.
18460
18461 2018-01-09 Martin Liska <mliska@suse.cz>
18462
18463 PR sanitizer/82517
18464 * asan.c (shadow_mem_size): Add gcc_assert.
18465
18466 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
18467
18468 Don't save registers in main().
18469
18470 PR target/83738
18471 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
18472 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
18473 * config/avr/avr.c (avr_set_current_function): Don't error if
18474 naked, OS_task or OS_main are specified at the same time.
18475 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
18476 OS_main.
18477 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
18478 attribute.
18479 * common/config/avr/avr-common.c (avr_option_optimization_table):
18480 Switch on -mmain-is-OS_task for optimizing compilations.
18481
18482 2018-01-09 Richard Biener <rguenther@suse.de>
18483
18484 PR tree-optimization/83572
18485 * graphite.c: Include cfganal.h.
18486 (graphite_transform_loops): Connect infinite loops to exit
18487 and remove fake edges at the end.
18488
18489 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18490
18491 * ipa-inline.c (edge_badness): Revert accidental checkin.
18492
18493 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18494
18495 PR ipa/80763
18496 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
18497 symbols; not inline clones.
18498
18499 2018-01-09 Jakub Jelinek <jakub@redhat.com>
18500
18501 PR target/83507
18502 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
18503 hard registers. Formatting fixes.
18504
18505 PR preprocessor/83722
18506 * gcc.c (try_generate_repro): Pass
18507 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
18508 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
18509 do_report_bug.
18510
18511 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
18512 Kito Cheng <kito.cheng@gmail.com>
18513
18514 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
18515 (riscv_leaf_function_p): Delete.
18516 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
18517
18518 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18519
18520 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
18521 function.
18522 (do_ifelse): New function.
18523 (do_isel): New function.
18524 (do_sub3): New function.
18525 (do_add3): New function.
18526 (do_load_mask_compare): New function.
18527 (do_overlap_load_compare): New function.
18528 (expand_compare_loop): New function.
18529 (expand_block_compare): Call expand_compare_loop() when appropriate.
18530 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
18531 option description.
18532 (-mblock-compare-inline-loop-limit): New option.
18533
18534 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18535
18536 PR target/83677
18537 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
18538 Reverse order of second and third operands in first alternative.
18539 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
18540 of first and second elements in UNSPEC_VPERMR vector.
18541 (altivec_expand_vec_perm_le): Likewise.
18542
18543 2018-01-08 Jeff Law <law@redhat.com>
18544
18545 PR rtl-optimizatin/81308
18546 * tree-switch-conversion.c (cfg_altered): New file scoped static.
18547 (process_switch): If group_case_labels makes a change, then set
18548 cfg_altered.
18549 (pass_convert_switch::execute): If a switch is converted, then
18550 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
18551
18552 PR rtl-optimization/81308
18553 * recog.c (split_all_insns): Conditionally cleanup the CFG after
18554 splitting insns.
18555
18556 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
18557
18558 PR target/83663 - Revert r255946
18559 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
18560 generation for cases where splatting a value is not useful.
18561 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
18562 across a vec_duplicate and a paradoxical subreg forming a vector
18563 mode to a vec_concat.
18564
18565 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18566
18567 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
18568 -march=armv8.3-a variants.
18569 * config/arm/t-multilib: Likewise.
18570 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
18571
18572 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18573
18574 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
18575 to generate rtl.
18576 (cceq_ior_compare_complement): Give it a name so I can use it, and
18577 change boolean_or_operator predicate to boolean_operator so it can
18578 be used to generate a crand.
18579 (eqne): New code iterator.
18580 (bd/bd_neg): New code_attrs.
18581 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
18582 a single define_insn.
18583 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
18584 decrement (bdnzt/bdnzf/bdzt/bdzf).
18585 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
18586 with the new names of the branch decrement patterns, and added the
18587 names of the branch decrement conditional patterns.
18588
18589 2018-01-08 Richard Biener <rguenther@suse.de>
18590
18591 PR tree-optimization/83563
18592 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
18593 cache.
18594
18595 2018-01-08 Richard Biener <rguenther@suse.de>
18596
18597 PR middle-end/83713
18598 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
18599
18600 2018-01-08 Richard Biener <rguenther@suse.de>
18601
18602 PR tree-optimization/83685
18603 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
18604 references to abnormals.
18605
18606 2018-01-08 Richard Biener <rguenther@suse.de>
18607
18608 PR lto/83719
18609 * dwarf2out.c (output_indirect_strings): Handle empty
18610 skeleton_debug_str_hash.
18611 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
18612
18613 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
18614
18615 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
18616 (emit_store_direct): Likewise.
18617 (arc_trampoline_adjust_address): Likewise.
18618 (arc_asm_trampoline_template): New function.
18619 (arc_initialize_trampoline): Use asm_trampoline_template.
18620 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
18621 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
18622 * config/arc/arc.md (flush_icache): Delete pattern.
18623
18624 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
18625
18626 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
18627 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
18628 munaligned-access.
18629
18630 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
18631
18632 PR target/83681
18633 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
18634 by not USED_FOR_TARGET.
18635 (make_pass_resolve_sw_modes): Likewise.
18636
18637 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
18638
18639 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
18640 USED_FOR_TARGET.
18641
18642 2018-01-08 Richard Biener <rguenther@suse.de>
18643
18644 PR middle-end/83580
18645 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
18646
18647 2018-01-08 Richard Biener <rguenther@suse.de>
18648
18649 PR middle-end/83517
18650 * match.pd ((t * 2) / 2) -> t): Add missing :c.
18651
18652 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
18653
18654 PR middle-end/81897
18655 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
18656 basic blocks with a small number of successors.
18657 (convert_control_dep_chain_into_preds): Improve handling of
18658 forwarder blocks.
18659 (dump_predicates): Split apart into...
18660 (dump_pred_chain): ...here...
18661 (dump_pred_info): ...and here.
18662 (can_one_predicate_be_invalidated_p): Add debugging printfs.
18663 (can_chain_union_be_invalidated_p): Improve check for invalidation
18664 of paths.
18665 (uninit_uses_cannot_happen): Avoid unnecessary if
18666 convert_control_dep_chain_into_preds yielded nothing.
18667
18668 2018-01-06 Martin Sebor <msebor@redhat.com>
18669
18670 PR tree-optimization/83640
18671 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
18672 subtracting negative offset from size.
18673 (builtin_access::overlap): Adjust offset bounds of the access to fall
18674 within the size of the object if possible.
18675
18676 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
18677
18678 PR rtl-optimization/83699
18679 * expmed.c (extract_bit_field_1): Restrict the vector usage of
18680 extract_bit_field_as_subreg to cases in which the extracted
18681 value is also a vector.
18682
18683 * lra-constraints.c (process_alt_operands): Test for the equivalence
18684 substitutions when detecting a possible reload cycle.
18685
18686 2018-01-06 Jakub Jelinek <jakub@redhat.com>
18687
18688 PR debug/83480
18689 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
18690 by default if flag_selective_schedling{,2}. Formatting fixes.
18691
18692 PR rtl-optimization/83682
18693 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
18694 if it has non-VECTOR_MODE element mode.
18695 (vec_duplicate_p): Likewise.
18696
18697 PR middle-end/83694
18698 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
18699 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
18700
18701 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18702
18703 PR target/83604
18704 * config/i386/i386-builtin.def
18705 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
18706 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
18707 Require also OPTION_MASK_ISA_AVX512F in addition to
18708 OPTION_MASK_ISA_GFNI.
18709 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
18710 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
18711 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
18712 to OPTION_MASK_ISA_GFNI.
18713 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
18714 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
18715 OPTION_MASK_ISA_AVX512BW.
18716 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
18717 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
18718 addition to OPTION_MASK_ISA_GFNI.
18719 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
18720 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
18721 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
18722 to OPTION_MASK_ISA_GFNI.
18723 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
18724 a requirement for all ISAs rather than any of them with a few
18725 exceptions.
18726 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
18727 processing.
18728 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
18729 bitmasks to be enabled with 3 exceptions, instead of requiring any
18730 enabled ISA with lots of exceptions.
18731 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
18732 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
18733 Change avx512bw in isa attribute to avx512f.
18734 * config/i386/sgxintrin.h: Add license boilerplate.
18735 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
18736 to __AVX512F__ and __AVX512VL to __AVX512VL__.
18737 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
18738 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
18739 defined.
18740 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
18741 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
18742 temporarily sse2 rather than sse if not enabled already.
18743
18744 PR target/83604
18745 * config/i386/sse.md (VI248_VLBW): Rename to ...
18746 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
18747 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
18748 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
18749 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
18750 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
18751 mode iterator instead of VI248_VLBW.
18752
18753 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
18754
18755 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
18756 (record_modified): Skip clobbers; add debug output.
18757 (param_change_prob): Use sreal frequencies.
18758
18759 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18760
18761 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
18762 punt for user-aligned variables.
18763
18764 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18765
18766 * tree-chrec.c (chrec_contains_symbols): Return true for
18767 POLY_INT_CST.
18768
18769 2018-01-05 Sudakshina Das <sudi.das@arm.com>
18770
18771 PR target/82439
18772 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
18773 of (x|y) == x for BICS pattern.
18774
18775 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18776
18777 PR tree-optimization/83605
18778 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
18779 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
18780 can throw.
18781
18782 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
18783
18784 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
18785 * config/epiphany/rtems.h: New file.
18786
18787 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18788 Uros Bizjak <ubizjak@gmail.com>
18789
18790 PR target/83554
18791 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
18792 QIreg_operand instead of register_operand predicate.
18793 * config/i386/i386.c (ix86_rop_should_change_byte_p,
18794 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
18795 comments instead of -fmitigate[-_]rop.
18796
18797 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18798
18799 PR bootstrap/81926
18800 * cgraphunit.c (symbol_table::compile): Switch to text_section
18801 before calling assembly_start debug hook.
18802 * run-rtl-passes.c (run_rtl_passes): Likewise.
18803 Include output.h.
18804
18805 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18806
18807 * tree-vrp.c (extract_range_from_binary_expr_1): Check
18808 range_int_cst_p rather than !symbolic_range_p before calling
18809 extract_range_from_multiplicative_op_1.
18810
18811 2018-01-04 Jeff Law <law@redhat.com>
18812
18813 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
18814 redundant test in assertion.
18815
18816 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18817
18818 * doc/rtl.texi: Document machine_mode wrapper classes.
18819
18820 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18821
18822 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
18823 using tree_to_uhwi.
18824
18825 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18826
18827 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
18828 the VEC_PERM_EXPR fold to fail.
18829
18830 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18831
18832 PR debug/83585
18833 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
18834 to switched_sections.
18835
18836 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18837
18838 PR target/83680
18839 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
18840 test for d.testing.
18841
18842 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
18843
18844 PR target/83387
18845 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
18846 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
18847
18848 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18849
18850 PR debug/83666
18851 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
18852 is BLKmode and bitpos not zero or mode change is needed.
18853
18854 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18855
18856 PR target/83675
18857 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
18858 TARGET_VIS2.
18859
18860 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
18861
18862 PR target/83628
18863 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
18864 instead of MULT rtx. Update all corresponding splitters.
18865 (*saddl_se): Ditto.
18866 (*ssub<modesuffix>): Ditto.
18867 (*ssubl_se): Ditto.
18868 (*cmp_sadd_di): Update split patterns.
18869 (*cmp_sadd_si): Ditto.
18870 (*cmp_sadd_sidi): Ditto.
18871 (*cmp_ssub_di): Ditto.
18872 (*cmp_ssub_si): Ditto.
18873 (*cmp_ssub_sidi): Ditto.
18874 * config/alpha/predicates.md (const23_operand): New predicate.
18875 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
18876 Look for ASHIFT, not MULT inner operand.
18877 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
18878
18879 2018-01-04 Martin Liska <mliska@suse.cz>
18880
18881 PR gcov-profile/83669
18882 * gcov.c (output_intermediate_file): Add version to intermediate
18883 gcov file.
18884 * doc/gcov.texi: Document new field 'version' in intermediate
18885 file format. Fix location of '-k' option of gcov command.
18886
18887 2018-01-04 Martin Liska <mliska@suse.cz>
18888
18889 PR ipa/82352
18890 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
18891
18892 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18893
18894 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
18895
18896 2018-01-03 Martin Sebor <msebor@redhat.com>
18897
18898 PR tree-optimization/83655
18899 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
18900 checking calls with invalid arguments.
18901
18902 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18903
18904 * tree-vect-stmts.c (vect_get_store_rhs): New function.
18905 (vectorizable_mask_load_store): Delete.
18906 (vectorizable_call): Return false for masked loads and stores.
18907 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
18908 instead of gimple_assign_rhs1.
18909 (vectorizable_load): Handle IFN_MASK_LOAD.
18910 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
18911
18912 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18913
18914 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
18915 split out from..,
18916 (vectorizable_mask_load_store): ...here.
18917 (vectorizable_load): ...and here.
18918
18919 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18920
18921 * tree-vect-stmts.c (vect_build_all_ones_mask)
18922 (vect_build_zero_merge_argument): New functions, split out from...
18923 (vectorizable_load): ...here.
18924
18925 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18926
18927 * tree-vect-stmts.c (vect_check_store_rhs): New function,
18928 split out from...
18929 (vectorizable_mask_load_store): ...here.
18930 (vectorizable_store): ...and here.
18931
18932 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18933
18934 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
18935 split out from...
18936 (vectorizable_mask_load_store): ...here.
18937
18938 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18939
18940 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
18941 (vect_model_store_cost): Take a vec_load_store_type instead of a
18942 vect_def_type.
18943 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
18944 (vect_model_store_cost): Take a vec_load_store_type instead of a
18945 vect_def_type.
18946 (vectorizable_mask_load_store): Update accordingly.
18947 (vectorizable_store): Likewise.
18948 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
18949
18950 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18951
18952 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
18953 IFN_MASK_LOAD calls here rather than...
18954 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
18955
18956 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18957 Alan Hayward <alan.hayward@arm.com>
18958 David Sherwood <david.sherwood@arm.com>
18959
18960 * expmed.c (extract_bit_field_1): For vector extracts,
18961 fall back to extract_bit_field_as_subreg if vec_extract
18962 isn't available.
18963
18964 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18965 Alan Hayward <alan.hayward@arm.com>
18966 David Sherwood <david.sherwood@arm.com>
18967
18968 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
18969 they are variable or constant sized.
18970 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
18971 slots for constant-sized data.
18972
18973 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18974 Alan Hayward <alan.hayward@arm.com>
18975 David Sherwood <david.sherwood@arm.com>
18976
18977 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
18978 handling COND_EXPRs with boolean comparisons, try to find a better
18979 basis for the mask type than the boolean itself.
18980
18981 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18982
18983 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
18984 is calculated and how it can be overridden.
18985 * genmodes.c (max_bitsize_mode_any_mode): New variable.
18986 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
18987 if defined.
18988 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
18989 if nonzero.
18990
18991 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18992 Alan Hayward <alan.hayward@arm.com>
18993 David Sherwood <david.sherwood@arm.com>
18994
18995 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
18996 Remove the mode argument.
18997 (aarch64_simd_valid_immediate): Remove the mode and inverse
18998 arguments.
18999 * config/aarch64/iterators.md (bitsize): New iterator.
19000 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
19001 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
19002 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
19003 aarch64_simd_valid_immediate.
19004 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
19005 (aarch64_reg_or_bic_imm): Likewise.
19006 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
19007 with an insn_type enum and msl with a modifier_type enum.
19008 Replace element_width with a scalar_mode. Change the shift
19009 to unsigned int. Add constructors for scalar_float_mode and
19010 scalar_int_mode elements.
19011 (aarch64_vect_float_const_representable_p): Delete.
19012 (aarch64_can_const_movi_rtx_p)
19013 (aarch64_simd_scalar_immediate_valid_for_move)
19014 (aarch64_simd_make_constant): Update call to
19015 aarch64_simd_valid_immediate.
19016 (aarch64_advsimd_valid_immediate_hs): New function.
19017 (aarch64_advsimd_valid_immediate): Likewise.
19018 (aarch64_simd_valid_immediate): Remove mode and inverse
19019 arguments. Rewrite to use the above. Use const_vec_duplicate_p
19020 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
19021 and aarch64_float_const_representable_p on the result.
19022 (aarch64_output_simd_mov_immediate): Remove mode argument.
19023 Update call to aarch64_simd_valid_immediate and use of
19024 simd_immediate_info.
19025 (aarch64_output_scalar_simd_mov_immediate): Update call
19026 accordingly.
19027
19028 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19029 Alan Hayward <alan.hayward@arm.com>
19030 David Sherwood <david.sherwood@arm.com>
19031
19032 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
19033 (mode_nunits): Likewise CONST_MODE_NUNITS.
19034 * machmode.def (ADJUST_NUNITS): Document.
19035 * genmodes.c (mode_data::need_nunits_adj): New field.
19036 (blank_mode): Update accordingly.
19037 (adj_nunits): New variable.
19038 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
19039 parameter.
19040 (emit_mode_size_inline): Set need_bytesize_adj for all modes
19041 listed in adj_nunits.
19042 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
19043 listed in adj_nunits. Don't emit case statements for such modes.
19044 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
19045 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
19046 nothing if adj_nunits is nonnull.
19047 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
19048 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
19049 (emit_mode_fbit): Update use of print_maybe_const_decl.
19050 (emit_move_size): Likewise. Treat the array as non-const
19051 if adj_nunits.
19052 (emit_mode_adjustments): Handle adj_nunits.
19053
19054 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19055
19056 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
19057 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
19058 (VECTOR_MODES): Use it.
19059 (make_vector_modes): Take the prefix as an argument.
19060
19061 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19062 Alan Hayward <alan.hayward@arm.com>
19063 David Sherwood <david.sherwood@arm.com>
19064
19065 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
19066 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
19067 for MODE_VECTOR_BOOL.
19068 * machmode.def (VECTOR_BOOL_MODE): Document.
19069 * genmodes.c (VECTOR_BOOL_MODE): New macro.
19070 (make_vector_bool_mode): New function.
19071 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
19072 MODE_VECTOR_BOOL.
19073 * lto-streamer-in.c (lto_input_mode_table): Likewise.
19074 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
19075 Likewise.
19076 * stor-layout.c (int_mode_for_mode): Likewise.
19077 * tree.c (build_vector_type_for_mode): Likewise.
19078 * varasm.c (output_constant_pool_2): Likewise.
19079 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
19080 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
19081 for MODE_VECTOR_BOOL.
19082 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
19083 of mode class checks.
19084 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
19085 instead of a list of mode class checks.
19086 (expand_vector_scalar_condition): Likewise.
19087 (type_for_widest_vector_mode): Handle BImode as an inner mode.
19088
19089 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19090 Alan Hayward <alan.hayward@arm.com>
19091 David Sherwood <david.sherwood@arm.com>
19092
19093 * machmode.h (mode_size): Change from unsigned short to
19094 poly_uint16_pod.
19095 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
19096 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19097 or if measurement_type is not polynomial.
19098 (fixed_size_mode::includes_p): Check for constant-sized modes.
19099 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
19100 return a poly_uint16 rather than an unsigned short.
19101 (emit_mode_size): Change the type of mode_size from unsigned short
19102 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
19103 (emit_mode_adjustments): Cope with polynomial vector sizes.
19104 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19105 for GET_MODE_SIZE.
19106 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19107 for GET_MODE_SIZE.
19108 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
19109 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
19110 * caller-save.c (setup_save_areas): Likewise.
19111 (replace_reg_with_saved_mem): Likewise.
19112 * calls.c (emit_library_call_value_1): Likewise.
19113 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
19114 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
19115 (gen_lowpart_for_combine): Likewise.
19116 * convert.c (convert_to_integer_1): Likewise.
19117 * cse.c (equiv_constant, cse_insn): Likewise.
19118 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
19119 (cselib_subst_to_values): Likewise.
19120 * dce.c (word_dce_process_block): Likewise.
19121 * df-problems.c (df_word_lr_mark_ref): Likewise.
19122 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
19123 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
19124 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
19125 (rtl_for_decl_location): Likewise.
19126 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
19127 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
19128 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
19129 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
19130 (expand_expr_real_1): Likewise.
19131 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
19132 (pad_below): Likewise.
19133 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19134 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
19135 * ira.c (get_subreg_tracking_sizes): Likewise.
19136 * ira-build.c (ira_create_allocno_objects): Likewise.
19137 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
19138 (ira_sort_regnos_for_alter_reg): Likewise.
19139 * ira-costs.c (record_operand_costs): Likewise.
19140 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
19141 (resolve_simple_move): Likewise.
19142 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
19143 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
19144 (lra_constraints): Likewise.
19145 (CONST_POOL_OK_P): Reject variable-sized modes.
19146 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
19147 (add_pseudo_to_slot, lra_spill): Likewise.
19148 * omp-low.c (omp_clause_aligned_alignment): Likewise.
19149 * optabs-query.c (get_best_extraction_insn): Likewise.
19150 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19151 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
19152 (expand_mult_highpart, valid_multiword_target_p): Likewise.
19153 * recog.c (offsettable_address_addr_space_p): Likewise.
19154 * regcprop.c (maybe_mode_change): Likewise.
19155 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
19156 * regrename.c (build_def_use): Likewise.
19157 * regstat.c (dump_reg_info): Likewise.
19158 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
19159 (find_reloads, find_reloads_subreg_address): Likewise.
19160 * reload1.c (eliminate_regs_1): Likewise.
19161 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
19162 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
19163 (simplify_binary_operation_1, simplify_subreg): Likewise.
19164 * targhooks.c (default_function_arg_padding): Likewise.
19165 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
19166 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
19167 (verify_gimple_assign_ternary): Likewise.
19168 * tree-inline.c (estimate_move_cost): Likewise.
19169 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19170 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
19171 (get_address_cost_ainc): Likewise.
19172 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
19173 (vect_supportable_dr_alignment): Likewise.
19174 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19175 (vectorizable_reduction): Likewise.
19176 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
19177 (vectorizable_operation, vectorizable_load): Likewise.
19178 * tree.c (build_same_sized_truth_vector_type): Likewise.
19179 * valtrack.c (cleanup_auto_inc_dec): Likewise.
19180 * var-tracking.c (emit_note_insn_var_location): Likewise.
19181 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
19182 (ADDR_VEC_ALIGN): Likewise.
19183
19184 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19185 Alan Hayward <alan.hayward@arm.com>
19186 David Sherwood <david.sherwood@arm.com>
19187
19188 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
19189 unsigned short.
19190 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19191 or if measurement_type is polynomial.
19192 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
19193 * combine.c (make_extraction): Likewise.
19194 * dse.c (find_shift_sequence): Likewise.
19195 * dwarf2out.c (mem_loc_descriptor): Likewise.
19196 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
19197 (extract_bit_field, extract_low_bits): Likewise.
19198 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
19199 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
19200 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
19201 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
19202 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19203 * reload.c (find_reloads): Likewise.
19204 * reload1.c (alter_reg): Likewise.
19205 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
19206 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
19207 * tree-if-conv.c (predicate_mem_writes): Likewise.
19208 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
19209 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
19210 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
19211 * valtrack.c (dead_debug_insert_temp): Likewise.
19212 * varasm.c (mergeable_constant_section): Likewise.
19213 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
19214
19215 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19216 Alan Hayward <alan.hayward@arm.com>
19217 David Sherwood <david.sherwood@arm.com>
19218
19219 * expr.c (expand_assignment): Cope with polynomial mode sizes
19220 when assigning to a CONCAT.
19221
19222 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19223 Alan Hayward <alan.hayward@arm.com>
19224 David Sherwood <david.sherwood@arm.com>
19225
19226 * machmode.h (mode_precision): Change from unsigned short to
19227 poly_uint16_pod.
19228 (mode_to_precision): Return a poly_uint16 rather than an unsigned
19229 short.
19230 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
19231 or if measurement_type is not polynomial.
19232 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
19233 in which the mode is already known to be a scalar_int_mode.
19234 * genmodes.c (emit_mode_precision): Change the type of mode_precision
19235 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
19236 initializer.
19237 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19238 for GET_MODE_PRECISION.
19239 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19240 for GET_MODE_PRECISION.
19241 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
19242 as polynomial.
19243 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
19244 (expand_field_assignment, make_extraction): Likewise.
19245 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
19246 (get_last_value): Likewise.
19247 * convert.c (convert_to_integer_1): Likewise.
19248 * cse.c (cse_insn): Likewise.
19249 * expr.c (expand_expr_real_1): Likewise.
19250 * lra-constraints.c (simplify_operand_subreg): Likewise.
19251 * optabs-query.c (can_atomic_load_p): Likewise.
19252 * optabs.c (expand_atomic_load): Likewise.
19253 (expand_atomic_store): Likewise.
19254 * ree.c (combine_reaching_defs): Likewise.
19255 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
19256 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
19257 * tree.h (type_has_mode_precision_p): Likewise.
19258 * ubsan.c (instrument_si_overflow): Likewise.
19259
19260 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19261 Alan Hayward <alan.hayward@arm.com>
19262 David Sherwood <david.sherwood@arm.com>
19263
19264 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
19265 polynomial numbers of units.
19266 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
19267 (valid_vector_subparts_p): New function.
19268 (build_vector_type): Remove temporary shim and take the number
19269 of units as a poly_uint64 rather than an int.
19270 (build_opaque_vector_type): Take the number of units as a
19271 poly_uint64 rather than an int.
19272 * tree.c (build_vector_from_ctor): Handle polynomial
19273 TYPE_VECTOR_SUBPARTS.
19274 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
19275 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
19276 (build_vector_from_val): If the number of units is variable,
19277 use build_vec_duplicate_cst for constant operands and
19278 VEC_DUPLICATE_EXPR otherwise.
19279 (make_vector_type): Remove temporary is_constant ().
19280 (build_vector_type, build_opaque_vector_type): Take the number of
19281 units as a poly_uint64 rather than an int.
19282 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
19283 VECTOR_CST_NELTS.
19284 * cfgexpand.c (expand_debug_expr): Likewise.
19285 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
19286 (store_constructor, expand_expr_real_1): Likewise.
19287 (const_scalar_mask_from_tree): Likewise.
19288 * fold-const-call.c (fold_const_reduction): Likewise.
19289 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
19290 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
19291 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
19292 (fold_relational_const): Likewise.
19293 (native_interpret_vector): Likewise. Change the size from an
19294 int to an unsigned int.
19295 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
19296 TYPE_VECTOR_SUBPARTS.
19297 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
19298 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
19299 duplicating a non-constant operand into a variable-length vector.
19300 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
19301 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
19302 * ipa-icf.c (sem_variable::equals): Likewise.
19303 * match.pd: Likewise.
19304 * omp-simd-clone.c (simd_clone_subparts): Likewise.
19305 * print-tree.c (print_node): Likewise.
19306 * stor-layout.c (layout_type): Likewise.
19307 * targhooks.c (default_builtin_vectorization_cost): Likewise.
19308 * tree-cfg.c (verify_gimple_comparison): Likewise.
19309 (verify_gimple_assign_binary): Likewise.
19310 (verify_gimple_assign_ternary): Likewise.
19311 (verify_gimple_assign_single): Likewise.
19312 * tree-pretty-print.c (dump_generic_node): Likewise.
19313 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19314 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
19315 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
19316 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
19317 (vect_shift_permute_load_chain): Likewise.
19318 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
19319 (expand_vector_condition, optimize_vector_constructor): Likewise.
19320 (lower_vec_perm, get_compute_type): Likewise.
19321 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19322 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
19323 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
19324 (vect_recog_mask_conversion_pattern): Likewise.
19325 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
19326 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
19327 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19328 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
19329 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
19330 (vectorizable_shift, vectorizable_operation, vectorizable_store)
19331 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
19332 (supportable_widening_operation): Likewise.
19333 (supportable_narrowing_operation): Likewise.
19334 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
19335 Likewise.
19336 * varasm.c (output_constant): Likewise.
19337
19338 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19339 Alan Hayward <alan.hayward@arm.com>
19340 David Sherwood <david.sherwood@arm.com>
19341
19342 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
19343 so that both the length == 3 and length != 3 cases set up their
19344 own permute vectors. Add comments explaining why we know the
19345 number of elements is constant.
19346 (vect_permute_load_chain): Likewise.
19347
19348 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19349 Alan Hayward <alan.hayward@arm.com>
19350 David Sherwood <david.sherwood@arm.com>
19351
19352 * machmode.h (mode_nunits): Change from unsigned char to
19353 poly_uint16_pod.
19354 (ONLY_FIXED_SIZE_MODES): New macro.
19355 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
19356 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
19357 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
19358 New typedefs.
19359 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
19360 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
19361 or if measurement_type is not polynomial.
19362 * genmodes.c (ZERO_COEFFS): New macro.
19363 (emit_mode_nunits_inline): Make mode_nunits_inline return a
19364 poly_uint16.
19365 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
19366 Use ZERO_COEFFS when emitting initializers.
19367 * data-streamer.h (bp_pack_poly_value): New function.
19368 (bp_unpack_poly_value): Likewise.
19369 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19370 for GET_MODE_NUNITS.
19371 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19372 for GET_MODE_NUNITS.
19373 * tree.c (make_vector_type): Remove temporary shim and make
19374 the real function take the number of units as a poly_uint64
19375 rather than an int.
19376 (build_vector_type_for_mode): Handle polynomial nunits.
19377 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
19378 * emit-rtl.c (const_vec_series_p_1): Likewise.
19379 (gen_rtx_CONST_VECTOR): Likewise.
19380 * fold-const.c (test_vec_duplicate_folding): Likewise.
19381 * genrecog.c (validate_pattern): Likewise.
19382 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
19383 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19384 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
19385 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
19386 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
19387 * rtlanal.c (subreg_get_info): Likewise.
19388 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19389 (vect_grouped_load_supported): Likewise.
19390 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
19391 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
19392 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
19393 (simplify_const_unary_operation, simplify_binary_operation_1)
19394 (simplify_const_binary_operation, simplify_ternary_operation)
19395 (test_vector_ops_duplicate, test_vector_ops): Likewise.
19396 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
19397 instead of CONST_VECTOR_NUNITS.
19398 * varasm.c (output_constant_pool_2): Likewise.
19399 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
19400 explicit-encoded elements in the XVEC for variable-length vectors.
19401
19402 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19403
19404 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
19405
19406 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19407 Alan Hayward <alan.hayward@arm.com>
19408 David Sherwood <david.sherwood@arm.com>
19409
19410 * coretypes.h (fixed_size_mode): Declare.
19411 (fixed_size_mode_pod): New typedef.
19412 * builtins.h (target_builtins::x_apply_args_mode)
19413 (target_builtins::x_apply_result_mode): Change type to
19414 fixed_size_mode_pod.
19415 * builtins.c (apply_args_size, apply_result_size, result_vector)
19416 (expand_builtin_apply_args_1, expand_builtin_apply)
19417 (expand_builtin_return): Update accordingly.
19418
19419 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19420
19421 * cse.c (hash_rtx_cb): Hash only the encoded elements.
19422 * cselib.c (cselib_hash_rtx): Likewise.
19423 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
19424 CONST_VECTOR encoding.
19425
19426 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19427 Jeff Law <law@redhat.com>
19428
19429 PR target/83641
19430 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
19431 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
19432 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
19433 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
19434
19435 PR target/83641
19436 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
19437 explicitly probe *sp in a noreturn function if there were any callee
19438 register saves or frame pointer is needed.
19439
19440 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19441
19442 PR debug/83621
19443 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
19444 BLKmode for ternary, binary or unary expressions.
19445
19446 PR debug/83645
19447 * var-tracking.c (delete_vta_debug_insn): New inline function.
19448 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
19449 insns from get_insns () to NULL instead of each bb separately.
19450 Use delete_vta_debug_insn. No longer static.
19451 (vt_debug_insns_local, variable_tracking_main_1): Adjust
19452 delete_vta_debug_insns callers.
19453 * rtl.h (delete_vta_debug_insns): Declare.
19454 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
19455 instead of variable_tracking_main.
19456
19457 2018-01-03 Martin Sebor <msebor@redhat.com>
19458
19459 PR tree-optimization/83603
19460 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
19461 arguments past the endof the argument list in functions declared
19462 without a prototype.
19463 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
19464 Avoid checking when arguments are null.
19465
19466 2018-01-03 Martin Sebor <msebor@redhat.com>
19467
19468 PR c/83559
19469 * doc/extend.texi (attribute const): Fix a typo.
19470 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
19471 issuing -Wsuggest-attribute for void functions.
19472
19473 2018-01-03 Martin Sebor <msebor@redhat.com>
19474
19475 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
19476 offset_int::from instead of wide_int::to_shwi.
19477 (maybe_diag_overlap): Remove assertion.
19478 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
19479 * gimple-ssa-sprintf.c (format_directive): Same.
19480 (parse_directive): Same.
19481 (sprintf_dom_walker::compute_format_length): Same.
19482 (try_substitute_return_value): Same.
19483
19484 2018-01-03 Jeff Law <law@redhat.com>
19485
19486 PR middle-end/83654
19487 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
19488 non-constant residual for zero at runtime and avoid probing in
19489 that case. Reorganize code for trailing problem to mirror handling
19490 of the residual.
19491
19492 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19493
19494 PR tree-optimization/83501
19495 * tree-ssa-strlen.c (get_string_cst): New.
19496 (handle_char_store): Call get_string_cst.
19497
19498 2018-01-03 Martin Liska <mliska@suse.cz>
19499
19500 PR tree-optimization/83593
19501 * tree-ssa-strlen.c: Include tree-cfg.h.
19502 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
19503 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
19504 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
19505 to false.
19506 (strlen_dom_walker::before_dom_children): Call
19507 gimple_purge_dead_eh_edges. Dump tranformation with details
19508 dump flags.
19509 (strlen_dom_walker::before_dom_children): Update call by adding
19510 new argument cleanup_eh.
19511 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
19512
19513 2018-01-03 Martin Liska <mliska@suse.cz>
19514
19515 PR ipa/83549
19516 * cif-code.def (VARIADIC_THUNK): New enum value.
19517 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
19518 thunks.
19519
19520 2018-01-03 Jan Beulich <jbeulich@suse.com>
19521
19522 * sse.md (mov<mode>_internal): Tighten condition for when to use
19523 vmovdqu<ssescalarsize> for TI and OI modes.
19524
19525 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19526
19527 Update copyright years.
19528
19529 2018-01-03 Martin Liska <mliska@suse.cz>
19530
19531 PR ipa/83594
19532 * ipa-visibility.c (function_and_variable_visibility): Skip
19533 functions with noipa attribure.
19534
19535 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19536
19537 * gcc.c (process_command): Update copyright notice dates.
19538 * gcov-dump.c (print_version): Ditto.
19539 * gcov.c (print_version): Ditto.
19540 * gcov-tool.c (print_version): Ditto.
19541 * gengtype.c (create_file): Ditto.
19542 * doc/cpp.texi: Bump @copying's copyright year.
19543 * doc/cppinternals.texi: Ditto.
19544 * doc/gcc.texi: Ditto.
19545 * doc/gccint.texi: Ditto.
19546 * doc/gcov.texi: Ditto.
19547 * doc/install.texi: Ditto.
19548 * doc/invoke.texi: Ditto.
19549
19550 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19551
19552 * vector-builder.h (vector_builder::m_full_nelts): Change from
19553 unsigned int to poly_uint64.
19554 (vector_builder::full_nelts): Update prototype accordingly.
19555 (vector_builder::new_vector): Likewise.
19556 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
19557 (vector_builder::operator ==): Likewise.
19558 (vector_builder::finalize): Likewise.
19559 * int-vector-builder.h (int_vector_builder::int_vector_builder):
19560 Take the number of elements as a poly_uint64 rather than an
19561 unsigned int.
19562 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
19563 from unsigned int to poly_uint64.
19564 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
19565 (vec_perm_indices::new_vector): Likewise.
19566 (vec_perm_indices::length): Likewise.
19567 (vec_perm_indices::nelts_per_input): Likewise.
19568 (vec_perm_indices::input_nelts): Likewise.
19569 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
19570 number of elements per input as a poly_uint64 rather than an
19571 unsigned int. Use the original encoding for variable-length
19572 vectors, rather than clamping each individual element.
19573 For the second and subsequent elements in each pattern,
19574 clamp the step and base before clamping their sum.
19575 (vec_perm_indices::series_p): Handle polynomial element counts.
19576 (vec_perm_indices::all_in_range_p): Likewise.
19577 (vec_perm_indices_to_tree): Likewise.
19578 (vec_perm_indices_to_rtx): Likewise.
19579 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
19580 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
19581 (tree_vector_builder::new_binary_operation): Handle polynomial
19582 element counts. Return false if we need to know the number
19583 of elements at compile time.
19584 * fold-const.c (fold_vec_perm): Punt if the number of elements
19585 isn't known at compile time.
19586
19587 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19588
19589 * vec-perm-indices.h (vec_perm_builder): Change element type
19590 from HOST_WIDE_INT to poly_int64.
19591 (vec_perm_indices::element_type): Update accordingly.
19592 (vec_perm_indices::clamp): Handle polynomial element_types.
19593 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19594 (vec_perm_indices::all_in_range_p): Likewise.
19595 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
19596 than shwi trees.
19597 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
19598 polynomial vec_perm_indices element types.
19599 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
19600 * fold-const.c (fold_vec_perm): Likewise.
19601 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
19602 * tree-vect-generic.c (lower_vec_perm): Likewise.
19603 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19604 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
19605 element type to HOST_WIDE_INT.
19606
19607 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19608 Alan Hayward <alan.hayward@arm.com>
19609 David Sherwood <david.sherwood@arm.com>
19610
19611 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
19612 rather than an int. Use plus_constant.
19613 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
19614 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
19615
19616 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19617 Alan Hayward <alan.hayward@arm.com>
19618 David Sherwood <david.sherwood@arm.com>
19619
19620 * calls.c (emit_call_1, expand_call): Change struct_value_size from
19621 a HOST_WIDE_INT to a poly_int64.
19622
19623 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19624 Alan Hayward <alan.hayward@arm.com>
19625 David Sherwood <david.sherwood@arm.com>
19626
19627 * calls.c (load_register_parameters): Cope with polynomial
19628 mode sizes. Require a constant size for BLKmode parameters
19629 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
19630 forces a parameter to be padded at the lsb end in order to
19631 fill a complete number of words, require the parameter size
19632 to be ordered wrt UNITS_PER_WORD.
19633
19634 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19635 Alan Hayward <alan.hayward@arm.com>
19636 David Sherwood <david.sherwood@arm.com>
19637
19638 * reload1.c (spill_stack_slot_width): Change element type
19639 from unsigned int to poly_uint64_pod.
19640 (alter_reg): Treat mode sizes as polynomial.
19641
19642 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19643 Alan Hayward <alan.hayward@arm.com>
19644 David Sherwood <david.sherwood@arm.com>
19645
19646 * reload.c (complex_word_subreg_p): New function.
19647 (reload_inner_reg_of_subreg, push_reload): Use it.
19648
19649 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19650 Alan Hayward <alan.hayward@arm.com>
19651 David Sherwood <david.sherwood@arm.com>
19652
19653 * lra-constraints.c (process_alt_operands): Reject matched
19654 operands whose sizes aren't ordered.
19655 (match_reload): Refer to this check here.
19656
19657 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19658 Alan Hayward <alan.hayward@arm.com>
19659 David Sherwood <david.sherwood@arm.com>
19660
19661 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
19662 that the mode size is in the set {1, 2, 4, 8, 16}.
19663
19664 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19665 Alan Hayward <alan.hayward@arm.com>
19666 David Sherwood <david.sherwood@arm.com>
19667
19668 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
19669 Use plus_constant instead of gen_rtx_PLUS.
19670
19671 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19672 Alan Hayward <alan.hayward@arm.com>
19673 David Sherwood <david.sherwood@arm.com>
19674
19675 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
19676 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
19677 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
19678 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
19679 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
19680 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
19681 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
19682 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
19683 * config/i386/i386.c (ix86_push_rounding): ...this new function.
19684 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
19685 a poly_int64.
19686 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
19687 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
19688 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
19689 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
19690 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
19691 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
19692 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
19693 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
19694 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
19695 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
19696 function.
19697 * expr.c (emit_move_resolve_push): Treat the input and result
19698 of PUSH_ROUNDING as a poly_int64.
19699 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
19700 (emit_push_insn): Likewise.
19701 * lra-eliminations.c (mark_not_eliminable): Likewise.
19702 * recog.c (push_operand): Likewise.
19703 * reload1.c (elimination_effects): Likewise.
19704 * rtlanal.c (nonzero_bits1): Likewise.
19705 * calls.c (store_one_arg): Likewise. Require the padding to be
19706 known at compile time.
19707
19708 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19709 Alan Hayward <alan.hayward@arm.com>
19710 David Sherwood <david.sherwood@arm.com>
19711
19712 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
19713 Use plus_constant instead of gen_rtx_PLUS.
19714
19715 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19716 Alan Hayward <alan.hayward@arm.com>
19717 David Sherwood <david.sherwood@arm.com>
19718
19719 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
19720 rather than an int.
19721
19722 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19723 Alan Hayward <alan.hayward@arm.com>
19724 David Sherwood <david.sherwood@arm.com>
19725
19726 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
19727 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
19728 via stack temporaries. Treat the mode size as polynomial too.
19729
19730 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19731 Alan Hayward <alan.hayward@arm.com>
19732 David Sherwood <david.sherwood@arm.com>
19733
19734 * expr.c (expand_expr_real_2): When handling conversions involving
19735 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
19736 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
19737 as a poly_uint64 too.
19738
19739 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19740 Alan Hayward <alan.hayward@arm.com>
19741 David Sherwood <david.sherwood@arm.com>
19742
19743 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
19744
19745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19746 Alan Hayward <alan.hayward@arm.com>
19747 David Sherwood <david.sherwood@arm.com>
19748
19749 * combine.c (can_change_dest_mode): Handle polynomial
19750 REGMODE_NATURAL_SIZE.
19751 * expmed.c (store_bit_field_1): Likewise.
19752 * expr.c (store_constructor): Likewise.
19753 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
19754 and polynomial REGMODE_NATURAL_SIZE.
19755 (gen_lowpart_common): Likewise.
19756 * reginfo.c (record_subregs_of_mode): Likewise.
19757 * rtlanal.c (read_modify_subreg_p): Likewise.
19758
19759 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19760 Alan Hayward <alan.hayward@arm.com>
19761 David Sherwood <david.sherwood@arm.com>
19762
19763 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
19764 numbers of elements.
19765
19766 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19767 Alan Hayward <alan.hayward@arm.com>
19768 David Sherwood <david.sherwood@arm.com>
19769
19770 * match.pd: Cope with polynomial numbers of vector elements.
19771
19772 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19773 Alan Hayward <alan.hayward@arm.com>
19774 David Sherwood <david.sherwood@arm.com>
19775
19776 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
19777 in a POINTER_PLUS_EXPR.
19778
19779 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19780 Alan Hayward <alan.hayward@arm.com>
19781 David Sherwood <david.sherwood@arm.com>
19782
19783 * omp-simd-clone.c (simd_clone_subparts): New function.
19784 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
19785 (ipa_simd_modify_function_body): Likewise.
19786
19787 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19788 Alan Hayward <alan.hayward@arm.com>
19789 David Sherwood <david.sherwood@arm.com>
19790
19791 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
19792 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
19793 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
19794 (expand_vector_condition, vector_element): Likewise.
19795 (subparts_gt): New function.
19796 (get_compute_type): Use subparts_gt.
19797 (count_type_subparts): Delete.
19798 (expand_vector_operations_1): Use subparts_gt instead of
19799 count_type_subparts.
19800
19801 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19802 Alan Hayward <alan.hayward@arm.com>
19803 David Sherwood <david.sherwood@arm.com>
19804
19805 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
19806 (vect_compile_time_alias): ...this new function. Do the calculation
19807 on poly_ints rather than trees.
19808 (vect_prune_runtime_alias_test_list): Update call accordingly.
19809
19810 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19811 Alan Hayward <alan.hayward@arm.com>
19812 David Sherwood <david.sherwood@arm.com>
19813
19814 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
19815 numbers of units.
19816 (vect_schedule_slp_instance): Likewise.
19817
19818 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19819 Alan Hayward <alan.hayward@arm.com>
19820 David Sherwood <david.sherwood@arm.com>
19821
19822 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
19823 constant and extern definitions for variable-length vectors.
19824 (vect_get_constant_vectors): Note that the number of units
19825 is known to be constant.
19826
19827 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19828 Alan Hayward <alan.hayward@arm.com>
19829 David Sherwood <david.sherwood@arm.com>
19830
19831 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
19832 of units as polynomial. Choose between WIDE and NARROW based
19833 on multiple_p.
19834
19835 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19836 Alan Hayward <alan.hayward@arm.com>
19837 David Sherwood <david.sherwood@arm.com>
19838
19839 * tree-vect-stmts.c (simd_clone_subparts): New function.
19840 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
19841
19842 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19843 Alan Hayward <alan.hayward@arm.com>
19844 David Sherwood <david.sherwood@arm.com>
19845
19846 * tree-vect-stmts.c (vectorizable_call): Treat the number of
19847 vectors as polynomial. Use build_index_vector for
19848 IFN_GOMP_SIMD_LANE.
19849
19850 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19851 Alan Hayward <alan.hayward@arm.com>
19852 David Sherwood <david.sherwood@arm.com>
19853
19854 * tree-vect-stmts.c (get_load_store_type): Treat the number of
19855 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
19856 for variable-length vectors.
19857 (vectorizable_mask_load_store): Treat the number of units as
19858 polynomial, asserting that it is constant if the condition has
19859 already been enforced.
19860 (vectorizable_store, vectorizable_load): Likewise.
19861
19862 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19863 Alan Hayward <alan.hayward@arm.com>
19864 David Sherwood <david.sherwood@arm.com>
19865
19866 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
19867 of units as polynomial. Punt if we can't tell at compile time
19868 which vector contains the final result.
19869
19870 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19871 Alan Hayward <alan.hayward@arm.com>
19872 David Sherwood <david.sherwood@arm.com>
19873
19874 * tree-vect-loop.c (vectorizable_induction): Treat the number
19875 of units as polynomial. Punt on SLP inductions. Use an integer
19876 VEC_SERIES_EXPR for variable-length integer reductions. Use a
19877 cast of such a series for variable-length floating-point
19878 reductions.
19879
19880 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19881 Alan Hayward <alan.hayward@arm.com>
19882 David Sherwood <david.sherwood@arm.com>
19883
19884 * tree.h (build_index_vector): Declare.
19885 * tree.c (build_index_vector): New function.
19886 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
19887 of units as polynomial, forcibly converting it to a constant if
19888 vectorizable_reduction has already enforced the condition.
19889 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
19890 to create a {1,2,3,...} vector.
19891 (vectorizable_reduction): Treat the number of units as polynomial.
19892 Choose vectype_in based on the largest scalar element size rather
19893 than the smallest number of units. Enforce the restrictions
19894 relied on above.
19895
19896 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19897 Alan Hayward <alan.hayward@arm.com>
19898 David Sherwood <david.sherwood@arm.com>
19899
19900 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
19901 number of units as polynomial.
19902
19903 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19904 Alan Hayward <alan.hayward@arm.com>
19905 David Sherwood <david.sherwood@arm.com>
19906
19907 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
19908 * target.def (autovectorize_vector_sizes): Return the vector sizes
19909 by pointer, using vector_sizes rather than a bitmask.
19910 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
19911 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
19912 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
19913 Likewise.
19914 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
19915 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
19916 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
19917 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
19918 * omp-general.c (omp_max_vf): Likewise.
19919 * omp-low.c (omp_clause_aligned_alignment): Likewise.
19920 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
19921 * tree-vect-loop.c (vect_analyze_loop): Likewise.
19922 * tree-vect-slp.c (vect_slp_bb): Likewise.
19923 * doc/tm.texi: Regenerate.
19924 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
19925 to a poly_uint64.
19926 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
19927 the vector size as a poly_uint64 rather than an unsigned int.
19928 (current_vector_size): Change from an unsigned int to a poly_uint64.
19929 (get_vectype_for_scalar_type): Update accordingly.
19930 * tree.h (build_truth_vector_type): Take the size and number of
19931 units as a poly_uint64 rather than an unsigned int.
19932 (build_vector_type): Add a temporary overload that takes
19933 the number of units as a poly_uint64 rather than an unsigned int.
19934 * tree.c (make_vector_type): Likewise.
19935 (build_truth_vector_type): Take the number of units as a poly_uint64
19936 rather than an unsigned int.
19937
19938 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19939 Alan Hayward <alan.hayward@arm.com>
19940 David Sherwood <david.sherwood@arm.com>
19941
19942 * target.def (get_mask_mode): Take the number of units and length
19943 as poly_uint64s rather than unsigned ints.
19944 * targhooks.h (default_get_mask_mode): Update accordingly.
19945 * targhooks.c (default_get_mask_mode): Likewise.
19946 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
19947 * doc/tm.texi: Regenerate.
19948
19949 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19950 Alan Hayward <alan.hayward@arm.com>
19951 David Sherwood <david.sherwood@arm.com>
19952
19953 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
19954 * omp-general.c (omp_max_vf): Likewise.
19955 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
19956 (expand_omp_simd): Handle polynomial safelen.
19957 * omp-low.c (omplow_simd_context): Add a default constructor.
19958 (omplow_simd_context::max_vf): Change from int to poly_uint64.
19959 (lower_rec_simd_input_clauses): Update accordingly.
19960 (lower_rec_input_clauses): Likewise.
19961
19962 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19963 Alan Hayward <alan.hayward@arm.com>
19964 David Sherwood <david.sherwood@arm.com>
19965
19966 * tree-vectorizer.h (vect_nunits_for_cost): New function.
19967 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
19968 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
19969 (vect_analyze_slp_cost): Likewise.
19970 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
19971 (vect_model_load_cost): Likewise.
19972
19973 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19974 Alan Hayward <alan.hayward@arm.com>
19975 David Sherwood <david.sherwood@arm.com>
19976
19977 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
19978 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
19979 from an unsigned int * to a poly_uint64_pod *.
19980 (calculate_unrolling_factor): New function.
19981 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
19982
19983 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19984 Alan Hayward <alan.hayward@arm.com>
19985 David Sherwood <david.sherwood@arm.com>
19986
19987 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
19988 from an unsigned int to a poly_uint64.
19989 (_loop_vec_info::slp_unrolling_factor): Likewise.
19990 (_loop_vec_info::vectorization_factor): Change from an int
19991 to a poly_uint64.
19992 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
19993 (vect_get_num_vectors): New function.
19994 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
19995 (vect_get_num_copies): Use vect_get_num_vectors.
19996 (vect_analyze_data_ref_dependences): Change max_vf from an int *
19997 to an unsigned int *.
19998 (vect_analyze_data_refs): Change min_vf from an int * to a
19999 poly_uint64 *.
20000 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20001 than an unsigned HOST_WIDE_INT.
20002 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
20003 (vect_analyze_data_ref_dependence): Change max_vf from an int *
20004 to an unsigned int *.
20005 (vect_analyze_data_ref_dependences): Likewise.
20006 (vect_compute_data_ref_alignment): Handle polynomial vf.
20007 (vect_enhance_data_refs_alignment): Likewise.
20008 (vect_prune_runtime_alias_test_list): Likewise.
20009 (vect_shift_permute_load_chain): Likewise.
20010 (vect_supportable_dr_alignment): Likewise.
20011 (dependence_distance_ge_vf): Take the vectorization factor as a
20012 poly_uint64 rather than an unsigned HOST_WIDE_INT.
20013 (vect_analyze_data_refs): Change min_vf from an int * to a
20014 poly_uint64 *.
20015 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
20016 vfm1 as a poly_uint64 rather than an int. Make the same change
20017 for the returned bound_scalar.
20018 (vect_gen_vector_loop_niters): Handle polynomial vf.
20019 (vect_do_peeling): Likewise. Update call to
20020 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
20021 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
20022 be constant.
20023 * tree-vect-loop.c (vect_determine_vectorization_factor)
20024 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
20025 (vect_get_known_peeling_cost): Likewise.
20026 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
20027 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
20028 (vect_transform_loop): Likewise. Use the lowest possible VF when
20029 updating the upper bounds of the loop.
20030 (vect_min_worthwhile_factor): Make static. Return an unsigned int
20031 rather than an int.
20032 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
20033 polynomial unroll factors.
20034 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
20035 (vect_make_slp_decision): Likewise.
20036 (vect_supported_load_permutation_p): Likewise, and polynomial
20037 vf too.
20038 (vect_analyze_slp_cost): Handle polynomial vf.
20039 (vect_slp_analyze_node_operations): Likewise.
20040 (vect_slp_analyze_bb_1): Likewise.
20041 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20042 than an unsigned HOST_WIDE_INT.
20043 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
20044 (vectorizable_load): Handle polynomial vf.
20045 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
20046 a poly_uint64.
20047 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
20048
20049 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20050 Alan Hayward <alan.hayward@arm.com>
20051 David Sherwood <david.sherwood@arm.com>
20052
20053 * match.pd: Handle bit operations involving three constants
20054 and try to fold one pair.
20055
20056 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20057
20058 * tree-vect-loop-manip.c: Include gimple-fold.h.
20059 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
20060 niters_maybe_zero parameters. Handle other cases besides a step of 1.
20061 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
20062 Add a path that uses a step of VF instead of 1, but disable it
20063 for now.
20064 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
20065 and niters_no_overflow parameters. Update calls to
20066 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
20067 Create a new SSA name if the latter choses to use a ste other
20068 than zero, and return it via niters_vector_mult_vf_var.
20069 * tree-vect-loop.c (vect_transform_loop): Update calls to
20070 vect_do_peeling, vect_gen_vector_loop_niters and
20071 slpeel_make_loop_iterate_ntimes.
20072 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
20073 (vect_gen_vector_loop_niters): Update declarations after above changes.
20074
20075 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
20076
20077 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
20078 128-bit round to integer instructions.
20079 (ceil<mode>2): Likewise.
20080 (btrunc<mode>2): Likewise.
20081 (round<mode>2): Likewise.
20082
20083 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20084
20085 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
20086 unaligned VSX load/store on P8/P9.
20087 (expand_block_clear): Allow the use of unaligned VSX
20088 load/store on P8/P9.
20089
20090 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20091
20092 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
20093 New function.
20094 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
20095 swap associated with both a load and a store.
20096
20097 2018-01-02 Andrew Waterman <andrew@sifive.com>
20098
20099 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
20100 * config/riscv/riscv.md (clear_cache): Use it.
20101
20102 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
20103
20104 * web.c: Remove out-of-date comment.
20105
20106 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20107
20108 * expr.c (fixup_args_size_notes): Check that any existing
20109 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
20110 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
20111 (emit_single_push_insn): ...here.
20112
20113 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20114
20115 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
20116 (const_vector_encoded_nelts): New function.
20117 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
20118 (const_vector_int_elt, const_vector_elt): Declare.
20119 * emit-rtl.c (const_vector_int_elt_1): New function.
20120 (const_vector_elt): Likewise.
20121 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
20122 of CONST_VECTOR_ELT.
20123
20124 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20125
20126 * expr.c: Include rtx-vector-builder.h.
20127 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
20128 directly on the tree encoding.
20129 (const_vector_from_tree): Likewise.
20130 * optabs.c: Include rtx-vector-builder.h.
20131 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
20132 sequence of "u" values.
20133 * vec-perm-indices.c: Include rtx-vector-builder.h.
20134 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
20135 directly on the vec_perm_indices encoding.
20136
20137 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20138
20139 * doc/rtl.texi (const_vector): Describe new encoding scheme.
20140 * Makefile.in (OBJS): Add rtx-vector-builder.o.
20141 * rtx-vector-builder.h: New file.
20142 * rtx-vector-builder.c: Likewise.
20143 * rtl.h (rtx_def::u2): Add a const_vector field.
20144 (CONST_VECTOR_NPATTERNS): New macro.
20145 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
20146 (CONST_VECTOR_DUPLICATE_P): Likewise.
20147 (CONST_VECTOR_STEPPED_P): Likewise.
20148 (CONST_VECTOR_ENCODED_ELT): Likewise.
20149 (const_vec_duplicate_p): Check for a duplicated vector encoding.
20150 (unwrap_const_vec_duplicate): Likewise.
20151 (const_vec_series_p): Check for a non-duplicated vector encoding.
20152 Say that the function only returns true for integer vectors.
20153 * emit-rtl.c: Include rtx-vector-builder.h.
20154 (gen_const_vec_duplicate_1): Delete.
20155 (gen_const_vector): Call gen_const_vec_duplicate instead of
20156 gen_const_vec_duplicate_1.
20157 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
20158 (gen_const_vec_duplicate): Use rtx_vector_builder.
20159 (gen_const_vec_series): Likewise.
20160 (gen_rtx_CONST_VECTOR): Likewise.
20161 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
20162 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20163 Build a new vector rather than modifying a CONST_VECTOR in-place.
20164 (handle_special_swappables): Update call accordingly.
20165 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
20166 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20167 Build a new vector rather than modifying a CONST_VECTOR in-place.
20168 (handle_special_swappables): Update call accordingly.
20169
20170 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20171
20172 * simplify-rtx.c (simplify_const_binary_operation): Use
20173 CONST_VECTOR_ELT instead of XVECEXP.
20174
20175 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20176
20177 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
20178 the selector elements to be different from the data elements
20179 if the selector is a VECTOR_CST.
20180 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
20181 ssizetype for the selector.
20182
20183 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20184
20185 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
20186 before testing each element individually.
20187 * tree-vect-generic.c (lower_vec_perm): Likewise.
20188
20189 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20190
20191 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
20192 * selftest-run-tests.c (selftest::run_tests): Call it.
20193 * vector-builder.h (vector_builder::operator ==): New function.
20194 (vector_builder::operator !=): Likewise.
20195 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
20196 (vec_perm_indices::all_from_input_p): New function.
20197 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20198 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
20199 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
20200 instead of reading the VECTOR_CST directly. Detect whether both
20201 vector inputs are the same before constructing the vec_perm_indices,
20202 and update the number of inputs argument accordingly. Use the
20203 utility functions added above. Only construct sel2 if we need to.
20204
20205 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20206
20207 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
20208 the broadcast of the low byte.
20209 (expand_mult_highpart): Use an explicit encoding for the permutes.
20210 * optabs-query.c (can_mult_highpart_p): Likewise.
20211 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20212 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20213 (vectorizable_bswap): Likewise.
20214 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
20215 explicit encoding for the power-of-2 permutes.
20216 (vect_permute_store_chain): Likewise.
20217 (vect_grouped_load_supported): Likewise.
20218 (vect_permute_load_chain): Likewise.
20219
20220 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20221
20222 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
20223 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
20224 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
20225 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20226 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
20227 (vect_gen_perm_mask_any): Likewise.
20228
20229 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20230
20231 * int-vector-builder.h: New file.
20232 * vec-perm-indices.h: Include int-vector-builder.h.
20233 (vec_perm_indices): Redefine as an int_vector_builder.
20234 (auto_vec_perm_indices): Delete.
20235 (vec_perm_builder): Redefine as a stand-alone class.
20236 (vec_perm_indices::vec_perm_indices): New function.
20237 (vec_perm_indices::clamp): Likewise.
20238 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
20239 (vec_perm_indices::new_vector): New function.
20240 (vec_perm_indices::new_expanded_vector): Update for new
20241 vec_perm_indices class.
20242 (vec_perm_indices::rotate_inputs): New function.
20243 (vec_perm_indices::all_in_range_p): Operate directly on the
20244 encoded form, without computing elided elements.
20245 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
20246 encoding. Update for new vec_perm_indices class.
20247 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
20248 the given vec_perm_builder.
20249 (expand_vec_perm_var): Update vec_perm_builder constructor.
20250 (expand_mult_highpart): Use vec_perm_builder instead of
20251 auto_vec_perm_indices.
20252 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
20253 vec_perm_indices instead of auto_vec_perm_indices. Use a single
20254 or double series encoding as appropriate.
20255 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
20256 vec_perm_indices instead of auto_vec_perm_indices.
20257 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20258 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20259 (vect_permute_store_chain): Likewise.
20260 (vect_grouped_load_supported): Likewise.
20261 (vect_permute_load_chain): Likewise.
20262 (vect_shift_permute_load_chain): Likewise.
20263 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20264 (vect_transform_slp_perm_load): Likewise.
20265 (vect_schedule_slp_instance): Likewise.
20266 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20267 (vectorizable_mask_load_store): Likewise.
20268 (vectorizable_bswap): Likewise.
20269 (vectorizable_store): Likewise.
20270 (vectorizable_load): Likewise.
20271 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
20272 vec_perm_indices instead of auto_vec_perm_indices. Use
20273 tree_to_vec_perm_builder to read the vector from a tree.
20274 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
20275 vec_perm_builder instead of a vec_perm_indices.
20276 (have_whole_vector_shift): Use vec_perm_builder and
20277 vec_perm_indices instead of auto_vec_perm_indices. Leave the
20278 truncation to calc_vec_perm_mask_for_shift.
20279 (vect_create_epilog_for_reduction): Likewise.
20280 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
20281 from auto_vec_perm_indices to vec_perm_indices.
20282 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20283 instead of changing individual elements.
20284 (aarch64_vectorize_vec_perm_const): Use new_vector to install
20285 the vector in d.perm.
20286 * config/arm/arm.c (expand_vec_perm_d::perm): Change
20287 from auto_vec_perm_indices to vec_perm_indices.
20288 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20289 instead of changing individual elements.
20290 (arm_vectorize_vec_perm_const): Use new_vector to install
20291 the vector in d.perm.
20292 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
20293 Update vec_perm_builder constructor.
20294 (rs6000_expand_interleave): Likewise.
20295 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
20296 (rs6000_expand_interleave): Likewise.
20297
20298 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20299
20300 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
20301 to qimode could truncate the indices.
20302 * optabs.c (expand_vec_perm_var): Likewise.
20303
20304 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20305
20306 * Makefile.in (OBJS): Add vec-perm-indices.o.
20307 * vec-perm-indices.h: New file.
20308 * vec-perm-indices.c: Likewise.
20309 * target.h (vec_perm_indices): Replace with a forward class
20310 declaration.
20311 (auto_vec_perm_indices): Move to vec-perm-indices.h.
20312 * optabs.h: Include vec-perm-indices.h.
20313 (expand_vec_perm): Delete.
20314 (selector_fits_mode_p, expand_vec_perm_var): Declare.
20315 (expand_vec_perm_const): Declare.
20316 * target.def (vec_perm_const_ok): Replace with...
20317 (vec_perm_const): ...this new hook.
20318 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
20319 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
20320 * doc/tm.texi: Regenerate.
20321 * optabs.def (vec_perm_const): Delete.
20322 * doc/md.texi (vec_perm_const): Likewise.
20323 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
20324 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
20325 expand_vec_perm for constant permutation vectors. Assert that
20326 the mode of variable permutation vectors is the integer equivalent
20327 of the mode that is being permuted.
20328 * optabs-query.h (selector_fits_mode_p): Declare.
20329 * optabs-query.c: Include vec-perm-indices.h.
20330 (selector_fits_mode_p): New function.
20331 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
20332 is defined, instead of checking whether the vec_perm_const_optab
20333 exists. Use targetm.vectorize.vec_perm_const instead of
20334 targetm.vectorize.vec_perm_const_ok. Check whether the indices
20335 fit in the vector mode before using a variable permute.
20336 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
20337 vec_perm_indices instead of an rtx.
20338 (expand_vec_perm): Replace with...
20339 (expand_vec_perm_const): ...this new function. Take the selector
20340 as a vec_perm_indices rather than an rtx. Also take the mode of
20341 the selector. Update call to shift_amt_for_vec_perm_mask.
20342 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
20343 Use vec_perm_indices::new_expanded_vector to expand the original
20344 selector into bytes. Check whether the indices fit in the vector
20345 mode before using a variable permute.
20346 (expand_vec_perm_var): Make global.
20347 (expand_mult_highpart): Use expand_vec_perm_const.
20348 * fold-const.c: Includes vec-perm-indices.h.
20349 * tree-ssa-forwprop.c: Likewise.
20350 * tree-vect-data-refs.c: Likewise.
20351 * tree-vect-generic.c: Likewise.
20352 * tree-vect-loop.c: Likewise.
20353 * tree-vect-slp.c: Likewise.
20354 * tree-vect-stmts.c: Likewise.
20355 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
20356 Delete.
20357 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
20358 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
20359 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
20360 (aarch64_vectorize_vec_perm_const): ...this new function.
20361 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20362 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20363 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
20364 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
20365 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20366 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20367 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
20368 into...
20369 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
20370 check for NEON modes.
20371 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
20372 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
20373 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
20374 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
20375 into...
20376 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
20377 the old VEC_PERM_CONST conditions.
20378 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
20379 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
20380 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
20381 (ia64_vectorize_vec_perm_const_ok): Merge into...
20382 (ia64_vectorize_vec_perm_const): ...this new function.
20383 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
20384 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
20385 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
20386 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
20387 * config/mips/mips.c (mips_expand_vec_perm_const)
20388 (mips_vectorize_vec_perm_const_ok): Merge into...
20389 (mips_vectorize_vec_perm_const): ...this new function.
20390 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
20391 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
20392 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
20393 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
20394 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
20395 (rs6000_expand_vec_perm_const): Delete.
20396 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
20397 Delete.
20398 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20399 (altivec_expand_vec_perm_const_le): Take each operand individually.
20400 Operate on constant selectors rather than rtxes.
20401 (altivec_expand_vec_perm_const): Likewise. Update call to
20402 altivec_expand_vec_perm_const_le.
20403 (rs6000_expand_vec_perm_const): Delete.
20404 (rs6000_vectorize_vec_perm_const_ok): Delete.
20405 (rs6000_vectorize_vec_perm_const): New function.
20406 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20407 an element count and rtx array.
20408 (rs6000_expand_extract_even): Update call accordingly.
20409 (rs6000_expand_interleave): Likewise.
20410 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
20411 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
20412 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
20413 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
20414 (rs6000_expand_vec_perm_const): Delete.
20415 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20416 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20417 (altivec_expand_vec_perm_const_le): Take each operand individually.
20418 Operate on constant selectors rather than rtxes.
20419 (altivec_expand_vec_perm_const): Likewise. Update call to
20420 altivec_expand_vec_perm_const_le.
20421 (rs6000_expand_vec_perm_const): Delete.
20422 (rs6000_vectorize_vec_perm_const_ok): Delete.
20423 (rs6000_vectorize_vec_perm_const): New function. Remove stray
20424 reference to the SPE evmerge intructions.
20425 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20426 an element count and rtx array.
20427 (rs6000_expand_extract_even): Update call accordingly.
20428 (rs6000_expand_interleave): Likewise.
20429 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
20430 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
20431 new function.
20432 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20433
20434 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20435
20436 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
20437 vector mode and that that mode matches the mode of the data
20438 being permuted.
20439 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
20440 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
20441 directly using expand_vec_perm_1 when forcing selectors into
20442 registers.
20443 (expand_vec_perm_var): New function, split out from expand_vec_perm.
20444
20445 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20446
20447 * optabs-query.h (can_vec_perm_p): Delete.
20448 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
20449 * optabs-query.c (can_vec_perm_p): Split into...
20450 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
20451 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
20452 particular selector is valid.
20453 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20454 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20455 (vect_grouped_load_supported): Likewise.
20456 (vect_shift_permute_load_chain): Likewise.
20457 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20458 (vect_transform_slp_perm_load): Likewise.
20459 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20460 (vectorizable_bswap): Likewise.
20461 (vect_gen_perm_mask_checked): Likewise.
20462 * fold-const.c (fold_ternary_loc): Likewise. Don't take
20463 implementations of variable permutation vectors into account
20464 when deciding which selector to use.
20465 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
20466 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
20467 with a false third argument.
20468 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
20469 to test whether the constant selector is valid and can_vec_perm_var_p
20470 to test whether a variable selector is valid.
20471
20472 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20473
20474 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
20475 * optabs-query.c (can_vec_perm_p): Likewise.
20476 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
20477 instead of vec_perm_indices.
20478 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
20479 (vect_gen_perm_mask_checked): Likewise,
20480 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
20481 (vect_gen_perm_mask_checked): Likewise,
20482
20483 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20484
20485 * optabs-query.h (qimode_for_vec_perm): Declare.
20486 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
20487 (qimode_for_vec_perm): ...this new function.
20488 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
20489
20490 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20491
20492 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
20493 does not have a conditional at the top.
20494
20495 2018-01-02 Richard Biener <rguenther@suse.de>
20496
20497 * ipa-inline.c (big_speedup_p): Fix expression.
20498
20499 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
20500
20501 PR target/81616
20502 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
20503 for generic 4->6.
20504
20505 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
20506
20507 PR target/81616
20508 Generic tuning.
20509 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
20510 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
20511 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
20512 cond_taken_branch_cost 3->4.
20513
20514 2018-01-01 Jakub Jelinek <jakub@redhat.com>
20515
20516 PR tree-optimization/83581
20517 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
20518 TODO_cleanup_cfg if any changes have been made.
20519
20520 PR middle-end/83608
20521 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
20522 convert_modes if target mode has the right side, but different mode
20523 class.
20524
20525 PR middle-end/83609
20526 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
20527 last argument when extracting from CONCAT. If either from_real or
20528 from_imag is NULL, use expansion through memory. If result is not
20529 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
20530 the parts directly to inner mode, if even that fails, use expansion
20531 through memory.
20532
20533 PR middle-end/83623
20534 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
20535 check for bswap in mode rather than HImode and use that in expand_unop
20536 too.
20537 \f
20538 Copyright (C) 2018 Free Software Foundation, Inc.
20539
20540 Copying and distribution of this file, with or without modification,
20541 are permitted in any medium without royalty provided the copyright
20542 notice and this notice are preserved.