1 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
3 * doc/gcov.texi (Invoking Gcov): Editorial changes.
5 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7 * pretty-print.c (text_info::set_location): Remove redundant
8 "line_table" parameter from call to rich_location::set_range.
10 2018-07-20 Martin Sebor <msebor@redhat.com>
13 * builtins.c (expand_builtin_alloca): Adjust.
14 * calls.c (alloc_max_size): Simplify.
15 * cgraphunit.c (cgraph_node::expand): Adjust.
16 * common.opt (larger_than_size, warn_frame_larger_than): Remove
18 (frame_larger_than_size): Same.
19 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
20 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
22 * doc/invoke.texi (GCC Command Options): Document option arguments.
23 Explain byte-size arguments and suffixes.
24 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
25 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
26 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
27 * doc/options.texi (UInteger): Expand.
28 (Host_Wide_Int, ByteSize): Document new properties.
29 * final.c (final_start_function_1): Include sizes in an error message.
30 * function.c (frame_offset_overflow): Same.
31 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
32 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
33 Diagnose unbounded alloca calls only for limits of less than
35 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
36 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
38 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
39 only for limits of less than PTRDIFF_MAX.
40 * langhooks-def.h (lhd_handle_option): Change function argument
42 * langhooks.c (lhd_handle_option): Same.
43 * langhooks.h (handle_option): Same.
44 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
46 (var_type, var_type_struct): Same.
47 (var_set): Handle ByteSize flag.
48 * optc-gen.awk: Add comments to output to ease debugging. Make
49 use of HOST_WIDE_INT where appropriate.
50 * opts-gen-save.awk: Use %lx to format unsigned long.
51 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
52 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
53 arguments. Parse bytes-size suffixes.
54 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
55 (enum_value_to_arg): Same.
56 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
57 (handle_option): Adjust.
58 (generate_option): Change function argument to HOST_WIDE_INT.
59 (cmdline_handle_error): Adjust.
60 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
61 (set_option): Change function argument to HOST_WIDE_INT.
62 (option_enabled): Handle cl_host_wide_int.
63 (get_option_state): Handle CLVC_SIZE.
64 (control_warning_option): Same.
65 * opts.c (common_handle_option): Change function argument to
66 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
67 OPT_Wvla_larger_than_.
68 * opts.h (enum cl_var_type): Add an enumerator.
69 * stor-layout.c (layout_decl): Print a more meaningful warning.
70 * toplev.c (output_stack_usage): Adjust.
72 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
74 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
75 call to inline_expand_builtin_string_cmp.
76 (expand_builtin_strcmp): Likewise.
77 (expand_builtin_strncmp): Likewise.
78 (inline_string_cmp): Delete the last parameter, change char_type_node
79 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
81 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
82 the inlining expansion on target where the type of the call has same or
83 narrower precision than unsigned char.
85 2018-07-20 David Malcolm <dmalcolm@redhat.com>
87 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
88 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
89 * common.opt (fsave-optimization-record): New option.
90 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
91 * doc/invoke.texi (-fsave-optimization-record): New option.
92 * dumpfile.c: Include "optinfo-emit-json.h".
93 (struct kv_pair): Move to coretypes.h.
94 (optgroup_options): Make non-static.
95 (dump_context::end_scope): Call
96 optimization_records_maybe_pop_dump_scope.
97 * dumpfile.h (optgroup_options): New decl.
100 * optinfo-emit-json.cc: New file.
101 * optinfo-emit-json.h: New file.
102 * optinfo.cc: Include "optinfo-emit-json.h".
103 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
104 (optinfo_enabled_p): Check optimization_records_enabled_p.
105 (optinfo_wants_inlining_info_p): Likewise.
106 * optinfo.h: Update comment.
107 * profile-count.c (profile_quality_as_string): New function.
108 * profile-count.h (profile_quality_as_string): New decl.
109 (profile_count::quality): New accessor.
110 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
111 and optinfo_emit_json_cc_tests.
112 * selftest.h (selftest::json_cc_tests): New decl.
113 (selftest::optinfo_emit_json_cc_tests): New decl.
114 * toplev.c: Include "optinfo-emit-json.h".
115 (compile_file): Call optimization_records_finish.
116 (do_compile): Call optimization_records_start.
117 * tree-ssa-live.c: Include optinfo.h.
118 (remove_unused_scope_block_p): Retain inlining information if
119 optinfo_wants_inlining_info_p returns true.
121 2018-07-20 Richard Biener <rguenther@suse.de>
124 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
125 to cover -flto-partition=none.
127 2018-07-20 Martin Liska <mliska@suse.cz>
129 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
130 (get_decl_source_range): Remove unused function.
132 2018-07-20 Richard Biener <rguenther@suse.de>
134 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
135 (struct vn_phi_s): Likewise.
136 (struct vn_reference_s): Likewise.
137 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
138 for searching the slot of an entry known to be in the hash itself.
139 (vn_phi_hasher::equal): Likewise.
140 (vn_reference_hasher::equal): Likewise.
141 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
143 (optimistic_info, current_info): Remove, keeping only valid_info.
144 (vn_reference_lookup_1): Remove fallback lookup.
145 (vn_reference_lookup_2): Likewise.
146 (vn_nary_op_lookup_1): Likewise.
147 (vn_phi_lookup): Likewise.
148 (vn_nary_build_or_lookup_1): Make sure to not chain the built
150 (vn_reference_insert): Adjust, chain the inserted hash element
151 at last_inserted_ref.
152 (vn_reference_insert_pieces): Likewise.
153 (visit_reference_op_call): Likewise.
154 (vn_nary_op_insert_into): Chain the inserted hash element at
156 (vn_nary_op_insert_pieces): Adjust.
157 (vn_nary_op_insert): Likewise.
158 (vn_nary_op_insert_stmt): Likewise.
159 (vn_phi_insert): Adjust, chain the inserted hash element at
161 (process_scc): Remove clearing and copying the optimistic
162 table. Instead remove elements inserted during an optimistic
163 iteration from the single table we maintain.
164 (init_scc_vn): Adjust.
165 (free_scc_vn): Likewise.
166 (sccvn_dom_walker::record_cond): Likewise.
167 (sccvn_dom_walker::after_dom_children): Likewise.
169 2018-07-19 Martin Sebor <msebor@redhat.com>
171 PR tree-optimization/84047
172 PR tree-optimization/83776
173 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
174 (check_array_bounds): Call it.
176 2018-07-19 Martin Sebor <msebor@redhat.com>
178 * align.h (align_flags): Use member initialization.
180 2018-07-19 David Malcolm <dmalcolm@redhat.com>
182 * Makefile.in (OBJS): Add optinfo.o.
183 * coretypes.h (class symtab_node): New forward decl.
184 (struct cgraph_node): New forward decl.
185 (class varpool_node): New forward decl.
186 * dump-context.h: New file.
187 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
189 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
190 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
191 (set_alt_dump_file): Likewise.
192 (dump_context::~dump_context): New dtor.
193 (dump_gimple_stmt): Move implementation to...
194 (dump_context::dump_gimple_stmt): ...this new member function.
195 Add the stmt to any pending optinfo, creating one if need be.
196 (dump_gimple_stmt_loc): Move implementation to...
197 (dump_context::dump_gimple_stmt_loc): ...this new member function.
198 Start a new optinfo and add the stmt to it.
199 (dump_gimple_expr): Move implementation to...
200 (dump_context::dump_gimple_expr): ...this new member function.
201 Add the stmt to any pending optinfo, creating one if need be.
202 (dump_gimple_expr_loc): Move implementation to...
203 (dump_context::dump_gimple_expr_loc): ...this new member function.
204 Start a new optinfo and add the stmt to it.
205 (dump_generic_expr): Move implementation to...
206 (dump_context::dump_generic_expr): ...this new member function.
207 Add the tree to any pending optinfo, creating one if need be.
208 (dump_generic_expr_loc): Move implementation to...
209 (dump_context::dump_generic_expr_loc): ...this new member
210 function. Add the tree to any pending optinfo, creating one if
212 (dump_printf): Move implementation to...
213 (dump_context::dump_printf_va): ...this new member function. Add
214 the text to any pending optinfo, creating one if need be.
215 (dump_printf_loc): Move implementation to...
216 (dump_context::dump_printf_loc_va): ...this new member function.
217 Start a new optinfo and add the stmt to it.
218 (dump_dec): Move implementation to...
219 (dump_context::dump_dec): ...this new member function. Add the
220 value to any pending optinfo, creating one if need be.
221 (dump_context::dump_symtab_node): New member function.
222 (dump_context::get_scope_depth): New member function.
223 (dump_context::begin_scope): New member function.
224 (dump_context::end_scope): New member function.
225 (dump_context::ensure_pending_optinfo): New member function.
226 (dump_context::begin_next_optinfo): New member function.
227 (dump_context::end_any_optinfo): New member function.
228 (dump_context::s_current): New global.
229 (dump_context::s_default): New global.
230 (dump_scope_depth): Delete global.
231 (dumpfile_ensure_any_optinfo_are_flushed): New function.
232 (dump_symtab_node): New function.
233 (get_dump_scope_depth): Reimplement in terms of dump_context.
234 (dump_begin_scope): Likewise.
235 (dump_end_scope): Likewise.
236 (selftest::temp_dump_context::temp_dump_context): New ctor.
237 (selftest::temp_dump_context::~temp_dump_context): New dtor.
238 (selftest::verify_item): New function.
239 (ASSERT_IS_TEXT): New macro.
240 (ASSERT_IS_TREE): New macro.
241 (ASSERT_IS_GIMPLE): New macro.
242 (selftest::test_capture_of_dump_calls): New test.
243 (selftest::dumpfile_c_tests): Call it.
244 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
245 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
246 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
248 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
249 (dump_node, dump_bb): Move these unrelated decls.
250 (class dump_manager): Add leading comment.
251 * optinfo.cc: New file.
252 * optinfo.h: New file.
254 2018-07-19 Michael Collison <michael.collison@arm.com>
255 Richard Henderson <rth@redhat.com>
257 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
258 (subti): Handle op1 zero.
259 (subvti4, usub4ti4): New.
260 (*sub<GPI>3_compare1_imm): New.
261 (sub<GPI>3_carryinCV): New.
262 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
263 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
265 2018-07-19 Michael Collison <michael.collison@arm.com>
266 Richard Henderson <rth@redhat.com>
268 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
269 (addti3): Create simpler code if low part is already known to be 0.
270 (addvti4, uaddvti4): New.
271 (*add<GPI>3_compareC_cconly_imm): New.
272 (*add<GPI>3_compareC_cconly): New.
273 (*add<GPI>3_compareC_imm): New.
274 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
275 handle constants within this pattern..
276 (*add<GPI>3_compareV_cconly_imm): New.
277 (*add<GPI>3_compareV_cconly): New.
278 (*add<GPI>3_compareV_imm): New.
279 (add<GPI>3_compareV): New.
280 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
281 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
282 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
283 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
284 with 'comparison' operator.
285 (*add<GPI>3_compareV_cconly_imm): Ditto.
286 (*add<GPI>3_compareV_cconly): Ditto.
287 (*add<GPI>3_compareV_imm): Ditto.
288 (add<GPI>3_compareV): Ditto.
289 (add<mode>3_carryinC): Ditto.
290 (*add<mode>3_carryinC_zero): Ditto.
291 (*add<mode>3_carryinC): Ditto.
292 (add<mode>3_carryinV): Ditto.
293 (*add<mode>3_carryinV_zero): Ditto.
294 (*add<mode>3_carryinV): Ditto.
296 2018-07-19 Michael Collison <michael.collison@arm.com>
297 Richard Henderson <rth@redhat.com>
299 * config/aarch64/aarch64-modes.def (CC_V): New.
300 * config/aarch64/aarch64-protos.h
301 (aarch64_addti_scratch_regs): Declare
302 (aarch64_subvti_scratch_regs): Declare.
303 (aarch64_expand_subvti): Declare.
304 (aarch64_gen_unlikely_cbranch): Declare
305 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
306 for signed overflow using CC_Vmode.
307 (aarch64_get_condition_code_1): Handle CC_Vmode.
308 (aarch64_gen_unlikely_cbranch): New function.
309 (aarch64_addti_scratch_regs): New function.
310 (aarch64_subvti_scratch_regs): New function.
311 (aarch64_expand_subvti): New function.
313 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
315 * config/aarch64/aarch64-option-extensions.def: New entry for profile
317 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
318 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
321 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
324 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
325 address check not strict.
327 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
329 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
331 (store_pair_lanes<mode>): Likewise.
332 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
333 enum value 'ADDR_QUERY_LDP_STP_N'.
334 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
335 (aarch64_print_address_internal): Add declaration.
336 (aarch64_print_ldpstp_address): Remove.
337 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
338 (aarch64_print_operand): Change printing of 'y'.
339 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
340 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
341 'true' rather than '1'.
342 * gcc/config/aarch64/constraints.md (Uml): Likewise.
343 (Uml): Rename to Umn.
346 2018-07-19 Richard Biener <rguenther@suse.de>
348 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
350 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
351 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
352 (vn_reference_hasher): Likewise.
353 (struct vn_tables_s): Remove obstack and alloc-pool members.
354 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
355 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
356 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
357 (vn_reference_insert_pieces): Likewise.
358 (alloc_vn_nary_op_noinit): Adjust.
359 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
361 (shared_lookup_phiargs): Remove.
362 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
363 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
364 (visit_reference_op_call): Likewise.
365 (copy_nary, copy_phi, copy_reference): Remove.
366 (process_scc): Rewind the obstack when iterating. Do not
367 copy the elements to valid_info but just move them from one
368 hashtable to the other.
369 (allocate_vn_table): Adjust.
370 (free_vn_table): Likewise.
371 (init_scc_vn): Likewise.
372 (free_scc_vn): Likewise.
374 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
377 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
378 indirect_return as function type attribute.
379 (ix86_attribute_table): Change indirect_return to function
381 * doc/extend.texi: Update indirect_return attribute.
383 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
385 * wide-int.h (widest2_int): New.
386 * gimple-fold.c (arith_overflowed_p): Use it.
387 * tree.h (widest2_int_cst): New.
388 * tree-vrp.c (wide_int_binop_overflow): Rename from
390 Rewrite to work on trees.
391 (extract_range_from_multiplicative_op_1): Abstract code to...
392 (wide_int_range_min_max): ...here.
393 (wide_int_range_cross_product): ...and here.
394 (extract_range_from_binary_expr_1): Abstract overflow code to...
395 (wide_int_range_mult_wrapping): ...here.
396 * tree-vrp.h (wide_int_range_cross_product): New.
397 (wide_int_range_mult_wrapping): New.
399 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
400 Julia Koval <julia.koval@intel.com>
402 * config/i386/x86-tune-costs.h (skylake_memcpy,
403 skylake_memset): Replace rep_prefix with unrolling for size 512.
405 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
408 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
411 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
413 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
414 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
415 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
416 previously known as "PowerPC AltiVec Built-in Functions". Move
417 some material to new subsubsections "PowerPC AltiVec Built-in
418 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
420 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
421 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
422 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
423 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
425 2018-07-18 Richard Biener <rguenther@suse.de>
427 PR tree-optimization/86557
428 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
431 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
433 * config/s390/s390.c (s390_function_profiler): Generate CFI.
435 2018-07-17 Jeff Law <law@redhat.com>
437 * config/arm/arm.c (get_label_padding): Update for recent
438 changes to label_to_alignment.
440 PR tree-optimization/86010
441 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
443 * config/mips/mips.c (vr4130_align_insns): Update for recent
444 changes to label_to_alignment.
446 * config/frv/frv.c (frv_label_align): Update for recent changes
447 to label_to_alignment.
449 * config/nios2/nios2.c (nios2_label_align): Update for recent
450 changes which dropped ALIGN_LABELS_LOG.
452 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
454 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
455 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
457 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
459 * config/arc/arc.c (arc_label_align): Use align_labels instead of
460 deprecated align_labels_log.
462 2018-07-17 Richard Biener <rguenther@suse.de>
465 * dwarf2out.c (init_sections_and_labels): Always generate
466 a debug_line_str_section for early LTO debug.
467 (dwarf2out_finish): Reset debug_line_str_hash output early.
468 Bump counter for extra dwarf5 .debug_loc labels to not conflict
470 (dwarf2out_early_finish): Output debug_line_str.
472 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
474 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
475 index register on z196 or later.
477 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
479 * config/s390/s390.c (s390_default_align): Set default function
481 (s390_override_options_after_change): Call s390_default align.
482 (s390_option_override_internal): Call s390_default_align.
483 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
485 2018-07-17 Jakub Jelinek <jakub@redhat.com>
488 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
489 to _looptemp_ clauses, other than the first two.
491 2018-07-17 Martin Liska <mliska@suse.cz>
493 * opts.c: Do not enable OPT_falign_* for -Os.
495 2018-07-17 Martin Liska <mliska@suse.cz>
497 * align.h (MAX_CODE_ALIGN): New.
498 (MAX_CODE_ALIGN_VALUE): New.
499 * common/config/i386/i386-common.c (ix86_handle_option):
500 (MAX_CODE_ALIGN): Moved to align.h.
501 * final.c (MAX_CODE_ALIGN): Likewise.
502 * opts.c (parse_and_check_align_values):
503 (MAX_CODE_ALIGN): Likewise.
504 (MAX_CODE_ALIGN_VALUE): Likewise.
506 2018-07-17 Martin Liska <mliska@suse.cz>
508 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
509 in order to fulfil coding style.
510 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
511 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
512 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
513 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
514 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
515 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
516 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
517 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
518 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
520 2018-07-17 Martin Liska <mliska@suse.cz>
523 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
524 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
525 align_flags of label_to_alignment.
526 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
528 * config/m68k/m68k.c: Do not use removed align_labels_value and
530 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
531 (LOOP_ALIGN): Likewise.
532 (LABEL_ALIGN): Likewise.
533 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
534 Remove not used macro.
535 (rs6000_loop_align): Change return type to align_flags.
536 (rs6000_loop_align_max_skip): Remove.
537 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
538 Change return type to align_flags.
539 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
540 Remove not used macro.
541 (rs6000_loop_align): Change return type to align_flags.
542 (rs6000_loop_align_max_skip): Remove.
543 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
544 * config/rx/rx-protos.h (rx_align_for_label): Make it
546 * config/rx/rx.c (rx_align_for_label): Change return type
548 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
550 into align_flags class.
551 (LABEL_ALIGN): Likewise.
552 (LOOP_ALIGN): Likewise.
553 * config/s390/s390.c (s390_label_align): Use align_flags
555 (s390_asm_output_function_label): Likewise.
556 * config/sh/sh.c (sh_override_options_after_change):
557 Use align_flags class directly without macros.
558 (find_barrier): Likewise.
559 (barrier_align): Likewise.
560 (sh_loop_align): Likewise.
561 * config/spu/spu.c (spu_option_override):
562 Use align_flags_tuple::get_value instead of removed macros.
563 (spu_sched_init): Likewise.
564 * config/spu/spu.h (GTY): Likewise.
565 * config/visium/visium.c (visium_option_override):
566 Set "8" as default secondary alignment.
567 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
568 in order to guarantee secondary alignment of 8.
569 * coretypes.h: Include align.h header file.
570 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
571 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
572 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
573 * doc/tm.texi.in: Likewise.
574 * final.c (struct label_alignment): Remove not used structure.
575 (LABEL_ALIGN): Change type to align_flags.
576 (LOOP_ALIGN): Likewise.
577 (JUMP_ALIGN): Likewise.
578 (default_loop_align_max_skip): Remove.
579 (default_label_align_max_skip): Likewise.
580 (default_jump_align_max_skip): Likewise.
581 (default_label_align_after_barrier_max_skip):
582 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
583 (LABEL_TO_MAX_SKIP): Remove.
584 (label_to_alignment): Return align_flags type instead of integer.
585 (label_to_max_skip): Remove.
586 (align_fuzz): Use align_flags type.
587 (compute_alignments): Use align_flags type and use align_flags::max
588 to combine multiple alignments.
589 (grow_label_align): Grow vec instead of C array.
590 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
591 (shorten_branches): Use align_flags type and use align_flags::max
592 to combine multiple alignments.
593 (final_scan_insn_1): Remove usage of secondary alignment that comes
594 from label alignment, but instead use proper secondary alignment
595 which is computed in grow_label_align.
596 * flags.h (struct align_flags_tuple): Move to align.h.
597 (struct align_flags): Likewise.
598 (state_align_loops): Rename to align_loops.
599 (state_align_jumps): Rename to align_jumps.
600 (state_align_labels): Rename to align_labels.
601 (state_align_functions): Rename to align_functions.
602 (align_loops_log): Remove.
603 (align_jumps_log): Remove.
604 (align_labels_log): Remove.
605 (align_functions_log): Remove.
606 (align_loops_max_skip): Remove.
607 (align_jumps_max_skip): Remove.
608 (align_labels_max_skip): Remove.
609 (align_functions_max_skip): Remove.
610 (align_loops_value): Remove.
611 (align_jumps_value): Remove.
612 (align_labels_value): Remove.
613 (align_functions_value): Remove.
614 * output.h (label_to_alignment): Change return type to align_flags.
615 (label_to_max_skip): Remove.
616 * target.def: Remove loop_align_max_skip, label_align_max_skip,
617 jump_align_max_skip macros.
618 * targhooks.h (default_loop_align_max_skip): Remove.
619 (default_label_align_max_skip): Likewise.
620 (default_jump_align_max_skip): Likewise.
621 (default_label_align_after_barrier_max_skip): Remove.
622 * toplev.c (read_log_maxskip): Use ::normalize function.
623 (parse_N_M): Remove not used argument and also call ::normalize.
624 (parse_alignment_opts): Do not pass unused arguments.
625 * varasm.c (assemble_start_function): Use directly align_functions
626 instead of removed macros.
627 * system.h: Do not poison removed macros.
629 2018-07-17 Jakub Jelinek <jakub@redhat.com>
632 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
633 and cond temporaries don't have reference type if iterator has
634 pointer type. For init use &for_pre_body instead of pre_p if
635 for_pre_body is non-empty.
637 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
639 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
640 double-double modes to SFmode directly directly.
641 (trunc<mode>sf2_fprs): Delete.
643 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
645 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
646 for conversions between IFmode and the decimal floating point modes.
647 (init_float128_ieee): Use the correct names for conversions between
648 KFmode and the decimal floating point modes.
650 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
652 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
653 for the conversions between TDmode and IFmode.
654 (init_float128_ieee): Use more correct names for the conversions
655 between TDmode and KFmode.
657 2018-07-16 Jakub Jelinek <jakub@redhat.com>
659 PR tree-optimization/86526
660 * builtins.c (expand_builtin_memcmp): Formatting fixes.
661 (inline_expand_builtin_string_cmp): Likewise.
662 (inline_string_cmp): Likewise. Use c_readstr instead of
663 builtin_memcpy_read_str. Add unit_mode temporary.
665 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
668 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
669 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
671 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
673 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
674 Alphabetize prototypes of built-in functions, separating out
675 built-in functions that are listed in this section but should be
678 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
681 * expmed.c (emit_store_flag): Do not emit setcc followed by a
682 conditional move when trapping comparison was split to a
683 non-trapping one (and vice versa).
685 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
687 * config/s390/s390.c (s390_function_profiler): Generate nops
688 instead of profiler call sequences.
689 * config/s390/s390.opt: Add the new option.
691 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
693 * config/s390/s390.c (s390_function_profiler): Generate
694 __mcount_loc section.
695 * config/s390/s390.opt: Add the new option.
697 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
699 * common.opt: Add the new warning.
700 * config/s390/s390.c (s390_function_profiler): Emit "brasl
701 %r0,__fentry__" when -mfentry is specified.
702 (s390_option_override_internal): Disallow -mfentry for 31-bit
704 * config/s390/s390.opt: Add the new option.
706 2018-07-16 Richard Biener <rguenther@suse.de>
709 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
710 for function-local FUNCTION_DECL and RESULT_DECL immediately.
712 2018-07-16 Martin Liska <mliska@suse.cz>
715 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
718 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
720 * config/arc/arcHS.md: Update ARCHS scheduling rules.
722 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
724 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
726 * config/arc/arc-cpus.def (hs4x): New cpu.
728 * config/arc/arc-tables.opt: Regenerate.
729 * config/arc/arc.c (arc_sched_issue_rate): New function.
730 (TARGET_SCHED_ISSUE_RATE): Define.
731 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
732 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
734 (attr tune): Add ARCHS4x tune values.
735 (attr tune_dspmpy): Define.
736 (*tst): Correct instruction type.
737 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
738 * config/arc/arcHS4x.md: New file.
739 * config/arc/fpu.md: Update instruction type attributes.
740 * config/arc/t-multilib: Regenerate.
742 2018-07-16 Tom de Vries <tdevries@suse.de>
745 * var-tracking.c (vt_initialize): Fix pre_dec handling.
747 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
749 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
752 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
754 PR tree-optimization/86514
755 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
756 conversion to a boolean type from a type with greater precision.
758 2018-07-16 Tom de Vries <tdevries@suse.de>
760 * var-tracking.c (vt_initialize): Print adjusted insn slim if
761 dump_flags request TDF_SLIM.
763 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
765 * fold-const.c (int_const_binop_1): Abstract...
766 (wide_int_binop): ...wide int code here.
767 (poly_int_binop): ...poly int code here.
768 Abstract the rest of int_const_binop_1 into int_const_binop.
769 * fold-const.h (wide_int_binop): New.
770 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
771 Remove useless PLUS/MINUS_EXPR case.
772 (zero_nonzero_bits_from_vr): Move wide int code...
773 (zero_nonzero_bits_from_bounds): ...here.
774 (extract_range_from_binary_expr_1): Move mask optimization code...
775 (range_easy_mask_min_max): ...here.
776 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
777 (range_easy_mask_min_max): New.
779 2018-07-15 Jeff Law <law@redhat.com>
782 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
785 2018-07-14 Jim Wilson <jimw@sifive.com>
787 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
789 2018-07-14 Paul Koning <ni1d@arrl.net>
791 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
793 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
795 * lto-streamer-out.c (copy_function_or_variable): Dump info about
798 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
799 Steve Munroe <munroesj52@gmail.com>
801 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
802 (_mm_andnot_si128): Likewise.
803 (_mm_or_si128): Likewise.
804 (_mm_xor_si128): Likewise.
806 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
809 * builtins.c (expand_builtin_memcmp): Inline the calls first
810 when result_eq is false.
811 (expand_builtin_strcmp): Inline the calls first.
812 (expand_builtin_strncmp): Likewise.
813 (inline_string_cmp): New routine. Expand a string compare
814 call by using a sequence of char comparison.
815 (inline_expand_builtin_string_cmp): New routine. Inline expansion
816 a call to str(n)cmp/memcmp.
817 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
819 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
821 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
823 * config/arm/driver-arm.c: Include arm-native.h.
824 (host_detect_local_cpu): Use auto-generated data tables.
825 (vendors, arm_cpu_table): Delete. Move part information to ...
826 * config/arm/arm-cpus.in: ... here.
827 * config/arm/parsecpu.awk (gen_native): New function.
828 (vendor, part): New CPU fields.
829 (END): Add support for building the native CPU detection tables.
830 * config/arm/t-arm (arm-native.h): Add build rule.
831 (driver-arm.o): Add dependency on arm-native.h.
833 2018-07-13 Richard Biener <rguenther@suse.de>
836 * match.pd (addr1 - addr2): Allow either of the operand to
839 2018-07-13 Tom de Vries <tdevries@suse.de>
841 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
844 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
846 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
847 arrays instead of numbered variables.
849 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
851 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
852 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
854 2018-07-13 Richard Biener <rguenther@suse.de>
857 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
858 instead of get_context_die.
860 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
861 Richard Biener <rguenther@suse.de>
864 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
865 that the loop latch destination where phi is defined.
867 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
869 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
870 (riscv_expand_epilogue): Add assertion to check interrupt mode.
871 (riscv_set_current_function): Extract getting interrupt type to new
873 (riscv_get_interrupt_type): New function.
874 (riscv_merge_decl_attributes): New function, checking interrupt type is
876 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
878 2018-07-12 Paul Koning <ni1d@arrl.net>
880 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
883 2018-07-12 Paul Koning <ni1d@arrl.net>
885 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
886 zero reference, add doloop_end instead.
887 * doc/md.texi (decrement_and_branch_until_zero): Remove.
888 (Looping patterns): Remove decrement_and_branch_until_zero. Add
889 detail for doloop_end.
891 2018-07-12 Martin Sebor <msebor@redhat.com>
894 * attribs.c (decl_attributes): Reject conflicting attributes before
895 calling attribute handlers.
897 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
899 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
901 (gcc::dump_manager::get_dump_file_name): likewise.
902 (dump_begin): Likewise.
903 * dumpfile.h (dump_begin): Update prototype.
904 (gcc::dump_manager::get_dump_file_name,
905 gcc::dump_manager::get_dump_file_name): Update prototype.
907 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
909 * internal-fn.h (vectorizable_internal_fn_p): New function.
910 * tree-vect-slp.c (compatible_calls_p): Likewise.
911 (vect_build_slp_tree_1): Remove nops argument. Handle calls
912 to internal functions.
913 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
915 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
917 * fold-const.h (inverse_conditions_p): Declare.
918 * fold-const.c (inverse_conditions_p): New function.
919 * match.pd: Use inverse_conditions_p. Add folds of view_converts
920 that test the inverse condition of a conditional internal function.
921 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
922 * internal-fn.c (internal_fn_mask_index): Handle conditional
924 (vectorized_internal_fn_supported_p): New function.
925 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
926 (any_pred_load_store): Replace with...
927 (need_to_predicate): ...this new variable.
928 (redundant_ssa_names): New variable.
929 (ifcvt_can_use_mask_load_store): Move initial checks to...
930 (ifcvt_can_predicate): ...this new function. Handle tree codes
931 for which a conditional internal function exists.
932 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
933 instead of ifcvt_can_use_mask_load_store. Update after variable
935 (predicate_load_or_store): New function, split out from
936 predicate_mem_writes.
937 (check_redundant_cond_expr): New function.
938 (value_available_p): Likewise.
939 (predicate_rhs_code): Likewise.
940 (predicate_mem_writes): Rename to...
941 (predicate_statements): ...this. Use predicate_load_or_store
942 and predicate_rhs_code.
943 (combine_blocks, tree_if_conversion): Update after above name changes.
944 (ifcvt_local_dce): Handle redundant_ssa_names.
945 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
946 general conditional functions.
947 * tree-vect-stmts.c (vectorizable_call): Likewise.
949 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
950 Alan Hayward <alan.hayward@arm.com>
951 David Sherwood <david.sherwood@arm.com>
953 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
954 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
955 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
956 plus and minus and convert them into IFN_COND_FMA-based sequences.
957 (convert_mult_to_fma): Handle conditional plus and minus.
959 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
961 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
962 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
963 (cond_fnms_optab): New optabs.
964 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
966 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
967 * internal-fn.h (get_conditional_internal_fn): Declare.
968 (get_unconditional_internal_fn): Likewise.
969 * internal-fn.c (cond_ternary_direct): New macro.
970 (expand_cond_ternary_optab_fn): Likewise.
971 (direct_cond_ternary_optab_supported_p): Likewise.
972 (FOR_EACH_COND_FN_PAIR): Likewise.
973 (get_conditional_internal_fn): New function.
974 (get_unconditional_internal_fn): Likewise.
975 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
976 (gimple_match_op::gimple_match_op): Add a new overload for 5
978 (gimple_match_op::set_op): Likewise.
979 (gimple_resimplify5): Declare.
980 * genmatch.c (decision_tree::gen): Generate simplifications for
982 * gimple-match-head.c (gimple_simplify): Define an overload for
983 5 operands. Handle calls with 5 arguments in the top-level overload.
984 (convert_conditional_op): Handle conversions from unconditional
985 internal functions to conditional ones.
986 (gimple_resimplify5): New function.
987 (build_call_internal): Pass a fifth operand.
988 (maybe_push_res_to_seq): Likewise.
989 (try_conditional_simplification): Try converting conditional
990 internal functions to unconditional internal functions.
991 Handle 3-operand unconditional forms.
992 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
993 Define ternary equivalents of the current rules for binary conditional
995 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
997 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
998 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
999 (optab): Handle them.
1000 (SVE_COND_FP_TERNARY): New int iterator.
1001 (sve_fmla_op, sve_fmad_op): New int attributes.
1002 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
1003 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
1004 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
1006 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1008 * target.def (preferred_else_value): New target hook.
1009 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
1010 * doc/tm.texi: Regenerate.
1011 * targhooks.h (default_preferred_else_value): Declare.
1012 * targhooks.c (default_preferred_else_value): New function.
1013 * internal-fn.h (conditional_internal_fn_code): Declare.
1014 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
1015 (get_conditional_internal_fn): Use it.
1016 (conditional_internal_fn_code): New function.
1017 * gimple-match.h (gimple_match_cond): New struct.
1018 (gimple_match_op): Add a cond member function.
1019 (gimple_match_op::gimple_match_op): Update all forms to take a
1021 * genmatch.c (expr::gen_transform): Use the same condition as res_op
1022 for the suboperation, but don't specify a particular else_value.
1023 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
1024 (visit_nary_op, visit_reference_op_load): Pass
1025 gimple_match_cond::UNCOND to the gimple_match_op constructor.
1026 * gimple-match-head.c: Include tree-eh.h
1027 (convert_conditional_op): New function.
1028 (maybe_resimplify_conditional_op): Likewise.
1029 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
1030 (gimple_resimplify2): Likewise.
1031 (gimple_resimplify3): Likewise.
1032 (gimple_resimplify4): Likewise.
1033 (maybe_push_res_to_seq): Return null for conditional operations.
1034 (try_conditional_simplification): New function.
1035 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
1037 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
1039 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
1041 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
1043 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
1045 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1047 (hash_tree): Do not hash DECL_FCONTEXT
1048 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
1049 Do not stream DECL_FCONTEXT.
1050 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
1051 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
1053 2018-07-12 Richard Biener <rguenther@suse.de>
1056 * dwarf2out.c (gen_block_die): Only output blocks when they have
1057 at least one !DECL_IGNORED_P variable.
1059 2018-07-12 Richard Biener <rguenther@suse.de>
1062 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
1063 Remove -mieee-fp handling.
1065 2018-07-12 Richard Biener <rguenther@suse.de>
1067 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
1068 left-over from last patch.
1070 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1072 PR tree-optimization/86492
1073 * gimple-ssa-store-merging.c
1074 (imm_store_chain_info::coalesce_immediate_stores): Call
1075 check_no_overlap even for the merge_overlapping case. Formatting fix.
1077 2018-07-12 Richard Biener <rguenther@suse.de>
1080 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
1081 move possibly trapping operations into the conditional.
1083 2018-07-12 Richard Biener <rguenther@suse.de>
1085 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
1086 (vn_lookup_simplify_result): Remove recursion limit applied
1088 (vn_nary_build_or_lookup_1): Adjust.
1089 (try_to_simplify): Likewise.
1090 * gimple-match-head.c (gimple_resimplify1): Instead apply one
1092 (gimple_resimplify2): Likewise.
1093 (gimple_resimplify3): Likewise.
1094 (gimple_resimplify4): Likewise.
1096 2018-07-11 Jakub Jelinek <jakub@redhat.com>
1098 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
1099 Use __mmask64 type instead of __mmask8 for __M argument.
1100 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
1101 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
1103 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
1104 __mmask16 for __M argument.
1105 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
1106 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
1107 to __mmask16 instead of __mmask8.
1108 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
1109 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
1110 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
1111 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
1112 instead of __mmask16 for __U argument.
1113 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
1114 __mmask16 instead of __mmask8 for __U argument.
1115 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
1117 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
1119 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
1121 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
1123 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
1125 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
1127 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
1129 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
1131 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
1133 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
1135 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
1136 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
1137 return type as well as __M argument type and all casts from __mmask8
1139 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
1140 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
1141 return type as well as __M argument type and all casts from __mmask8
1143 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
1144 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
1145 return type as well as __M argument type and all casts from __mmask8
1147 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
1148 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
1149 return type as well as __M argument type and all casts from __mmask8
1151 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
1152 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
1155 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
1157 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
1158 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
1161 2018-07-11 Paul Koning <ni1d@arrl.net>
1163 * doc/md.texi (define_subst): Document how multiple occurrences of
1164 the same argument in the replacement pattern are handled.
1166 2018-07-11 Paul Koning <ni1d@arrl.net>
1168 * doc/extend.texi (Common Variable Attributes): Move "mode" into
1170 (Common Type Attributes): Add "mode" attribute.
1172 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
1174 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
1175 stream DECL_ORIGINAL_TYPE.
1176 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
1177 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
1178 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
1179 Do not walk original type.
1180 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
1182 (write_ts_decl_non_common_tree_pointers): Do not stream
1184 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
1185 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
1187 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1189 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
1190 thread twice from the same starting edge.
1192 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1194 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
1195 * gimple.c (gimple_call_nonnull_result_p): ...here...
1196 (gimple_call_nonnull_arg): ...and here.
1197 * gimple.h (gimple_call_nonnull_result_p): New.
1198 (gimple_call_nonnull_arg): New.
1200 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
1202 * config/arm/arm-cpus.in: Move information from fpu field of each
1203 cpu definition to the isa field.
1204 * config/arm/parsecpu.awk (fpu): Delete match rule.
1205 (gen_comm_data): Don't add bits from the CPU's FPU entry.
1207 2018-07-11 Richard Biener <rguenther@suse.de>
1210 * dwarf2out.c (init_sections_and_labels): Use
1211 output_asm_line_debug_info consistently.
1212 (dwarf2out_early_finish): Likewise.
1213 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
1216 2018-07-11 Richard Biener <rguenther@suse.de>
1218 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
1219 Rework father_bb setting in a way to avoid propagating constants
1220 multiple times on a loop body.
1222 2018-07-10 Mark Wielaard <mark@klomp.org>
1225 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
1227 2018-07-10 Richard Biener <rguenther@suse.de>
1229 * hash-map.h (hash_map::iterator::operator*): Return
1230 references to key and value.
1232 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1235 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
1236 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
1237 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
1238 (gimplify_omp_for): For composite loops, move outer
1239 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
1240 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
1241 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
1242 TREE_LIST for both the original class iterator and the "last" helper
1243 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
1244 loop, remember has_decl_expr from outer composite loops for the
1245 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
1247 2018-07-09 Martin Sebor <msebor@redhat.com>
1251 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
1252 accessing implicitly initialized array elements.
1253 * expr.c (string_constant): Handle string initializers of
1254 character arrays within aggregates.
1255 * gimple-fold.c (fold_array_ctor_reference): Add argument.
1256 Store element offset. As a special case, handle zero size.
1257 (fold_nonarray_ctor_reference): Same.
1258 (fold_ctor_reference): Add argument. Store subobject offset.
1259 * gimple-fold.h (fold_ctor_reference): Add argument.
1261 2018-07-09 Paul Koning <ni1d@arrl.net>
1263 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
1264 (pdp11_insn_cost): New function.
1265 (pdp11_md_asm_adjust): New function.
1266 (TARGET_INVALID_WITHIN_DOLOOP): Define.
1267 (pdp11_rtx_costs): Update to match machine better.
1268 (output_addr_const_pdp11): Correct format mismatch warnings.
1269 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
1270 * config/pdp11/pdp11.md: General change to add base_cost and/or
1271 length attributes for use by new pdp11_insn_cost function.
1272 (MIN_BRANCH): Correct definition.
1274 (doloop_end): Use standard pattern name for looping pattern.
1275 (doloop_end_nocc): New.
1276 (movsf): Add another constraint alternative.
1277 (zero_extendqihi2): Add constraint alternatives for not in place
1279 (zero_extendhisi2): Remove.
1280 (shift patterns): Add CC handling variants.
1284 (define_peephole2): New peephole to recognize mov that sets CC for
1287 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1289 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
1290 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
1293 2018-07-09 Jakub Jelinek <jakub@redhat.com>
1296 * real.c (real_nextafter): Return true if result is denormal.
1298 2018-07-09 Martin Liska <mliska@suse.cz>
1300 * common.opt: Add back wrongly removed attribute.
1302 2018-07-09 Richard Biener <rguenther@suse.de>
1305 * dwarf2out.c (gen_block_die): For an early generated DIE
1306 always output high/low PC attributes.
1308 2018-07-09 Tom de Vries <tdevries@suse.de>
1310 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
1311 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
1312 onto VAR_DECL with abstract origin.
1314 2018-07-07 Jim Wilson <jimw@sifive.com>
1316 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
1318 2018-07-07 Tom de Vries <tdevries@suse.de>
1320 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
1322 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
1324 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
1326 (combine_bound): Use wide-int overflow calculation instead of
1328 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
1330 * fold-const.c (int_const_binop_2): Same.
1331 (extract_muldiv_1): Same.
1332 (fold_div_compare): Same.
1333 (fold_abs_const): Same.
1335 * poly-int.h (add): Same.
1339 * predict.c (predict_iv_comparison): Same.
1340 * profile-count.c (slow_safe_scale_64bit): Same.
1341 * simplify-rtx.c (simplify_const_binary_operation): Same.
1342 * tree-chrec.c (tree_fold_binomial): Same.
1343 * tree-data-ref.c (split_constant_offset_1): Same.
1344 * tree-if-conv.c (idx_within_array_bound): Same.
1345 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
1346 * tree-ssa-phiopt.c (minmax_replacement): Same.
1347 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
1348 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
1349 * vr-values.c (vr_values::adjust_range_with_scev): Same.
1350 * wide-int.cc (wi::add_large): Same.
1351 (wi::mul_internal): Same.
1352 (wi::sub_large): Same.
1353 (wi::divmod_internal): Same.
1354 * wide-int.h: Change overflow type to overflow_type for neg, add,
1355 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
1356 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
1357 mul_internal, divmod_internal.
1358 (overflow_type): New enum.
1359 (accumulate_overflow): New.
1361 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
1363 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
1364 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
1366 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1368 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
1369 argument is checked for zero before entering loop, avoid checking again.
1371 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
1373 * gimplify.h (generic_expr_could_trap_p): Set as global function.
1374 * gimplify.h (generic_expr_could_trap_p): Likwise.
1375 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
1377 2018-07-06 Jakub Jelinek <jakub@redhat.com>
1379 PR tree-optimization/86401
1380 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
1381 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
1382 (fold_bit_and_mask): ... here. New helper function for match.pd.
1383 * fold-const.h (fold_bit_and_mask): Declare.
1384 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
1386 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
1389 * target.def (translate_mode_attribute): New hook.
1390 * targhooks.h (default_translate_mode_attribute): Declare.
1391 * targhooks.c (default_translate_mode_attribute): New function.
1392 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
1393 * doc/tm.texi: Regenerate.
1394 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
1395 (rs6000_translate_mode_attribute): New function.
1397 2018-07-06 Paul Koning <ni1d@arrl.net>
1399 * doc/md.texi (define_split): Document DONE and FAIL.
1400 (define_peephole2): Ditto.
1402 2018-07-05 Jeff Law <law@redhat.com>
1404 PR tree-optimization/86010
1405 * tree-ssa-dse.c (compute_trims): More aggressively trim at
1406 both the head and tail of mem* and str* calls.
1408 2018-07-05 Jim Wilson <jimw@sifive.com>
1410 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
1412 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
1414 * config/aarch64/aarch64-simd.md: correct flags text for
1415 MIN_EXPR replacement.
1417 2018-07-05 James Clarke <jrtc27@jrtc27.com>
1419 * configure: Regenerated.
1421 2018-07-05 Carl Love <cel@us.ibm.com>
1423 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
1424 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
1425 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
1426 VSX_BUILTIN_DOUBLEL_V4SF.
1428 2018-07-05 Martin Sebor <msebor@redhat.com>
1431 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
1432 than its domain to compute its the upper bound of a char array.
1434 2018-07-05 Nathan Sidwell <nathan@acm.org>
1436 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
1437 * doc/cpp.texi: Update comment.
1438 * doc/tm.texi: Rebuilt.
1439 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
1440 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
1441 * doc/extend.texi (Backwards Compatibility): Clarify it is system
1442 headers affected by extern "C".
1443 * system.h: Poison NO_IMPLICIT_EXTERN_C.
1444 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
1445 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
1446 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
1447 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
1448 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
1449 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
1450 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
1451 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
1452 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
1453 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
1454 config/sparc/sp64-elf.h, config/spu/spu.h,
1455 config/stormy16/stormy16.h, config/v850/v850.h,
1456 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
1457 define NO_IMPLICIT_EXTERN_C.
1458 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
1460 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1463 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
1464 instead of GET_MODE_SIZE when comparing Units.
1466 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1469 * rtlanal.c (set_noop_p): Constrain on mode change,
1470 include hard-reg-set.h
1472 2018-07-05 Tamar Christina <tamar.christina@arm.com>
1474 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
1476 2018-07-05 Jakub Jelinek <jakub@redhat.com>
1479 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
1482 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1484 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1486 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
1489 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
1491 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
1493 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
1496 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
1498 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
1500 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
1501 neg_*_op* variables.
1503 2018-07-04 Martin Liska <mliska@suse.cz>
1505 * tree-switch-conversion.c: Define
1506 max_ratio_for_speed and max_ratio_for_size constants.
1508 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
1509 Martin Liska <mliska@suse.cz>
1514 * common.opt: Rename align options with 'str_' prefix.
1515 * common/config/i386/i386-common.c (set_malign_value): New
1517 (ix86_handle_option): Use it to set -falign-* options/
1518 * config/aarch64/aarch64-protos.h (struct tune_params): Change
1519 type from int to string.
1520 * config/aarch64/aarch64.c: Update default values from int
1522 * config/alpha/alpha.c (alpha_override_options_after_change):
1524 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
1525 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1526 max skip conditionally.
1527 * config/i386/freebsd.h (SUBALIGN_LOG): New.
1528 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1529 max skip conditionally.
1530 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1531 max skip conditionally.
1532 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
1533 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1534 max skip conditionally.
1535 * config/i386/i386.c (struct ptt): Change type from int to
1537 (ix86_default_align): Set default values.
1538 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
1539 max skip conditionally.
1540 * config/i386/iamcu.h (SUBALIGN_LOG): New.
1541 (ASM_OUTPUT_MAX_SKIP_ALIGN):
1542 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
1543 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1544 max skip conditionally.
1545 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
1546 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
1547 * config/i386/x86-64.h (SUBALIGN_LOG): New.
1548 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
1549 max skip conditionally.
1550 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1551 * config/ia64/ia64.c (ia64_option_override): Set default values
1552 for alignment options.
1553 * config/m68k/m68k.c: Handle new str_align_* options.
1554 * config/mips/mips.c (mips_set_compression_mode): Change
1556 (mips_option_override): Set default values for options.
1557 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1559 * config/rs6000/rs6000.c (rs6000_option_override_internal):
1561 * config/rx/rx.c (rx_option_override): Likewise.
1562 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
1563 (LABEL_ALIGN): Use align_labels_log.
1564 (LOOP_ALIGN): Use align_loops_align.
1565 * config/s390/s390.c (s390_asm_output_function_label): Use new
1567 * config/sh/sh.c (sh_override_options_after_change):
1568 Change type of constants.
1569 * config/spu/spu.c (spu_sched_init): Likewise.
1570 * config/sparc/sparc.c (sparc_option_override): Set default
1572 * config/visium/visium.c (visium_option_override): Likewise.
1573 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
1574 emit p2align format with last argument if it's not needed.
1575 * doc/invoke.texi: Document extended format of -falign-*.
1576 * final.c: Use align_labels alignment.
1577 * flags.h (struct target_flag_state): Change type to use
1579 (struct align_flags_tuple): New.
1580 (struct align_flags): Likewise.
1581 (align_loops_log): Redefine macro to use new types.
1582 (align_loops_max_skip): Redefine macro to use new types.
1583 (align_jumps_log): Redefine macro to use new types.
1584 (align_jumps_max_skip): Redefine macro to use new types.
1585 (align_labels_log): Redefine macro to use new types.
1586 (align_labels_max_skip): Redefine macro to use new types.
1587 (align_functions_log): Redefine macro to use new types.
1588 (align_loops): Redefine macro to use new types.
1589 (align_jumps): Redefine macro to use new types.
1590 (align_labels): Redefine macro to use new types.
1591 (align_functions): Redefine macro to use new types.
1592 (align_functions_max_skip): Redefine macro to use new types.
1593 (align_loops_value): New macro.
1594 (align_jumps_value): New macro.
1595 (align_labels_value): New macro.
1596 (align_functions_value): New macro.
1597 * function.c (invoke_set_current_function_hook): Propagate
1598 alignment values from flags to global variables default in
1600 * ipa-icf.c (sem_function::equals_wpa): Use
1601 cl_optimization_option_eq instead of memcmp.
1602 * lto-streamer.h (cl_optimization_stream_out): Support streaming
1604 (cl_optimization_stream_in): Likewise.
1605 * optc-save-gen.awk: Support strings in cl_optimization.
1606 * opth-gen.awk: Likewise.
1607 * opts.c (finish_options): Remove error checking of invalid
1609 (MAX_CODE_ALIGN): Remove.
1610 (MAX_CODE_ALIGN_VALUE): Likewise.
1611 (parse_and_check_align_values): New function.
1612 (check_alignment_argument): Likewise.
1613 (common_handle_option): Use check_alignment_argument.
1614 * opts.h (parse_and_check_align_values): Declare.
1615 * toplev.c (init_alignments): Remove.
1616 (read_log_maxskip): New.
1617 (parse_N_M): Likewise.
1618 (parse_alignment_opts): Likewise.
1619 (backend_init_target): Remove usage of init_alignments.
1620 * toplev.h (parse_alignment_opts): Declare.
1621 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
1623 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
1624 * tree.c (cl_option_hasher::equal): New.
1625 * varasm.c: Use new global macros.
1627 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
1629 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
1630 Use a simpler align directive also if MAXSKIP = ALIGN-1.
1631 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1632 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1633 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1634 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1635 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
1636 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
1637 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
1638 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1639 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1640 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1641 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1643 2018-07-04 Martin Liska <mliska@suse.cz>
1644 Jonathan Wakely <jwakely@redhat.com>
1646 * coverage.c: Use correct type.
1647 * doc/invoke.texi: Language correction.
1649 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
1652 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
1653 ENDBRANCH for non-tail call which may return via indirect branch.
1654 * doc/extend.texi: Document indirect_return attribute.
1656 2018-07-03 Martin Sebor <msebor@redhat.com>
1658 PR tree-optimization/86274
1659 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
1661 (format_floating): Correct handling of infinities and NaNs.
1663 2018-07-03 Martin Sebor <msebor@redhat.com>
1665 * print-tree.c (print_real_cst): New function.
1666 (print_node_brief): Call it.
1667 (print_node): Ditto.
1669 2018-07-03 Jeff Law <law@redhat.com>
1671 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
1672 into a single pattern.
1674 * config/h8300/h8300.md (ors code_iterator): New.
1675 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
1676 a single pattern and single splitter.
1677 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
1678 (iorqi3_1, xorqi3_1): Likewise.
1679 (iorqi3, xorqi3 expanders): Similarly.
1681 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
1682 (movmd_internal) into a single pattern using the P mode iterator.
1683 (movmd splitters): Similarly.
1684 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
1685 (movsd splitters): Similarly.
1687 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
1688 ADDB, ADDW and ADDL into a single ADD attribute which selects the
1689 right table based on the size of the operand.
1690 * config/h8300/h8300.md (length_table): Corresponding changes. All
1691 references to "addb", "addw" and "addl" changed to "add".
1692 (btst patterns): Merge two variants into a single pattern.
1693 (tstqi, tsthi): Likewise.
1694 (addhi3_incdec, addsi3_incdec): Likewise.
1695 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
1696 (mulhi3, mulsi3): Likewise.
1697 (udivhi3, udivsi3): Likewise.
1698 (divhi3, divsi3): Likewise.
1699 (andorqi3, andorhi3, andorsi3): Likewise.
1701 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
1704 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
1705 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
1707 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1709 PR tree-optimization/85694
1710 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
1711 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
1713 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
1714 (<u>avg<mode>3_ceil): New patterns.
1716 2018-07-03 David Malcolm <dmalcolm@redhat.com>
1718 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
1719 scan-tree-dump directive.
1720 * gcc.dg/vect/slp-perm-2.c: Likewise.
1721 * gcc.dg/vect/slp-perm-3.c: Likewise.
1722 * gcc.dg/vect/slp-perm-5.c: Likewise.
1723 * gcc.dg/vect/slp-perm-6.c: Likewise.
1724 * gcc.dg/vect/slp-perm-7.c: Likewise.
1725 * gcc.dg/vect/slp-perm-8.c: Likewise.
1727 2018-07-03 Marek Polacek <polacek@redhat.com>
1730 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
1732 2018-07-03 Richard Biener <rguenther@suse.de>
1735 * tree-ssa-structalias.c (find_func_clobbers): Properly
1736 handle indirect calls.
1738 2018-07-03 Jeff Law <law@redhat.com>
1740 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
1741 (shifts): New code iterator.
1742 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
1743 expander. Fix HImode handling on H8/SX.
1744 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
1745 (subqi3, subhi3, subsi3 expanders): Likewise.
1746 (andqi3, andhi3, andsi3 expanders): Likewise.
1747 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
1748 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
1749 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
1750 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
1751 (zero_extendqihi2, zero_extendqisi2): Likewise.
1752 (extendqihi2, extendqisi2): Likewise.
1753 (rotlqi3, rotlhi3, rotlsi3): Likewise.
1754 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
1755 (rotlqi3_1, rotlhi3_1): Likewise.
1756 (logicalhi3_sn, logicalsi3_sn): Likewise.
1757 (logicalhi3, logicalsi3): Likewise.
1759 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1761 * tree-vect-patterns.c (vect_recog_rotate_pattern)
1762 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1763 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
1764 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
1765 type to append_pattern_def_seq instead of creating a stmt_vec_info
1767 (build_mask_conversion): Likewise. Remove vinfo argument.
1768 (vect_add_conversion_to_patterm): Likewise, renaming to...
1769 (vect_add_conversion_to_pattern): ...this.
1770 (vect_recog_mask_conversion_pattern): Update call to
1771 build_mask_conversion. Pass the vector type to
1772 append_pattern_def_seq here too.
1773 (vect_recog_gather_scatter_pattern): Update call to
1774 vect_add_conversion_to_pattern.
1776 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1778 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
1779 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1780 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
1781 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
1782 STMT_VINFO_PATTERN_DEF_SEQ to null here.
1783 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
1784 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
1785 append_pattern_def_seq instead of new_pattern_def_seq.
1786 (vect_recog_divmod_pattern): Do both of the above.
1787 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
1790 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1792 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
1793 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
1794 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
1795 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
1796 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
1797 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1798 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
1799 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1800 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1801 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
1802 parameter with a single stmt_vec_info.
1803 (vect_recog_func_ptr): Likewise.
1804 (vect_recog_gather_scatter_pattern): Likewise, folding in...
1805 (vect_try_gather_scatter_pattern): ...this.
1806 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
1807 the stmt_vec_info of the statement to be matched. Don't clear
1808 STMT_VINFO_RELATED_STMT.
1809 (vect_pattern_recog): Update call accordingly.
1811 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1813 PR tree-optimization/85694
1814 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
1815 (uavgM3_ceil): Document new optabs.
1816 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
1817 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
1819 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
1820 (savg_ceil_optab): New optabs.
1821 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
1822 (vect_vect_recog_func_ptrs): Add it.
1823 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
1824 constant directly from the associated lhs.
1826 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1828 * tree-vect-patterns.c (vect_split_statement): New function.
1829 (vect_convert_input): Use it to try to split an existing cast.
1831 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1833 * poly-int.h (print_hex): New function.
1834 * dumpfile.h (dump_dec, dump_hex): Declare.
1835 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
1836 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
1837 min_input_precision, operation_precision and operation_sign.
1838 * tree-vect-patterns.c (vect_get_range_info): New function.
1839 (vect_same_loop_or_bb_p, vect_single_imm_use)
1840 (vect_operation_fits_smaller_type): Delete.
1841 (vect_look_through_possible_promotion): Add an optional
1842 single_use_p parameter.
1843 (vect_recog_over_widening_pattern): Rewrite to use new
1844 stmt_vec_info infomration. Handle one operation at a time.
1845 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
1846 (vect_truncatable_operation_p, vect_set_operation_type)
1847 (vect_set_min_input_precision): New functions.
1848 (vect_determine_min_output_precision_1): Likewise.
1849 (vect_determine_min_output_precision): Likewise.
1850 (vect_determine_precisions_from_range): Likewise.
1851 (vect_determine_precisions_from_users): Likewise.
1852 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
1853 (vect_vect_recog_func_ptrs): Put over_widening first.
1855 (vect_pattern_recog): Call vect_determine_precisions.
1857 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
1859 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
1860 statements that have been replaced by further pattern statements.
1861 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
1863 2018-07-03 Richard Biener <rguenther@suse.de>
1865 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
1866 always set *dt. Dump vectype in vectype overload.
1867 * dumpfile.h (dump_gimple_expr): New function.
1868 (dump_gimple_expr_loc): Likewise.
1869 * dumpfile.c (dump_gimple_expr): New function.
1870 (dump_gimple_expr_loc): Likewise.
1872 2018-07-02 Jeff Law <law@redhat.com>
1874 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
1875 the H8/300, H8/300H and H8/S variants into a single pattern.
1876 (movhi_h8300, movqi_h8300hs): Similarly.
1877 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
1878 (QHI mode iterator): New.
1880 * config/h8300/h8300.md: Remove trailing whitespace.
1882 2018-07-02 Jim Wilson <jimw@sifive.com>
1884 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
1885 instead of emit_insn for interrupt returns.
1886 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
1887 (riscv_sret, riscv_uret): Likewise.
1889 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1891 * pretty-print.c (selftest::test_pp_format): Move save and restore
1892 of quotes to class auto_fix_quotes, and add an instance.
1893 * selftest.c: Include "intl.h".
1894 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
1895 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
1896 * selftest.h (selftest::auto_fix_quotes): New class.
1898 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
1900 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
1901 (aarch64_sve_prepare_conditional_op): Remove.
1902 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
1903 Allow aarch64_simd_reg_or_zero as select operand; remove
1904 the aarch64_sve_prepare_conditional_op call.
1905 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
1906 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1907 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
1908 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
1909 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
1910 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
1911 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
1912 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
1913 and a splitters to match all of the *_any patterns.
1914 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
1916 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
1917 (SVE_COND_FP_BINARY_REV): Remove.
1918 (sve_int_op_rev, sve_fp_op_rev): New.
1919 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
1920 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
1921 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
1922 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
1923 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
1924 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
1925 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
1926 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
1927 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
1929 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
1930 Remove match_dup 1 from the inner unspec.
1931 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
1933 * config/aarch64/aarch64.md (movprfx): New attr.
1934 (length): Default movprfx to 8.
1935 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
1936 (*madd<SVE_I>, *msub<SVE_I): Likewise.
1937 (*<su>mul<SVE_I>3_highpart): Likewise.
1938 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
1939 (*v<ASHIFT><SVE_I>3): Likewise.
1940 (*<su><MAXMIN><SVE_I>3): Likewise.
1941 (*<su><MAXMIN><SVE_F>3): Likewise.
1942 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
1943 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
1944 (*div<SVE_F>4): Likewise.
1946 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
1948 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
1951 2018-07-02 Richard Biener <rguenther@suse.de>
1953 PR tree-optimization/86363
1954 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
1955 memset argument refers to a non-variable address.
1957 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
1959 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
1960 {PLUS,MINUS}_EXPR code to...
1961 (adjust_symbolic_bound): ...here,
1962 (combine_bound): ...here,
1963 (set_value_range_with_overflow): ...and here.
1965 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
1967 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
1969 (extract_range_from_abs_expr): ...here.
1971 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
1973 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
1974 -fno-omit-frame-pointer when not optimizing.
1976 2018-07-02 Martin Liska <mliska@suse.cz>
1979 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
1980 (propagate_nothrow): Likewise.
1982 2018-07-02 Martin Liska <mliska@suse.cz>
1985 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
1987 2018-07-02 David Malcolm <dmalcolm@redhat.com>
1989 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
1990 function in r262149, changing "loc" param from source_location to
1991 const dump_location_t &.
1992 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
1993 declaration, as above.
1995 2018-07-01 Paul Koning <ni1d@arrl.net>
1997 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1998 -munit-asm, -mgnu-asm, -mdec-asm.
1999 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
2000 (pdp11_output_labelref): New.
2001 (pdp11_output_def): New.
2002 (pdp11_output_addr_vec_elt): New.
2003 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
2004 %# and %@ format codes.
2005 (pdp11_option_override): New.
2006 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
2007 (pdp11_output_ident): New.
2008 (pdp11_asm_named_section): New.
2009 (pdp11_asm_init_sections): New.
2010 (pdp11_file_start): New.
2011 (pdp11_file_end): New.
2012 (output_ascii): Use .ascii/.asciz for -mdec-asm.
2013 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
2014 %o, like %c but octal.
2015 (pdp11_option_override): New.
2016 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
2018 (DATA_SECTION_ASM_OP): Ditto.
2019 (READONLY_DATA_SECTION_ASM_OP): New.
2020 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
2021 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
2022 (ASM_OUTPUT_LABELREF): Ditto.
2023 (ASM_OUTPUT_DEF): Ditto.
2024 (ASM_OUTPUT_EXTERNAL): New.
2025 (ASM_OUTPUT_SOURCE_FILENAME): New.
2026 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
2027 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
2028 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
2029 %# and %@ format codes.
2030 * config/pdp11/pdp11.opt (mgnu-asm): New.
2031 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
2032 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
2033 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
2035 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
2037 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
2038 dereferencing path[] beyond its length.
2040 (debug_all_paths): New.
2041 (rewire_first_differing_edge): New.
2042 (adjust_paths_after_duplication): New.
2043 (duplicate_thread_path): Call adjust_paths_after_duplication.
2045 (thread_through_all_blocks): Add new argument to
2046 duplicate_thread_path.
2048 2018-06-30 Jim Wilson <jimw@sifive.com>
2050 * config/riscv/predicates.md (p2m1_shift_operand): New.
2051 (high_mask_shift_operand): New.
2052 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
2053 pattern using p2m1_shift_operand.
2054 (lshsi3_zero_extend_3+2): New combiner pattern using
2055 high_mask_shift_operand.
2057 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2059 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
2061 (vect_recog_rotate_pattern): ...here.
2062 (vect_convert_input): Try to insert casts of invariants in the
2064 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
2065 preheader to be empty.
2067 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2069 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
2070 vector type. If given, install it in the new statement's
2072 (vect_element_precision): New function.
2073 (vect_unpromoted_value): New struct.
2074 (vect_unpromoted_value::vect_unpromoted_value): New function.
2075 (vect_unpromoted_value::set_op): Likewise.
2076 (vect_look_through_possible_promotion): Likewise.
2077 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
2078 (vect_widened_op_tree, vect_convert_input): Likewise.
2079 (vect_convert_inputs, vect_convert_output): Likewise.
2080 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
2081 to handle the optional cast of the multiplication result and
2082 vect_widened_op_tree to detect the widened multiplication itself.
2083 Do not require the input and output of promotion casts to have
2084 the same sign, but base the signedness of the operation on the
2085 input rather than the result. If the pattern includes two
2086 promotions, check that those promotions have the same sign.
2087 Do not restrict the MULT_EXPR handling to a double-width result;
2088 handle quadruple-width results and wider. Use vect_convert_inputs
2089 to convert the inputs to the common type.
2090 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
2091 to handle the optional cast of the ABS result. Also allow a sign
2092 change or a sign extension between the ABS and MINUS.
2093 Use vect_widened_op_tree to detect the widened subtraction and use
2094 vect_convert_inputs to convert the inputs to the common type.
2095 (vect_handle_widen_op_by_const): Delete.
2096 (vect_recog_widen_op_pattern): New function.
2097 (vect_recog_widen_mult_pattern): Use it.
2098 (vect_recog_widen_shift_pattern): Likewise.
2099 (vect_recog_widen_sum_pattern): Use
2100 vect_look_through_possible_promotion to handle the promoted
2103 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2105 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
2106 the containing gimple_seq *.
2107 * gimple-iterator.h (gsi_for_stmt): Declare it.
2108 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
2109 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
2110 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2111 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2112 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
2114 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
2116 (vect_mark_pattern_stmts): ...here. Handle cases in which the
2117 statement being replaced is part of an existing pattern
2118 definition sequence, inserting the new pattern statements before
2120 (vect_pattern_recog_1): Don't return a bool. If the statement
2121 is already part of a pattern, instead apply pattern matching
2122 to the pattern definition statements. Don't clear the
2123 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
2124 (vect_pattern_recog): Don't break after the first match;
2125 continue processing the pattern definition statements instead.
2126 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
2128 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2130 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
2131 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2132 (vect_recog_widen_sum_pattern): Use it.
2134 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2136 * tree-vect-loop.c (vectorizable_reduction): Assert that the
2137 phi is not a pattern statement and has not been replaced by
2138 a pattern statement.
2139 * tree-vect-patterns.c (type_conversion_p): Don't check
2140 STMT_VINFO_IN_PATTERN_P.
2141 (vect_recog_vector_vector_shift_pattern): Likewise.
2142 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
2143 the pattern statement rather than the original statement; check
2144 directly for a WIDEN_MULT_EXPR here.
2145 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
2146 vect_is_simple_use to return the pattern statement rather
2147 than the original statement; use is_pattern_stmt_p to check
2148 for such a pattern statement.
2149 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
2150 to return the pattern statement rather than the original statement;
2151 don't do the same transformation here.
2152 (vect_is_simple_use): If the defining statement has been replaced
2153 by a pattern statement, return the pattern statement instead.
2154 Remove the corresponding (local) transformation from the vectype
2157 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2159 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
2160 end and default to null.
2161 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2162 (vectorizable_reduction): Update calls accordingly, dropping the
2163 gimple ** argument if the passed-back statement isn't needed.
2164 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
2165 (vect_recog_rotate_pattern): Likewise.
2166 (vect_recog_mask_conversion_pattern): Likewise.
2167 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2168 (vect_mask_constant_operand_p): Likewise.
2169 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
2170 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
2171 (get_group_load_store_type, get_load_store_type): Likewise.
2172 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
2173 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
2174 (vectorizable_conversion, vectorizable_assignment): Likewise.
2175 (vectorizable_shift, vectorizable_operation): Likewise.
2176 (vectorizable_store, vect_is_simple_cond): Likewise.
2177 (vectorizable_condition, vectorizable_comparison): Likewise.
2178 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
2179 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
2180 and move it to the end. Cope with null def_stmt_outs.
2182 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2184 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
2186 2018-06-29 Jeff Law <law@redhat.com>
2188 * config/v850/v850.c (v850_legitimate_address_p): Handle large
2189 displacements for TARGET_V850E2V3 and newer.
2190 (TARGET_LRA_P): Remove. Defaults to LRA now.
2191 * config/v850/v850.md (sign23byte_load): Remove.
2192 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
2193 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
2195 2018-06-29 Martin Liska <mliska@suse.cz>
2198 * coverage.c (coverage_init): Mangle full path name.
2199 * doc/invoke.texi: Document the change.
2200 * gcov-io.c (mangle_path): New.
2201 * gcov-io.h (mangle_path): Likewise.
2202 * gcov.c (mangle_name): Use mangle_path for path mangling.
2204 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2206 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2207 if starting source register is not even.
2209 2018-06-29 Martin Liska <mliska@suse.cz>
2211 PR tree-optimization/86263
2212 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
2213 Make edge redirection.
2215 2018-06-29 David Malcolm <dmalcolm@redhat.com>
2217 * dumpfile.c (dump_loc): Add indentation based on scope depth.
2218 (dump_scope_depth): New variable.
2219 (get_dump_scope_depth): New function.
2220 (dump_begin_scope): New function.
2221 (dump_end_scope): New function.
2222 * dumpfile.h (get_dump_scope_depth): New declaration.
2223 (dump_begin_scope): New declaration.
2224 (dump_end_scope): New declaration.
2225 (class auto_dump_scope): New class.
2226 (AUTO_DUMP_SCOPE): New macro.
2227 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
2230 2018-06-29 Richard Biener <rguenther@suse.de>
2232 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
2233 compute_all_dependences succeeds.
2234 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
2235 exceed --param loop-max-datarefs-for-datadeps.
2237 2018-06-29 Jakub Jelinek <jakub@redhat.com>
2239 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
2241 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
2244 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
2245 alternative 0 in preferred_for_speed attribute.
2247 2018-06-28 Paul Koning <ni1d@arrl.net>
2249 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
2250 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
2251 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
2252 * config/pdp11/pdp11.md: Correct "length" attribute calculation
2253 for shift insn patterns.
2255 2018-06-28 David Malcolm <dmalcolm@redhat.com>
2257 * cgraph.c (cgraph_node::get_body): Replace assignments to
2258 "dump_file" with calls to set_dump_file.
2259 * dumpfile.c (alt_dump_file): Make static, and group with...
2260 (alt_flags): ...this definition.
2261 (dumps_are_enabled): New variable.
2262 (refresh_dumps_are_enabled): New function.
2263 (set_dump_file): New function.
2264 (set_alt_dump_file): New function.
2265 (gcc::dump_manager::dump_start): Replace assignments to
2266 "dump_file" and "alt_dump_file" with calls to set_dump_file and
2268 (gcc::dump_manager::dump_finish): Likewise.
2269 * dumpfile.h (alt_dump_file): Delete decl.
2270 (dumps_are_enabled): New variable decl.
2271 (set_dump_file): New function decl.
2272 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
2274 * tree-nested.c (lower_nested_functions): Replace assignments to
2275 "dump_file" with calls to set_dump_file.
2277 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2279 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
2280 goto_locus of each outgoing edge of each basic block.
2282 2018-06-28 Richard Biener <rguenther@suse.de>
2284 * dwarf2out.c (decl_scope_table): Remove.
2285 (push_decl_scope): Likewise.
2286 (pop_decl_scope): Likewise.
2287 (gen_type_die_for_member): Do not call push/pop_decl_scope.
2288 (gen_struct_or_union_type_die): Likewise.
2289 (gen_tagged_type_die): Likewise.
2290 (dwarf2out_init): Do not initialize decl_scope_table.
2291 (dwarf2out_c_finalize): Do not free it.
2293 2018-06-28 Richard Biener <rguenther@suse.de>
2295 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
2296 deciding whether to not re-use a DIE.
2298 2018-06-28 Richard Biener <rguenther@suse.de>
2300 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
2301 DW_AT_abstract_origin attribute.
2303 2018-06-28 Martin Liska <mliska@suse.cz>
2305 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2306 Use newly introduced constants.
2307 * tree-switch-conversion.h (struct jump_table_cluster):
2308 Define max_ratio_for_size and max_ratio_for_speed.
2310 2018-06-28 Martin Liska <mliska@suse.cz>
2312 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2313 Add new checking assert to catch invalid state.
2314 (jump_table_cluster::can_be_handled): Handle single case
2316 (jump_table_cluster::is_beneficial): Bail out for such case.
2317 (bit_test_cluster::find_bit_tests):
2318 Add new checking assert to catch invalid state.
2319 (bit_test_cluster::can_be_handled): Handle single case
2321 (bit_test_cluster::is_beneficial): Bail out for such case.
2322 (switch_decision_tree::analyze_switch_statement):
2325 2018-06-28 Martin Liska <mliska@suse.cz>
2327 * common.opt: Introduce -completion option.
2328 * gcc.c (driver_handle_option): Handle it.
2329 (driver::main): Print completions if completion
2331 * opt-suggestions.c (option_proposer::get_completions):
2333 (option_proposer::suggest_completion): Likewise.
2334 (option_proposer::find_param_completions): Likewise.
2335 (verify_autocompletions): Likewise.
2336 (test_completion_valid_options): Likewise.
2337 (test_completion_valid_params): Likewise.
2338 (in_completion_p): Likewise.
2339 (empty_completion_p): Likewise.
2340 (test_completion_partial_match): Likewise.
2341 (test_completion_garbage): Likewise.
2342 (opt_proposer_c_tests): Likewise.
2343 * opt-suggestions.h: Declare new functions.
2344 * opts.c (common_handle_option): Handle OPT__completion_.
2345 * selftest-run-tests.c (selftest::run_tests): Add
2346 opt_proposer_c_tests.
2347 * selftest.c (assert_str_startswith): New.
2348 * selftest.h (assert_str_startswith): Likewise.
2349 (opt_proposer_c_tests): New.
2350 (ASSERT_STR_STARTSWITH): Likewise.
2352 2018-06-28 Martin Liska <mliska@suse.cz>
2354 * Makefile.in: Add opt-suggestions.o.
2355 * gcc-main.c: Include opt-suggestions.h.
2356 * gcc.c (driver::driver): Likewise.
2357 (driver::~driver): Remove m_option_suggestions.
2358 (driver::build_option_suggestions): Moved to option_proposer.
2359 (driver::suggest_option): Likewise.
2360 (driver::handle_unrecognized_options): Use option_proposer.
2361 * gcc.h (class driver): Add new memver m_option_proposer.
2362 * opt-suggestions.c: New file.
2363 * opt-suggestions.h: New file.
2365 2018-06-28 Martin Liska <mliska@suse.cz>
2367 * vec.h (class auto_string_vec): New (moved from auto_argvec).
2368 (auto_string_vec::~auto_string_vec): Likewise.
2370 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
2372 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
2373 prevent_decl_creation_for_types fields up and add reset_location field.
2374 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
2375 statement if id->reset_location is true.
2376 (copy_edges_for_bb): Do not set goto_locus on the new edges if
2377 id->reset_location is true.
2378 (copy_phis_for_bb): Force input_location on the arguments if
2379 id->reset_location is true.
2380 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
2381 is set on the function to be inlined.
2383 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
2385 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
2387 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
2389 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
2390 registers for Pmode.
2391 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
2392 hard registers for the clobbered pseudo.
2394 2018-06-27 Paul Koning <ni1d@arrl.net>
2396 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2397 mutually exclusive options.
2398 * config/pdp11/constraints.md (h): New constraint.
2399 (O): Update definition to match shift code generation.
2400 (D): New constraint.
2401 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
2403 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
2405 (output_jump): Change arguments.
2406 (pdp11_fixed_cc_regs): New function.
2407 (pdp11_cc_mode): Ditto.
2408 (pdp11_expand_shift): Ditto.
2409 (pdp11_assemble_shift): Ditto.
2410 (pdp11_small_shift): Ditto.
2411 (pdp11_branch_cost): Remove.
2412 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
2414 (pdp11_register_move_cost): Update for CC registers.
2415 (pdp11_rtx_costs): Add case for LSHIFTRT.
2416 (pdp11_output_jump): Add CCNZ mode conditional branches.
2417 (notice_update_cc_on_set): Remove.
2418 (pdp11_cc_mode): New function.
2419 (simple_memory_operand): Correct pre/post decrement case.
2420 (no_side_effect_operand): New function.
2421 (pdp11_regno_reg_class): Add CC_REGS class.
2422 (pdp11_fixed_cc_regs): New function.
2423 (pdp11_small_shift): New function.
2424 (pdp11_expand_shift): New function to expand shift insns.
2425 (pdp11_assemble_shift): New function to output shifts.
2426 (pdp11_branch_cost): Remove.
2427 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
2428 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
2429 (WCHAR_TYPE): Ditto.
2430 (PTRDIFF_TYPE): Ditto.
2431 (ADJUST_INSN_LENGTH): New macro.
2432 (FIXED_REGISTERS): Add CC registers.
2433 (CALL_USED_REGISTERS): Ditto.
2435 (REG_CLASS_NAMES): Ditto.
2436 (REG_CLASS_CONTENTS): Ditto.
2437 (SELECT_CC_MODE): Use new function.
2438 (TARGET_FLAGS_REGNUM): New macro.
2439 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
2440 (cc0_reg_rtx): Remove.
2441 (CC_STATUS_MDEP): Remove.
2442 (CC_STATUS_MDEFP_INIT): Remove.
2443 (CC_IN_FPU): Remove.
2444 (NOTICE_UPDATE_CC): Remove.
2445 (REGISTER_NAMES): Add CC registers.
2446 (BRANCH_COST): Change to constant 1.
2447 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
2449 * config/pdp11/pdp11.opt (mbcopy): Remove.
2450 (mbcopy-builtin): Remove.
2451 (mbranch-cheap): Remove.
2452 (mbranch-expensive): Remove.
2453 * config/pdp11/predicates.md (expand_shift_operand): Update to
2454 match shift code generation.
2455 (ccnz_operator): New predicate.
2456 * doc/invoke.texi (PDP-11 Options): Remove deleted options
2457 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
2458 Remove non-existent option -mabshi, -mno-abshi. Document mutually
2460 * doc/md.texi (PDP-11): Document new D and h constraints. Update
2461 description of O constraint.
2463 2018-06-27 Jeff Law <law@redhat.com>
2464 Austin Law <austinklaw@gmail.com>
2466 * config/v850/v850.md (addsi3_set_flags): New pattern.
2467 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
2468 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
2469 (zero_extendhisi2_v850_set_flags): Likewise.
2470 (zero_extendqisi2_v850_set_flags): Likewise.
2471 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
2472 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
2473 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
2475 * config/v850/v850-protos.h (notice_update_cc): Remove.
2476 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
2477 (v850_print_operand): Handle 'D' and "d".
2478 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
2479 Add handling of arithmetic/logical operations compared against zero.
2480 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
2481 Do not look at v850_compare_op, instead get mode from last argument.
2482 (v850_gen_compare): Remove
2483 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
2484 after reload for prologue insns.
2485 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
2487 (construct_save_jarl): Likewise.
2488 (TARGET_FLAGS_REGNUM): Define.
2489 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
2490 (NOTICE_UPDATE_CC): Remove.
2491 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
2492 than cc0. Conditionalize on reload_completed.
2493 (cmpsi_insn, setfcc_insn): Likewise.
2494 (tst1 splitter): Turn into define_and_split which sets the flags
2496 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
2497 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
2498 (cstoresf4, cstoredf4): Clobber the flags.
2499 (cmpsi, cmpsf, cmpdf): Remove expanders.
2500 (setf_insn): Remove pattern.
2501 (addsi3): Turn into define_and_split which clobbers the flags after
2502 reload and a suitable pattern (addsi3_clobber_flags) for use after
2504 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
2505 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
2506 (ashrsi3, ashrsi3_v850e2): Likewise.
2507 (bins): Clobber the flags.
2508 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
2509 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
2510 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
2511 (call_value_internal_short, call_value_internal_long): Likewise.
2512 (callt_save_interrupt, callt_return_interrupt): Likewise.
2513 (save_interrupt, return_interrupt): Likewise.
2514 (callt_save_all_interrupt, save_all_interrupt): Likewise.
2515 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
2516 (restore_all_interrupt, _restore_all_interrupt): Likewise.
2517 (All FP comparisons): Only allow after reload has completed.
2519 (divh, divhu): Tweak output template.
2520 (branch_z_normal, branch_z_invert): Remove
2521 (branch_nz_normal, branch_nz_invert): Likewise.
2522 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
2524 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
2525 * config/v850/v850.c (notice_update_cc): Remove.
2526 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
2527 (CC_NO_CARRY): Likewise.
2528 (NOTICE_UPDATE_CC): Define to nothing.
2529 * config/v850/v850.md: Remove block comment on cc0 handling
2530 Remove "cc" attribute from all patterns. Remove cc_status handling
2531 from all patterns. Minor formatting fixes.
2533 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2535 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
2536 (cortex-a76.cortex-a55): Likewise.
2537 * config/aarch64/aarch64-tune.md: Regenerate.
2538 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
2539 cortex-a76.cortex-a55.
2541 2018-06-27 Jeff Law <law@redhat.com>
2543 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
2544 (MULTILIB_DIRNAMES): Similarly.
2546 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
2548 * gimple.h (gimple_return_retbnd): Delete.
2549 (gimple_return_set_retbnd): Likewise.
2550 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
2551 gimple_return_set_retbnd.
2552 * gimple-pretty-print.c (dump_gimple_return): Remove call to
2553 gimple_return_retbnd and adjust.
2554 * tree-inline.h (struct copy_body_data): Remove retbnd field.
2555 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
2556 Explicitly return NULL in a couple more cases. Move assertion
2557 on debug statements and remove unreachable code.
2558 (reset_debug_binding): Do not test id->retbnd.
2559 (expand_call_inline): Do not set it.
2561 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
2563 * configure.ac: Add --disable-gcov option.
2564 * configure: Regenerate.
2565 * Makefile.in: Honour @enable_gcov@.
2566 * doc/install.texi: Document --disable-gcov.
2568 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2570 * config/arm/arm-cpus.in (cortex-a76): New entry.
2571 (cortex-a76.cortex-a55): Likewise.
2572 * config/arm/arm-tables.opt: Regenerate.
2573 * config/arm/arm-tune.md: Likewise.
2574 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
2575 * doc/invoke.texi (ARM Options): Document cortex-a76 and
2576 cortex-a76.cortex-a55.
2578 2018-06-27 Tamar Christina <tamar.christina@arm.com>
2581 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
2583 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
2585 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
2587 (EPILOGUE_USES): Likewise.
2589 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
2591 * tree-inline.c (remap_location): New function extracted from...
2592 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
2593 (copy_phis_for_bb): ...here. Call remap_location.
2594 (copy_cfg_body): Adjust call to copy_edges_for_bb.
2596 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2598 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
2599 unaligned vsx for 16B memset.
2601 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
2604 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
2605 ieee128_float_type_node to long_double_type_node unless
2606 TARGET_LONG_DOUBLE_128 is set.
2608 2018-06-26 David Malcolm <dmalcolm@redhat.com>
2610 * cfgloop.c (get_loop_location): Convert return type from
2611 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
2612 by implicit construction from rtx_insn *, and using
2613 dump_user_location_t::from_function_decl for the fallback case.
2614 * cfgloop.h (get_loop_location): Convert return type from
2615 location_t to dump_user_location_t.
2616 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
2617 dump_printf_loc to pass in a dump_location_t rather than a
2618 location_t, via the gimple stmt.
2619 * coverage.c (get_coverage_counts): Update calls to
2620 dump_printf_loc to pass in dump_location_t rather than a
2622 * doc/optinfo.texi (Dump types): Convert example of
2623 dump_printf_loc from taking "locus" to taking "insn". Update
2624 description of the "_loc" calls to cover dump_location_t.
2625 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
2627 (dump_user_location_t::dump_user_location_t): New constructors,
2628 from gimple *stmt and rtx_insn *.
2629 (dump_user_location_t::from_function_decl): New function.
2630 (dump_loc): Make static.
2631 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
2632 const dump_location_t &.
2633 (dump_generic_expr_loc): Delete.
2634 (dump_printf_loc): Convert param "loc" from location_t to
2635 const dump_location_t &.
2636 (selftest::test_impl_location): New function.
2637 (selftest::dumpfile_c_tests): New function.
2638 * dumpfile.h: Include "profile-count.h".
2639 (class dump_user_location_t): New class.
2640 (struct dump_impl_location_t): New struct.
2641 (class dump_location_t): New class.
2642 (dump_printf_loc): Convert 2nd param from source_location to
2643 const dump_location_t &.
2644 (dump_generic_expr_loc): Delete.
2645 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
2646 const dump_location_t &.
2647 * gimple-fold.c (fold_gimple_assign): Update call to
2648 dump_printf_loc to pass in a dump_location_t rather than a
2649 location_t, via the gimple stmt.
2650 (gimple_fold_call): Likewise.
2651 * gimple-loop-interchange.cc
2652 (loop_cand::analyze_iloop_reduction_var): Update for change to
2653 check_reduction_path.
2654 (tree_loop_interchange::interchange): Update for change to
2656 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
2657 change in return-type of find_loop_location.
2658 (graphite_regenerate_ast_isl): Likewise.
2659 * graphite-optimize-isl.c (optimize_isl): Likewise.
2660 * graphite.c (graphite_transform_loops): Likewise.
2661 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
2662 pass in a dump_location_t rather than a location_t, via the
2664 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2665 * ipa.c (walk_polymorphic_call_targets): Likewise.
2666 * loop-unroll.c (report_unroll): Convert "locus" param from
2667 location_t to dump_location_t.
2668 (decide_unrolling): Update for change to get_loop_location's
2670 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
2671 location_t to dump_user_location_t.
2672 (grid_find_single_omp_among_assignments_1): Updates calls to
2673 dump_printf_loc to pass in a dump_location_t rather than a
2674 location_t, via the gimple stmt.
2675 (grid_parallel_clauses_gridifiable): Convert "tloc" from
2676 location_t to dump_location_t. Updates calls to dump_printf_loc
2677 to pass in a dump_location_t rather than a location_t, via the
2679 (grid_inner_loop_gridifiable_p): Likewise.
2680 (grid_dist_follows_simple_pattern): Likewise.
2681 (grid_gfor_follows_tiling_pattern): Likewise.
2682 (grid_target_follows_gridifiable_pattern): Likewise.
2683 (grid_attempt_target_gridification): Convert initialization
2684 of local "grid" from memset to zero-initialization; FIXME: does
2685 this require C++11? Update call to dump_printf_loc to pass in a
2686 optinfo_location rather than a location_t, via the gimple stmt.
2687 * profile.c (read_profile_edge_counts): Updates call to
2688 dump_printf_loc to pass in a dump_location_t rather than a
2690 (compute_branch_probabilities): Likewise.
2691 * selftest-run-tests.c (selftest::run_tests): Call
2693 * selftest.h (dumpfile_c_tests): New decl.
2694 * tree-loop-distribution.c (pass_loop_distribution::execute):
2695 Update for change in return type of find_loop_location.
2696 * tree-parloops.c (parallelize_loops): Likewise.
2697 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
2698 "locus" from location_t to dump_user_location_t.
2699 (canonicalize_loop_induction_variables): Likewise.
2700 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
2701 for change in return type of find_loop_location.
2702 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
2703 to dump_printf_loc to pass in a dump_location_t rather than a
2704 location_t, via the stmt.
2705 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
2707 * tree-vect-loop-manip.c (find_loop_location): Convert return
2708 type from source_location to dump_user_location_t.
2709 (vect_do_peeling): Update for above change.
2710 (vect_loop_versioning): Update for change in type of
2712 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
2713 from location_t to dump_user_location_t.
2714 (vect_estimate_min_profitable_iters): Update for change in type
2716 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
2717 location_t to dump_location_t.
2718 (vect_slp_bb): Update for change in type of vect_location.
2719 * tree-vectorizer.c (vect_location): Convert from source_location
2720 to dump_user_location_t.
2721 (try_vectorize_loop_1): Update for change in vect_location's type.
2722 (vectorize_loops): Likewise.
2723 (increase_alignment): Likewise.
2724 * tree-vectorizer.h (vect_location): Convert from source_location
2725 to dump_user_location_t.
2726 (find_loop_location): Convert return type from source_location to
2727 dump_user_location_t.
2728 (check_reduction_path): Convert 1st param from location_t to
2729 dump_user_location_t.
2730 * value-prof.c (check_counter): Update call to dump_printf_loc to
2731 pass in a dump_user_location_t rather than a location_t; update
2732 call to error_at for change in type of "locus".
2733 (check_ic_target): Update call to dump_printf_loc to
2734 pass in a dump_user_location_t rather than a location_t, via the
2737 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
2739 * config/s390/s390.h (enum processor_flags): Do not use
2740 default tune parameter when -march was specified.
2742 2018-06-26 Jakub Jelinek <jakub@redhat.com>
2745 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
2746 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
2749 2018-06-26 Richard Biener <rguenther@suse.de>
2751 PR tree-optimization/86287
2753 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
2754 (vect_analyze_loop): Initialize n_stmts.
2756 2018-06-26 Richard Biener <rguenther@suse.de>
2759 * fold-const.c (fold_convertible_p): Pointer extension
2762 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
2765 * dwarf2out.c (loc_list_has_views): Adjust comments.
2766 (dw_loc_list): Split single cross-partition range with
2769 2018-06-25 Jeff Law <law@redhat.com>
2771 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
2772 on -mbig-switch by default.
2774 * config/v850/predicates.md (const_float_1_operand): Fix match_code
2776 (const_float_0_operand): Remove unused predicate.
2777 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
2778 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
2779 (recipsf2): New expander. Original pattern now called
2781 (recipdf2, recipdf2_insn): Similarly.
2782 (rsqrtsf2, rsqrtsf2_insn): Similarly
2783 (rsqrtdf2, rsqrtdf2_insn): Similarly
2785 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
2787 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
2788 Simplify logic for FreeBSD (twice).
2790 2018-06-25 Martin Sebor <msebor@redhat.com>
2792 PR tree-optimization/86204
2793 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
2794 a strnlen result if it's less than the length of the string.
2796 2018-06-25 Martin Sebor <msebor@redhat.com>
2798 PR tree-optimization/85700
2799 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
2800 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
2801 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
2803 2018-06-25 Martin Sebor <msebor@redhat.com>
2805 * doc/extend.texi (Zero-length arrays): Update and clarify.
2807 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
2809 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
2810 added IEEE/IBM long double multilib support on PowerPC little
2811 endian Linux systems.
2812 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
2813 (MULTILIB_DEFAULTS): Likewise.
2814 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2816 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
2817 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
2818 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
2820 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
2823 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
2824 (REORDER_45): Likewise.
2826 2018-06-25 Jeff Law <law@redhat.com>
2828 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
2829 dividend to 32 bits. Adjust length.
2830 (udivmodhi4): Cleanup output template. Fix length.
2832 2018-06-25 Carl Love <cel@us.ibm.com>
2834 * config/rs6000/vsx.md: Change word selector to prefered location.
2836 2018-06-25 Richard Biener <rguenther@suse.de>
2838 PR tree-optimization/86304
2839 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
2840 epilogue-if-converted loops as well.
2842 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
2844 * lto-section-out.c (lto_begin_section): Do not print section
2845 name for noaddr and unnumbered dumps.
2847 2018-06-25 Richard Biener <rguenther@suse.de>
2849 * tree-vectorizer.h (struct vec_info_shared): New structure
2850 with parts split out from struct vec_info and loop_nest from
2851 struct _loop_vec_info.
2852 (struct vec_info): Adjust accordingly.
2853 (struct _loop_vec_info): Likewise.
2854 (LOOP_VINFO_LOOP_NEST): Adjust.
2855 (LOOP_VINFO_DATAREFS): Likewise.
2856 (LOOP_VINFO_DDRS): Likewise.
2857 (struct _bb_vec_info): Likewise.
2858 (BB_VINFO_DATAREFS): Likewise.
2859 (BB_VINFO_DDRS): Likewise.
2860 (struct _stmt_vec_info): Add dr_aux member.
2861 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
2862 (DR_MISALIGNMENT_UNINITIALIZED): New.
2863 (set_dr_misalignment): Adjust.
2864 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
2865 (vect_analyze_loop): Adjust prototype.
2866 (vect_analyze_loop_form): Likewise.
2867 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2868 Compute dependences lazily.
2869 (vect_record_base_alignments): Use shared datarefs/ddrs.
2870 (vect_verify_datarefs_alignment): Likewise.
2871 (vect_analyze_data_refs_alignment): Likewise.
2872 (vect_analyze_data_ref_accesses): Likewise.
2873 (vect_analyze_data_refs): Likewise.
2874 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
2875 constructor parameter for shared part.
2876 (vect_analyze_loop_form): Pass in shared part and adjust.
2877 (vect_analyze_loop_2): Pass in storage for the number of
2878 stmts. Move loop nest finding to the caller. Compute
2880 (vect_analyze_loop): Pass in shared part.
2881 (vect_transform_loop): Verify shared datarefs are unchanged.
2882 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
2883 constructor parameter for shared part.
2884 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
2885 (vect_slp_bb): Verify shared datarefs are unchanged before
2887 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
2889 (new_stmt_vec_info): Initialize DR_AUX misalignment to
2890 DR_MISALIGNMENT_UNINITIALIZED.
2891 * tree-vectorizer.c (vec_info::vec_info): Add constructor
2892 parameter for shared part.
2893 (vec_info::~vec_info): Adjust.
2894 (vec_info_shared::vec_info_shared): New.
2895 (vec_info_shared::~vec_info_shared): Likewise.
2896 (vec_info_shared::save_datarefs): Likewise.
2897 (vec_info_shared::check_datarefs): Likewise.
2898 (try_vectorize_loop_1): Construct shared part live for analyses
2899 of a single loop for multiple vector sizes.
2900 * tree-parloops.c (gather_scalar_reductions): Adjust.
2902 2018-06-25 Richard Biener <rguenther@suse.de>
2904 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
2905 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
2906 (vect_analyze_data_refs): Remove similar code from here and
2907 simplify accordingly.
2909 2018-06-25 Richard Biener <rguenther@suse.de>
2911 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
2912 for reverse storage order accesses rather than asserting
2913 they cannot happen here.
2915 2018-06-25 Tom de Vries <tdevries@suse.de>
2918 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
2919 Use data16 instead of .byte for insn prefix.
2921 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
2924 * parser.c (make_char_string_pack): Pass this literal chars
2925 through cpp_interpret_string.
2926 (cp_parser_userdef_numeric_literal): Check the result of
2927 make_char_string_pack.
2929 2018-06-24 Maya Rashish <coypu@sdf.org>
2931 * ginclude/stddef.h: Simplify conditions around avoiding
2932 re-definition of __size_t.
2934 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2936 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
2937 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
2939 2018-06-22 Maya Rashish <coypu@sdf.org>
2941 * doc/invoke.texi (mno-fancy-math-387): Update for changes
2942 made to OpenBSD and NetBSD through the years.
2944 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
2946 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2947 behavior of vec_pack (vector double, vector double) to match
2948 behavior of vec_float2 (vector double, vector double).
2950 2018-06-22 Olivier Hainque <hainque@adacore.com>
2952 * gimplify.c (gimplify_function_tree): Prevent creation
2953 of a trampoline for the address of the current function
2954 passed to entry/exit instrumentation hooks.
2956 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
2959 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
2962 2018-06-22 Martin Liska <mliska@suse.cz>
2964 PR tree-optimization/86263
2965 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2966 Bail out if is_enabled is false.
2967 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
2969 (jump_table_cluster::is_enabled): New function.
2971 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2973 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2974 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
2975 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
2976 (lto_input_ts_binfo_tree_pointers): Likewise.
2977 * tree-streamer-out.c (streamer_write_tree_bitfields,
2978 write_ts_binfo_tree_pointers): Likewise.
2979 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
2981 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
2983 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
2985 2018-06-22 Martin Liska <mliska@suse.cz>
2987 * symbol-summary.h (get): Make it pure and inline move
2988 functionality from ::get function.
2989 (get): Remove and inline into ::get and ::get_create.
2990 (get_create): Move code from ::get function.
2992 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2995 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
2996 -x assembler-with-cpp.
2998 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3000 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
3001 _FILE_OFFSET_BITS=64 for C++.
3003 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3005 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3006 conversion insn that shows up when pr85657-3.c is compiled using
3007 IEEE 128-bit long double.
3008 (neg<mode>2_internal): Use the correct mode to check whether the
3009 mode is IBM extended.
3010 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3011 multiply and divide external functions from being created more
3014 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3016 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
3018 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
3019 the edge can be forwarded.
3020 (cfg_layout_merge_blocks): Likewise.
3022 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3024 * except.c (finish_eh_generation): Commit edge insertions only after
3025 the EH edges have been redirected from post-landing to landing pads.
3027 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3029 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
3030 create_tmp_var_for to create the FRAME decl.
3031 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
3033 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3035 * tree-inline.c (copy_edges_for_bb): Minor tweak.
3036 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
3037 debug statement when resetting its value.
3038 (expand_call_inline): Copy the locus of the call onto the assignment
3039 of the return value, if any. Use local variable in more cases.
3041 2018-06-21 Martin Liska <mliska@suse.cz>
3043 * ipa-pure-const.c (propagate_nothrow): Use
3044 funct_state_summaries->get.
3045 (dump_malloc_lattice): Likewise.
3046 (propagate_malloc): Likewise.
3048 2018-06-21 Richard Biener <rguenther@suse.de>
3050 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
3051 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
3052 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
3054 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
3055 BLOCK_ABSTRACT_ORIGIN unconditionally.
3057 2018-06-21 David Malcolm <dmalcolm@redhat.com>
3059 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
3061 * ipa-reference.c (ipa_reference_c_finalize): Delete
3062 ipa_ref_opt_sum_summaries and set it to NULL.
3064 2018-06-21 Tom de Vries <tdevries@suse.de>
3066 PR tree-optimization/85859
3067 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
3068 test with comment from bb_no_side_effects_p.
3070 2018-06-21 Richard Biener <rguenther@suse.de>
3072 PR tree-optimization/86232
3073 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
3074 max for constant niter.
3076 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
3078 * config/aarch64/aarch64-simd.md
3079 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
3081 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
3083 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
3084 Make opernads of the unspec commutative.
3086 2018-06-21 Richard Biener <rguenther@suse.de>
3088 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
3089 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
3090 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
3091 (vect_analyze_data_ref_dependence): Re-order checks to deal with
3093 (vect_record_base_alignments): Do not record base alignment
3094 for gathers or scatters.
3095 (vect_compute_data_ref_alignment): Drop return value that is always
3096 true. Bail out early for gathers or scatters.
3097 (vect_enhance_data_refs_alignment): Bail out early for gathers
3099 (vect_find_same_alignment_drs): Likewise.
3100 (vect_analyze_data_refs_alignment): Remove dead code.
3101 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3102 (vect_analyze_data_refs): For possible gathers or scatters do
3103 not create an alternate DR, just check their possible validity
3104 and mark them. Adjust DECL_NONALIASED handling to not rely
3106 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
3107 update inits of gathers or scatters.
3108 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
3109 Also copy gather/scatter flag to pattern vinfo.
3111 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
3113 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3114 behavior of vec_packsu (vector unsigned long long, vector unsigned
3115 long long) to match behavior of vec_packs with same signature.
3117 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3118 Thomas Schwinge <thomas@codesourcery.com>
3119 Cesar Philippidis <cesar@codesourcery.com>
3121 * gimplify.c (gimplify_scan_omp_clauses): Add support for
3122 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3123 (gimplify_adjust_omp_clauses): Likewise.
3124 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
3125 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
3126 (gimplify_omp_target_update): Update handling of acc update and
3128 * omp-low.c (install_var_field): Remove unused parameter
3129 base_pointers_restrict.
3130 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
3131 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
3133 (omp_target_base_pointers_restrict_p): Delete.
3134 (scan_omp_target): Update call to scan_sharing_clauses.
3135 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
3137 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3138 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3139 (convert_local_omp_clauses): Likewise.
3140 * tree-pretty-print.c (dump_omp_clause): Likewise.
3141 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
3143 (omp_clause_code_name): Likewise.
3145 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3148 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
3151 PR tree-optimization/86231
3152 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
3153 anti-range don't overwrite *vr0min before using it to compute *vr0max.
3155 2018-06-20 Tom de Vries <tdevries@suse.de>
3157 PR tree-optimization/86097
3158 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
3159 iv type if signedness of iv type is not the same as that of *nit.
3161 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3163 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
3164 EDGE_EH edges, verify they are all EDGE_EH.
3166 2018-06-20 Maya Rashish <coypu@sdf.org>
3168 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
3170 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3172 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
3173 * config/aarch64/aarch64.c (xgene1_tunings): Add
3174 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
3175 (aarch64_mode_valid_for_sched_fusion_p):
3176 Allow 16-byte modes.
3177 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
3178 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
3180 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
3182 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
3183 * config/aarch64/iterators.md (VQ2): New mode iterator.
3185 2018-06-20 Martin Liska <mliska@suse.cz>
3187 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3188 Change default ratio from 10 to 8.
3190 2018-06-20 Martin Liska <mliska@suse.cz>
3192 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3194 (bit_test_cluster::find_bit_tests): Likewise.
3195 (switch_decision_tree::analyze_switch_statement): Find clusters.
3196 * tree-switch-conversion.h (struct jump_table_cluster): Document
3199 2018-06-20 Martin Liska <mliska@suse.cz>
3201 * tree-switch-conversion.c (switch_conversion::collect):
3202 Record m_uniq property.
3203 (switch_conversion::expand): Bail out for special conditions.
3204 (group_cluster::~group_cluster): New.
3205 (group_cluster::group_cluster): Likewise.
3206 (group_cluster::dump): Likewise.
3207 (jump_table_cluster::emit): New.
3208 (switch_decision_tree::fix_phi_operands_for_edges): New.
3209 (struct case_node): Remove struct.
3210 (jump_table_cluster::can_be_handled): New.
3211 (case_values_threshold): Moved to header.
3212 (reset_out_edges_aux): Likewise.
3213 (jump_table_cluster::is_beneficial): New.
3214 (bit_test_cluster::can_be_handled): Likewise.
3215 (add_case_node): Remove.
3216 (bit_test_cluster::is_beneficial): New.
3217 (case_bit_test::cmp): New.
3218 (bit_test_cluster::emit): New.
3219 (expand_switch_as_decision_tree_p): Remove.
3220 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
3221 (fix_phi_operands_for_edge): Likewise.
3222 (switch_decision_tree::analyze_switch_statement): New.
3223 (compute_cases_per_edge): Move ...
3224 (switch_decision_tree::compute_cases_per_edge): ... here.
3225 (try_switch_expansion): Likewise.
3226 (switch_decision_tree::try_switch_expansion): Likewise.
3227 (record_phi_operand_mapping): Likewise.
3228 (switch_decision_tree::record_phi_operand_mapping): Likewise.
3229 (emit_case_decision_tree): Likewise.
3230 (switch_decision_tree::emit): Likewise.
3231 (balance_case_nodes): Likewise.
3232 (switch_decision_tree::balance_case_nodes): Likewise.
3233 (dump_case_nodes): Likewise.
3234 (switch_decision_tree::dump_case_nodes): Likewise.
3235 (emit_jump): Likewise.
3236 (switch_decision_tree::emit_jump): Likewise.
3237 (emit_cmp_and_jump_insns): Likewise.
3238 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
3239 (emit_case_nodes): Likewise.
3240 (switch_decision_tree::emit_case_nodes): Likewise.
3241 (conditional_probability): Remove.
3242 * tree-switch-conversion.h (enum cluster_type): New.
3244 (struct cluster): Likewise.
3245 (cluster::cluster): Likewise.
3246 (struct simple_cluster): Likewise.
3247 (simple_cluster::simple_cluster): Likewise.
3248 (struct group_cluster): Likewise.
3249 (struct jump_table_cluster): Likewise.
3250 (struct bit_test_cluster): Likewise.
3251 (struct min_cluster_item): Likewise.
3252 (struct case_tree_node): Likewise.
3253 (case_tree_node::case_tree_node): Likewise.
3254 (jump_table_cluster::case_values_threshold): Likewise.
3255 (struct case_bit_test): Likewise.
3256 (struct switch_decision_tree): Likewise.
3257 (struct switch_conversion): Likewise.
3258 (switch_decision_tree::reset_out_edges_aux): Likewise.
3260 2018-06-20 Martin Liska <mliska@suse.cz>
3262 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
3263 (hoist_edge_and_branch_if_true): Likewise.
3264 (expand_switch_using_bit_tests_p): Likewise.
3265 (struct case_bit_test): Likewise.
3266 (case_bit_test_cmp): Likewise.
3267 (emit_case_bit_tests): Likewise.
3268 (switch_conversion::switch_conversion): New class.
3269 (struct switch_conv_info): Remove old struct.
3270 (collect_switch_conv_info): More to ...
3271 (switch_conversion::collect): ... this.
3272 (check_range): Likewise.
3273 (switch_conversion::check_range): Likewise.
3274 (check_all_empty_except_final): Likewise.
3275 (switch_conversion::check_all_empty_except_final): Likewise.
3276 (check_final_bb): Likewise.
3277 (switch_conversion::check_final_bb): Likewise.
3278 (create_temp_arrays): Likewise.
3279 (switch_conversion::create_temp_arrays): Likewise.
3280 (free_temp_arrays): Likewise.
3281 (gather_default_values): Likewise.
3282 (switch_conversion::gather_default_values): Likewise.
3283 (build_constructors): Likewise.
3284 (switch_conversion::build_constructors): Likewise.
3285 (constructor_contains_same_values_p): Likewise.
3286 (switch_conversion::contains_same_values_p): Likewise.
3287 (array_value_type): Likewise.
3288 (switch_conversion::array_value_type): Likewise.
3289 (build_one_array): Likewise.
3290 (switch_conversion::build_one_array): Likewise.
3291 (build_arrays): Likewise.
3292 (switch_conversion::build_arrays): Likewise.
3293 (gen_def_assigns): Likewise.
3294 (switch_conversion::gen_def_assigns): Likewise.
3295 (prune_bbs): Likewise.
3296 (switch_conversion::prune_bbs): Likewise.
3297 (fix_phi_nodes): Likewise.
3298 (switch_conversion::fix_phi_nodes): Likewise.
3299 (gen_inbound_check): Likewise.
3300 (switch_conversion::gen_inbound_check): Likewise.
3301 (process_switch): Use the newly created class.
3302 (switch_conversion::expand): New.
3303 (switch_conversion::~switch_conversion): New.
3304 * tree-switch-conversion.h: New file.
3306 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3308 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
3309 tree-vect-patterns.c.
3310 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
3311 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
3312 (vect_recog_sad_pattern): Likewise.
3313 (vect_recog_widen_sum_pattern): Likewise.
3314 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
3315 (vect_recog_widen_shift_pattern): Remove the type_in argument.
3316 (vect_recog_rotate_pattern): Likewise.
3317 (vect_recog_mult_pattern): Likewise.
3318 (vect_recog_vector_vector_shift_pattern): Likewise.
3319 (vect_recog_divmod_pattern): Likewise.
3320 (vect_recog_mixed_size_cond_pattern): Likewise.
3321 (vect_recog_bool_pattern): Likewise.
3322 (vect_recog_mask_conversion_pattern): Likewise.
3323 (vect_try_gather_scatter_pattern): Likewise.
3324 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
3325 (vect_recog_over_widening_pattern): Likewise.
3326 (vect_recog_gather_scatter_pattern): Likewise.
3327 (vect_recog_func_ptr): Move from tree-vectorizer.h
3328 (vect_vect_recog_func_ptrs): Move further down the file.
3329 (vect_recog_func): Likewise. Remove the third argument.
3330 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
3331 (vect_pattern_recog_1): Expect the pattern function to do any
3332 necessary target tests. Also expect it to provide a vector type.
3333 Remove the type_in handling.
3335 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3337 * tree-vect-patterns.c (vect_pattern_detected): New function.
3338 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
3339 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
3340 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
3341 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
3342 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3343 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3344 (vect_recog_mask_conversion_pattern)
3345 (vect_try_gather_scatter_pattern): Likewise.
3347 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3349 * tree-vect-patterns.c (vect_get_internal_def): New function.
3350 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3351 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
3352 (search_type_for_mask_1): Use it.
3354 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3356 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3357 redundant WIDEN_SUM_EXPR handling.
3358 (vect_recog_sad_pattern): Likewise.
3360 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3362 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
3363 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
3364 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
3365 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
3366 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
3368 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3370 * tree-vect-stmts.c (vectorizable_call): Make sure that we
3371 use the stmt_vec_info of the original bb statement for the
3372 new zero assignment, even if the call is part of a pattern.
3374 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3376 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
3377 that the sequence is attached to the original statement rather
3378 than the pattern statement.
3379 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
3380 PATTERN_DEF_SEQ from the original statement rather than
3381 the main pattern statement.
3382 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
3383 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
3384 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
3386 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
3388 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
3389 definition statements before the early exit for statements that aren't
3391 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
3393 (vect_transform_loop): ...here. Process pattern definition
3394 statements without first checking whether the main pattern
3395 statement is live or relevant.
3397 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3399 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
3400 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
3402 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
3404 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
3405 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
3406 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
3407 (expand_block_compare): Change select_block_compare_mode call.
3408 (expand_strncmp_align_check): Use new functions, fix comment.
3409 (emit_final_str_compare_gpr): New function.
3410 (expand_strn_compare): Refactor and clean up code.
3411 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
3413 2018-06-19 Tony Reix <tony.reix@atos.com>
3414 Damien Bergamini <damien.bergamini@atos.com>
3415 David Edelsohn <dje.gcc@gmail.com>
3417 * collect2.c (static_obj): New variable.
3418 (static_libs): New variable.
3419 (is_in_list): Uncomment declaration.
3420 (main): Track AIX libraries linked statically.
3421 (is_in_list): Uncomment definition.
3422 (scan_prog_file): Don't add AIX shared libraries initializer
3423 to constructor list if linking statically.
3425 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
3427 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
3429 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
3431 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
3433 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
3436 2018-06-19 Martin Liska <mliska@suse.cz>
3438 * config/i386/i386.c (ix86_can_inline_p): Do not use
3439 ipa_fn_summaries::get_create.
3440 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
3442 (devirtualization_time_bonus): Likewise.
3443 (ipcp_propagate_stage): Likewise.
3444 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3445 (edge_set_predicate): Likewise.
3446 (evaluate_conditions_for_known_args): Likewise.
3447 (evaluate_properties_for_edge): Likewise.
3448 (ipa_call_summary::reset): Tranform to ...
3449 (ipa_call_summary::~ipa_call_summary): ... this.
3450 (ipa_fn_summary::reset): Transform to ...
3451 (ipa_fn_summary::~ipa_fn_summary): ... this.
3452 (ipa_fn_summary_t::remove): Rename to ...
3453 (ipa_fn_summary_t::remove_callees): ... this.
3454 (ipa_fn_summary_t::duplicate): Use placement new
3455 instead of memory copy.
3456 (ipa_call_summary_t::duplicate): Likewise.
3457 (ipa_call_summary_t::remove): Remove.
3458 (dump_ipa_call_summary): Change get_create to get.
3459 (ipa_dump_fn_summary): Dump only when summary exists.
3460 (analyze_function_body): Use symbol_summary::get instead
3462 (compute_fn_summary): Likewise.
3463 (estimate_edge_devirt_benefit): Likewise.
3464 (estimate_edge_size_and_time): Likewise.
3465 (inline_update_callee_summaries): Likewise.
3466 (remap_edge_change_prob): Likewise.
3467 (remap_edge_summaries): Likewise.
3468 (ipa_merge_fn_summary_after_inlining): Likewise.
3469 (write_ipa_call_summary): Likewise.
3470 (ipa_fn_summary_write): Likewise.
3471 (ipa_free_fn_summary): Likewise.
3472 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
3473 (struct ipa_call_summary): Likewise.
3474 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
3476 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
3477 (estimate_size_after_inlining): Likewise.
3478 (estimate_growth): Likewise.
3479 (growth_likely_positive): Likewise.
3480 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3481 (inline_call): Likewise.
3482 * ipa-inline.c (caller_growth_limits): Likewise.
3483 (can_inline_edge_p): Likewise.
3484 (can_inline_edge_by_limits_p): Likewise.
3485 (compute_uninlined_call_time): Likewise.
3486 (compute_inlined_call_time): Likewise.
3487 (want_inline_small_function_p): Likewise.
3488 (edge_badness): Likewise.
3489 (update_caller_keys): Likewise.
3490 (update_callee_keys): Likewise.
3491 (inline_small_functions): Likewise.
3492 (inline_to_all_callers_1): Likewise.
3493 (dump_overall_stats): Likewise.
3494 (early_inline_small_functions): Likewise.
3495 (early_inliner): Likewise.
3496 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3497 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3498 * ipa-pure-const.c (malloc_candidate_p): Likewise.
3499 * ipa-split.c (execute_split_functions): Likewise.
3500 * symbol-summary.h: Likewise.
3501 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3503 2018-06-19 Richard Biener <rguenther@suse.de>
3505 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
3506 (vectorize_loops): ... here. Fix dbgcnt handling.
3507 (try_vectorize_loop): Wrap try_vectorize_loop_1.
3509 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
3512 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3513 ieee128 argument takes up only one (vector) register, not two (floating
3516 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3518 * gimplify.c (gimplify_init_constructor): Really never clear for an
3519 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
3521 2018-06-19 Richard Biener <rguenther@suse.de>
3523 PR tree-optimization/86179
3524 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
3525 after failed recognition.
3527 2018-06-18 Martin Sebor <msebor@redhat.com>
3530 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3531 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3532 Handle integer subtraction.
3533 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3534 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3536 2018-06-18 David Malcolm <dmalcolm@redhat.com>
3538 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
3539 param from rtx to rtx_insn *.
3540 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
3542 (frv_ifcvt_modify_insn): Likwise.
3543 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
3544 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
3545 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
3546 as_a <rtx_insn *> cast to local "unprotected_region" once
3547 it's been established that it's not NULL or pc_rtx.
3548 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
3549 param "sethi" from rtx to rtx_insn *.
3550 (nds32_group_float_insns): Likewise for param "insn".
3551 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
3553 (vax_output_int_subtract): Likewise.
3554 * config/vax/vax.c (vax_output_int_add): Likewise for param
3556 (vax_output_int_subtract): Likewise.
3557 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
3558 (emit_pattern_after): Likewise for param "after".
3559 (emit_insn_after): Likewise.
3560 (emit_jump_insn_after): Likewise.
3561 (emit_call_insn_after): Likewise.
3562 (emit_debug_insn_after): Likewise.
3563 (emit_pattern_before): Likewise for param "before".
3564 (emit_insn_before): Likewise.
3565 (emit_jump_insn_before): Likewise.
3566 * final.c (get_insn_template): Likewise for param "insn", removing
3568 * output.h (get_insn_template): Likewise for 2nd param.
3569 * rtl.h (emit_insn_before): Likewise.
3570 (emit_jump_insn_before): Likewise.
3571 (emit_debug_insn_before_noloc): Likewise.
3572 (emit_insn_after): Likewise.
3573 (emit_jump_insn_after): Likewise.
3574 (emit_call_insn_after): Likewise.
3575 (emit_debug_insn_after): Likewise.
3576 (set_insn_deleted): Likewise for param.
3578 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
3581 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3582 floating point modes, so that IFmode is numerically greater than
3583 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3584 to declare the ordering. This prevents IFmode from being
3585 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3586 machine. Include rs6000-modes.h to share the fractional values
3587 between genmodes* and the rest of the compiler.
3591 * config/rs6000/rs6000-modes.h: New file.
3592 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3593 meaning of rs6000_long_double_size so that 126..128 selects an
3594 appropriate 128-bit floating point type.
3595 (rs6000_option_override_internal): Likewise.
3596 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3597 (TARGET_LONG_DOUBLE_128): Change the meaning of
3598 rs6000_long_double_size so that 126..128 selects an appropriate
3599 128-bit floating point type.
3600 (LONG_DOUBLE_TYPE_SIZE): Update comment.
3601 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
3602 source and destination to match the standard usage.
3603 (truncifkf2): Likewise.
3604 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
3605 ISA 2.07 to use an explicit clobber, instead of passing in a
3607 (copysign<mode>3_soft): Likewise.
3609 2018-06-18 David Malcolm <dmalcolm@redhat.com>
3611 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3612 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
3613 (vect_slp_analyze_instance_dependence): Likewise.
3614 (vect_enhance_data_refs_alignment): Likewise.
3615 (vect_analyze_data_refs_alignment): Likewise.
3616 (vect_slp_analyze_and_verify_instance_alignment
3617 (vect_analyze_data_ref_accesses): Likewise.
3618 (vect_prune_runtime_alias_test_list): Likewise.
3619 (vect_analyze_data_refs): Likewise.
3620 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
3621 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
3622 (vect_analyze_scalar_cycles_1): Likewise.
3623 (vect_get_loop_niters): Likewise.
3624 (vect_analyze_loop_form_1): Likewise.
3625 (vect_update_vf_for_slp): Likewise.
3626 (vect_analyze_loop_operations): Likewise.
3627 (vect_analyze_loop): Likewise.
3628 (vectorizable_induction): Likewise.
3629 (vect_transform_loop): Likewise.
3630 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
3631 * tree-vect-slp.c (vect_analyze_slp): Likewise.
3632 (vect_make_slp_decision): Likewise.
3633 (vect_detect_hybrid_slp): Likewise.
3634 (vect_slp_analyze_operations): Likewise.
3635 (vect_slp_bb): Likewise.
3636 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
3637 (vectorizable_bswap): Likewise.
3638 (vectorizable_call): Likewise.
3639 (vectorizable_simd_clone_call): Likewise.
3640 (vectorizable_conversion): Likewise.
3641 (vectorizable_assignment): Likewise.
3642 (vectorizable_shift): Likewise.
3643 (vectorizable_operation): Likewise.
3644 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
3646 2018-06-18 Martin Sebor <msebor@redhat.com>
3648 PR tree-optimization/81384
3649 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
3650 * builtins.c (expand_builtin_strnlen): New function.
3651 (expand_builtin): Call it.
3652 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
3653 * builtins.def (BUILT_IN_STRNLEN): New.
3654 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
3655 Warn for bounds in excess of maximum object size.
3656 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
3657 single-value ranges. Handle strnlen.
3658 (handle_builtin_strlen): Handle strnlen.
3659 (strlen_check_and_optimize_stmt): Same.
3660 * doc/extend.texi (Other Builtins): Document strnlen.
3662 2018-06-18 Maya Rashish <coypu@sdf.org>
3664 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
3665 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
3666 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
3668 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
3670 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
3672 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3674 * tree.c (escaped_string::escape): Replace cast to char * by
3675 const_cast<char *> (unescaped).
3677 2018-06-18 Nick Clifton <nickc@redhat.com>
3680 * tree.c (escaped_string): New class. Converts an unescaped
3681 string into its escaped equivalent.
3682 (warn_deprecated_use): Use the new class to convert the
3683 deprecation message, if present.
3684 (test_escaped_strings): New self test.
3685 (test_c_tests): Add test_escaped_strings.
3686 * doc/extend.texi (deprecated): Add a note that the
3687 deprecation message is affected by the -fmessage-length
3688 option, and that control characters will be escaped.
3689 (#pragma GCC error): Document this pragma.
3690 (#pragma GCC warning): Likewise.
3691 * doc/invoke.texi (-fmessage-length): Document this option's
3692 effect on the #warning and #error preprocessor directives and
3693 the deprecated attribute.
3695 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
3697 * tree.c (decl_value_expr_lookup): Revert latest change.
3698 (decl_value_expr_insert): Likewise.
3700 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
3702 * gimplify.c (nonlocal_vlas): Delete.
3703 (nonlocal_vla_vars): Likewise.
3704 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
3706 (gimplify_body): Do not create and destroy nonlocal_vlas.
3707 * tree-nested.c: Include diagnostic.h.
3708 (use_pointer_in_frame): Tweak.
3709 (lookup_field_for_decl): Add assertion and declare the transformation.
3710 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
3711 internal error when the reference is in a wrong context. Do not
3712 create a debug decl by default.
3713 (note_nonlocal_block_vlas): Delete.
3714 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
3715 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
3716 create a debug decl by default.
3717 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
3718 call is in a wrong context.
3719 (fixup_vla_decls): New function.
3720 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
3721 debug variables were created.
3722 * tree.c (decl_value_expr_lookup): Add checking assertion.
3723 (decl_value_expr_insert): Likewise.
3725 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3728 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
3729 * tree-scalar-evolution.c (interpret_expr): Likewise.
3730 (expression_expensive_p): Likewise.
3731 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
3732 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
3733 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
3734 (ssa_defined_by_minus_one_stmt_p): New.
3736 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3739 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
3740 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
3741 * dojump.c (do_jump): Likewise.
3742 * expr.c (expand_expr_real_2): Check operand type's sign.
3743 * fold-const.c (const_unop): Handle ABSU_EXPR.
3744 (fold_abs_const): Likewise.
3745 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
3746 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
3747 (strip_sign_op_1): Likesise.
3748 * match.pd: Add new pattern to generate ABSU_EXPR.
3749 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
3750 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3751 * tree-eh.c (operation_could_trap_helper_p): Likewise.
3752 * tree-inline.c (estimate_operator_cost): Likewise.
3753 * tree-pretty-print.c (dump_generic_node): Likewise.
3754 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
3755 * tree.def (ABSU_EXPR): New.
3757 2018-06-16 Jakub Jelinek <jakub@redhat.com>
3760 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
3761 documented as preserved for backward compatibility only.
3762 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
3764 PR rtl-optimization/86108
3765 * bb-reorder.c (create_forwarder_block): Renamed to ...
3766 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
3767 jump from new landing pad to the second part.
3768 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
3771 2018-06-15 Jakub Jelinek <jakub@redhat.com>
3774 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
3775 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
3776 Only call store_expr for halves if the mode is the same.
3779 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
3780 Fix up comment formatting.
3782 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3784 * typed-splay-tree.h (typed_splay_tree::remove): New function.
3785 (typed_splay_tree::closure,
3786 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
3787 (typed_splay_tree::typed_splay_tree,
3788 typed_splay_tree::operator =): Declared private.
3789 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
3790 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
3791 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
3792 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
3793 typed_splay_tree::splay_tree_splay,
3794 typed_splay_tree::splay_tree_foreach_helper,
3795 typed_splay_tree::splay_tree_insert,
3796 typed_splay_tree::splay_tree_remove,
3797 typed_splay_tree::splay_tree_lookup,
3798 typed_splay_tree::splay_tree_predecessor,
3799 typed_splay_tree::splay_tree_successor,
3800 typed_splay_tree::splay_tree_min,
3801 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
3802 (typed_splay_tree::root, typed_splay_tree::comp,
3803 typed_splay_tree::delete_key,
3804 typed_splay_tree::delete_value): New data members.
3805 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
3806 typed_splay_tree::remove.
3808 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
3810 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
3811 -mginv and -mno-ginv to the assembler.
3812 * config/mips/mips.opt (-mcrc): New option.
3814 * doc/invoke.text (-mcrc): Document.
3817 2018-06-15 Nick Clifton <nickc@redhat.com>
3820 * tree.c (escaped_string): New class. Converts an unescaped
3821 string into its escaped equivalent.
3822 (warn_deprecated_use): Use the new class to convert the
3823 deprecation message, if present.
3824 (test_escaped_strings): New self test.
3825 (test_c_tests): Add test_escaped_strings.
3826 * doc/extend.texi (deprecated): Add a note that the
3827 deprecation message is affected by the -fmessage-length
3828 option, and that control characters will be escaped.
3829 (#pragma GCC error): Document this pragma.
3830 (#pragma GCC warning): Likewise.
3831 * doc/invoke.texi (-fmessage-length): Document this option's
3832 effect on the #warning and #error preprocessor directives and
3833 the deprecated attribute.
3835 2018-06-15 Richard Biener <rguenther@suse.de>
3837 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
3838 here, also noting vector size used.
3839 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
3840 size used in MSG_OPTIMIZED_LOCATIONS dump.
3841 (pass_slp_vectorize::execute): Adjust.
3843 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
3846 * config/arc/arc.c (arc_return_address_register): Fix
3849 2018-06-15 Richard Biener <rguenther@suse.de>
3852 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
3853 leave useless conversion stripping to force_gimple_operand_gsi.
3854 (gimplify_build2): Likewise.
3855 (gimplify_build1): Likewise.
3857 2018-06-15 Richard Biener <rguenther@suse.de>
3860 * tree-cfg.c (move_stmt_op): unshare invariant addresses
3861 before adjusting their block.
3863 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
3865 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
3866 multilibs for *-*-rtems*.
3867 * config/riscv/t-rtems: New file.
3869 2018-06-14 Jakub Jelinek <jakub@redhat.com>
3872 * match.pd ((A +- CST1) +- CST2): Punt if last resort
3873 unsigned_type_for returns NULL.
3876 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
3877 subregs of multi-word pseudos unless the float mode has word size.
3879 2018-06-14 Richard Biener <rguenther@suse.de>
3882 * tree-vect-generic.c (build_word_mode_vector_type): Remove
3883 duplicate and harmful type_hash_canon.
3884 * tree.c (type_hash_canon): Assert we didn't find ourselves.
3886 2018-06-14 Richard Biener <rguenther@suse.de>
3889 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
3892 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3894 * config/rtems.h (STDINT_LONG32): Define.
3896 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
3897 Prachi Godbole <prachi.godbole@imgtec.com>
3899 * config/mips/mips-cpus.def: Define P6600.
3900 * config/mips/mips-tables.opt: Regenerate.
3901 * config/mips/mips.c (mips_ucbranch_type): New enum.
3902 (mips_rtx_cost_data): Add support for P6600.
3903 (mips_issue_rate): Likewise.
3904 (mips_multipass_dfa_lookahead): Likewise.
3905 (mips_avoid_hazard): Likewise.
3906 (mips_reorg_process_insns): Likewise.
3907 (mips_classify_branch_p6600): New function.
3908 * config/mips/mips.h (TUNE_P6600): New define.
3909 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
3910 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
3911 * config/mips/mips.md: Include p6600.md.
3912 (processor): Add p6600.
3913 * config/mips/p6600.md: New file.
3914 * doc/invoke.texi: Add p6600 to supported architectures.
3916 2018-06-13 Martin Sebor <msebor@redhat.com>
3918 PR tree-optimization/86114
3919 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
3921 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
3923 2018-06-13 Richard Biener <rguenther@suse.de>
3925 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
3926 Properly set vector type of the intermediate stmt.
3927 * tree-vect-stmts.c (vectorizable_operation): The destination
3928 var always has vectype_out type.
3930 2018-06-13 Jeff Law <law@redhat.com>
3932 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
3933 integer 0 for argument to print_rtl_with_bb.
3934 (rl78_reorg): Likewise.
3936 2018-06-13 David Malcolm <dmalcolm@redhat.com>
3938 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
3939 from rtx to rtx_insn *.
3940 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
3942 (add_sched_insns_for_speculation): Likewise for local "target",
3943 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3944 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
3945 from rtx_insn ** to rtx_code_label **.
3946 (reorg_emit_nops): Likewise.
3947 (c6x_reorg): Likewise for local "call_labels".
3948 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
3950 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
3951 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
3952 the loops over LABEL_REFS.
3953 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
3955 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
3956 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
3957 (split_branches): Strengthen local "olabel" from rtx to
3958 rtx_insn *, adding a safe_as_a cast.
3959 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
3961 (add_insn_after): Likewise for first two params.
3962 (add_insn_before): Likewise.
3963 (remove_insn): Likewise for param.
3964 (emit_pattern_before_noloc): Likewise for second and third params.
3965 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
3966 (emit_call_insn_before_noloc): Likewise.
3967 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
3969 (emit_barrier_before): Likewise.
3970 (emit_label_before): Strengthen "label" param from "rtx" to
3971 "rtx_code_label *". Strengthen "before" param from "rtx" to
3973 (emit_insn_after_1): Strengthen "after" param from "rtx" to
3975 (emit_pattern_after_noloc): Likewise.
3976 (emit_insn_after_noloc): Likewise.
3977 (emit_jump_insn_after_noloc): Likewise.
3978 (emit_call_insn_after_noloc): Likewise.
3979 (emit_debug_insn_after_noloc): Likewise.
3980 (emit_barrier_after): Likewise.
3981 (emit_label_after): Likewise for both params.
3982 (emit_pattern_after_setloc): Likewise for "after" param. Convert
3983 "loc" param from "int" to "location_t".
3984 (emit_insn_after_setloc): Likewise.
3985 (emit_jump_insn_after_setloc): Likewise.
3986 (emit_call_insn_after_setloc): Likewise.
3987 (emit_debug_insn_after_setloc): Likewise.
3988 (emit_pattern_before_setloc): Likewise for "before" param. Convert
3989 "loc" param from "int" to "location_t".
3990 (emit_pattern_before): Convert NULL_RTX to NULL.
3991 (emit_insn_before_setloc): Convert "loc" param from "int" to
3993 (emit_jump_insn_before_setloc): Likewise.
3994 (emit_call_insn_before_setloc): Likewise.
3995 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
3996 rtx_insn *. Convert "loc" param from "int" to "location_t".
3997 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
3998 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
3999 Convert 3rd param from "int" to "location_t".
4000 (emit_barrier_before, emit_barrier_after, next_real_insn):
4001 Strengthen param from rtx to rtx_insn *.
4002 (emit_label_before): Strengthen 1st param from "rtx" to
4003 "rtx_code_label *". Strengthen 2nd param from "rtx" to
4005 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
4006 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
4007 Strengthen 2nd param from "rtx" to "rtx_insn *".
4008 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
4009 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
4010 Likewise. Convert 3rd param from "int" to "location_t".
4011 (emit_label_after): Strengthen 1st param from "rtx" to
4013 (next_real_insn, remove_insn): Strengthen param from "rtx" to
4015 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
4016 from "rtx" to "rtx_insn *".
4018 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
4020 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
4021 bodies streamed in with -Q.
4022 * dumpfile.c (dump_files): Add lto-stream-out dump file.
4023 * dumpfile.h (tree_dump_index): Add lto_stream_out.
4024 * gimple-streamer-out.c: Include gimple-pretty-print.h
4025 (output_bb): Dump stmts streamed.
4026 * lto-section-out.c: Include print-tree.h
4027 (lto_begin_section): Dump sections created.
4028 (lto_output_decl_index): Dump decl encoded.
4029 * lto-streamer-out.c: Include print-tree.h
4030 (create_output_block): Dump output block created.
4031 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
4032 (output_function): Dump function output.
4033 (output_constructor): Dump constructor streamed.
4034 (write_global_stream): Output indexes encoded.
4035 (produce_asm_for_decls): Dump streams encoded.
4036 * lto-streamer.c (streamer_dump_file): New global var.
4037 * lto-streamer.h (streamer_dump_file): Declare.
4038 * passes.c (ipa_write_summaries): Initialize streamer dump.
4039 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
4042 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
4045 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
4046 offsets for register save directives. Emit a second batch of save
4047 directives, if need be, when the function accesses prior frames.
4049 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4051 * config/arc/fpu.md (fmasf4): Force operand to register.
4052 (fnmasf4): Likewise.
4054 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4056 * config/arc/arc-protos.h (arc_pad_return): Remove.
4057 * config/arc/arc.c (machine_function): Remove force_short_suffix
4059 (arc_print_operand): Adjust printing of '&'.
4060 (arc_verify_short): Remove conditional printing of short suffix.
4061 (arc_final_prescan_insn): Remove reference to size_reason.
4062 (pad_return): New function.
4063 (arc_reorg): Call pad_return.
4064 (arc_pad_return): Remove.
4065 (arc_init_machine_status): Remove reference to force_short_suffix.
4066 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
4067 (attr length): When attribute iscompact is true force to 2
4068 regardless; in the case of maybe check if we want to force the
4069 instruction to have 4 bytes length.
4070 (nopv): Change it to generate 4 byte long nop as well.
4071 (blockage): New pattern.
4072 (simple_return): Remove call to arc_pad_return.
4073 (p_return_i): Likewise.
4075 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4077 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
4079 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4081 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
4084 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4086 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
4087 for ARC700 and ARCv2.
4089 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
4092 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
4093 operands[2] instead of operands[1].
4096 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
4098 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
4099 case, check whether the outer register overlaps an unallocatable
4100 register, not just whether it fits the required class.
4102 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
4104 * poly-int.h (can_div_trunc_p): Add new overload in which all values
4106 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
4107 (memrefs_conflict_p): Likewise.
4108 (init_alias_analysis): Likewise.
4109 * cfgexpand.c (expand_debug_expr): Likewise.
4110 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
4111 * cse.c (fold_rtx): Likewise.
4112 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
4113 * expr.c (emit_block_move_hints): Likewise.
4114 (clear_storage_hints, push_block, emit_push_insn): Likewise.
4115 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
4116 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
4117 (emit_group_store): Likewise.
4118 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
4119 to read the PRE/POST_MODIFY increment.
4120 * calls.c (store_one_arg): Use strip_offset.
4121 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
4123 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
4125 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
4126 (simplify_binary_operation_1): Extend CONST_INT handling to
4128 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
4129 than a HOST_WIDE_INT.
4130 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
4132 (adjust_mems, add_stores): Update accodingly.
4133 (vt_canonicalize_addr): Track polynomial offsets.
4134 (emit_note_insn_var_location): Likewise.
4135 (vt_add_function_parameter): Likewise.
4136 (vt_initialize): Likewise.
4138 2018-06-12 Jeff Law <law@redhat.com>
4140 * config.gcc (alpha*-*-freebsd*): Remove.
4141 * config/alpha/freebsd.h: Remove.
4143 2018-06-12 David Malcolm <dmalcolm@redhat.com>
4146 * spellcheck-tree.c (levenshtein_distance): Rename to...
4147 (get_edit_distance): ...this, and update for underlying renaming.
4148 * spellcheck-tree.h (levenshtein_distance): Rename to...
4149 (get_edit_distance): ...this.
4150 * spellcheck.c (levenshtein_distance): Rename to...
4151 (get_edit_distance): ...this. Convert from Levenshtein distance
4152 to Damerau-Levenshtein distance by supporting transpositions of
4153 adjacent characters. Rename "v1" to "v_next" and "v0" to
4155 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
4156 (selftest::test_edit_distance_unit_test_oneway): ...this, and
4157 update for underlying renaming.
4158 (selftest::levenshtein_distance_unit_test): Rename to...
4159 (selftest::test_get_edit_distance_unit): ...this, and update for
4160 underlying renaming.
4161 (selftest::test_find_closest_string): Add example from PR 69968
4162 where transposition helps
4163 (selftest::test_metric_conditions): Update for renaming.
4164 (selftest::test_metric_conditions): Likewise.
4165 (selftest::spellcheck_c_tests): Likewise.
4166 * spellcheck.h (levenshtein_distance): Rename both overloads to...
4167 (get_edit_distance): ...this.
4168 (best_match::consider): Update for renaming.
4170 2018-06-12 Martin Sebor <msebor@redhat.com>
4172 PR tree-optimization/85259
4173 * builtins.c (compute_objsize): Handle constant offsets.
4174 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
4175 true iff a warning has been issued.
4176 * gimple.h (gimple_nonartificial_location): New function.
4177 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
4178 gimple_nonartificial_location and handle -Wno-system-headers.
4179 (handle_builtin_stxncpy): Same.
4181 2018-06-12 Martin Sebor <msebor@redhat.com>
4184 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
4186 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
4188 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4189 BUILTIN_VEC_XST entries for pointer to double and long long.
4191 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
4194 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4196 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4199 2018-06-12 Martin Liska <mliska@suse.cz>
4201 * doc/options.texi: Document IntegerRange.
4203 2018-06-12 Martin Liska <mliska@suse.cz>
4205 * config/i386/i386.opt: Make MPX-related options as Deprecated.
4206 * opt-functions.awk: Handle Deprecated flag.
4207 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
4209 (read_cmdline_option): Report warning for a deprecated option.
4210 * opts.h (struct cl_option): Add new field cl_deprecated.
4211 (CL_ERR_DEPRECATED): New.
4213 2018-06-12 Martin Liska <mliska@suse.cz>
4215 * doc/options.texi: Document Deprecated option flag.
4217 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4219 * config/arc/arc-arch.h (arc_extras): New enum.
4220 (arc_cpu_t):Add field extra.
4221 (arc_cpu_types): Consider the extras.
4222 * config/arc/arc-cpus.def: Add extras info.
4223 * config/arc/arc-opts.h (processor_type): Consider extra field.
4224 * config/arc/arc.c (arc_override_options): Handle extra field.
4226 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4228 * config/arc/arc-arch.h: Update ARC_OPTX macro.
4229 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
4231 * config/arc/arc.c (arc_init): Update pic warning.
4232 (irq_range): Update irq range parsing warnings.
4233 (arc_override_options): Update various warning messages.
4234 (arc_handle_aux_attribute): Likewise.
4236 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
4238 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
4240 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4242 * doc/sourcebuild.texi: Document usage of line number 0 in verify
4243 compiler messages directives.
4245 2018-06-12 Matthew Fortune <mfortune@gmail.com>
4247 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
4248 * config/mips/mips-tables.opt: Regenerate.
4249 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
4251 * doc/invoke.texi: Document -march=i6500.
4253 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
4255 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
4256 (i6400_gpmul): Add cpu_unit.
4257 (i6400_gpdiv): Likewise.
4258 (i6400_msa_add_d): Update reservations.
4259 (i6400_msa_int_add) Likewise.
4260 (i6400_msa_short_logic3) Likewise.
4261 (i6400_msa_short_logic2) Likewise.
4262 (i6400_msa_short_logic) Likewise.
4263 (i6400_msa_move) Likewise.
4264 (i6400_msa_cmp) Likewise.
4265 (i6400_msa_short_float2) Likewise.
4266 (i6400_msa_div_d) Likewise.
4267 (i6400_msa_long_logic1) Likewise.
4268 (i6400_msa_long_logic2) Likewise.
4269 (i6400_msa_mult) Likewise.
4270 (i6400_msa_long_float2) Likewise.
4271 (i6400_msa_long_float4) Likewise.
4272 (i6400_msa_long_float5) Likewise.
4273 (i6400_msa_long_float8) Likewise.
4274 (i6400_fpu_fadd): Include frint type.
4275 (i6400_fpu_store): New define_insn_reservation.
4276 (i6400_fpu_load): Likewise.
4277 (i6400_fpu_move): Likewise.
4278 (i6400_fpu_fcmp): Likewise.
4279 (i6400_fpu_fmadd): Likewise.
4280 (i6400_int_mult): Include imul3nc type and update reservation.
4281 (i6400_int_div): Include idiv3 type and update reservation.
4282 (i6400_int_load): Update to check type not move_type.
4283 (i6400_int_store): Likewise.
4284 (i6400_int_prefetch): Set zero latency.
4286 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
4288 * gcc.c: Document new %@{...} sequence.
4289 (LINK_COMMAND_SPEC): Use it for the -L switches.
4290 (cpp_unique_options): Use it for the -I switches.
4291 (at_file_argbuf): New global variable.
4292 (in_at_file): Likewise.
4293 (alloc_args): Create at_file_argbuf.
4294 (clear_args): Truncate at_file_argbuf.
4295 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
4296 (open_at_file): New function.
4297 (close_at_file): Likewise.
4298 (create_at_file): Delete.
4299 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
4302 (validate_switches_from_spec): Deal with %@{...} sequence.
4303 (validate_switches): Likewise.
4304 (driver::finalize): Call clear_args.
4306 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4308 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
4310 2018-06-11 Martin Sebor <msebor@redhat.com>
4312 * doc/invoke.texi (-Wall): List -Wc++17-compat.
4313 (Wno-class-memaccess): Add @opindex.
4314 (Wno-templates, Wno-multiple-inheritance): Same.
4315 (Wno-virtual-inheritance, Wno-namespaces): Same.
4316 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
4317 (Wno-format-overflow, Wno-format-truncation): Same.
4318 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
4319 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
4320 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
4321 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
4322 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
4323 (Wno-misspelled-isr): Same.
4325 2018-06-11 Martin Sebor <msebor@redhat.com>
4327 * PR tree-optimization/86083
4328 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
4330 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
4332 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
4334 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
4337 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
4338 on the correct operand.
4339 (*movdi_internal64): Ditto.
4341 2018-06-11 Martin Liska <mliska@suse.cz>
4343 PR tree-optimization/86089
4344 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
4346 2018-06-11 Julia Koval <julia.koval@intel.com>
4348 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
4349 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
4350 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
4352 2018-06-11 Olivier Hainque <hainque@adacore.com>
4354 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
4355 for Ada with strict dwarf2.
4357 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
4360 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
4363 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
4365 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
4367 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
4369 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
4372 2018-06-08 Martin Liska <mliska@suse.cz>
4374 * tree-cfg.h (debug_function): Fix argument type to match
4377 2018-06-08 Martin Liska <mliska@suse.cz>
4379 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
4380 Remove usage of MPX-related (and removed) fields.
4381 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
4383 2018-06-08 David Malcolm <dmalcolm@redhat.com>
4385 * cfg.c (debug): Use TDF_NONE rather than 0.
4386 * cfghooks.c (debug): Likewise.
4387 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
4388 (struct dump_option_value_info): Convert to...
4389 (struct kv_pair): ...this template type.
4390 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
4392 (optinfo_verbosity_options): Likewise.
4393 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
4395 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
4396 than int for "optgroup_flags" param.
4397 (dump_generic_expr_loc): Use dump_flags_t rather than int for
4399 (dump_dec): Likewise.
4400 (dump_finish): Use TDF_NONE rather than 0.
4401 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
4402 rather than int for "optgroup_flags" param. Use TDF_NONE rather
4403 than 0. Update for change to option_ptr.
4404 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
4405 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
4406 0. Update for changes to optinfo_verbosity_options and
4408 (opt_info_switch_p): Convert optgroup_flags from int to
4410 (dump_basic_block): Use dump_flags_t rather than int
4411 for "dump_kind" param.
4412 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
4413 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
4414 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
4415 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
4416 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
4417 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
4418 TDF_NONE): Convert from macros to...
4419 (enum dump_flag): ...this new enum.
4420 (dump_flags_t): Update to use enum.
4421 (operator|, operator&, operator~, operator|=, operator&=):
4422 Implement for dump_flags_t.
4423 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
4424 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
4425 Convert from macros to...
4426 (enum optgroup_flag): ...this new enum.
4427 (optgroup_flags_t): New typedef.
4428 (operator|, operator|=): Implement for optgroup_flags_t.
4429 (struct dump_file_info): Convert field "alt_flags" to
4430 dump_flags_t. Convert field "optgroup_flags" to
4432 (dump_basic_block): Use dump_flags_t rather than int for param.
4433 (dump_generic_expr_loc): Likewise.
4434 (dump_dec): Likewise.
4435 (dump_register): Convert param "optgroup_flags" to
4437 (opt_info_enable_passes): Likewise.
4438 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
4440 * gimple-pretty-print.c (debug): Likewise.
4441 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
4442 (merged_store_group::apply_stores): Likewise.
4443 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
4444 * gimple.c (verify_gimple_pp): Likewise.
4445 * graphite-poly.c (print_pbb_body): Likewise.
4446 * passes.c (pass_manager::register_one_dump_file): Convert
4447 local "optgroup_flags" to optgroup_flags_t.
4448 * print-tree.c (print_node): Use TDF_NONE rather than 0.
4450 (debug_body): Likewise.
4451 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
4452 to optgroup_flags_t.
4453 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
4455 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
4456 (convert_mult_to_fma): Likewise.
4457 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
4458 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
4459 * tree-vect-data-refs.c (dump_lower_bound): Convert param
4460 "dump_kind" to dump_flags_t.
4462 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
4464 * config/rs6000/rs6000.c (min, max): Delete.
4466 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
4468 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
4469 -mabi=spe and -mabi=no-spe.
4471 2018-06-08 Martin Liska <mliska@suse.cz>
4473 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
4474 where we expect an existing summary.
4476 2018-06-08 Martin Liska <mliska@suse.cz>
4478 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
4479 * ipa-inline.h (estimate_edge_growth): Likewise.
4481 2018-06-08 Martin Liska <mliska@suse.cz>
4483 * cgraph.c (function_version_hasher::hash): Use
4484 cgraph_node::get_uid ().
4485 (function_version_hasher::equal):
4486 * cgraph.h (cgraph_node::get_uid): New method.
4487 * ipa-inline.c (update_caller_keys): Use
4488 cgraph_node::get_uid ().
4489 (update_callee_keys): Likewise.
4490 * ipa-utils.c (searchc): Likewise.
4491 (ipa_reduced_postorder): Likewise.
4492 * lto-cgraph.c (input_node): Likewise.
4493 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
4494 * symbol-summary.h (symtab_insertion): Likewise.
4495 (symtab_removal): Likewise.
4496 (symtab_duplication): Likewise.
4497 * tree-pretty-print.c (dump_function_header): Likewise.
4498 * tree-sra.c (convert_callers_for_node): Likewise.
4500 2018-06-08 Martin Liska <mliska@suse.cz>
4502 * cgraph.c (symbol_table::create_edge): Always assign a new
4504 (symbol_table::free_edge): Do not recycle numbers.
4505 * cgraph.h (cgraph_edge::get): New method.
4506 * symbol-summary.h (symtab_removal): Use it.
4507 (symtab_duplication): Likewise.
4508 (call_summary::hashable_uid): Remove.
4510 2018-06-08 Martin Liska <mliska@suse.cz>
4512 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
4513 (initialize_growth_caches): Remove.
4514 (free_growth_caches): Likewise.
4515 (do_estimate_edge_time): Use edge_growth_cache.
4516 (do_estimate_edge_size): Likewise.
4517 (do_estimate_edge_hints): Likewise.
4518 * ipa-inline.c (reset_edge_caches): Likewise.
4519 (recursive_inlining): Likewise.
4520 (inline_small_functions): Likewise.
4521 * ipa-inline.h (initialize_growth_caches): Remove.
4522 (estimate_edge_size): Likewise.
4523 (estimate_edge_time): Likewise.
4524 (estimate_edge_hints): Likewise.
4525 (reset_edge_growth_cache): Likewise.
4526 * symbol-summary.h (call_summary::remove): New method.
4528 2018-06-08 Martin Liska <mliska@suse.cz>
4530 * ipa-cp.c (class edge_clone_summary): New summary.
4531 (grow_edge_clone_vectors): Remove.
4532 (ipcp_edge_duplication_hook): Remove.
4533 (class edge_clone_summary_t): New call_summary class.
4534 (ipcp_edge_removal_hook): Remove.
4535 (edge_clone_summary_t::duplicate): New function.
4536 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
4537 (create_specialized_node): Likewise.
4538 (ipcp_driver): Initialize edge_clone_summaries and do not
4541 2018-06-08 Martin Liska <mliska@suse.cz>
4543 * symbol-summary.h (get): New function.
4544 (call_summary::m_initialize_when_cloning): New class member.
4546 2018-06-08 Martin Liska <mliska@suse.cz>
4548 * cgraph.c (cgraph_node::remove): Do not recycle uid.
4549 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
4550 (symbol_table::allocate_cgraph_symbol): Do not set uid.
4551 * passes.c (uid_hash_t): Record removed_nodes by their uids.
4552 (remove_cgraph_node_from_order): Use the removed_nodes set.
4553 (do_per_function_toporder): Likwise.
4554 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
4555 instead of summary_uid.
4556 (symtab_removal): Likewise.
4557 (symtab_duplication): Likewise.
4559 2018-06-08 Martin Liska <mliska@suse.cz>
4561 * ipa-cp.c (ipcp_store_bits_results): Use
4562 ipcp_transformation_sum.
4563 (ipcp_store_vr_results): Likewise.
4564 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
4566 (ipcp_transformation_initialize): ... this.
4567 (ipa_set_node_agg_value_chain):
4568 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
4569 (write_ipcp_transformation_info): Likewise.
4570 (read_ipcp_transformation_info): Likewise.
4571 (ipcp_update_bits): Likewise.
4572 (ipcp_update_vr): Likewise.
4573 (ipcp_transform_function): Likewise.
4574 * ipa-prop.h: Rename ipcp_transformation_summary to
4575 ipcp_transformation.
4576 (class ipcp_transformation_t): New function summary.
4577 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
4578 (ipa_get_agg_replacements_for_node): Likewise.
4580 2018-06-08 Martin Liska <mliska@suse.cz>
4582 * ipa-pure-const.c (struct funct_state_d): Do it class instead
4584 (class funct_state_summary_t): New function_summary class.
4585 (has_function_state): Remove.
4586 (get_function_state): Likewise.
4587 (set_function_state): Likewise.
4588 (add_new_function): Likewise.
4589 (funct_state_summary_t::insert): New function.
4590 (duplicate_node_data): Remove.
4591 (remove_node_data): Remove.
4592 (funct_state_summary_t::duplicate): New function.
4593 (register_hooks): Create new funct_state_summaries.
4594 (pure_const_generate_summary): Use it.
4595 (pure_const_write_summary): Likewise.
4596 (pure_const_read_summary): Likewise.
4597 (propagate_pure_const): Likewise.
4598 (propagate_nothrow): Likewise.
4599 (dump_malloc_lattice): Likewise.
4600 (propagate_malloc): Likewise.
4601 (execute): Do not register hooks, just remove summary
4603 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
4606 2018-06-08 Martin Liska <mliska@suse.cz>
4608 * ipa-reference.c (remove_node_data): Remove.
4609 (duplicate_node_data): Likewise.
4610 (class ipa_ref_var_info_summary_t): New class.
4611 (class ipa_ref_opt_summary_t): Likewise.
4612 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
4613 (get_reference_optimization_summary): Use
4614 ipa_ref_opt_sum_summaries.
4615 (set_reference_vars_info): Remove.
4616 (set_reference_optimization_summary): Likewise.
4617 (ipa_init): Create summaries.
4618 (init_function_info): Use function summary.
4619 (ipa_ref_opt_summary_t::duplicate): New function.
4620 (ipa_ref_opt_summary_t::remove): New function.
4621 (get_read_write_all_from_node): Fix GNU coding style.
4622 (propagate): Use function summary.
4623 (write_node_summary_p): Fix GNU coding style.
4624 (stream_out_bitmap): Likewise.
4625 (ipa_reference_read_optimization_summary): Use function summary.
4626 (ipa_reference_c_finalize): Do not release hooks.
4628 2018-06-08 Martin Liska <mliska@suse.cz>
4630 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
4631 (analyze_function_body): Extract multiple calls of get_create.
4632 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4633 * ipa-inline.c (recursive_inlining): Use ::get method.
4634 * ipa-inline.h (estimate_edge_growth): Likewise.
4636 2018-06-08 Martin Liska <mliska@suse.cz>
4638 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
4640 (hsa_function_summary::hsa_function_summary): Use the new enum
4642 (hsa_gpu_implementation_p): Use hsa_summaries::get.
4643 * hsa-gen.c (hsa_get_host_function): Likewise.
4644 (get_brig_function_name): Likewise.
4645 * ipa-hsa.c (process_hsa_functions): Likewise.
4646 (ipa_hsa_write_summary): Likewise.
4647 * symbol-summary.h (symtab_duplication): Use ::get function/
4648 (get): New function.
4650 2018-06-08 Martin Liska <mliska@suse.cz>
4652 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
4654 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
4655 (hsa_register_kernel): Likewise.
4656 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
4657 * hsa-gen.c (hsa_get_host_function): Likewise.
4658 (get_brig_function_name): Likewise.
4659 (generate_hsa): Likewise.
4660 (pass_gen_hsail::execute): Likewise.
4661 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
4662 (devirtualization_time_bonus): Likewise.
4663 (ipcp_propagate_stage): Likewise.
4664 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4665 (edge_set_predicate): Likewise.
4666 (evaluate_conditions_for_known_args): Likewise.
4667 (evaluate_properties_for_edge): Likewise.
4668 (ipa_fn_summary::reset): Likewise.
4669 (ipa_fn_summary_t::duplicate): Likewise.
4670 (dump_ipa_call_summary): Likewise.
4671 (ipa_dump_fn_summary): Likewise.
4672 (analyze_function_body): Likewise.
4673 (compute_fn_summary): Likewise.
4674 (estimate_edge_devirt_benefit): Likewise.
4675 (estimate_edge_size_and_time): Likewise.
4676 (estimate_calls_size_and_time): Likewise.
4677 (estimate_node_size_and_time): Likewise.
4678 (inline_update_callee_summaries): Likewise.
4679 (remap_edge_change_prob): Likewise.
4680 (remap_edge_summaries): Likewise.
4681 (ipa_merge_fn_summary_after_inlining): Likewise.
4682 (ipa_update_overall_fn_summary): Likewise.
4683 (read_ipa_call_summary): Likewise.
4684 (inline_read_section): Likewise.
4685 (write_ipa_call_summary): Likewise.
4686 (ipa_fn_summary_write): Likewise.
4687 (ipa_free_fn_summary): Likewise.
4688 * ipa-hsa.c (process_hsa_functions): Likewise.
4689 (ipa_hsa_write_summary): Likewise.
4690 (ipa_hsa_read_section): Likewise.
4691 * ipa-icf.c (sem_function::merge): Likewise.
4692 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
4693 (do_estimate_edge_time): Likewise.
4694 (estimate_size_after_inlining): Likewise.
4695 (estimate_growth): Likewise.
4696 (growth_likely_positive): Likewise.
4697 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4698 (inline_call): Likewise.
4699 * ipa-inline.c (caller_growth_limits): Likewise.
4700 (can_inline_edge_p): Likewise.
4701 (can_inline_edge_by_limits_p): Likewise.
4702 (compute_uninlined_call_time): Likewise.
4703 (compute_inlined_call_time): Likewise.
4704 (want_inline_small_function_p): Likewise.
4705 (edge_badness): Likewise.
4706 (update_caller_keys): Likewise.
4707 (update_callee_keys): Likewise.
4708 (recursive_inlining): Likewise.
4709 (inline_small_functions): Likewise.
4710 (inline_to_all_callers_1): Likewise.
4711 (dump_overall_stats): Likewise.
4712 (early_inline_small_functions): Likewise.
4713 (early_inliner): Likewise.
4714 * ipa-inline.h (estimate_edge_growth): Likewise.
4715 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4716 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4717 * ipa-prop.h (IPA_NODE_REF): Likewise.
4718 (IPA_EDGE_REF): Likewise.
4719 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4720 (propagate_malloc): Likewise.
4721 * ipa-split.c (execute_split_functions): Likewise.
4722 * symbol-summary.h: Rename get to get_create.
4724 (get_create): Likewise.
4725 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4727 2018-06-08 Martin Liska <mliska@suse.cz>
4729 * symbol-summary.h (release): Move definition out of class
4731 (symtab_removal): Likewise.
4732 (symtab_duplication): Likewise.
4734 2018-06-08 Martin Liska <mliska@suse.cz>
4736 * symbol-summary.h (function_summary): Move constructor
4737 implementation out of class declaration.
4738 (release): Likewise.
4739 (symtab_insertion): Likewise.
4740 (symtab_removal): Likewise.
4741 (symtab_duplication): Likewise.
4744 2018-06-08 Martin Liska <mliska@suse.cz>
4746 * Makefile.in: Remove support for MPX (macros, related functions,
4747 fields in cgraph_node, ...).
4748 * builtin-types.def (BT_BND): Likewise.
4749 (BT_FN_BND_CONST_PTR): Likewise.
4750 (BT_FN_CONST_PTR_BND): Likewise.
4751 (BT_FN_VOID_PTR_BND): Likewise.
4752 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
4753 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
4754 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
4755 (expand_builtin_mempcpy_with_bounds): Likewise.
4756 (expand_builtin_memset_with_bounds): Likewise.
4757 (expand_builtin_memset_args): Likewise.
4758 (std_expand_builtin_va_start): Likewise.
4759 (expand_builtin): Likewise.
4760 (expand_builtin_with_bounds): Likewise.
4761 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
4762 (DEF_LIB_BUILTIN_CHKP): Likewise.
4763 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
4764 (DEF_CHKP_BUILTIN): Likewise.
4765 (BUILT_IN_MEMCPY): Likewise.
4766 (BUILT_IN_MEMMOVE): Likewise.
4767 (BUILT_IN_MEMPCPY): Likewise.
4768 (BUILT_IN_MEMSET): Likewise.
4769 (BUILT_IN_STPCPY): Likewise.
4770 (BUILT_IN_STRCAT): Likewise.
4771 (BUILT_IN_STRCHR): Likewise.
4772 (BUILT_IN_STRCPY): Likewise.
4773 (BUILT_IN_STRLEN): Likewise.
4774 (BUILT_IN_MEMCPY_CHK): Likewise.
4775 (BUILT_IN_MEMMOVE_CHK): Likewise.
4776 (BUILT_IN_MEMPCPY_CHK): Likewise.
4777 (BUILT_IN_MEMSET_CHK): Likewise.
4778 (BUILT_IN_STPCPY_CHK): Likewise.
4779 (BUILT_IN_STRCAT_CHK): Likewise.
4780 (BUILT_IN_STRCPY_CHK): Likewise.
4781 * calls.c (store_bounds): Likewise.
4782 (emit_call_1): Likewise.
4783 (special_function_p): Likewise.
4784 (maybe_warn_nonstring_arg): Likewise.
4785 (initialize_argument_information): Likewise.
4786 (finalize_must_preallocate): Likewise.
4787 (compute_argument_addresses): Likewise.
4788 (expand_call): Likewise.
4789 * cfgexpand.c (expand_call_stmt): Likewise.
4790 (expand_return): Likewise.
4791 (expand_gimple_stmt_1): Likewise.
4792 (pass_expand::execute): Likewise.
4793 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
4794 (cgraph_node::remove): Likewise.
4795 (cgraph_node::dump): Likewise.
4796 (cgraph_node::verify_node): Likewise.
4797 * cgraph.h (chkp_function_instrumented_p): Likewise.
4798 (symtab_node::get_alias_target): Likewise.
4799 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
4800 (cgraph_local_p): Likewise.
4801 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
4802 (cgraph_edge::rebuild_references): Likewise.
4803 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
4804 (walk_polymorphic_call_targets): Likewise.
4805 (cgraph_node::expand_thunk): Likewise.
4806 (symbol_table::output_weakrefs): Likewise.
4807 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
4808 (ix86_handle_option): Likewise.
4809 * config/i386/constraints.md: Likewise.
4810 * config/i386/i386-builtin-types.def (BND): Likewise.
4814 * config/i386/i386-builtin.def (BDESC_END): Likewise.
4815 (BDESC_FIRST): Likewise.
4817 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
4818 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
4819 * config/i386/i386.c (enum reg_class): Likewise.
4820 (ix86_target_string): Likewise.
4821 (ix86_option_override_internal): Likewise.
4822 (ix86_conditional_register_usage): Likewise.
4823 (ix86_valid_target_attribute_inner_p): Likewise.
4824 (ix86_set_indirect_branch_type): Likewise.
4825 (ix86_set_current_function): Likewise.
4826 (ix86_function_arg_regno_p): Likewise.
4827 (init_cumulative_args): Likewise.
4828 (ix86_function_arg_advance): Likewise.
4829 (ix86_function_arg): Likewise.
4830 (ix86_pass_by_reference): Likewise.
4831 (ix86_function_value_regno_p): Likewise.
4832 (ix86_function_value_1): Likewise.
4833 (ix86_function_value_bounds): Likewise.
4834 (ix86_return_in_memory): Likewise.
4835 (ix86_setup_incoming_vararg_bounds): Likewise.
4836 (ix86_va_start): Likewise.
4837 (indirect_thunk_need_prefix): Likewise.
4838 (print_reg): Likewise.
4839 (ix86_print_operand): Likewise.
4840 (ix86_expand_call): Likewise.
4841 (ix86_output_function_return): Likewise.
4842 (reg_encoded_number): Likewise.
4843 (BDESC_VERIFYS): Likewise.
4844 (ix86_init_mpx_builtins): Likewise.
4845 (ix86_init_builtins): Likewise.
4846 (ix86_emit_cmove): Likewise.
4847 (ix86_emit_move_max): Likewise.
4848 (ix86_expand_builtin): Likewise.
4849 (ix86_builtin_mpx_function): Likewise.
4850 (ix86_get_arg_address_for_bt): Likewise.
4851 (ix86_load_bounds): Likewise.
4852 (ix86_store_bounds): Likewise.
4853 (ix86_load_returned_bounds): Likewise.
4854 (ix86_store_returned_bounds): Likewise.
4855 (ix86_class_likely_spilled_p): Likewise.
4856 (ix86_hard_regno_mode_ok): Likewise.
4857 (x86_order_regs_for_local_alloc): Likewise.
4858 (ix86_mitigate_rop): Likewise.
4859 (ix86_bnd_prefixed_insn_p): Likewise.
4860 (ix86_mpx_bound_mode): Likewise.
4861 (ix86_make_bounds_constant): Likewise.
4862 (ix86_initialize_bounds): Likewise.
4863 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
4864 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
4865 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
4866 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
4867 (TARGET_CHKP_BOUND_MODE): Likewise.
4868 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
4869 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
4870 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
4871 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
4872 * config/i386/i386.h (TARGET_MPX): Likewise.
4873 (TARGET_MPX_P): Likewise.
4874 (VALID_BND_REG_MODE): Likewise.
4875 (FIRST_BND_REG): Likewise.
4876 (LAST_BND_REG): Likewise.
4877 (enum reg_class): Likewise.
4878 (BND_REG_P): Likewise.
4879 (BND_REGNO_P): Likewise.
4880 (BNDmode): Likewise.
4881 (ADJUST_INSN_LENGTH): Likewise.
4882 * config/i386/i386.md: Likewise.
4883 * config/i386/i386.opt: Likewise.
4884 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
4885 (defined): Likewise.
4886 (LINK_MPX): Likewise.
4887 (MPX_SPEC): Likewise.
4888 (LIBMPX_SPEC): Likewise.
4889 (LIBMPXWRAPPERS_SPEC): Likewise.
4890 (CHKP_SPEC): Likewise.
4891 * config/i386/predicates.md: Likewise.
4892 * dbxout.c (dbxout_type): Likewise.
4893 * doc/extend.texi: Likewise.
4894 * doc/invoke.texi: Likewise.
4895 * doc/md.texi: Likewise.
4896 * doc/tm.texi: Likewise.
4897 * doc/tm.texi.in: Likewise.
4898 * dwarf2out.c (is_base_type): Likewise.
4899 (gen_formal_types_die): Likewise.
4900 (gen_subprogram_die): Likewise.
4901 (gen_type_die_with_usage): Likewise.
4902 (gen_decl_die): Likewise.
4903 (dwarf2out_late_global_decl): Likewise.
4904 * expr.c (expand_assignment): Likewise.
4905 (emit_storent_insn): Likewise.
4906 (store_expr_with_bounds): Likewise.
4907 (store_expr): Likewise.
4908 (expand_expr_real_1): Likewise.
4909 * expr.h (store_expr_with_bounds): Likewise.
4910 * function.c (use_register_for_decl): Likewise.
4911 (struct bounds_parm_data): Likewise.
4912 (assign_parms_augmented_arg_list): Likewise.
4913 (assign_parm_find_entry_rtl): Likewise.
4914 (assign_parm_is_stack_parm): Likewise.
4915 (assign_parm_load_bounds): Likewise.
4916 (assign_bounds): Likewise.
4917 (assign_parms): Likewise.
4918 (expand_function_start): Likewise.
4919 * gcc.c (CHKP_SPEC): Likewise.
4920 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
4921 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
4922 (wrestrict_dom_walker::check_call): Likewise.
4923 * gimple.c (gimple_build_call_from_tree): Likewise.
4924 * gimple.h (enum gf_mask): Likewise.
4925 (gimple_call_with_bounds_p): Likewise.
4926 (gimple_call_set_with_bounds): Likewise.
4927 * gimplify.c (gimplify_init_constructor): Likewise.
4928 * ipa-cp.c (initialize_node_lattices): Likewise.
4929 (propagate_constants_across_call): Likewise.
4930 (find_more_scalar_values_for_callers_subset): Likewise.
4931 * ipa-hsa.c (process_hsa_functions): Likewise.
4932 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
4933 * ipa-icf.c (sem_function::merge): Likewise.
4934 * ipa-inline.c (early_inliner): Likewise.
4935 * ipa-pure-const.c (warn_function_noreturn): Likewise.
4936 (warn_function_cold): Likewise.
4937 (propagate_pure_const): Likewise.
4938 * ipa-ref.h (enum GTY): Likewise.
4939 * ipa-split.c (find_retbnd): Likewise.
4940 (consider_split): Likewise.
4941 (split_function): Likewise.
4942 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4943 * ipa.c (walk_polymorphic_call_targets): Likewise.
4944 (symbol_table::remove_unreachable_nodes): Likewise.
4945 (process_references): Likewise.
4946 (cgraph_build_static_cdtor_1): Likewise.
4947 * lto-cgraph.c (lto_output_node): Likewise.
4948 (output_refs): Likewise.
4949 (compute_ltrans_boundary): Likewise.
4950 (input_overwrite_node): Likewise.
4951 (input_node): Likewise.
4952 (input_cgraph_1): Likewise.
4953 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
4954 * passes.c (pass_manager::execute_early_local_passes): Likewise.
4955 (class pass_chkp_instrumentation_passes): Likewise.
4956 (make_pass_chkp_instrumentation_passes): Likewise.
4957 * passes.def: Likewise.
4958 * rtl.h (struct GTY): Likewise.
4959 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
4960 * stor-layout.c (layout_type): Likewise.
4961 * symtab.c: Likewise.
4962 * target.def: Likewise.
4963 * targhooks.c (default_chkp_bound_type): Likewise.
4964 (default_chkp_bound_mode): Likewise.
4965 (default_builtin_chkp_function): Likewise.
4966 (default_chkp_function_value_bounds): Likewise.
4967 (default_chkp_make_bounds_constant): Likewise.
4968 (default_chkp_initialize_bounds): Likewise.
4969 * targhooks.h (default_chkp_bound_type): Likewise.
4970 (default_chkp_bound_mode): Likewise.
4971 (default_builtin_chkp_function): Likewise.
4972 (default_chkp_function_value_bounds): Likewise.
4973 (default_chkp_make_bounds_constant): Likewise.
4974 (default_chkp_initialize_bounds): Likewise.
4975 * toplev.c (compile_file): Likewise.
4976 (process_options): Likewise.
4977 * tree-core.h (DEF_BUILTIN): Likewise.
4978 (DEF_BUILTIN_CHKP): Likewise.
4979 * tree-inline.c (declare_return_variable): Likewise.
4980 (remap_gimple_stmt): Likewise.
4981 (copy_bb): Likewise.
4982 (initialize_inlined_parameters): Likewise.
4983 (expand_call_inline): Likewise.
4984 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
4985 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
4986 (make_pass_ipa_chkp_produce_thunks): Likewise.
4987 (make_pass_chkp): Likewise.
4988 (make_pass_chkp_opt): Likewise.
4989 (make_pass_chkp_instrumentation_passes): Likewise.
4990 * tree-pretty-print.c (dump_generic_node): Likewise.
4991 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
4992 * tree-ssa-dce.c (propagate_necessity): Likewise.
4993 (eliminate_unnecessary_stmts): Likewise.
4994 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
4995 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
4996 * tree-ssa-sccvn.h: Likewise.
4997 * tree-ssa-strlen.c (get_string_length): Likewise.
4998 (valid_builtin_call): Likewise.
4999 (adjust_last_stmt): Likewise.
5000 (handle_builtin_strchr): Likewise.
5001 (handle_builtin_strcpy): Likewise.
5002 (handle_builtin_stxncpy): Likewise.
5003 (handle_builtin_memcpy): Likewise.
5004 (handle_builtin_strcat): Likewise.
5005 (strlen_check_and_optimize_stmt): Likewise.
5006 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
5007 * tree-streamer-in.c: Likewise.
5008 * tree-streamer.c (record_common_node): Likewise.
5009 * tree.c (tree_code_size): Likewise.
5010 (wide_int_to_tree_1): Likewise.
5011 (type_contains_placeholder_1): Likewise.
5012 (build_common_tree_nodes): Likewise.
5013 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
5014 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
5015 (POINTER_BOUNDS_P): Likewise.
5016 (BOUNDED_TYPE_P): Likewise.
5017 (BOUNDED_P): Likewise.
5018 (CALL_WITH_BOUNDS_P): Likewise.
5019 (pointer_bounds_type_node): Likewise.
5020 * value-prof.c (gimple_ic): Likewise.
5021 * var-tracking.c (vt_add_function_parameters): Likewise.
5022 * varasm.c (make_decl_rtl): Likewise.
5023 (assemble_start_function): Likewise.
5024 (output_constant): Likewise.
5025 (maybe_assemble_visibility): Likewise.
5026 * varpool.c (ctor_for_folding): Likewise.
5027 * chkp-builtins.def: Remove.
5028 * ipa-chkp.c: Remove.
5029 * ipa-chkp.h: Remove.
5030 * rtl-chkp.c: Remove.
5031 * rtl-chkp.h: Remove.
5032 * tree-chkp-opt.c: Remove.
5033 * tree-chkp.c: Remove.
5034 * tree-chkp.h: Remove.
5036 2018-06-07 Carl Love <cel@us.ibm.com>
5038 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
5039 vextract_fp_from_shortl): Add BE support.
5041 2018-06-07 Paul Koning <ni1d@arrl.net>
5043 * compare-elim.c (try_merge_compare): Don't merge compare if
5044 address contains a side effect.
5045 (try_eliminate_compare): Likewise.
5047 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
5049 * config.gcc: Support "tremont".
5050 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
5051 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5053 * config/i386/i386.c (m_TREMONT): Define.
5054 (processor_target_table): Add "tremont".
5055 (PTA_TREMONT): Define.
5056 (ix86_lea_outperforms): Add TARGET_TREMONT.
5057 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
5058 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
5059 and M_INTEL_GOLDMONT_PLUS.
5060 (fold_builtin_cpu): Add "tremont".
5061 (ix86_add_stmt_cost): Add TARGET_TREMONT.
5062 (ix86_option_override_internal): Add "tremont".
5063 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
5064 (processor_type): Add PROCESSOR_TREMONT.
5065 * config/i386/x86-tune.def: Add m_TREMONT.
5066 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
5068 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5070 * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
5071 symbol defined for msp430i* devices to be lower case.
5073 gcc/testsuite/gcc.target/msp430/
5074 * msp430i-device-symbol.c: New test.
5075 * msp430f-device-symbol.c: New test.
5076 * msp430.h: New test header file.
5078 2018-06-07 Richard Biener <rguenther@suse.de>
5080 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
5081 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
5082 Properly wrap signed arithmetic if overflow wraps.
5084 2018-06-07 Jakub Jelinek <jakub@redhat.com>
5086 PR tree-optimization/69615
5087 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
5088 of a cast from a same precision integral SSA_NAME in a bb dominated
5089 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
5090 cast to utype if rhs2 has already a compatible type.
5092 2018-06-07 Richard Biener <rguenther@suse.de>
5094 PR tree-optimization/85935
5095 * graphite-scop-detection.c (find_params_in_bb): Analyze
5096 condition operands with respect to the correct loop. Assert
5097 the analysis doesn't fail.
5099 2018-06-04 Carl Love <cel@us.ibm.com>
5101 * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
5102 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
5103 as it is slightly cheaper.
5104 (first_match_or_eos_index_<mode>):
5105 Calculate index using natural element order.
5106 (first_match_index_<mode>):
5107 Calculate index using natural element order.
5108 (first_match_or_eos_index_<mode>):
5109 Calculate index using natural order.
5110 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
5111 for BE and LE modes.
5112 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
5113 P9V_BUILTIN_VCLZLSBB_V16QI.
5114 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
5117 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5119 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
5120 indentation and line wrap for many prototypes. Add missing
5121 @smallexample directives around block of prototypes for vec_xl and
5124 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
5126 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
5127 track if we pass or return IEEE 128-bit floating point.
5128 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
5129 C++ mangling that is compatible with GCC 8.1.
5130 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
5131 (init_cumulative_args): Note if we pass or return IEEE 128-bit
5132 floating point types.
5133 (rs6000_function_arg_advance_1): Likewise.
5134 (rs6000_mangle_type): Optionally generate mangled names that match
5135 what GCC 8.1 generated for IEEE 128-bit floating point types.
5136 (rs6000_globalize_decl_name): If we have an external function that
5137 passes or returns IEEE 128-bit types, generate a weak reference
5138 from the mangled name used in GCC 8.1 to the current mangled
5140 (rs6000_init_builtins): Make __ibm128 use the long double type if
5141 long double is IBM extended double. Make __float128 use the long
5142 double type if long double is IEEE 128-bit.
5145 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
5146 macro for __ibm128 built-in functions.
5147 (PACK_IF): Add __ibm128 pack/unpack functions.
5148 (UNPACK_IF): Likewise.
5149 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
5150 enable long double built-in functions if long double is IEEE
5151 128-bit floating point.
5152 (rs6000_invalid_builtin): Update long double built-in function
5154 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
5155 functions, adjust the built-in function to use the long double
5156 built-in function if __ibm128 and long double are the same type.
5157 * doc/extend.texi (PowerPC builtins): Update documention for
5158 __builtin_{,un}pack_longdouble. Add documentation for
5159 __builtin_{,un}pack_ibm128.
5161 2018-06-06 Jim Wilson <jimw@sifive.com>
5163 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
5164 (struct machine_function): New field interrupt_mode.
5165 (riscv_handle_type_attribute): New function. Add forward declaration.
5166 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
5167 (riscv_expand_epilogue): Check interrupt_mode field.
5168 (riscv_set_current_function): Check interrupt attribute args and
5169 set interrupt_mode field.
5170 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
5171 (riscv_sret, riscv_uret): New.
5172 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
5173 new arguments to interrupt attribute.
5175 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
5178 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
5179 Don't handle -mcpu=power8 if -mpower9-vector is also used.
5181 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5183 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
5184 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
5185 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5186 several redundant entries.
5188 2018-06-06 David Malcolm <dmalcolm@redhat.com>
5190 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
5191 type from "rtx" to "rtx_insn *".
5192 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
5193 for local "call_insn", removing cast.
5194 (ix86_expand_call): Likewise, introducing a "call_insn" local.
5196 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
5198 PR tree-optimization/86066
5199 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
5200 for BIT_INSERT_EXPR stores.
5202 2018-06-06 Richard Biener <rguenther@suse.de>
5204 PR tree-optimization/86062
5205 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5206 component refs ontop
5207 of to be offsetted base.
5209 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5211 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
5212 to be static and remove check on interrupt attribute name.
5214 gcc/testsuite/gcc.target/msp430/
5215 * function-attributes-4.c: New test.
5216 * static-interrupts.c: New test.
5218 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
5220 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5221 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
5223 2018-06-05 Steve Ellcey <sellcey@cavium.com>
5226 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
5228 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
5229 Remove second argument, change how error is called.
5230 (aarch64_layout_arg): Remove second argument from
5231 aarch64_err_no_fpadvsimd call.
5232 (aarch64_init_cumulative_args): Ditto.
5233 (aarch64_gimplify_va_arg_expr): Ditto.
5234 * config/aarch64/aarch64.md (mov<mode>): Ditto.
5236 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
5238 * config/i386/i386.md (simple_return_indirect_internal): New expander.
5239 (*simple_return_indirect_internal<mode>): Rename from
5240 simple_return_indirect_internal. Use W mode iterator.
5241 (rstorssp): New expander.
5242 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
5243 (clrssbsy): New expander.
5244 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
5246 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
5248 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
5250 (cmse_check_pointed_object): Likewise.
5252 2018-06-05 Martin Liska <mliska@suse.cz>
5254 PR gcov-profile/47618
5255 * doc/invoke.texi: Document how -fprofile-dir format
5258 2018-06-05 Richard Biener <rguenther@suse.de>
5260 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
5261 removal pretend DOM info isn't available so we do not update
5262 it and only remove edges, not dominated blocks. Actually free
5263 DOM info in case we removed something. Remove unreachable blocks.
5264 (mfb_keep_latches): Work with either DOM info or marked backedges.
5265 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
5266 first. Mark backedges if DOM info isn't available.
5267 (Re-)compute DOM info after cleanup_control_flow_pre.
5269 2018-06-05 Richard Biener <rguenther@suse.de>
5271 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
5272 (locus_discrim_hasher::hash): Adjust.
5273 (locus_discrim_hasher::equal): Likewise.
5274 (next_discriminator_for_locus): Work on line directly.
5275 (same_line_p): Pass in expanded locus1 as well.
5276 (assign_discriminators): Avoid redundant location expansions.
5278 2018-06-05 Richard Biener <rguenther@suse.de>
5280 PR tree-optimization/86046
5281 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
5282 if required after clearing TREE_ADDRESSABLE.
5284 2018-06-05 Richard Biener <rguenther@suse.de>
5286 PR tree-optimization/86047
5287 * tree-ssa-loop.c (for_each_index): Glob handling of all
5288 decls and constants and really handle all of them.
5290 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5293 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
5294 qualifier_void_pointer and qualifier_const_void_pointer.
5295 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
5296 (arm_init_builtins): Handle the above.
5297 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
5298 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
5299 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
5302 2018-06-05 Martin Liska <mliska@suse.cz>
5304 * auto-profile.c (read_autofdo_file): Do not use
5305 gcov_ctr_summary struct.
5306 (afdo_callsite_hot_enough_for_early_inline): Likewise.
5307 * coverage.c (struct counts_entry): Likewise.
5308 (read_counts_file): Read just single summary entry.
5309 (get_coverage_counts): Use gcov_summary struct.
5310 * coverage.h (get_coverage_counts): Likewise.
5311 * gcov-dump.c (dump_working_sets): Likewise.
5312 (tag_summary): Dump just single summary.
5313 * gcov-io.c (gcov_write_summary): Write just histogram
5315 (gcov_read_summary): Read just single summary.
5316 (compute_working_sets): Use gcov_summary struct.
5317 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
5318 of GCOV_COUNTERS_SUMMABLE.
5319 (GCOV_COUNTERS_SUMMABLE): Remove.
5320 (GCOV_FIRST_VALUE_COUNTER): Replace with
5321 GCOV_COUNTER_V_INTERVAL.
5322 (struct gcov_ctr_summary): Remove.
5323 (struct gcov_summary): Directly use fields of former
5325 (compute_working_sets): Use gcov_summary struct.
5326 * gcov.c (read_count_file): Do not use ctrs fields.
5327 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
5329 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
5331 * profile.c: Likewise.
5332 * profile.h: Likewise.
5334 2018-06-05 Martin Liska <mliska@suse.cz>
5336 PR gcov-profile/84846
5337 * gcov.c (output_lines): Print working directory only
5338 in intermediate format.
5340 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
5342 * config/s390/s390-builtin-types.def: Add void function type.
5343 * config/s390/s390-builtins.def: Use the function type for the
5346 2018-06-04 Jim Wilson <jimw@sifive.com>
5348 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
5350 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
5351 and maybe_eh_return. Change regno to unsigned int. Use new args to
5352 handle EH_RETURN_DATA_REGNO registers properly.
5353 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
5354 (riscv_expand_epilogue): Update comment. Change argument name and
5355 type. Update code to use new name and type. Pass new args to
5356 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
5358 * config/riscv/riscv.md (NORMAL_RETURN): New.
5359 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
5360 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
5361 (eh_return): Call gen_eh_return_internal and emit barrier.
5362 (eh_return_internal): Call riscv_expand_epilogue.
5364 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
5366 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
5367 bit_insertion field and declare can_be_merged_into method.
5368 (merged_store_group::can_be_merged_into): New method.
5369 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
5370 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
5371 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
5373 2018-06-04 Richard Biener <rguenther@suse.de>
5375 PR tree-optimization/85955
5376 * builtins.c (fold_builtin_sincos): Convert pointers to
5377 destination to appropriate type before dereferencing.
5379 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
5381 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
5383 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
5385 * expr.c (expand_expr_real_1): Force the operand into memory if
5386 its TYPE_MODE is BLKmode and if there is no integer mode for
5387 the number of bits being extracted.
5389 2018-06-04 Jakub Jelinek <jakub@redhat.com>
5393 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5394 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
5396 2018-06-04 Richard Biener <rguenther@suse.de>
5398 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
5399 (cleanup_tree_cfg_noloop): ... single caller. Do
5400 start_recording_case_labels later.
5402 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
5404 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
5405 to _IMMINTRIN_H_INCLUDED.
5406 * config/i386/pconfigintrin.h: Ditto.
5407 * config/i386/waitpkgintrin.h: Ditto.
5408 * config/i386/immintrin.h: Add includes for sgxintrin.h,
5409 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
5410 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
5411 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
5412 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
5413 waitpkgintrin.h and cldemoteintrin.h.
5415 2018-06-04 Richard Biener <rguenther@suse.de>
5417 PR tree-optimization/86038
5418 * tracer.c (find_best_successor): Check probability for
5419 being initialized, bail out if not.
5421 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
5424 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
5425 of bits to ignore when comparing architectures.
5427 2018-06-04 Jakub Jelinek <jakub@redhat.com>
5429 PR tree-optimization/69615
5430 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
5431 maximum or minimum of the type, try to merge it also as if
5432 range1 is + [-, x - 1] or + [x + 1, -].
5435 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
5437 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
5439 PR tree-optimization/86034
5440 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
5441 the unsigned bitfield type in a bit insertion sequence if it does not
5442 have a larger precision than the bitfield size.
5443 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
5445 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
5447 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
5449 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
5451 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
5452 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
5453 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
5454 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
5456 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
5458 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
5459 Disable -fdelete-null-pointer-checks for ELF toolchain.
5461 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
5462 Kito Cheng <kito.cheng@gmail.com>
5464 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
5465 (nds32le-*-*, nds32be-*-*): Integrate checking process.
5466 (nds32*-*-*): Add glibc and uclibc conditions.
5467 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
5468 (TARGET_EXCEPT_UNWIND_INFO): Define.
5469 * config/nds32/elf.h: New file.
5470 * config/nds32/linux.h: New file.
5471 * config/nds32/nds32-elf.opt: New file.
5472 * config/nds32/nds32-linux.opt: New file.
5473 * config/nds32/nds32-fp-as-gp.c
5474 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
5475 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
5477 (nds32_asm_file_end): Ditto.
5478 (nds32_print_operand): Ditto.
5479 (nds32_insert_attributes): Ditto.
5480 (nds32_init_libfuncs): New function.
5481 (TARGET_HAVE_TLS): Define.
5482 (TARGET_INIT_LIBFUNCS): Define.
5483 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
5485 (TARGET_ELF): Apply different mcmodel setting.
5486 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
5487 been migrated into elf.h and linux.h files.
5488 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
5489 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
5490 (mcmodel): The content has been migrated into nds32-elf.opt and
5491 nds32-linux.opt files.
5492 * config/nds32/t-elf: New file.
5493 * config/nds32/t-linux: New file.
5495 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
5496 Shiva Chen <shiva0217@gmail.com>
5498 * config/nds32/constants.md (unspec_volatile_element): Add
5499 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
5500 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
5502 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
5503 (make_pass_nds32_fp_as_gp): Declare.
5504 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
5506 (nds32_asm_function_end_prologue): Remove unused asm output.
5507 (nds32_asm_function_begin_epilogue): Remove unused asm output.
5508 (nds32_asm_file_start): Output necessary fp_as_gp information.
5509 (nds32_option_override): Adjust register usage.
5510 (nds32_expand_prologue): Consider fp_as_gp situation.
5511 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
5512 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
5515 (simple_return): Ditto.
5516 (omit_fp_begin): Output special directive for fp_as_gp.
5517 (omit_fp_end): Output special directive for fp_as_gp.
5518 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
5519 mforbid-fp-as-gp): New options.
5521 2018-06-01 Mark Wielaard <mark@klomp.org>
5523 * dwarf2out.c (dwarf2out_finish): Remove generation of
5524 DW_AT_loclists_base.
5526 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
5528 * gimple-ssa-store-merging.c: Include gimple-fold.h.
5529 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
5530 (struct merged_store_group): Add bit_insertion field.
5531 (dump_char_array): Use standard hexadecimal format.
5532 (merged_store_group::merged_store_group): Set bit_insertion to false.
5533 (merged_store_group::apply_stores): Use optimal buffer size. Deal
5534 with BIT_INSERT_EXPR stores. Move up code updating the mask and
5535 also print the mask in the dump file.
5536 (pass_store_merging::gate): Minor tweak.
5537 (imm_store_chain_info::coalesce_immediate): Fix wrong association
5538 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
5539 stores with INTEGER_CST stores.
5540 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
5541 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
5542 and use it throughout. Generate bit insertion sequences if need be.
5543 (pass_store_merging::process_store): Remove redundant condition.
5544 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
5546 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
5548 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
5549 the 128-bit floating point types. Fix function comment.
5551 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5553 * config/aarch64/aarch64-simd.md
5554 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
5556 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
5559 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
5561 PR tree-optimization/85989
5562 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
5564 (backprop::intersect_uses): Check it when deciding whether this
5565 is a backedge reference.
5566 (backprop::process_block): Add each phi to m_visited_phis
5567 after visiting it, then clear it at the end.
5569 2018-06-01 Richard Biener <rguenther@suse.de>
5571 * tree-vectorizer.h (vect_dr_stmt): New function.
5572 (vect_get_load_cost): Adjust.
5573 (vect_get_store_cost): Likewise.
5574 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
5575 Use vect_dr_stmt instead of DR_SMTT.
5576 (vect_record_base_alignments): Likewise.
5577 (vect_calculate_target_alignment): Likewise.
5578 (vect_compute_data_ref_alignment): Likewise and make static.
5579 (vect_update_misalignment_for_peel): Likewise.
5580 (vect_verify_datarefs_alignment): Likewise.
5581 (vector_alignment_reachable_p): Likewise.
5582 (vect_get_data_access_cost): Likewise. Pass down
5583 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
5584 (vect_get_peeling_costs_all_drs): Likewise.
5585 (vect_peeling_hash_get_lowest_cost): Likewise.
5586 (vect_enhance_data_refs_alignment): Likewise.
5587 (vect_find_same_alignment_drs): Likewise.
5588 (vect_analyze_data_refs_alignment): Likewise.
5589 (vect_analyze_group_access_1): Likewise.
5590 (vect_analyze_group_access): Likewise.
5591 (vect_analyze_data_ref_access): Likewise.
5592 (vect_analyze_data_ref_accesses): Likewise.
5593 (vect_vfa_segment_size): Likewise.
5594 (vect_small_gap_p): Likewise.
5595 (vectorizable_with_step_bound_p): Likewise.
5596 (vect_prune_runtime_alias_test_list): Likewise.
5597 (vect_analyze_data_refs): Likewise.
5598 (vect_supportable_dr_alignment): Likewise.
5599 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
5600 (vect_gen_prolog_loop_niters): Likewise.
5601 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
5602 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
5604 (vect_recog_mask_conversion_pattern): Likewise.
5605 (vect_try_gather_scatter_pattern): Likewise.
5606 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
5607 to vect_get_store_cost.
5608 (vect_get_store_cost): Get stmt_info instead of DR.
5609 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
5610 (vect_get_load_cost): Get stmt_info instead of DR.
5612 2018-06-01 Richard Biener <rguenther@suse.de>
5615 * gimple-fold.c (var_decl_component_p): Also allow offsetted
5616 vars wrapped in MEM_REFs.
5618 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
5620 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5621 Fix subreg tests so that we only return a choice between
5622 GENERAL_REGS and FP_REGS if the original classes included both.
5624 2018-06-01 Richard Biener <rguenther@suse.de>
5627 * tree-ssa-structalias.c (get_function_part_constraint):
5628 Handle NULL fi->decl.
5629 (find_func_aliases_for_call): Properly handle indirect
5630 fi from direct call.
5631 (find_func_clobbers): Likewise.
5632 (ipa_pta_execute): Likewise.
5633 (create_variable_info_for): For functions that are ifunc_resolver
5634 resolve to a varinfo that contains the result of the resolver call.
5635 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
5638 2018-05-31 Michael Collison <michael.collison@arm.com>
5640 * config/aarch64/aarch64.md:
5641 (*fix_to_zero_extenddfdi2): New pattern.
5642 * gcc.target/aarch64/fix_extend1.c: New testcase.
5644 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
5648 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
5649 and BUILT_IN_STRNCMP_EQ.
5650 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
5651 BUILT_IN_STRNCMP_EQ.
5652 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
5653 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5654 (gimple_fold_builtin): Likewise.
5655 * tree-ssa-strlen.c (compute_string_length): New function.
5656 (determine_min_obsize): New function.
5657 (handle_builtin_string_cmp): New function to handle calls to
5658 string compare functions.
5659 (strlen_optimize_stmt): Add handling to builtin string compare
5661 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
5662 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
5663 * tree.c (build_common_builtin_nodes): Add new defines of
5664 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
5666 2018-05-31 Jakub Jelinek <jakub@redhat.com>
5669 * bb-reorder.c (pass_partition_blocks::gate): Return false for
5670 functions with naked attribute.
5672 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
5674 * config/i386/sse.md (avx_vec_concat<mode>):
5675 Substitute concat_tg_mode mode attribute with xtg_mode.
5676 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
5677 (concat_tg_mode): Remove mode attribute.
5679 2018-05-31 Martin Sebor <msebor@redhat.com>
5682 * calls.c (alloc_max_size): Correct a logic error/typo.
5683 Treat excessive arguments as infinite. Warn for invalid arguments.
5684 * doc/invoke.texi (-Walloc-size-larger-than): Update.
5686 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
5689 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
5690 and movx for Haswell.
5692 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
5693 Cesar Philippidis <cesar@codesourcery.com>
5696 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
5697 when emitting error on private/firstprivate reductions.
5698 * omp-low.c (lower_omp_target): Avoid reference-type processing
5699 on pointers for firstprivate clause.
5701 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5703 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
5706 * config/aarch64/aarch64-simd.md
5707 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
5708 (aarch64_ld1_x3_<mode>): Likewise
5709 (aarch64_st1x2<VALLDIF:mode>): Likewise
5710 (aarch64_st1_x2_<mode>): Likewise
5711 (aarch64_st1x3<VALLDIF:mode>): Likewise
5712 (aarch64_st1_x3_<mode>): Likewise
5713 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
5714 (vld1_s8_x3): Likewise.
5715 (vld1_u16_x3): Likewise.
5716 (vld1_s16_x3): Likewise.
5717 (vld1_u32_x3): Likewise.
5718 (vld1_s32_x3): Likewise.
5719 (vld1_u64_x3): Likewise.
5720 (vld1_s64_x3): Likewise.
5721 (vld1_f16_x3): Likewise.
5722 (vld1_f32_x3): Likewise.
5723 (vld1_f64_x3): Likewise.
5724 (vld1_p8_x3): Likewise.
5725 (vld1_p16_x3): Likewise.
5726 (vld1_p64_x3): Likewise.
5727 (vld1q_u8_x3): Likewise.
5728 (vld1q_s8_x3): Likewise.
5729 (vld1q_u16_x3): Likewise.
5730 (vld1q_s16_x3): Likewise.
5731 (vld1q_u32_x3): Likewise.
5732 (vld1q_s32_x3): Likewise.
5733 (vld1q_u64_x3): Likewise.
5734 (vld1q_s64_x3): Likewise.
5735 (vld1q_f16_x3): Likewise.
5736 (vld1q_f32_x3): Likewise.
5737 (vld1q_f64_x3): Likewise.
5738 (vld1q_p8_x3): Likewise.
5739 (vld1q_p16_x3): Likewise.
5740 (vld1q_p64_x3): Likewise.
5741 (vst1_s64_x2): Likewise.
5742 (vst1_u64_x2): Likewise.
5743 (vst1_f64_x2): Likewise.
5744 (vst1_s8_x2): Likewise.
5745 (vst1_p8_x2): Likewise.
5746 (vst1_s16_x2): Likewise.
5747 (vst1_p16_x2): Likewise.
5748 (vst1_s32_x2): Likewise.
5749 (vst1_u8_x2): Likewise.
5750 (vst1_u16_x2): Likewise.
5751 (vst1_u32_x2): Likewise.
5752 (vst1_f16_x2): Likewise.
5753 (vst1_f32_x2): Likewise.
5754 (vst1_p64_x2): Likewise.
5755 (vst1q_s8_x2): Likewise.
5756 (vst1q_p8_x2): Likewise.
5757 (vst1q_s16_x2): Likewise.
5758 (vst1q_p16_x2): Likewise.
5759 (vst1q_s32_x2): Likewise.
5760 (vst1q_s64_x2): Likewise.
5761 (vst1q_u8_x2): Likewise.
5762 (vst1q_u16_x2): Likewise.
5763 (vst1q_u32_x2): Likewise.
5764 (vst1q_u64_x2): Likewise.
5765 (vst1q_f16_x2): Likewise.
5766 (vst1q_f32_x2): Likewise.
5767 (vst1q_f64_x2): Likewise.
5768 (vst1q_p64_x2): Likewise.
5769 (vst1_s64_x3): Likewise.
5770 (vst1_u64_x3): Likewise.
5771 (vst1_f64_x3): Likewise.
5772 (vst1_s8_x3): Likewise.
5773 (vst1_p8_x3): Likewise.
5774 (vst1_s16_x3): Likewise.
5775 (vst1_p16_x3): Likewise.
5776 (vst1_s32_x3): Likewise.
5777 (vst1_u8_x3): Likewise.
5778 (vst1_u16_x3): Likewise.
5779 (vst1_u32_x3): Likewise.
5780 (vst1_f16_x3): Likewise.
5781 (vst1_f32_x3): Likewise.
5782 (vst1_p64_x3): Likewise.
5783 (vst1q_s8_x3): Likewise.
5784 (vst1q_p8_x3): Likewise.
5785 (vst1q_s16_x3): Likewise.
5786 (vst1q_p16_x3): Likewise.
5787 (vst1q_s32_x3): Likewise.
5788 (vst1q_s64_x3): Likewise.
5789 (vst1q_u8_x3): Likewise.
5790 (vst1q_u16_x3): Likewise.
5791 (vst1q_u32_x3): Likewise.
5792 (vst1q_u64_x3): Likewise.
5793 (vst1q_f16_x3): Likewise.
5794 (vst1q_f32_x3): Likewise.
5795 (vst1q_f64_x3): Likewise.
5796 (vst1q_p64_x3): Likewise.
5798 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5800 * config/msp430/msp430.c (msp430_output_labelref): Prepend
5801 user_label_prefix to name.
5803 * tree-core.h: Update comment about the format of NAME string
5804 passed to handler in attribute_spec.
5806 * config/msp430/msp430.md: Remove erroneous subreg expression from
5807 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
5808 zero_extend{q,h}isi2.
5810 2018-05-30 Borislav Petkov <bp@suse.de>
5812 * doc/extend.texi: Document some architecture specific
5813 constraints and sort entries.
5815 2018-05-30 Martin Sebor <msebor@redhat.com>
5818 * builtins.c (expand_builtin_stpcpy_1): New function.
5819 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
5820 only if the former succeeds.
5822 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5824 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
5827 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5829 * doc/invoke.texi (-flinker-output): Document
5831 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5833 * passes.c (ipa_write_summaries): Only modify statements if body
5835 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
5836 incrementally linking.
5837 (ipa_passes): Likewise.
5838 * lto-cgraph.c (lto_output_node): When incrementally linking do not
5839 pass down resolution info.
5840 * common.opt (flag_incremental_link): Update info.
5841 * gcc.c (plugin specs): Turn flinker-output=* to
5842 -plugin-opt=-linker-output-known
5843 * toplev.c (compile_file): Also cut compilation when doing incremental
5845 * flag-types. (enum lto_partition_model): Add
5846 LTO_LINKER_OUTPUT_NOLTOREL.
5847 (invoke.texi): Add -flinker-output docs.
5848 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
5849 link same way as WPA; do not stream in dead initializers.
5851 * dwarf2out.c (dwarf2out_die_ref_for_decl,
5852 darf2out_register_external_decl): Support incremental link.
5854 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5856 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
5858 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
5860 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
5861 it down to simple_object_copy_lto_debug_sections.
5862 (run_gcc): Determine incremental LTO link time and configure
5863 lto1 into non-wpa mode, disable renaming of debug sections.
5865 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
5867 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5868 descriptions of various incorrectly documented functions.
5870 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
5873 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5874 address check not strict.
5876 2018-05-30 Richard Biener <rguenther@suse.de>
5878 PR tree-optimization/85964
5879 * tracer.c (better_p): Drop initialized count check, we only
5880 call the function with initialized counts now.
5881 (find_best_successor): Do find a best edge if one
5882 has uninitialized count.
5883 (find_best_predecessor): Likewise. Do BB frequency check only
5884 if count is initialized.
5886 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
5888 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
5889 (aarch64_ldrstr_offset_compare): New.
5890 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
5891 load/store orderings.
5892 (aarch64_gen_adjusted_ldpstp): Likewise.
5894 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
5896 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
5897 Check for subset of GENERAL_REGS and FP_REGS.
5898 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
5901 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
5903 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
5904 and wi::to_poly_offset. Add the current offset and then check
5905 whether the sum fits, rather than using an unchecked addition of
5906 a checked term. Check for a shwi rather than a uhwi.
5907 * expr.c (get_bit_range): Use tree_to_poly_uint64.
5908 (store_constructor): Use poly_int_tree_p.
5909 (expand_expr_real_1): Likewise.
5910 * function.c (assign_temp): Likewise.
5911 * fold-const.c (const_binop): Use poly_int_tree_p and
5913 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
5915 * ipa-icf-gimple.c (func_checker::compare_operand): Use
5916 to_poly_offset for MEM offsets.
5917 * ipa-icf.c (sem_variable::equals): Likewise.
5918 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
5919 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
5920 wi::to_poly_offset for BIT_FIELD_REF offsets.
5921 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
5923 * var-tracking.c (emit_note_insn_var_location): Use
5924 tree_to_poly_uint64.
5926 2018-05-29 Jim Wilson <jimw@sifive.com>
5928 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
5930 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
5933 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
5934 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
5936 (sse4_1_round<mode>2): Use nonimmediate_operand
5937 for operand 1 predicate.
5939 2018-05-29 Martin Sebor <msebor@redhat.com>
5940 Richard Biener <rguenther@suse.de>
5943 * calls.c (get_size_range): Call determine_value_range instead
5944 of get_value_range..
5945 * tree-vrp.h (determine_value_range): Declared new function.
5946 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
5948 2018-05-29 Richard Biener <rguenther@suse.de>
5950 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
5951 sure to use non-pattern stmts for get_earlier_stmt arguments.
5952 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
5953 called on pattern stmts.
5954 (get_later_stmt): Likewise.
5956 2018-05-29 Martin Liska <mliska@suse.cz>
5958 PR gcov-profile/85759
5959 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
5962 2018-05-29 Jakub Jelinek <jakub@redhat.com>
5964 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
5966 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
5970 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5971 VEC_PACK_FLOAT_EXPR): New tree codes.
5972 * tree-pretty-print.c (op_code_prio): Handle
5973 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5974 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5975 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5976 * tree-inline.c (estimate_operator_cost): Likewise.
5977 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
5978 * fold-const.c (const_binop): Likewise.
5979 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
5980 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
5981 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5982 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
5983 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
5984 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
5985 * expr.c (expand_expr_real_2): Likewise.
5986 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
5987 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
5988 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
5990 * optabs.c (expand_widen_pattern_expr): For
5991 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
5992 sign from result type rather than operand's type.
5993 (expand_binop_directly): For vec_packu_float_optab and
5994 vec_packs_float_optab allow result type to be different from operand's
5996 * optabs-tree.c (optab_for_tree_code): Handle
5997 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
5998 VEC_PACK_FLOAT_EXPR. Formatting fixes.
5999 * tree-vect-generic.c (expand_vector_operations_1): Handle
6000 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6001 VEC_PACK_FLOAT_EXPR.
6002 * tree-vect-stmts.c (supportable_widening_operation): Handle
6004 (supportable_narrowing_operation): Handle FLOAT_EXPR.
6005 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
6006 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
6007 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
6008 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
6010 (vec_pack<floatprefix>_float_<mode>): New expander.
6011 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
6013 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
6014 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
6015 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
6016 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
6017 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
6019 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
6020 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
6021 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6022 VEC_PACK_FLOAT_EXPR): Document.
6024 2018-05-29 Richard Biener <rguenther@suse.de>
6026 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
6028 (stmt_vec_info_vec): Make pointer.
6029 (init_stmt_vec_info_vec): Remove.
6030 (free_stmt_vec_info_vec): Likewise.
6031 (set_stmt_vec_info_vec): New function.
6032 (free_stmt_vec_infos): Likewise.
6033 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
6034 (set_vinfo_for_stmt): Likewise.
6035 (get_earlier_stmt): Likewise.
6036 (get_later_stmt): Likewise.
6037 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
6038 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
6039 (vec_info::~vec_info): Free stmt_vec_infos.
6040 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
6041 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
6042 (pass_slp_vectorize::execute): Likewise.
6043 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
6044 (free_stmt_vec_info_vec): Likewise.
6045 (set_stmt_vec_info_vec): New function.
6046 (free_stmt_vec_infos): Likewise.
6047 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
6048 the global stmt_vec_info_vec.
6049 * tree-parloops.c (gather_scalar_reductions): Use
6050 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
6053 2018-05-29 Richard Biener <rguenther@suse.de>
6055 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
6057 2018-05-29 Martin Liska <mliska@suse.cz>
6058 David Malcolm <dmalcolm@redhat.com>
6060 * vec.c (test_reverse): New.
6061 (vec_c_tests): Add new test.
6062 * vec.h (vl_ptr>::reverse): New function.
6064 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
6066 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
6068 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
6071 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
6073 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
6075 2018-05-28 Richard Biener <rguenther@suse.de>
6077 PR tree-optimization/85933
6078 * tree-vect-data-refs.c (vect_record_base_alignments): Only
6079 look at stmts marked as vectorizable.
6081 2018-05-28 Richard Biener <rguenther@suse.de>
6083 PR tree-optimization/85934
6084 * tree-vect-generic.c (expand_vector_operations_1): Hoist
6085 vector boolean check before scalar optimization.
6087 2018-05-28 Jakub Jelinek <jakub@redhat.com>
6089 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
6092 2018-05-28 Mark Wielaard <mark@klomp.org>
6094 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
6095 if it is an expression containing a minus sign.
6097 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
6099 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
6101 2018-05-27 Paul Koning <ni1d@arrl.net>
6103 * config/pdp11/pdp11.md (truncsihi2): Remove.
6105 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
6106 Chung-Ju Wu <jasonwucj@gmail.com>
6108 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
6110 (unaligned_store_dw): Ditto.
6111 * config/nds32/nds32-memory-manipulation.c
6112 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
6113 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
6114 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
6115 (emit_setmem_word_loop): Rename to ...
6116 (emit_setmem_doubleword_loop): ... this.
6117 (nds32_gen_dup_4_byte_to_word_value): New function.
6118 (nds32_gen_dup_8_byte_to_double_word_value): New function.
6119 (nds32_expand_setmem_loop): Refine implementation.
6120 (nds32_expand_setmem_loop_v3m): Ditto.
6121 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
6124 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6126 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
6128 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6130 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
6131 (nds32_init_machine_status): Initialize machine->attr_naked_p and
6132 machine->attr_no_prologue_p.
6133 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
6134 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
6135 (nds32_expand_epilogue): Consider attr_naked_p.
6136 (nds32_expand_epilogue_v3pop): Likewise.
6137 (nds32_can_use_return_insn): Likewise.
6138 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
6139 attr_no_prologue_p fields.
6140 * config/nds32/nds32.opt (mret-in-naked-func): New option.
6142 2018-05-27 Jakub Jelinek <jakub@redhat.com>
6145 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
6147 * config/i386/sse.md
6148 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
6150 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
6152 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
6154 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
6156 (*<floatsuffix>floatv2div2sf2): Rename to ...
6157 (*float<floatunssuffix>v2div2sf2): ... this.
6158 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
6159 (float<floatunssuffix>v2div2sf2_mask): ... this.
6160 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
6161 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
6162 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
6164 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
6166 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6168 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6170 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6172 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6174 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
6175 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
6176 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
6177 gen_ufix_truncv8dfv8si2.
6178 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
6179 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
6180 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
6181 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
6182 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
6183 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
6184 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
6185 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
6187 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6191 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
6193 2018-05-25 Jim Wilson <jimw@sifive.com>
6195 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
6196 * config/riscv/riscv.c (struct machine_function): Add
6197 interrupt_handler_p and attribute_checked_p fields.
6198 (riscv_attribute_table): Add interrupt.
6199 (riscv_interrupt_type_p): New.
6200 (riscv_save_reg_p): Save extra regs for interrupt handler.
6201 (riscv_use_save_libcall): Return false for interrupt handler.
6202 (riscv_first_stack_step): Add forward declaration.
6203 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
6204 for interrupt handler with large frame. Use it for saved reg list.
6205 (riscv_expand_prologue): Move flag_stack_usage_info support to
6206 eliminate duplication.
6207 (riscv_expand_epilogue): Generate mret for interrupt handler.
6208 (riscv_epilogue_uses): New.
6209 (riscv_can_use_return_insn): Return false for interrupt handler.
6210 (riscv_function_ok_for_sibcall): Likewise.
6211 (riscv_set_current_function): Add interrupt handler support.
6212 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
6213 * config/riscv/riscv.md (UNSPECV_MRET): New.
6215 (riscv_frflags, riscv_fsflags): Use tab after opcode.
6217 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
6219 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
6221 PR tree-optimization/85712
6222 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
6223 this candidate has already been replaced in-situ by a copy.
6225 2018-05-25 Jason Merrill <jason@redhat.com>
6227 PR c++/80485 - inline function non-zero address.
6228 * symtab.c (nonzero_address): Check DECL_COMDAT.
6230 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
6233 * config/alpha/alpha.md (ashlsi3): New insn pattern.
6234 (*ashlsi_se): Rename from *ashldi_se. Define as sign
6235 extension of SImode operation. Use const123_operand predicate.
6236 (*saddsi_1): Remove.
6237 (*saddl_se_1): Ditto.
6239 (*ssubl_se_1): Ditto.
6240 * config/alpha/predicates.md (const123_operand): New predicate.
6241 * config/alpha/constraints.md (P): Use IN_RANGE.
6243 2018-05-25 Richard Biener <rguenther@suse.de>
6245 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
6247 (ref_maybe_used_by_stmt_p): Likewise.
6248 (stmt_may_clobber_ref_p): Likewise.
6249 (stmt_may_clobber_ref_p_1): Likewise.
6250 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
6252 (ref_maybe_used_by_stmt_p): Likewise.
6253 (stmt_may_clobber_ref_p): Likewise.
6254 (stmt_may_clobber_ref_p_1): Likewise.
6255 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
6256 the alias oracle to disambiguate DRs with stmts DR analysis
6258 (vect_analyze_data_refs): Do not give up on not analyzable
6259 DRs for BB vectorization. Remove code truncating the dataref
6262 2018-05-25 Jakub Jelinek <jakub@redhat.com>
6265 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6266 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
6267 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
6269 2018-05-25 Richard Biener <rguenther@suse.de>
6271 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
6272 function, combining stmt data ref gathering and fatal analysis
6274 (vect_analyze_data_refs): Remove now redudnant code and simplify.
6275 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
6276 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
6277 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
6278 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
6280 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6282 PR tree-optimization/85720
6283 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
6284 SCC if all partitions are builtins.
6285 (version_loop_by_alias_check): New parameter. Generate cancelable
6286 runtime alias check if all partitions are builtins.
6287 (distribute_loop): Update call to above function.
6289 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6291 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
6292 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
6293 (parm_default_def_partition_arg): Ditto.
6294 (set_parm_default_def_partition): Ditto.
6295 (get_parm_default_def_partitions): Ditto and make it static.
6296 (get_undefined_value_partitions): Ditto and make it static.
6297 (remove_ssa_form): Refactor call to init_var_map here.
6298 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
6299 computation for loop region.
6300 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
6301 (register_default_def): Delete.
6302 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
6303 (parm_default_def_partition_arg): Ditto.
6304 (set_parm_default_def_partition): Ditto.
6305 (get_parm_default_def_partitions): Ditto and make it static.
6306 (get_undefined_value_partitions): Ditto and make it static.
6307 (coalesce_with_default, coalesce_with_default): Update comment.
6308 (create_coalesce_list_for_region): New func factored out from
6309 create_outofssa_var_map.
6310 (populate_coalesce_list_for_outofssa): New func factored out from
6311 create_outofssa_var_map and coalesce_ssa_name.
6312 (create_outofssa_var_map): Delete.
6313 (coalesce_ssa_name): Refactor to support live range computation.
6314 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
6315 (get_parm_default_def_partitions): Delete.
6316 (get_undefined_value_partitions): Ditto.
6317 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
6318 computation for loop region.
6319 (new_tree_live_info, loe_visit_block): Ditto.
6320 (live_worklist, set_var_live_on_entry): Ditto.
6321 (calculate_live_on_exit, verify_live_on_entry): Ditto.
6322 * tree-ssa-live.h (struct _var_map): New fields.
6323 (init_var_map): Change decl.
6324 (region_contains_p): New.
6326 2018-05-25 Bin Cheng <bin.cheng@arm.com>
6328 * tree-ssa-live.h (live_merge_and_clear): Delete.
6330 2018-05-25 Richard Biener <rguenther@suse.de>
6333 * tree-dump.c (dequeue_and_dump): Remove access to removed
6334 operand 2 of a SWITCH_EXPR.
6336 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6338 * doc/sourcebuild.texi (vect_double_cond_arith): Include
6339 multiplication and division.
6340 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
6341 (cond_udiv@var{m}, cond_umod@var{m}): Document.
6342 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
6343 (cond_udiv_optab, cond_umod_optab): New optabs.
6344 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
6345 (IFN_COND_RDIV): New internal functions.
6346 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
6347 TRUNC_MOD_EXPR and RDIV_EXPR.
6348 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
6349 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
6351 (SVE_INT_BINARY): Include mult.
6352 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
6353 (optab, sve_int_op): Handle mult.
6354 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
6356 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
6357 for SVE_INT_BINARY_SD.
6359 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6361 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
6362 (optab, sve_int_op): Handle div and udiv.
6363 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
6364 for SVE_INT_BINARY_SD.
6365 (*<optab><mode>3): New insn for the same.
6367 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6369 * tree-vect-patterns.c: Include predict.h.
6370 (vect_recog_divmod_pattern): Restrict check for division support
6371 to when optimizing for size.
6373 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6375 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
6376 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
6377 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
6378 (gimple_match_op::set_op): Likewise.
6379 (gimple_resimplify4): Declare.
6380 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
6381 (expr::gen_transform): Likewise.
6382 (decision_tree::gen): Generate a simplification routine for 4 operands.
6383 * gimple-match-head.c (gimple_simplify): Add an overload for
6384 4 operands. In the top-level function, handle up to 4 call
6385 arguments and call gimple_resimplify4.
6386 (gimple_resimplify4): New function.
6387 (build_call_internal): Pass a fourth operand.
6388 (maybe_push_to_seq): Likewise.
6389 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
6390 Fold VEC_COND_EXPRs of an operation and a default value into
6391 an IFN_COND_* function if possible.
6392 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
6394 (SVE_COND_FP_BINARY): Include them.
6395 (optab, sve_fp_op): Handle them.
6396 (SVE_INT_BINARY_REV): New code iterator.
6397 (SVE_COND_FP_BINARY_REV): New int iterator.
6398 (commutative): New int attribute.
6399 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
6401 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
6403 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
6404 (*cond_<optab><mode>): New patterns for reversed operands.
6406 2018-05-25 Richard Biener <rguenther@suse.de>
6408 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
6409 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
6410 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
6411 (STMT_VINFO_GROUPED_ACCESS): Adjust.
6412 * tree-vect-data-refs.c (everywhere): Adjust users.
6413 * tree-vect-loop.c (everywhere): Likewise.
6414 * tree-vect-slp.c (everywhere): Likewise.
6415 * tree-vect-stmts.c (everywhere): Likewise.
6416 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6418 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6420 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
6422 (gcc_cv_as_section_exclude): ... this.
6423 Try Solaris as #exclude syntax.
6424 * configure: Regenerate.
6425 * config.in: Regenerate.
6426 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
6428 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
6429 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
6431 * varasm.c (default_elf_asm_named_section): Don't check if
6432 HAVE_GAS_SECTION_EXCLUDE is defined.
6434 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6436 * doc/md.texi: Update the documentation of the cond_* optabs
6437 to mention the new final operand. Fix GET_MODE_NUNITS call.
6438 Describe the scalar case too.
6439 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
6440 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
6442 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
6443 (get_conditional_internal_fn): Update comment.
6444 * tree-vect-loop.c (vectorizable_reduction): Pass the original
6445 accumulator value as a final argument to conditional functions.
6446 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
6447 a define_expand and add an "else" operand. Assert for now that
6448 the else operand is equal to operand 2. Use SVE_INT_BINARY and
6449 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
6450 (*cond_<optab><mode>): New patterns.
6451 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
6452 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
6453 (UNSPEC_COND_EOR): Delete.
6454 (optab): Remove associated mappings.
6455 (SVE_INT_BINARY): New code iterator.
6456 (sve_int_op): Remove int attribute and add "minus" to the code
6458 (SVE_COND_INT_OP): Delete.
6459 (SVE_COND_FP_OP): Rename to...
6460 (SVE_COND_FP_BINARY): ...this.
6462 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
6464 * optabs.c (can_reuse_operands_p): New function.
6465 (maybe_legitimize_operands): Try to reuse the results for
6468 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
6470 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
6471 Add {q} suffix to insn mnemonic.
6473 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6475 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
6476 (msp430_warn_func_return): New.
6478 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
6480 * fold-const.c (tree_nonzero_bits): New function.
6481 * fold-const.h (tree_nonzero_bits): Likewise.
6482 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
6483 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
6485 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6489 * varasm.c (assemble_alias): Check ifunc_resolver only on
6492 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
6495 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
6496 when memory input operand is handled.
6498 2018-05-24 Luis Machado <luis.machado@linaro.org>
6500 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
6502 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
6504 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
6506 * match.pd: Delay FMA folds until after vectorization.
6508 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
6511 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6512 address check not strict.
6514 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
6516 * gimple-match.h (gimple_match_op): New class.
6517 (mprts_hook): Replace parameters with a gimple_match_op *.
6518 (maybe_build_generic_op): Likewise.
6519 (gimple_simplified_result_is_gimple_val): Replace parameters with
6520 a const gimple_match_op *.
6521 (gimple_simplify): Replace code_helper * and tree * parameters with
6522 a gimple_match_op * parameter.
6523 (gimple_resimplify1): Replace code_helper *, tree and tree *
6524 parameters with a gimple_match_op * parameter.
6525 (gimple_resimplify2): Likewise.
6526 (gimple_resimplify3): Likewise.
6527 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
6528 parameters with a gimple_match_op * parameter.
6529 * gimple-match-head.c (gimple_simplify): Change prototypes of
6530 auto-generated functions to take a gimple_match_op * instead of
6531 separate code_helper * and tree * parameters. Make the same
6532 change in the top-level overload and update calls to the
6533 gimple_resimplify routines. Update calls to the auto-generated
6534 functions and to maybe_push_res_to_seq in the publicly-facing
6535 operation-specific gimple_simplify overloads.
6536 (gimple_match_op::MAX_NUM_OPS): Define.
6537 (gimple_resimplify1): Replace rcode and ops with a single res_op
6538 parameter. Update call to gimple_simplify.
6539 (gimple_resimplify2): Likewise.
6540 (gimple_resimplify3): Likewise.
6541 (mprts_hook): Replace parameters with a gimple_match_op *.
6542 (maybe_build_generic_op): Likewise.
6543 (build_call_internal): Replace type, nargs and ops with
6544 a gimple_match_op *.
6545 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
6546 with a single gimple_match_op *. Update calls to mprts_hook,
6547 build_call_internal and gimple_simplified_result_is_gimple_val.
6548 Factor out code that is common to the tree_code and combined_fn cases.
6549 * genmatch.c (expr::gen_transform): Replace tem_code and
6550 tem_ops with a gimple_match_op called tem_op. Update calls
6551 to the gimple_resimplify functions and maybe_push_res_to_seq.
6552 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
6553 res_ops. Update call to the gimple_resimplify functions.
6554 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
6555 (decision_tree::gen): Make the functions take a gimple_match_op *
6556 called res_op instead of separate res_code and res_ops parameters.
6557 Update call accordingly.
6558 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
6559 and ops with a single res_op parameter. Update calls to
6560 maybe_build_generic_op and maybe_push_res_to_seq.
6561 (fold_stmt_1): Update calls to gimple_simplify and
6562 replace_stmt_with_simplification.
6563 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
6564 and gimple_simplified_result_is_gimple_val.
6565 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
6567 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
6568 with a gimple_match_op *.
6569 (vn_nary_build_or_lookup): Likewise. Update call to
6570 vn_nary_build_or_lookup_1.
6571 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
6572 gimple_match_op *. Update calls to the gimple_resimplify routines
6573 and to gimple_simplified_result_is_gimple_val.
6574 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
6575 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
6576 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
6577 (visit_nary_op): Likewise.
6578 (visit_reference_op_load): Likewise.
6580 2018-05-23 Luis Machado <luis.machado@linaro.org>
6582 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
6583 modifier for printing the step amount.
6585 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
6588 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
6591 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
6593 * doc/sourcebuild.texi (Endianness): New subsubsection.
6595 2018-05-23 Luis Machado <luis.machado@linaro.org>
6597 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6598 <prefetch_dynamic_strides>: New const bool field.
6599 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6600 prefetch_dynamic_strides.
6601 (exynosm1_prefetch_tune): Likewise.
6602 (thunderxt88_prefetch_tune): Likewise.
6603 (thunderx_prefetch_tune): Likewise.
6604 (thunderx2t99_prefetch_tune): Likewise.
6605 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
6607 (aarch64_override_options_internal): Update to set
6608 PARAM_PREFETCH_DYNAMIC_STRIDES.
6609 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6610 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6611 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6612 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6613 prefetch-dynamic-strides setting.
6615 2018-05-23 Luis Machado <luis.machado@linaro.org>
6617 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6618 <minimum_stride>: New const int field.
6619 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6620 minimum_stride field defaulting to -1.
6621 (exynosm1_prefetch_tune): Likewise.
6622 (thunderxt88_prefetch_tune): Likewise.
6623 (thunderx_prefetch_tune): Likewise.
6624 (thunderx2t99_prefetch_tune): Likewise.
6625 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
6626 <default_opt_level>: Set to 3.
6627 (aarch64_override_options_internal): Update to set
6628 PARAM_PREFETCH_MINIMUM_STRIDE.
6629 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6630 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6631 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6632 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6633 stride is constant and is below the minimum stride threshold.
6635 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6637 * config/arm/arm-cpus.in (mode26): Delete.
6638 (armv4): Delete mode26 reference.
6639 * config/arm/arm.c (arm_configure_build_target): Delete use of
6642 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
6644 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
6646 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
6647 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
6649 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
6650 (floatunsdidf2): Ditto.
6652 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
6654 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
6655 (fixuns_trunc<mode>si2_avx512f): Ditto.
6656 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
6657 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
6658 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
6660 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
6662 PR rtl-optimization/79985
6663 * df-scan.c (df_insn_refs_collect): Remove special case for
6664 global registers and asm statements.
6666 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
6668 * extend.texi (Global Register Variables): Rewrite the bullet list.
6669 Note that the register is available for allocation. Note that access
6670 via inline asm must use constraints. Add note about async-signal
6671 handlers. Remove paragraph about automagic register selection.
6673 2018-05-23 Richard Biener <rguenther@suse.de>
6675 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
6676 of fixed offset from memset VN.
6678 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
6680 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
6682 (alloc_cand_and_find_basis): Initialize first_interp field.
6683 (slsr_process_mul): Modify first_interp field.
6684 (slsr_process_add): Likewise.
6685 (slsr_process_cast): Modify first_interp field for each new
6687 (slsr_process_copy): Likewise.
6688 (dump_candidate): Dump first_interp field.
6689 (replace_mult_candidate): Process all interpretations, not just
6691 (replace_rhs_if_not_dup): Likewise.
6692 (replace_one_candidate): Likewise.
6694 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
6696 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
6698 (aarch64_needs_frame_chain): New function.
6699 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
6701 2018-05-23 Sudakshina Das <sudi.das@arm.com>
6704 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
6705 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
6706 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
6707 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
6708 as true for strict-align.
6709 (aarch64_can_inline_p): Perform checks even when callee has no
6710 attributes to check for strict alignment.
6711 * doc/extend.texi (AArch64 Function Attributes): Document
6713 * doc/invoke.texi: (AArch64 Options): Likewise.
6715 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
6717 PR tree-optimization/85853
6718 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
6719 the handling of the root of the node to...
6720 (vect_slp_analyze_node_operations_1): ...this new function,
6721 and run the whole thing with the child nodes' def types
6722 set according to their SLP node's def type.
6724 2018-05-23 Richard Biener <rguenther@suse.de>
6727 * tree-data-ref.c (create_runtime_alias_checks): Defer
6728 and ignore overflow warnings.
6730 2018-05-23 Yury Gribov <tetra2005@gmail.com>
6732 PR tree-optimization/85822
6733 * tree-vrp.c (is_masked_range_test): Fix handling of negative
6736 2018-05-23 Richard Biener <rguenther@suse.de>
6738 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6739 memset constants via native_interpret_expr.
6741 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
6744 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
6746 (cgraph_node::create_alias): Likewise.
6747 (cgraph_node::get_availability): Check ifunc_resolver instead
6748 of looking up ifunc attribute.
6749 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6750 * varasm.c (do_assemble_alias): Likewise.
6751 (assemble_alias): Likewise.
6752 (default_binds_local_p_3): Likewise.
6753 * cgraph.h (cgraph_node): Add ifunc_resolver.
6754 (cgraph_node::only_called_directly_or_aliased_p): Return false
6756 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
6758 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
6759 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
6760 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
6761 instead of looking up ifunc attribute.
6763 2018-05-22 Luis Machado <luis.machado@linaro.org>
6765 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
6767 2018-05-22 Martin Sebor <msebor@redhat.com>
6770 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
6771 only when expasion succeeds.
6772 (expand_builtin_strcmp): Same.
6773 (expand_builtin_strncmp): Same.
6775 2018-05-22 Martin Sebor <msebor@redhat.com>
6777 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
6779 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6780 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6782 * config/aarch64/aarch64-ldpstp.md: Replace uses of
6783 aarch64_mem_pair_operand with memory_operand and delete operand swapping
6785 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6786 Add check for legitimate_address.
6787 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
6788 (aarch64_swap_ldrstr_operands): New.
6789 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
6792 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
6793 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6795 * config/aarch64/aarch64.md: New patterns to generate stp
6797 (store_pair_sw, store_pair_dw): New patterns to generate stp for
6798 single words and double words.
6799 (load_pair_sw, load_pair_dw): Likewise.
6800 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
6802 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
6804 * config/aarch64/aarch64-ldpstp.md: Modify peephole
6805 for different mode ldpstp and add peephole for merged zero stores.
6807 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
6809 (aarch64_gen_store_pair): Rename calls to match new patterns.
6810 (aarch64_gen_load_pair): Rename calls to match new patterns.
6811 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
6812 (load_pair<DREG:mode><DREG2:mode>): ... This.
6813 (store_pair<mode>): Rename to...
6814 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
6815 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
6817 (V_INT_EQUIV): Handle SImode.
6818 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
6821 2018-05-22 Martin Sebor <msebor@redhat.com>
6824 * calls.c (maybe_warn_nonstring_arg): Use string length to set
6825 or ajust the presumed bound on an operation to avoid unnecessary
6828 2018-05-22 Martin Sebor <msebor@redhat.com>
6830 PR tree-optimization/85826
6831 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
6832 assuming that a DECL necesarily has a constant size.
6834 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
6837 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
6839 2018-05-22 Richard Biener <rguenther@suse.de>
6841 PR tree-optimization/85834
6842 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
6843 non-constant and non-zero memset arguments.
6845 2018-05-22 Martin Liska <mliska@suse.cz>
6848 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
6850 2018-05-22 Richard Biener <rguenther@suse.de>
6852 PR tree-optimization/85863
6853 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
6854 comparisons when vectype is specified.
6855 (vectorizable_condition): Do not specify vectype for
6856 vect_is_simple_cond when SLP vectorizing.
6858 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
6861 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
6862 define __ibm128 as long double.
6863 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
6864 as a distinct type when IEEE 128-bit support is enabled.
6865 (init_float128_ieee): Fix up conversions between IFmode and IEEE
6866 128-bit types to use the correct functions.
6867 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
6868 convert between 128-bit floating point types that have different
6869 modes but the same representation, instead of using gen_lowpart to
6871 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
6873 (IFKF_reg): New attributes to give the register constraints for
6875 (extend<mode>tf2_internal): New insns to mark an explicit
6876 conversion between 128-bit floating point types that have a
6877 different mode but share the same representation.
6879 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
6881 PR tree-optimization/85814
6882 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
6883 a null return from get_strinfo when unsharing the next
6884 strinfo in the chain.
6886 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6889 * varasm.c (weak_finish): Clean up weak_decls.
6891 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6893 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
6894 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
6895 UNSPEC_UADALP values.
6896 * config/aarch64/iterators.md (ABAL): New int iterator.
6899 (sur): Add mappings for the above.
6900 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
6902 (aarch64_<sur>abal<mode>_4): Likewise.
6903 (aarch64_<sur>adalp<mode>_3): Likewise.
6904 (<sur>sadv16qi): New define_expand.
6906 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
6908 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
6909 (*movdf_internal): Ditto.
6910 (*rcpsf2_sse): Ditto.
6911 (*rsqrtsf2_sse): Ditto.
6912 (*sqrt<mode>2_sse): Ditto.
6914 2018-05-21 Tamar Christina <tamar.christina@arm.com>
6916 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
6918 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
6919 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
6920 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
6921 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
6923 * config/aarch64/arm_neon.h: Likewise.
6924 * config/aarch64/iterators.md (VQ_I): New.
6926 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
6928 * config.gcc: Add arc/t-multilib-linux to tmake_file for
6930 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
6933 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
6935 * config/nds32/constraints.md (S): New constraint.
6936 * config/nds32/nds32.md (call_internal): Use constraint S.
6937 (call_value_internal): Likewise.
6938 (sibcall_internal): Likewise.
6939 (sibcall_value_internal): Likewise.
6941 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
6942 Chung-Ju Wu <jasonwucj@gmail.com>
6944 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
6947 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
6948 Chung-Ju Wu <jasonwucj@gmail.com>
6950 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
6951 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
6952 (nds32_rtx_costs_impl): Simplify.
6953 (nds32_address_cost_impl): Simplify.
6954 (nds32_init_rtx_costs): New function.
6955 (nds32_rtx_costs_speed_prefer): Likewise.
6956 (nds32_rtx_costs_size_prefer): Likewise.
6957 (nds32_address_cost_speed_prefer): Likewise.
6958 (nds32_address_cost_speed_fwprop): Likewise.
6959 (nds32_address_cost_size_prefer): Likewise.
6960 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
6961 * config/nds32/nds32.c (nds32_option_override): Use
6962 nds32_init_rtx_costs function.
6964 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
6966 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
6967 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
6968 (TARGET_PIPELINE_N8): Likewise.
6969 (TARGET_PIPELINE_N10): Likewise.
6970 (TARGET_PIPELINE_N13): Likewise.
6971 (TARGET_PIPELINE_GRAYWOLF): Likewise.
6973 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
6975 * config/nds32/nds32-fpu.md: Update copyright year.
6977 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6979 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
6981 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6983 * config/nds32/nds32.c
6984 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
6985 * config/nds32/nds32.opt (minline-asm-r15): New option.
6987 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
6989 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
6991 * config/nds32/nds32.md (abssi2): New pattern.
6993 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
6995 * config/i386/i386.md (rex64namesuffix): New mode attribute.
6996 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
6997 Merge insn pattern from sse_cvtsi2ss<round_name> and
6998 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
6999 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
7000 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
7001 using SWI48 mode iterator.
7002 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
7003 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
7004 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
7005 pattern from sse_cvttss2si<round_saeonly_name>
7006 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
7007 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
7008 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
7009 using SWI48 mode iterator.
7010 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
7011 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
7012 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
7013 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
7014 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
7015 using SWI48 mode iterator.
7016 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
7017 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
7018 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
7019 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
7020 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
7021 SWI48 mode iterator.
7022 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
7023 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
7024 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
7025 pattern from sse_cvttsd2si<round_saeonly_name>
7026 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
7028 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7030 * config/nds32/nds32-md-auxiliary.c
7031 (nds32_valid_smw_lwm_base_p): Refine.
7032 (nds32_output_smw_single_word): Refine.
7033 (nds32_output_smw_double_word): New.
7034 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
7036 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7038 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
7039 (nds32_output_stack_pop): Refine.
7040 (nds32_expand_unaligned_load): Refine.
7041 (nds32_expand_unaligned_store): Refine.
7043 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7044 Chung-Ju Wu <jasonwucj@gmail.com>
7046 * config/nds32/constants.md: Add TP_REGNUM constant.
7047 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
7048 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
7050 * config/nds32/nds32-doubleword.md: Consider flag_pic.
7051 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
7052 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
7053 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
7054 and PIC code generation.
7055 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
7057 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
7059 * config/nds32/nds32.md: Support TLS and PIC.
7060 * config/nds32/nds32.c: Support TLS and PIC.
7061 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
7062 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
7065 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7067 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
7068 mode with E_ prefix.
7070 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7071 Chung-Ju Wu <jasonwucj@gmail.com>
7073 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
7074 * config/nds32/nds32-md-auxiliary.c
7075 (symbolic_reference_mentioned_p): New.
7076 (nds32_legitimize_ict_address): New.
7077 (nds32_expand_ict_move): New.
7078 (nds32_indirect_call_referenced_p): New.
7079 (nds32_symbol_binds_local_p): Delete.
7080 (nds32_long_call_p): Modify.
7081 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
7082 * config/nds32/nds32-protos.h
7083 (symbolic_reference_mentioned_p): Declare.
7084 (nds32_legitimize_ict_address): Declare.
7085 (nds32_expand_ict_move): Declare.
7086 (nds32_indirect_call_referenced_p): Declare.
7087 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
7088 (nds32_relax_group): Use nds32_ict_const_p as condition.
7089 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
7090 (nds32_asm_file_start): Output ict_model directive in asm code.
7091 (nds32_legitimate_address_p): Consider indirect call.
7092 (nds32_print_operand): Consider indirect call.
7093 (nds32_print_operand_address): Consider indirect call.
7094 (nds32_insert_attributes): Handle "indirect_call" attribute.
7095 (TARGET_LEGITIMATE_ADDRESS_P): Define.
7096 (TARGET_LEGITIMATE_CONSTANT_P): Define.
7097 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
7098 (TARGET_DELEGITIMIZE_ADDRESS): Define.
7099 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
7100 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
7101 (TARGET_ICT_MODEL_SMALL): Define.
7102 (TARGET_ICT_MODEL_LARGE): Define.
7103 * config/nds32/nds32.md (movsi): Consider ict model.
7104 (call, call_value): Consider ict model.
7105 (sibcall, sibcall_value): Consider ict model.
7106 * config/nds32/nds32.opt (mict-model): New option.
7107 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
7110 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
7111 Monk Chiang <sh.chiang04@gmail.com>
7112 Jim Wilson <jimw@sifive.com>
7114 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
7115 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
7116 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
7117 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
7118 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
7119 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
7120 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
7121 compute save_libcall_adjustment properly.
7122 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
7123 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
7124 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
7125 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
7126 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
7127 (ABI_SPEC): Handle mabi=ilp32e.
7128 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
7129 (RVE): Add RVE mask.
7130 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
7131 <-march>: Add rv32e as an example.
7133 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
7136 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
7137 (intra_create_variable_infos): Handle C++ constructors.
7139 2018-05-18 Martin Liska <mliska@suse.cz>
7141 * passes.def: Remove a redundant pass.
7143 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
7146 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
7148 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7150 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
7152 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
7154 (armv2, armv2a, armv3, armv3m): Delete architectures.
7155 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
7156 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
7157 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
7159 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
7160 (*mulsidi3adddi): Likewise.
7161 (mulsidi3): Likewise.
7162 (*mulsidi3_nov6): Likewise.
7163 (umulsidi3): Likewise.
7164 (umulsidi3_nov6): Likewise.
7165 (umaddsidi4): Likewise.
7166 (*umulsidi3adddi): Likewise.
7167 (smulsi3_highpart): Likewise.
7168 (*smulsi3_highpart_nov6): Likewise.
7169 (umulsi3_highpart): Likewise.
7170 (*umulsi3_highpart_nov6): Likewise.
7171 * config/arm/arm.h (arm_arch3m): Delete.
7172 * config/arm/arm.c (arm_arch3m): Delete.
7173 (arm_option_override_internal): Update armv3-related comment.
7174 (arm_configure_build_target): Delete use of isa_bit_mode32.
7175 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
7176 (arm_rtx_costs_internal): Delete check of arm_arch3m.
7177 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
7179 (mulusa3): Likewise.
7180 * config/arm/arm-protos.h (arm_arch3m): Delete.
7181 * config/arm/arm-tables.opt: Regenerate.
7182 * config/arm/arm-tune.md: Likewise.
7183 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
7184 deleted architectures.
7186 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7188 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
7189 (armv5t, armv5te): New features.
7190 (ARMv5, ARMv5e): Delete fgroups.
7191 (ARMv5t, ARMv5te): Adjust for above changes.
7193 (armv5, armv5e): Delete arches.
7194 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
7196 (*call_reg_arm): Likewise.
7197 (*call_value_reg_armv5): Likewise.
7198 (*call_value_reg_arm): Likewise.
7199 (*call_symbol): Likewise.
7200 (*call_value_symbol): Likewise.
7201 (*sibcall_insn): Likewise.
7202 (*sibcall_value_insn): Likewise.
7204 (prefetch): Likewise.
7205 (define_split and define_peephole2 dependent on arm_arch5):
7207 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
7209 (TARGET_ARM_QBIT): Likewise.
7210 (TARGET_DSP_MULTIPLY): Likewise.
7211 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
7212 (arm_arch5, arm_arch5e): Delete.
7213 (arm_arch5t, arm_arch5te): Declare.
7214 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
7215 (arm_arch5t): Declare.
7216 (arm_option_reconfigure_globals): Update for the above.
7217 (arm_options_perform_arch_sanity_checks): Update comment, replace
7218 use of arm_arch5 with arm_arch5t.
7219 (use_return_insn): Likewise.
7220 (arm_emit_call_insn): Likewise.
7221 (output_return_instruction): Likewise.
7222 (arm_final_prescan_insn): Likewise.
7223 (arm_coproc_builtin_available): Likewise.
7224 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
7225 arm_arch5e with arm_arch5t and arm_arch5te.
7226 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
7227 (arm_arch5t, arm_arch5te): Declare.
7228 * config/arm/arm-tables.opt: Regenerate.
7229 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
7230 * config/arm/t-multilib: Likewise.
7231 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
7232 instead of arm_arch5.
7233 (*call_reg_thumb1): Likewise.
7234 (*call_value_reg_thumb1_v5): Likewise.
7235 (*call_value_reg_thumb1): Likewise.
7236 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
7238 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
7240 2018-05-18 Martin Liska <mliska@suse.cz>
7242 PR gcov-profile/84846
7243 * doc/gcov.texi: Document -t option of gcov tool.
7245 2018-05-18 Martin Liska <mliska@suse.cz>
7247 PR gcov-profile/84846
7248 * gcov.c (print_usage): Add new -t option.
7249 (process_args): Handle the option.
7250 (generate_results): Use stdout as output when requested by
7253 2018-05-18 Martin Liska <mliska@suse.cz>
7255 PR gcov-profile/84846
7256 * coverage.c (coverage_init): Write PWD to .gcno file.
7257 * doc/gcov.texi: Document how working directory is printed.
7258 * gcov-dump.c (dump_gcov_file): Print PWD.
7259 * gcov.c (output_intermediate_file): Likewise.
7260 (read_graph_file): Read PWD string.
7261 (output_lines): Print PWD.
7263 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7266 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
7267 for retval and return false if all args to phi are zero.
7269 2018-05-18 Richard Biener <rguenther@suse.de>
7271 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
7273 (evrp_dom_walker::before_dom_children): Call it.
7275 2018-05-18 Richard Biener <rguenther@suse.de>
7277 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
7278 results when processing array refs with variable index.
7280 2018-05-18 Toon Moene <toon@moene.org>
7282 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
7283 directly after that of -floop-interchange. Indicate that both
7284 options are enabled by default when specifying -O3.
7286 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7288 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
7289 iterator. Delete separate integer-mode vec_set<mode> expander.
7290 (aarch64_simd_vec_setv2di): Delete.
7291 (vec_setv2di): Delete.
7292 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
7293 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
7294 the "w, r" alternative.
7296 2018-05-18 Martin Liska <mliska@suse.cz>
7298 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
7299 * tree-pass.h (make_pass_lower_switch_O0): New function.
7300 * tree-switch-conversion.c (node_has_low_bound): Remove.
7301 (node_has_high_bound): Likewise.
7302 (node_is_bounded): Likewise.
7303 (class pass_lower_switch): Make it a template type and create
7305 (pass_lower_switch::execute): Add template argument.
7306 (make_pass_lower_switch): New function.
7307 (make_pass_lower_switch_O0): New function.
7308 (do_jump_if_equal): Remove.
7309 (emit_case_nodes): Simplify to just handle all 3 cases and leave
7310 all the hard work to tree optimization passes.
7312 2018-05-18 Martin Liska <mliska@suse.cz>
7314 * dbgcnt.c (limit_low): Renamed from limit.
7315 (limit_high): New variable.
7316 (dbg_cnt_is_enabled): Check for upper limit.
7317 (dbg_cnt): Adjust dumping.
7318 (dbg_cnt_set_limit_by_index): Add new argument for high
7320 (dbg_cnt_set_limit_by_name): Likewise.
7321 (dbg_cnt_process_single_pair): Parse new format.
7322 (dbg_cnt_process_opt): Use strtok.
7323 (dbg_cnt_list_all_counters): Remove 'value' and add
7325 * doc/invoke.texi: Document changes.
7327 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
7329 * doc/sourcebuild.texi (scalar_all_fma): Document.
7330 * tree.def (FMA_EXPR): Delete.
7331 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
7332 * internal-fn.c (ternary_direct): New macro.
7333 (expand_ternary_optab_fn): Likewise.
7334 (direct_ternary_optab_supported_p): Likewise.
7335 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
7336 * builtins.c (fold_builtin_fma): Delete.
7337 (fold_builtin_3): Don't call it.
7338 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
7339 * expr.c (expand_expr_real_2): Likewise.
7340 * fold-const.c (operand_equal_p): Likewise.
7341 (fold_ternary_loc): Likewise.
7342 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
7343 * gimple.c (DEFTREECODE): Likewise.
7344 * gimplify.c (gimplify_expr): Likewise.
7345 * optabs-tree.c (optab_for_tree_code): Likewise.
7346 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7347 * tree-eh.c (operation_could_trap_p): Likewise.
7348 (stmt_could_throw_1_p): Likewise.
7349 * tree-inline.c (estimate_operator_cost): Likewise.
7350 * tree-pretty-print.c (dump_generic_node): Likewise.
7351 (op_code_prio): Likewise.
7352 * tree-ssa-loop-im.c (stmt_cost): Likewise.
7353 * tree-ssa-operands.c (get_expr_operands): Likewise.
7354 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
7355 * fold-const-call.h (fold_fma): Delete.
7356 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
7357 CFN_FNMA and CFN_FNMS.
7359 * genmatch.c (combined_fn): New enum.
7360 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
7361 (commutative_op): New function.
7362 (commutate): Use it. Handle more than 2 operands.
7363 (dt_operand::gen_gimple_expr): Use commutative_op.
7364 (parser::parse_expr): Allow :c to be used with non-binary
7365 operators if the commutative operand is known.
7366 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
7367 CFN_FMS, CFN_FNMA and CFN_FNMS.
7368 (backprop::process_assign_use): Remove FMA_EXPR handling.
7369 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
7370 (gen_hsa_fma): New function.
7371 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
7372 IFN_FNMA and IFN_FNMS.
7373 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
7374 * gimple-fold.h (follow_all_ssa_edges): Declare.
7375 * gimple-fold.c (follow_all_ssa_edges): New function.
7376 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
7377 gimple_build interface and use follow_all_ssa_edges to fold the result.
7378 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
7379 instead of checking for optabs directly.
7380 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
7381 rather than FMA_EXPRs.
7382 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
7383 call to IFN_FMA instead of an FMA_EXPR.
7385 2018-05-17 Jim Wilson <jimw@sifive.com>
7387 * expr.c (do_tablejump): When converting index to Pmode, if we have a
7388 sign extended promoted subreg, and the range does not have the sign bit
7389 set, then do a sign extend.
7391 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
7392 test, check for sign extended subreg and/or constant operands, and
7393 do a sign extend in that case.
7395 2018-05-17 Steve Ellcey <sellcey@cavium.com>
7397 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
7398 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
7400 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
7401 Change logics_shift_reg to logics_shift_imm.
7402 (thunderx2t99_fp_loadpair_basic): Delete.
7403 (thunderx2t99_fp_storepair_basic): Delete.
7404 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
7405 (thunderx2t99_asimd_polynomial): Delete.
7406 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
7407 and neon_fp_mul_d_scalar_q.
7408 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
7409 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
7410 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
7411 (thunderx2t99_asimd_lut): Add missing tbl types.
7412 (thunderx2t99_asimd_ext): Delete.
7413 (thunderx2t99_asimd_load1_1_mult): Delete.
7414 (thunderx2t99_asimd_load1_2_mult): Delete.
7415 (thunderx2t99_asimd_load1_ldp): New.
7416 (thunderx2t99_asimd_load1): New.
7417 (thunderx2t99_asimd_load2): Add missing *load2* types.
7418 (thunderx2t99_asimd_load3): New.
7419 (thunderx2t99_asimd_load4): New.
7420 (thunderx2t99_asimd_store1_1_mult): Delete.
7421 (thunderx2t99_asimd_store1_2_mult): Delete.
7422 (thunderx2t99_asimd_store2_mult): Delete.
7423 (thunderx2t99_asimd_store2_onelane): Delete.
7424 (thunderx2t99_asimd_store_stp): New.
7425 (thunderx2t99_asimd_store1): New.
7426 (thunderx2t99_asimd_store2): New.
7427 (thunderx2t99_asimd_store3): New.
7428 (thunderx2t99_asimd_store4): New.
7430 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
7432 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
7433 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
7435 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
7436 Segher Boessenkool <segher@kernel.crashing.org>
7439 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
7442 2018-05-17 Richard Biener <rguenther@suse.de>
7444 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
7445 for pruning loop and prune defs feeding only already visited PHIs.
7447 2018-05-17 Richard Biener <rguenther@suse.de>
7449 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
7451 2018-05-17 Bin Cheng <bin.cheng@arm.com>
7452 Richard Biener <rguenther@suse.de>
7454 PR tree-optimization/85793
7455 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
7456 for VMAT_ELEMENTWISE.
7458 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
7460 * internal-fn.h (lookup_internal_fn): Declare
7461 * internal-fn.c (lookup_internal_fn): New function.
7462 * gimple.c (gimple_build_call_from_tree): Handle calls to
7464 * gimple-pretty-print.c (dump_gimple_call): Print "." before
7465 internal function names.
7466 * tree-pretty-print.c (dump_generic_node): Likewise.
7467 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
7469 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
7471 * gimple-fold.h (gimple_build): Make the function forms take
7472 combined_fn rather than built_in_function.
7473 (gimple_simplify): Likewise.
7474 * gimple-match-head.c (gimple_simplify): Likewise.
7475 * gimple-fold.c (gimple_build): Likewise.
7476 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
7477 rather than gimple_build_call_internal.
7478 (get_initial_defs_for_reduction): Likewise.
7479 (vect_create_epilog_for_reduction): Likewise.
7480 (vectorizable_live_operation): Likewise.
7482 2018-05-17 Martin Liska <mliska@suse.cz>
7484 * gimple-ssa-sprintf.c (format_directive): Do not use
7485 space in between 'G_' and '('.
7487 2018-05-17 Jakub Jelinek <jakub@redhat.com>
7490 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
7491 even if the mask is not all ones.
7494 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
7496 (ix86_gimple_fold_builtin): Likewise.
7499 * config/i386/i386.c: Include tree-vector-builder.h.
7500 (ix86_vector_shift_count): New function.
7501 (ix86_fold_builtin): Fold shift builtins by scalar count.
7502 (ix86_gimple_fold_builtin): Likewise.
7504 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
7505 _mm512_setzero): New intrinsics.
7507 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
7508 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7510 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
7511 code generation for cases where splatting a value is not useful.
7512 * simplify-rtx.c (simplify_ternary_operation): Simplify
7513 vec_merge across a vec_duplicate and a paradoxical subreg forming
7514 a vector mode to a vec_concat.
7516 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
7518 * config.gcc: Support "goldmont-plus".
7519 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7521 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7522 PROCESSOR_GOLDMONT_PLUS.
7523 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
7524 (processor_target_table): Add "goldmont-plus".
7525 (PTA_GOLDMONT_PLUS): Define.
7526 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
7527 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
7528 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
7529 (fold_builtin_cpu): Add "goldmont-plus".
7530 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
7531 (ix86_option_override_internal): Add "goldmont-plus".
7532 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
7533 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
7534 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
7535 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
7537 2018-05-17 Richard Biener <rguenther@suse.de>
7539 PR tree-optimization/85757
7540 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
7541 remove defs that only feed that PHI from further processing.
7543 2018-05-16 Jim Wilson <jimw@sifive.com>
7545 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
7547 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
7549 2018-05-16 Mark Wielaard <mark@klomp.org>
7551 * dwarf2out.c (count_index_strings): New function.
7552 (output_indirect_strings): Call count_index_strings and generate
7553 header for dwarf_version >= 5.
7555 2018-05-16 Mark Wielaard <mark@klomp.org>
7557 * dwarf2out.c (dwarf_FORM): New function.
7558 (set_indirect_string): Use dwarf_FORM.
7559 (reset_indirect_string): Likewise.
7560 (size_of_die): Likewise.
7561 (value_format): Likewise.
7562 (output_die): Likewise.
7563 (add_skeleton_AT_string): Likewise.
7564 (output_macinfo_op): Likewise.
7565 (index_string): Likewise.
7566 (output_index_string_offset): Likewise.
7567 (output_index_string): Likewise.
7568 (count_index_strings): Likewise.
7570 2018-05-16 Carl Love <cel@us.ibm.com>
7572 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7573 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
7575 2018-05-16 Martin Jambor <mjambor@suse.cz>
7577 * ipa-prop.c (ipa_free_all_edge_args): Remove.
7578 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
7580 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
7582 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
7583 (fnma<mode>4): Likewise.
7584 (fms<mode>4): Likewise.
7585 (fnms<mode>4): Likewise.
7586 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
7587 (aarch64_fnma<mode>4): Likewise.
7588 (aarch64_fms<mode>4): Likewise.
7589 (aarch64_fnms<mode>4): Likewise.
7590 (aarch64_fnmadd<mode>4): Likewise.
7592 2018-05-16 Jason Merrill <jason@redhat.com>
7594 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
7596 2018-05-16 Richard Biener <rguenther@suse.de>
7598 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
7599 (dump_stmt_cost): Declare.
7600 (add_stmt_cost): Dump cost we add.
7601 (add_stmt_costs): New function.
7602 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
7604 (vect_analyze_stmt): Adjust prototype.
7605 (vectorizable_condition): Likewise.
7606 (vectorizable_live_operation): Likewise.
7607 (vectorizable_reduction): Likewise.
7608 (vectorizable_induction): Likewise.
7609 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
7610 cost vector to pass to vectorizable_ and record afterwards.
7611 (vect_model_reduction_cost): Take cost vector argument and adjust.
7612 (vect_model_induction_cost): Likewise.
7613 (vectorizable_reduction): Likewise.
7614 (vectorizable_induction): Likewise.
7615 (vectorizable_live_operation): Likewise.
7616 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
7617 SLP_TREE_NUMBER_OF_VEC_STMTS.
7618 (vect_analyze_slp_cost_1): Remove.
7619 (vect_analyze_slp_cost): Likewise.
7620 (vect_slp_analyze_node_operations): Take visited args and
7621 a target cost vector. Avoid processing already visited stmt sets.
7622 (vect_slp_analyze_operations): Use a local cost vector to gather
7623 costs and register those of non-discarded instances.
7624 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
7625 (vect_schedule_slp_instance): Remove copying of
7626 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
7628 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
7629 adding cost. Record cost entry location.
7630 (vect_prologue_cost_for_slp_op): Function to compute cost of
7631 a constant or invariant generated for SLP vect in the prologue,
7632 split out from vect_analyze_slp_cost_1.
7633 (vect_model_simple_cost): Make static. Adjust for SLP costing.
7634 (vect_model_promotion_demotion_cost): Likewise.
7635 (vect_model_store_cost): Likewise, make static.
7636 (vect_model_load_cost): Likewise.
7637 (vectorizable_bswap): Add cost vector arg and adjust.
7638 (vectorizable_call): Likewise.
7639 (vectorizable_simd_clone_call): Likewise.
7640 (vectorizable_conversion): Likewise.
7641 (vectorizable_assignment): Likewise.
7642 (vectorizable_shift): Likewise.
7643 (vectorizable_operation): Likewise.
7644 (vectorizable_store): Likewise.
7645 (vectorizable_load): Likewise.
7646 (vectorizable_condition): Likewise.
7647 (vectorizable_comparison): Likewise.
7648 (can_vectorize_live_stmts): Likewise.
7649 (vect_analyze_stmt): Likewise.
7650 (vect_transform_stmt): Adjust calls to vectorizable_*.
7651 * tree-vectorizer.c: Include gimple-pretty-print.h.
7652 (dump_stmt_cost): New function.
7654 2018-05-16 Richard Biener <rguenther@suse.de>
7656 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
7657 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
7658 * tree-ssa-dse.c: Include tree-ssa-loop.h.
7659 (check_name): New callback.
7660 (dse_classify_store): Track cycles via a visited bitmap of PHI
7661 defs and simplify handling of in-loop and across loop dead stores
7662 and properly fail for loop-variant refs. Handle byte-tracking with
7663 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
7666 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
7668 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
7669 (vect_get_mask_type_for_stmt): Likewise.
7670 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
7672 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
7673 to determine the statement's vector type and the vector type that
7674 should be used for calculating nunits. Deal with cases in which
7675 the type has to be deferred.
7676 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
7677 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
7678 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
7679 (vect_determine_vf_for_stmt): New functions, split out from...
7680 (vect_determine_vectorization_factor): ...here.
7681 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
7682 (vect_get_mask_type_for_stmt): New functions, split out from
7683 vect_determine_vectorization_factor.
7685 2018-05-16 Richard Biener <rguenther@suse.de>
7687 * tree-cfg.c (verify_gimple_assign_ternary): Properly
7688 verify the [VEC_]COND_EXPR embedded comparison.
7690 2018-05-15 Martin Sebor <msebor@redhat.com>
7692 PR tree-optimization/85753
7693 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
7694 RECORD_TYPE in addition to ARRAY_TYPE.
7696 2018-05-15 Martin Sebor <msebor@redhat.com>
7699 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
7701 2018-05-15 Richard Biener <rguenther@suse.de>
7703 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
7704 add by_clobber_p one. Change algorithm to collect all defs
7705 representing uses we need to walk and try reducing them to
7706 a single one before failing.
7707 (dse_dom_walker::dse_optimize_stmt): Adjust.
7709 2018-05-13 Mark Wielaard <mark@klomp.org>
7711 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
7712 (size_of_loc_descr): Likewise.
7713 (output_loc_operands): Likewise.
7714 (output_loc_operands_raw): Likewise.
7715 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
7716 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
7717 (hash_loc_operands): Likewise.
7718 (compare_loc_operands): Likewise.
7720 2018-05-14 Mark Wielaard <mark@klomp.org>
7722 * dwarf2out.c (count_index_addrs): New function.
7723 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
7725 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7727 PR tree-optimization/83648
7728 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
7729 return value as malloc candidate.
7731 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7734 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
7735 param as true in call to suggest_attribute.
7737 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
7739 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
7740 -mreadonly-in-sdata.
7742 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7744 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
7746 (aarch64_crypto_aesd_fused): Likewise.
7748 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
7750 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
7751 (movsi_aarch64): Likewise.
7752 (load_pairsi): Likewise.
7753 (load_pairdi): Likewise.
7754 (store_pairsi): Likewise.
7755 (store_pairdi): Likewise.
7756 (load_pairsf): Likewise.
7757 (load_pairdf): Likewise.
7758 (store_pairsf): Likewise.
7759 (store_pairdf): Likewise.
7760 (zero_extend): Likewise.
7761 (trunc): Swap alternatives.
7762 (fcvt_target): Add '?' to prefer w over r.
7764 2018-05-14 Jakub Jelinek <jakub@redhat.com>
7767 * config/i386/i386.md: Disallow non-commutative arithmetics in
7768 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
7769 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
7770 in the peephole2 before it.
7772 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
7774 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
7775 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
7776 (ix86_handle_option): Handle -mcldemote.
7777 * config.gcc: New header.
7778 * config/i386/cldemoteintrin.h: New file.
7779 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
7780 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
7782 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7783 OPTION_MASK_ISA_CLDEMOTE.
7784 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
7785 (ix86_valid_target_attribute_inner_p): Ditto.
7786 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
7787 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
7788 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
7789 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
7790 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
7792 * config/i386/i386.opt: Add -mcldemote.
7793 * config/i386/x86intrin.h: New header.
7794 * doc/invoke.texi: Add -mcldemote.
7796 2018-05-14 Richard Biener <rguenther@suse.de>
7798 * doc/match-and-simplify.texi: Adjust :s documentation.
7800 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
7802 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
7803 intended memcpy size.
7804 (REORDER_45): Likewise.
7806 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
7808 * sort.cc: New file.
7809 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
7810 * vec.c (qsort_chk): Use gcc_qsort.
7811 * Makefile.in (OBJS-libcommon): Add sort.o.
7812 (build/sort.o): New target. Use it...
7813 (BUILD_RTL): ... here, and...
7814 (build/gencfn-macros): ... here, and...
7815 (build/genmatch): ... here.
7817 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7818 Chung-Ju Wu <jasonwucj@gmail.com>
7820 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
7821 * config/nds32/nds32-graywolf.md: New file.
7822 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
7823 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
7825 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
7826 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
7827 * config/nds32/nds32.md (pipeline_model): Add graywolf.
7828 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
7829 * config/nds32/pipelines.md: Include n15 settings.
7831 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7832 Chung-Ju Wu <jasonwucj@gmail.com>
7834 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
7835 * config/nds32/nds32-n13.md: New file.
7836 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
7837 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
7839 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
7840 * config/nds32/nds32.md (pipeline_model): Add n13.
7841 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
7842 * config/nds32/pipelines.md: Include n13 settings.
7844 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
7845 Chung-Ju Wu <jasonwucj@gmail.com>
7847 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
7848 * config/nds32/nds32-n10.md: New file.
7849 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
7850 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
7852 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
7853 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
7854 * config/nds32/nds32.md (pipeline_model): Add n10.
7855 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
7856 * config/nds32/pipelines.md: Include n10 settings.
7858 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
7859 Kito Cheng <kito.cheng@gmail.com>
7860 Chung-Ju Wu <jasonwucj@gmail.com>
7862 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
7863 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7864 Add enum values for DSP extension instructions.
7865 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
7867 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
7868 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
7870 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
7871 * config/nds32/nds32-dspext.md: New file for DSP implementation.
7872 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
7873 * config/nds32/nds32-intrinsic.md: Likewise.
7874 * config/nds32/nds32_intrinsic.h: Likewise.
7875 * config/nds32/nds32-md-auxiliary.c: Likewise.
7876 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
7877 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
7878 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
7879 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
7880 * config/nds32/nds32-protos.h: New declarations for DSP extension.
7881 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
7882 TYPE_DMAC in switch statement.
7883 * config/nds32/nds32.c: New checking and implementation for DSP
7884 extension instructions.
7885 * config/nds32/nds32.h: Likewise.
7886 * config/nds32/nds32.md: Likewise.
7887 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
7888 * config/nds32/predicates.md: Implement new predicates for DSP
7891 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7893 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
7894 Reformat alternatives and attributes so it is easier to identify
7895 which constraints/attributes go with which instruction.
7896 (mov<mode>_hardfloat32, FMOVE64): Likewise.
7897 (mov<mode>_softfloat32, FMOVE64): Likewise.
7898 (mov<mode>_hardfloat64, FMOVE64): Likewise.
7899 (mov<mode>_softfloat64, FMOVE64): Likewise.
7901 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
7903 * doc/extend.texi (PowerPC Built-in Functions): Rename this
7905 (Basic PowerPC Built-in Functions): The new name of the
7906 subsection previously known as "PowerPC Built-in Functions".
7907 (Basic PowerPC Built-in Functions Available on all Configurations):
7909 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
7910 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
7911 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
7912 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
7914 2018-05-11 Martin Jambor <mjambor@suse.cz>
7917 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
7920 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
7923 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
7925 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
7927 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
7928 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
7929 (ix86_handle_option): Handle -mwaitpkg.
7930 * config.gcc: New header.
7931 * config/i386/cpuid.h (bit_WAITPKG): New bit.
7932 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
7933 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
7935 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7936 OPTION_MASK_ISA_WAITPKG.
7937 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
7938 (ix86_option_override_internal): Add PTA_WAITPKG.
7939 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
7940 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
7941 IX86_BUILTIN_TPAUSE.
7942 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
7943 __builtin_ia32_umwait and __builtin_ia32_tpause.
7944 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
7945 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
7946 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
7947 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
7948 UNSPECV_TPAUSE): New.
7949 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
7950 * config/i386/i386.opt: Add -mwaitpkg.
7951 * config/i386/waitpkgintrin.h: New file.
7952 * config/i386/x86intrin.h: New header.
7953 * doc/invoke.texi: Add -mwaitpkg.
7955 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
7958 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
7960 (cortex-m0): Use armv6s-m isa.
7961 (cortex-m0plus): Likewise.
7962 (cortex-m1): Likewise.
7963 (cortex-m0.small-multiply): Likewise.
7964 (cortex-m0plus.small-multiply): Likewise.
7965 (cortex-m1.small-multiply): Likewise.
7967 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
7968 Jakub Jelinek <jakub@redhat.com>
7970 PR tree-optimization/85692
7971 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
7972 source permute as well.
7974 2018-05-11 Martin Liska <mliska@suse.cz>
7977 * doc/extend.texi: Document LLVM style format for no_sanitize
7980 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
7982 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
7983 mode_supports_vsx_dform_quad to mode_supports_dq_form.
7984 (mode_supports_vsx_dform_quad): Likewise.
7985 (mode_supports_vmx_dform): Move these functions to be next to the
7986 other mode_supports functions.
7987 (mode_supports_dq_form): Likewise.
7988 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
7989 mode_supports_dq_form.
7990 (reg_offset_addressing_ok_p): Likewise.
7991 (offsettable_ok_by_alignment): Likewise.
7992 (rs6000_legitimate_offset_address_p): Likewise.
7993 (legitimate_lo_sum_address_p): Likewise.
7994 (rs6000_legitimize_address): Likewise.
7995 (rs6000_legitimize_reload_address): Likewise.
7996 (rs6000_secondary_reload_inner): Likewise.
7997 (rs6000_preferred_reload_class): Likewise.
7998 (rs6000_output_move_128bit): Likewise.
8000 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8002 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
8003 Generate SImode target register for null target.
8004 <case IX86_BUILTIN_XGETBV>: Ditto.
8005 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
8006 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
8008 2018-05-10 Carl Love <cel@us.ibm.com>
8010 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8011 dcbtt and dcbtstt if operands[2] is 0.
8013 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8016 * config/i386/sse.md (usadv64qi): New expander.
8018 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
8020 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
8021 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
8022 -maltivec=be support.
8023 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
8024 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
8025 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
8026 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
8027 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
8028 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
8029 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
8030 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
8031 altivec_vsumsws): Adjust.
8032 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
8033 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
8034 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
8036 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
8037 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
8038 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
8039 (altivec_lve<VI_char>x): Delete expand.
8040 (*altivec_lve<VI_char>x_internal): Rename to...
8041 (altivec_lve<VI_char>x): ... this.
8042 (altivec_lvxl_<mode>): Delete expand.
8043 (*altivec_lvxl_<mode>_internal): Rename to ...
8044 (altivec_lvxl_<mode>): ... this.
8045 (altivec_stvxl_<mode>): Delete expand.
8046 (*altivec_stvxl_<mode>_internal): Rename to ...
8047 (altivec_stvxl_<mode>): ... this.
8048 (altivec_stve<VI_char>x): Delete expand.
8049 (*altivec_stve<VI_char>x_internal): Rename to ...
8050 (altivec_stve<VI_char>x): ... this.
8051 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
8052 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
8053 reduc_plus_scal_<mode>): Adjust.
8054 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
8056 (rs6000_cpu_cpp_builtins): Adjust.
8057 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
8058 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
8059 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
8060 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
8061 -maltivec=be support.
8062 (rs6000_split_vec_extract_var): Adjust.
8063 (rs6000_split_v4si_init): Adjust.
8064 (swap_selector_for_mode): Delete.
8065 (altivec_expand_lvx_be, altivec_expand_stvx_be,
8066 altivec_expand_stvex_be): Delete.
8067 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
8068 -maltivec=be support.
8069 (rs6000_gimple_fold_builtin): Ditto.
8070 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
8072 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
8073 (TARGET_DIRECT_MOVE_64BIT): Adjust.
8074 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
8075 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
8076 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
8077 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
8078 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
8079 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
8080 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
8081 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
8082 anonymous split): Adjust.
8083 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
8084 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
8086 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
8088 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
8089 when --with-gxx-include-dir is also specified.
8090 * configure: Regenerate.
8092 2018-05-09 Jim Wilson <jimw@sifive.com>
8095 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
8096 * config/riscv/t-withmultilib: New.
8097 * config/riscv/withmultilib.h: New.
8098 * doc/install.texi: Document RISC-V --with-multilib-list support.
8100 2018-05-09 Richard Biener <rguenther@suse.de>
8102 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
8104 (vect_bb_vectorization_profitable_p): Adjust. Compute
8105 actual scalar cost using the cost vector and the add_stmt_cost
8108 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8110 PR rtl-optimization/85645
8111 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
8112 in the REG_CFA_REGISTER note for LR, don't leave it empty.
8114 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8116 PR rtl-optimization/85645
8117 * shrink-wrap.c (spread_components): Return a boolean saying if
8118 anything was changed.
8119 (try_shrink_wrapping_separate): Iterate spread_components until
8120 nothing changes anymore.
8122 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8124 PR rtl-optimization/85645
8125 * regrename.c (build_def_use): Also kill the chains that include the
8126 destination of a REG_CFA_REGISTER note.
8128 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8130 PR rtl-optimization/85645
8131 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
8132 insn that has a REG_CFA_REGISTER note.
8134 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
8136 * cfgexpand.c (expand_clobber): New function.
8137 (expand_gimple_stmt_1): Use it.
8138 * tree-vect-stmts.c (vect_clobber_variable): New function,
8140 (vectorizable_simd_clone_call): ...here.
8141 (vectorizable_store): Emit a clobber either side of an
8142 IFN_STORE_LANES sequence.
8143 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
8145 2018-05-09 Tom de Vries <tom@codesourcery.com>
8148 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
8149 (define_insn "trap_if_false"): Add exit after trap.
8151 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
8153 PR rtl-optimization/85638
8154 * bb-reorder.c: Include common/common-target.h.
8155 (create_forwarder_block): New function extracted from...
8156 (fix_up_crossing_landing_pad): ...here. Rename into...
8157 (dw2_fix_up_crossing_landing_pad): ...this.
8158 (sjlj_fix_up_crossing_landing_pad): New function.
8159 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
8160 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
8161 from both partitions and exit the loop after one iteration.
8163 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8166 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8168 (Basic PowerPC Built-in Functions): The new name of the
8169 subsection previously known as "PowerPC Built-in Functions".
8170 (Basic PowerPC Built-in Functions Available on all Configurations):
8172 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8174 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8176 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8178 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8181 2018-05-08 Jim Wilson <jimw@sifive.com>
8183 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
8184 (LD_EMUL_SUFFIX): New.
8185 (LINK_SPEC): Use it.
8187 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8189 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8191 (Basic PowerPC Built-in Functions): The new name of the
8192 subsection previously known as "PowerPC Built-in Functions".
8193 (Basic PowerPC Built-in Functions Available on all Configurations):
8195 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8197 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8199 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8201 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8204 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8207 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
8208 after cmpelim optimization.
8210 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
8212 * config.gcc: Support "goldmont".
8213 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
8214 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8216 * config/i386/i386.c (m_GOLDMONT): Define.
8217 (processor_target_table): Add "goldmont".
8218 (PTA_GOLDMONT): Define.
8219 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
8220 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
8221 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
8222 (fold_builtin_cpu): Add "goldmont".
8223 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
8224 (ix86_option_override_internal): Add "goldmont".
8225 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
8226 (processor_type): Add PROCESSOR_GOLDMONT.
8227 * config/i386/i386.md: Add CPU "glm".
8228 * config/i386/glm.md: New file.
8229 * config/i386/x86-tune.def: Add m_GOLDMONT.
8230 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
8232 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8235 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
8237 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
8238 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
8239 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
8242 * config/i386/i386.c (ix86_fold_builtin): Handle
8243 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
8246 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
8247 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
8249 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
8252 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
8253 (check_arch): Likewise.
8254 (check_fpu): Return the result rather than printing it.
8255 (end arch): Fix operator precedence.
8256 (end cpu): Likewise.
8257 (END): Print the result from check_fpu.
8259 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8260 Alan Hayward <alan.hayward@arm.com>
8261 David Sherwood <david.sherwood@arm.com>
8263 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
8264 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
8265 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
8266 (*fcmuo<mode>_and): New patterns.
8268 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
8270 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
8271 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
8272 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
8273 (cmp_op, sve_imm_con): New code attributes.
8274 (SVE_COND_INT_CMP, imm_con): Delete.
8275 (cmp_op): Remove above unspecs from int attribute.
8276 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
8278 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
8279 comparison-specific unspecs.
8280 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
8281 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
8282 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
8283 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
8284 (*vec_fcm<cmp_op><mode>): Rename to...
8285 (*fcm<cmp_op><mode>): ...this and adjust likewise.
8286 (*vec_fcmuo<mode>): Rename to...
8287 (*fcmuo<mode>): ...this and adjust likewise.
8288 (*pred_fcm<cmp_op><mode>): New pattern.
8289 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
8290 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
8292 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
8294 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
8295 (aarch64_emit_sve_predicated_cond): New function.
8296 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
8297 (aarch64_emit_unspec_cond_or): Replace with...
8298 (aarch64_emit_sve_or_conds): ...this new function. Use
8299 aarch64_emit_sve_ptrue_op for the individual comparisons and
8300 aarch64_emit_binop to OR them together.
8301 (aarch64_emit_inverted_unspec_cond): Replace with...
8302 (aarch64_emit_sve_inverted_cond): ...this new function. Use
8303 aarch64_emit_sve_ptrue_op for the comparison and
8304 aarch64_emit_unop to invert the result.
8305 (aarch64_expand_sve_vec_cmp_float): Update after the above
8306 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
8308 2018-05-07 Nathan Sidwell <nathan@acm.org>
8310 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
8311 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
8312 (Backwards Compatibility): Likewise.
8314 2018-05-07 Luis Machado <luis.machado@linaro.org>
8318 2018-05-07 Luis Machado <luis.machado@linaro.org>
8320 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8321 <prefetch_dynamic_strides>: New const bool field.
8322 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8323 prefetch_dynamic_strides.
8324 (exynosm1_prefetch_tune): Likewise.
8325 (thunderxt88_prefetch_tune): Likewise.
8326 (thunderx_prefetch_tune): Likewise.
8327 (thunderx2t99_prefetch_tune): Likewise.
8328 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8330 (aarch64_override_options_internal): Update to set
8331 PARAM_PREFETCH_DYNAMIC_STRIDES.
8332 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8333 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8334 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8335 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8336 prefetch-dynamic-strides setting.
8338 2018-05-07 Luis Machado <luis.machado@linaro.org>
8340 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8341 <minimum_stride>: New const int field.
8342 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8343 minimum_stride field.
8344 (exynosm1_prefetch_tune): Likewise.
8345 (thunderxt88_prefetch_tune): Likewise.
8346 (thunderx_prefetch_tune): Likewise.
8347 (thunderx2t99_prefetch_tune): Likewise.
8348 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8349 (aarch64_override_options_internal): Update to set
8350 PARAM_PREFETCH_MINIMUM_STRIDE.
8351 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8352 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8353 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8354 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8355 stride is constant and is below the minimum stride threshold.
8357 2018-05-07 Luis Machado <luis.machado@linaro.org>
8359 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
8362 2018-05-07 Luis Machado <luis.machado@linaro.org>
8364 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8365 <prefetch_dynamic_strides>: New const bool field.
8366 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8367 prefetch_dynamic_strides.
8368 (exynosm1_prefetch_tune): Likewise.
8369 (thunderxt88_prefetch_tune): Likewise.
8370 (thunderx_prefetch_tune): Likewise.
8371 (thunderx2t99_prefetch_tune): Likewise.
8372 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
8374 (aarch64_override_options_internal): Update to set
8375 PARAM_PREFETCH_DYNAMIC_STRIDES.
8376 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
8377 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
8378 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
8379 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
8380 prefetch-dynamic-strides setting.
8382 2018-05-07 Luis Machado <luis.machado@linaro.org>
8384 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
8385 <minimum_stride>: New const int field.
8386 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
8387 minimum_stride field.
8388 (exynosm1_prefetch_tune): Likewise.
8389 (thunderxt88_prefetch_tune): Likewise.
8390 (thunderx_prefetch_tune): Likewise.
8391 (thunderx2t99_prefetch_tune): Likewise.
8392 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
8393 (aarch64_override_options_internal): Update to set
8394 PARAM_PREFETCH_MINIMUM_STRIDE.
8395 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
8396 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
8397 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
8398 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
8399 stride is constant and is below the minimum stride threshold.
8401 2018-05-06 Jakub Jelinek <jakub@redhat.com>
8404 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
8405 the type is addressable. Don't force op into register if it has
8408 2018-05-05 Roland McGrath <mcgrathr@google.com>
8411 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
8412 any section for which we don't know a specific type it should have,
8413 regardless of name. Previously this was done only for the exact
8414 names ".init_array", ".fini_array", and ".preinit_array".
8415 (default_elf_asm_named_section): Add comment about
8416 relationship with default_section_type_flags and SECTION_NOTYPE.
8417 (get_section): Don't consider it a type conflict if one side has
8418 SECTION_NOTYPE and the other doesn't, as long as neither has the
8419 SECTION_BSS et al used in the default_section_type_flags logic.
8421 2018-05-05 Tom de Vries <tom@codesourcery.com>
8424 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
8425 (workaround_barsyncs): New function.
8426 (nvptx_reorg): Use workaround_barsyncs.
8427 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8428 (define_expand "nvptx_membar_cta"): New define_expand.
8429 (define_insn "*nvptx_membar_cta"): New insn.
8431 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
8433 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
8434 To improve optimization opportunities.
8435 * builtin-types.def: The new needed builtin types for the above.
8437 2018-05-04 Richard Biener <rguenther@suse.de>
8439 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
8440 * gimple-ssa-store-merging.c
8441 (imm_store_chain_info::output_merged_store): Remove redundant create,
8442 release split_store vector contents on failure.
8443 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
8444 scalar stmt vector on cache hit.
8446 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
8448 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
8450 * config.gcc (powerpc-xilinx-eabi*): Remove.
8451 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
8453 (fusion_addis_mem_combo_load): Ditto.
8454 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
8456 (rs6000_cpu_cpp_builtins): Ditto.
8457 * config/rs6000/rs6000-linux.c
8458 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
8459 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
8460 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
8462 (rs6000_setup_reg_addr_masks): Ditto.
8463 (rs6000_init_hard_regno_mode_ok): Ditto.
8464 (rs6000_option_override_internal): Ditto.
8465 (legitimate_lo_sum_address_p): Ditto.
8466 (rs6000_legitimize_address): Ditto.
8467 (rs6000_legitimize_reload_address): Ditto.
8468 (rs6000_legitimate_address_p): Ditto.
8469 (abi_v4_pass_in_fpr): Ditto.
8470 (setup_incoming_varargs): Ditto.
8471 (rs6000_gimplify_va_arg): Ditto.
8472 (rs6000_split_multireg_move): Ditto.
8473 (rs6000_savres_strategy): Ditto.
8474 (rs6000_emit_prologue_components): Ditto.
8475 (rs6000_emit_epilogue_components): Ditto.
8476 (rs6000_emit_prologue): Ditto.
8477 (rs6000_emit_epilogue): Ditto.
8478 (rs6000_elf_file_end): Ditto.
8479 (rs6000_function_value): Ditto.
8480 (rs6000_libcall_value): Ditto.
8481 * config/rs6000/rs6000.h: Ditto.
8482 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
8483 (TARGET_MINMAX): ... this. New.
8484 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
8485 * config/rs6000/rs6000.md: Remove Xilinx FP support.
8486 (*movsi_internal1_single): Delete.
8487 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
8488 mfpu=, mxilinx-fpu): Delete.
8489 * config/rs6000/singlefp.h: Delete.
8490 * config/rs6000/sysv4.h: Remove Xilinx FP support.
8491 * config/rs6000/t-rs6000: Ditto.
8492 * config/rs6000/t-xilinx: Delete.
8493 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
8494 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
8495 (VStype_simple): Delete.
8496 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
8497 * config/rs6000/xfpu.h: Delete.
8498 * config/rs6000/xfpu.md: Delete.
8499 * config/rs6000/xilinx.h: Delete.
8500 * config/rs6000/xilinx.opt: Delete.
8501 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
8502 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
8504 2018-05-04 Tom de Vries <tom@codesourcery.com>
8507 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
8510 2018-05-04 Richard Biener <rguenther@suse.de>
8513 * tree-complex.c (update_complex_assignment): We are always in SSA form.
8514 (expand_complex_div_wide): Likewise.
8515 (expand_complex_operations_1): Likewise.
8516 (expand_complex_libcall): Preserve EH info of the original stmt.
8517 (tree_lower_complex): Handle removed blocks.
8518 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
8519 on complex multiplication and division libcall builtins.
8521 2018-05-04 Richard Biener <rguenther@suse.de>
8524 * fold-const.c (negate_expr_p): Restrict negation of operand
8525 zero of a division to when we know that can happen without
8527 (fold_negate_expr_1): Likewise.
8529 2018-05-04 Jakub Jelinek <jakub@redhat.com>
8532 * real.h (real_nextafter): Declare.
8533 * real.c (real_nextafter): New function.
8534 * fold-const-call.c (fold_const_nextafter): New function.
8535 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
8536 CASE_CFN_NEXTTOWARD.
8537 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
8538 even when arg1_mode is different from arg0_mode.
8540 2018-05-03 Nathan Sidwell <nathan@acm.org>
8542 * doc/extend.texi (Deprecated Features): Remove
8544 (Backwards Compatibility): Likewise.
8545 * doc/invoke.texi (C++ Language Options): Likewise.
8546 (C++ Dialect Options): Likewise.
8548 2018-05-03 Jakub Jelinek <jakub@redhat.com>
8551 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
8552 _mm512_mask_mullox_epi64): New intrinsics.
8554 2018-05-03 Tom de Vries <tom@codesourcery.com>
8557 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8558 dump files): Add offload-tree.
8560 2018-05-03 Richard Biener <rguenther@suse.de>
8562 PR tree-optimization/85615
8563 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
8564 to loops not nested in BBs loop father to avoid creating multi-entry
8567 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8569 PR tree-optimization/70291
8570 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
8571 arguments. Change return type to tree. Emit libcall as a new
8572 statement rather than replacing existing one when inplace_p is true.
8573 (expand_complex_multiplication_components): New function.
8574 (expand_complex_multiplication): Expand floating-point complex
8575 multiplication using the above.
8576 (expand_complex_division): Rename inner_type parameter to type.
8577 Update expand_complex_libcall call-site.
8578 (expand_complex_operations_1): Update expand_complex_multiplication
8579 and expand_complex_division call-sites.
8581 2018-05-02 Jakub Jelinek <jakub@redhat.com>
8584 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8585 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8586 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
8587 the highest significant bit of the shift count mask is clear. In
8588 check whether and[sq]i3 is needed verify that all significant bits
8589 of the shift count other than the highest are set.
8591 2018-05-02 Tom de Vries <tom@codesourcery.com>
8594 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
8595 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
8596 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
8597 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
8598 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
8599 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
8600 __builtin_goacc_parlevel_size.
8602 2018-05-02 Richard Biener <rguenther@suse.de>
8604 PR tree-optimization/85597
8605 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
8606 do not use split vect_get_vec_defs call but call vect_get_slp_defs
8609 2018-05-02 Tom de Vries <tom@codesourcery.com>
8612 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8613 dump files): Add ltrans-tree.
8615 2018-05-02 Tom de Vries <tom@codesourcery.com>
8618 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
8619 dump files): Add wpa-ipa.
8621 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
8623 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
8624 powerpc*-*-linux*paired* target.
8625 * config/rs6000/750cl.h: Delete.
8626 * config/rs6000/paired.h: Delete.
8627 * config/rs6000/paired.md: Delete.
8628 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
8630 * config/rs6000/rs6000-builtin.def: Remove paired float support.
8631 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
8632 comment. Remove paired float support.
8633 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
8634 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8636 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
8637 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
8639 * config/rs6000/rs6000.c: Remove paired float support.
8640 (paired_expand_vector_init, paired_expand_vector_move,
8641 paired_emit_vector_compare, paired_emit_vector_cond_expr,
8642 (paired_expand_lv_builtin, paired_expand_stv_builtin,
8643 paired_expand_builtin, paired_expand_predicate_builtin,
8644 paired_init_builtins): Delete.
8645 * config/rs6000/rs6000.h: Remove paired float support.
8646 * config/rs6000/rs6000.md: Remove paired float support.
8647 (move_from_CR_ov_bit): Delete.
8648 * config/rs6000/rs6000.opt (mpaired): Delete.
8649 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
8650 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
8652 2018-05-02 Richard Biener <rguenther@suse.de>
8655 * gimplify.c (gimplify_save_expr): When in SSA form allow
8656 SAVE_EXPRs to compute to SSA vars.
8658 2018-05-02 Jakub Jelinek <jakub@redhat.com>
8661 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
8662 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
8663 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
8664 clobber operands[2], instead use a new pseudo. Formatting fixes.
8666 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
8668 PR tree-optimization/85586
8669 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
8670 exit early for statements in the same group if the accesses are
8673 2018-05-02 Tom de Vries <tom@codesourcery.com>
8676 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
8679 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
8681 PR tree-optimization/85143
8682 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
8684 2018-05-01 Tom de Vries <tom@codesourcery.com>
8687 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
8688 not found" error message.
8690 2018-05-01 Tom de Vries <tom@codesourcery.com>
8693 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
8694 * vec.c (test_ordered_remove_if): New function.
8695 (vec_c_tests): Call test_ordered_remove_if.
8696 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
8697 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
8698 * tree-vect-patterns.c (vect_pattern_recog_1): Use
8699 VEC_ORDERED_REMOVE_IF.
8701 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8703 PR tree-optimization/82665
8704 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
8705 pointer subtraction where arguments come from a memchr call.
8707 2018-05-01 Jakub Jelinek <jakub@redhat.com>
8709 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
8710 --push-state --as-needed and --pop-state instead of --as-needed and
8711 --no-as-needed if ld supports it.
8712 * configure: Regenerated.
8715 * doc/install.texi2html: Replace _002d with - and _002a with * in
8716 generated html files using sed.
8718 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8721 * gcc-rich-location.c (blank_line_before_p): New function.
8722 (use_new_line): New function.
8723 (gcc_rich_location::add_fixit_insert_formatted): New function.
8724 * gcc-rich-location.h
8725 (gcc_rich_location::add_fixit_insert_formatted): New function.
8727 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8729 * selftest.c (assert_streq): Rename "expected" and "actual" to
8730 "val1" and "val2". Extend NULL-handling to cover both inputs
8731 symmetrically, while still requiring both to be non-NULL for a pass.
8732 * selftest.h (assert_streq): Rename "expected" and "actual" to
8734 (ASSERT_EQ): Likewise.
8735 (ASSERT_EQ_AT): Likewise.
8736 (ASSERT_KNOWN_EQ): Likewise.
8737 (ASSERT_KNOWN_EQ_AT): Likewise.
8738 (ASSERT_NE): Likewise.
8739 (ASSERT_MAYBE_NE): Likewise.
8740 (ASSERT_MAYBE_NE_AT): Likewise.
8741 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
8742 the assertion to pass.
8743 (ASSERT_STREQ_AT): Likewise.
8745 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8747 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
8748 interaction with -pie.
8750 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8752 * selftest.h: Fix alphabetization of per-source-file selftest
8755 2018-04-30 Jason Merrill <jason@redhat.com>
8757 PR c++/61982 - dead stores to destroyed objects.
8758 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
8761 2018-04-30 Jason Merrill <jason@redhat.com>
8763 * tree.c (build_clobber): New.
8764 * tree.h: Declare it.
8765 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
8767 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8769 * diagnostic-show-locus.c (layout::layout): Update for
8770 location_get_source_line returning a char_span.
8771 (struct char_span): Move to input.h.
8772 (struct correction): Update for fields in char_span becoming
8774 (struct source_line): Update for location_get_source_line
8775 returning a char_span.
8776 (layout::print_line): Likewise.
8777 * edit-context.c (edited_file::print_content): Likewise.
8778 (edited_file::print_diff_hunk): Likewise.
8779 (edited_file::print_run_of_changed_lines): Likewise.
8780 (edited_file::get_num_lines): Likewise.
8781 (edited_line::edited_line): Likewise.
8782 * final.c (asm_show_source): Likewise.
8783 * input.c (location_get_source_line): Convert return type
8784 from const char * to char_span, losing the final "line_len"
8786 (dump_location_info): Update for the above.
8787 (get_substring_ranges_for_loc): Likewise. Use a char_span
8788 when handling the literal within the line.
8789 (test_reading_source_line): Update for location_get_source_line
8790 returning a char_span.
8791 * input.h (class char_span): Move here from
8792 diagnostic-show-locus.c, converting from a struct to a class.
8793 Make data members private.
8794 (char_span::operator bool): New.
8795 (char_span::length): New.
8796 (char_span::get_buffer): New.
8797 (char_span::operator[]): New.
8798 (char_span::subspan): Make const.
8799 (char_span::xstrdup): New.
8800 (location_get_source_line): Convert return type from const char *
8801 to char_span, losing the final "line_size" param.
8803 2018-04-30 Jan Hubicka <jh@suse.cz>
8805 * lto-wrapper.c (ltrans_priorities): New static var.
8806 (cmp_priority): New.
8807 (run_gcc): Read priorities and if doing parallel build order
8808 the Makefile by them.
8810 2018-04-30 David Malcolm <dmalcolm@redhat.com>
8812 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
8814 2018-04-30 Richard Biener <rguenther@suse.de>
8816 * tree-cfg.c (verify_address): Remove base argument, add
8817 flag whether to check TREE_ADDRESSABLE and do that.
8818 (verify_expr): Remove.
8819 (verify_types_in_gimple_reference): Add pieces from verify_expr.
8820 (verify_gimple_assign_single): Likewise.
8821 (verify_gimple_switch): Likewise.
8822 (verify_expr_location_1): Dereference tp once. Add (disabled)
8823 piece from verify_expr.
8824 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
8826 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8828 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
8830 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8832 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
8833 (small_data_pattern): Likewise.
8834 (arc_rewrite_small_data): Likewise.
8835 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
8836 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
8837 (get_symbol_alignment): New function.
8838 (legitimate_small_data_address_p): Likewise.
8839 (legitimate_scaled_address): Update, call
8840 legitimate_small_data_address_p.
8841 (output_sdata): New static variable.
8842 (arc_print_operand): Update how we handle small data operands.
8843 (arc_print_operand_address): Likewise.
8844 (arc_legitimate_address_p): Update, use
8845 legitimate_small_data_address_p.
8846 (arc_rewrite_small_data_p): Remove.
8847 (arc_rewrite_small_data_1): Likewise.
8848 (arc_rewrite_small_data): Likewise.
8849 (small_data_pattern): Likewise.
8850 (compact_sda_memory_operand): Update to use
8851 legitimate_small_data_address_p and get_symbol_alignment.
8852 (prepare_move_operands): Don't rewite sdata pattern.
8853 (prepare_extend_operands): Remove.
8854 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
8856 (zero_extendqisi2): Likewise.
8857 (zero_extendhisi2): Likewise.
8858 (extendqihi2): Likewise.
8859 (extendqisi2): Likewise.
8860 (extendhisi2): Likewise.
8864 * config/arc/constraints.md (Usd): Change it to memory constraint.
8866 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
8868 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
8869 as source of std instructions.
8870 * config/arc/arc.md (movsi_insn): Update pattern predicate to
8871 allow 6-bit constants as source for store instructions.
8872 (movdi_insn): Update instruction pattern to allow 6-bit constants
8873 as source for store instructions.
8875 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
8877 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
8879 2018-04-30 Nathan Sidwell <nathan@acm.org>
8880 Sandra Loosemore <sandra@codesourcery.com>
8882 * dumpfile.c (dump_open): Allow '-' for stdout.
8883 * doc/invoke.texi (Developer Options): Document dump filename
8884 determination early. Document stdin/stdout selection.
8886 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
8888 Microblaze Target: PIC data text relative
8890 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
8891 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
8893 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
8894 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
8895 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
8896 New addressing mode for data-text relative position indepenedent code.
8897 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
8898 'ADDRESS_SYMBOLIC_TXT_REL'.
8899 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
8900 (microblaze_legitimate_pic_operand): Exclude function calls from
8901 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
8902 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
8904 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8905 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
8906 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
8907 for 'address + offset'.
8908 (microblaze_expand_prologue): Add new function prologue call for
8910 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
8911 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
8912 table in case of TARGET_PIC_DATA_TEXT_REL.
8913 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
8914 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
8915 Add new macros 'UNSPEC_TEXT',
8916 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
8917 + exclude function calls from 'UNSPEC_PLT' in case of data text
8919 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8920 new target hook for generating address diff vector tables in case of
8922 * doc/tm.texi : Regenerate.
8923 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
8924 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
8925 of addr diff vector generation.
8926 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
8927 target hook definition.
8928 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
8929 Add default function for generate_pic_addr_diff_vec -> flag_pic.
8930 * doc/invoke.texi (Add new pic option): Add new microblaze pic
8931 option for data text relative.
8933 2018-04-30 Richard Biener <rguenther@suse.de>
8935 * tree-chrec.h (evolution_function_is_constant_p): Remove
8937 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
8939 2018-04-30 Richard Biener <rguenther@suse.de>
8942 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
8944 2018-04-30 Richard Biener <rguenther@suse.de>
8946 PR tree-optimization/28364
8947 PR tree-optimization/85275
8948 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
8949 copying first exit test.
8951 2018-04-28 Mark Wielaard <mark@klomp.org>
8953 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
8955 (dwarf_AT): Handle DW_AT_addr_base.
8956 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
8958 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
8961 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
8962 (*ashl<dwi>3_doubleword_mask_1): Ditto.
8963 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
8964 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
8966 2018-04-28 Richard Biener <rguenther@suse.de>
8968 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
8969 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
8970 to reflect use. Only add interesting stmts.
8972 2018-04-27 Martin Jambor <mjambor@suse.cz>
8975 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
8976 the jump function allows for passing through aggregate values.
8978 2018-04-27 David Malcolm <dmalcolm@redhat.com>
8980 * input.h (in_system_header_at): Convert from macro to inline
8982 (from_macro_expansion_at): Likewise.
8983 (from_macro_definition_at): Likewise.
8985 2018-04-27 Jeff Law <law@redhat.com>
8987 * config.gcc: Mark tile* targets as deprecated/obsolete.
8989 2018-04-27 Richard Biener <rguenther@suse.de>
8991 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
8994 2018-04-27 Richard Biener <rguenther@suse.de>
8996 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
8998 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
9000 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
9001 with Yd constraint. Set "preferred_for_speed" attribute from
9002 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
9004 (*movdi_internal): Ditto.
9005 (movti_interunit splitters): Remove
9006 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
9007 (movdi_interunit splitters): Ditto.
9008 * config/i386/constraints.md (Ye): Remove.
9009 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
9011 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9014 * config/aarch64/constraints.md (Usg): Limit to 31.
9017 2018-04-27 Jakub Jelinek <jakub@redhat.com>
9019 PR tree-optimization/85529
9020 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
9021 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
9022 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
9023 zero extension or masking of the MSB bit.
9024 (optimize_range_tests): Add FIRST_BB argument, pass it through
9025 to optimize_range_tests_var_bound.
9026 (maybe_optimize_range_tests, reassociate_bb): Adjust
9027 optimize_range_tests callers.
9029 2018-04-26 Richard Biener <rguenther@suse.de>
9030 Jakub Jelinek <jakub@redhat.com>
9032 * cgraph.h (symbol_table): Just declare debug method here.
9033 * symtab.c (symbol_table::debug): Define.
9035 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
9037 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
9039 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
9041 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
9042 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
9043 (*movdi_internal): Substitute Yi and Yj constraint with x
9044 and Ym and Yn constraint with y constraint. Update "isa"
9045 attribute and set "preferred_for_speed" attribute from
9046 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
9047 (*movsi_internal): Ditto.
9048 (*movdf_internal): Ditto.
9049 (*movsf_internal): Ditto.
9050 (*zero_extendsidi2): Ditto.
9051 * config/i386/sse.md (vec_set<mode>_0): Ditto.
9052 (sse2_loadld): Ditto.
9053 (*vec_extract<ssevecmodelower>_0): Ditto.
9054 (*vec_extractv4si_0_zext_sse4): Ditto.
9055 (vec_concatv2di): Ditto.
9056 (*vec_dup<mode>): Ditto.
9057 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
9058 * config/i386/constraints.md (Yi): Remove.
9063 2018-04-26 Nathan Sidwell <nathan@acm.org>
9065 * dumpfile.c (dump_open): New.
9066 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
9067 (dump_finish): Detect stdio/stderr by value not name.
9069 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
9071 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
9073 2018-04-26 Tom de Vries <tom@codesourcery.com>
9076 * config/nvptx/nvptx.c (verify_neutering_jumps)
9077 (verify_neutering_labels): New function
9078 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
9080 2018-04-26 Tom de Vries <tom@codesourcery.com>
9083 * config/nvptx/nvptx.c (needs_neutering_p): New function.
9084 (nvptx_single): Use needs_neutering_p to skip over insns that do not
9087 2018-04-26 Richard Biener <rguenther@suse.de>
9088 Tom de Vries <tom@codesourcery.com>
9091 * lto-streamer-out.c (output_function): Fixup loops if required to match
9092 discovery done in the reader.
9094 2018-04-26 Richard Biener <rguenther@suse.de>
9096 PR tree-optimization/85116
9097 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
9098 have a loop exit from the single latch predecessor. Remove
9099 case of header with just condition.
9100 (ch_base::copy_headers): Exclude infinite loops from any
9102 (pass_ch::execute): Record exits.
9104 2018-04-26 Richard Biener <rguenther@suse.de>
9106 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
9107 prologue cost vector and pass it to vect_get_load_cost.
9108 (vect_get_peeling_costs_all_drs): Likewise.
9109 (vect_peeling_hash_get_lowest_cost): Likewise.
9110 (vect_enhance_data_refs_alignment): Likewise.
9112 2018-04-26 Richard Biener <rguenther@suse.de>
9115 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
9116 checking of integer<->pointer conversions.
9117 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
9118 sign-/zero-extending pointer types.
9119 (expand_omp_for_static_chunk): Likewise.
9121 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
9122 Jean Lee <xiaoyur347@gmail.com>
9124 * config/mips/mips.c (mips_asan_shadow_offset): New function.
9125 (TARGET_ASAN_SHADOW_OFFSET): Define.
9126 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
9127 true for -fsanitize=address.
9129 2018-04-25 Mark Wielaard <mark@klomp.org>
9131 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
9134 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9136 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
9137 than "alu", remove explicit "memory" and "imm_disp" attributes.
9138 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
9141 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
9142 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
9143 gen_lowpart_no_emit.
9145 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
9148 * config/i386/i386.c (ix86_expand_builtin): Change memory
9149 operand to XI, extend p0 to Pmode.
9150 * config/i386/i386.md: Change unspec volatile and operand
9151 1 mode to XI, change operand 0 mode to P.
9153 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9155 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
9156 GET_MODE_MASK before any checking.
9157 (nds32_can_use_bset_p): Likewise.
9158 (nds32_can_use_btgl_p): Likewise.
9160 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9162 * config/nds32/nds32-doubleword.md: New define_split pattern for
9163 illegal register number.
9165 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9167 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
9169 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9171 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
9173 2018-04-25 Richard Biener <rguenther@suse.de>
9175 * lto-streamer.h (LTO_major_version): Bump to 8.
9177 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9179 * BASE-VER: Set to 9.0.0.
9181 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
9183 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
9184 in __abskf2 and __powikf2.
9186 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9189 * config/aarch64/constraints.md (Usg, Usj): New constraints.
9190 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
9191 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
9192 Use the above on operand 2. Reindent.
9193 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
9195 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9198 * common/config/i386/i386-common.c (ix86_handle_option): Don't
9200 * config/i386/i386.opt (mcet): Removed.
9201 * doc/install.texi: Remove -mcet documentation.
9202 * doc/invoke.texi: Likewise.
9204 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9207 * doc/install.texi: Remove -mcet from bootstrap-cet.
9209 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9212 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
9213 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
9217 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
9218 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
9219 containing a CONST_VECTOR.
9221 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
9223 * doc/install.texi: Update newlib dependency for nvptx.
9225 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9228 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
9229 instead of INTVAL when shifting x left.
9231 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
9233 PR tree-optimization/85478
9234 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
9235 vect_grouped_store_supported for single element vectors.
9237 2018-04-24 Richard Biener <rguenther@suse.de>
9240 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
9241 load cost increase to the case of non-constant step.
9243 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9246 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
9247 destination if any_malformed_asm.
9249 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
9252 * expr.c (store_field): In the bitfield case, if the value comes from
9253 a function call and is returned in registers by means of a PARALLEL,
9254 do not change the mode of the temporary unless BLKmode and VOIDmode.
9256 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
9258 PR rtl-optimization/85423
9259 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
9260 dependencies to debug insns when the previous insn is non-debug.
9262 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9264 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
9265 enums into a single definition.
9266 (fls): Fix predicates and printing.
9269 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
9271 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
9272 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
9273 and short u6 immediate.
9274 (check_if_valid_sleep_operand): Remove.
9275 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
9277 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9279 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
9280 flag_always_save_lp condition.
9281 * config/nds32/nds32.opt (malways-save-lp): New option.
9283 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9285 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
9286 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
9287 * config/nds32/nds32.h
9288 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
9289 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
9291 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9293 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
9294 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
9296 2018-04-22 Shiva Chen <shiva0217@gmail.com>
9297 Chung-Ju Wu <jasonwucj@gmail.com>
9299 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
9301 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
9302 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
9304 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9306 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
9308 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9310 * config/nds32/nds32-protos.h (nds32_data_alignment,
9311 nds32_local_alignment): Declare.
9312 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
9313 nds32_local_alignment): New functions.
9314 (TARGET_CONSTANT_ALIGNMENT): Define.
9315 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
9317 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9319 * config/nds32/nds32.c
9320 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
9321 (TARGET_MODES_TIEABLE_P): Likewise.
9323 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
9325 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
9328 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
9329 Chung-Ju Wu <jasonwucj@gmail.com>
9331 * config/nds32/constants.md (unspec_volatile_element): Add enum values
9332 for unaligned access.
9333 * config/nds32/nds32-intrinsic.c: Implementation of expanding
9335 * config/nds32/nds32-intrinsic.md: Likewise.
9336 * config/nds32/nds32_intrinsic.h: Likewise.
9337 * config/nds32/nds32.h (nds32_builtins): Likewise.
9338 * config/nds32/nds32.opt (munaligned-access): New option.
9339 * config/nds32/nds32.c (nds32_asm_file_start): Display
9340 flag_unaligned_access status.
9342 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9344 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
9345 -mno-relax is present.
9346 * config/riscv/linux.h (LINK_SPEC): Ditto.
9348 2018-04-20 Martin Sebor <msebor@redhat.com>
9351 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
9353 (gimple_fold_builtin_stxcpy_chk): Same.
9354 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
9356 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
9359 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
9360 __powikf2 when long double is IEEE 128-bit.
9362 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
9364 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
9365 step to make sure stack always aligned.
9367 2018-04-20 Carl Love <cel@us.ibm.com>
9370 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
9371 size check for arg0.
9373 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
9374 Tom de Vries <tom@codesourcery.com>
9377 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
9378 Emit insns for calls too.
9379 (nvptx_find_par): Always look for worker-level predecessor insn.
9380 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
9382 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
9383 (nvptx_process_pars): Propagate frames for calls.
9385 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
9388 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
9390 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
9391 (ix86_handle_option): Don't handle OPT_mibt.
9392 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
9394 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
9396 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
9397 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
9398 (ix86_target_macros): Define __CET__ with flag_cf_protection
9399 for -fcf-protection.
9400 * config/i386/i386.c (isa2_opts): Remove -mibt.
9401 * config/i386/i386.h (TARGET_IBT): Removed.
9402 (TARGET_IBT_P): Likewise.
9403 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
9404 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
9405 * config/i386/i386.opt (mcet): Update help message.
9408 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
9409 -mcet as an alias for -mshstk.
9411 2018-04-20 Richard Biener <rguenther@suse.de>
9414 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
9415 complexity by forcing a single use of the multiply operand.
9417 2018-04-20 Martin Jambor <mjambor@suse.cz>
9420 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
9421 recursion dependency to only apply to non-clones.
9423 2018-04-20 Martin Jambor <mjambor@suse.cz>
9426 * ipa-cp.c (create_specialized_node): Check that clones of
9427 self-recursive edges exist during IPA-CP.
9429 2018-04-19 Toon Moene <toon@moene.org>
9431 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
9434 2018-04-19 Jakub Jelinek <jakub@redhat.com>
9436 PR tree-optimization/85467
9437 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
9438 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
9439 VECTOR_CST element to type.
9441 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9444 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
9445 * config/i386/i386.md (builtin_setjmp_setup): Removed.
9446 (builtin_longjmp): Likewise.
9447 (save_stack_nonlocal): New pattern.
9448 (restore_stack_nonlocal): Likewise.
9450 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9453 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9454 Replace ASM_OUTPUT_LABEL with fprintf.
9456 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
9459 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
9460 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
9461 * config/i386/i386-c.c (ix86_target_macros_internal): Also
9462 define __IBT__ and __SHSTK__ for -fcf-protection.
9463 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
9465 (ix86_trampoline_init): Likewise.
9466 (x86_output_mi_thunk): Likewise.
9467 (ix86_notrack_prefixed_insn_p): Likewise.
9468 (ix86_option_override_internal): Don't disallow -fcf-protection.
9469 * config/i386/i386.md (rdssp<mode>): Also enable for
9471 (incssp<mode>): Likewise.
9472 (nop_endbr): Likewise.
9473 * config/i386/i386.opt (mcet): Change help message to built-in
9477 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
9478 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
9479 enable CET built-in functions.
9481 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
9483 * common/config/i386/i386-common.c
9484 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
9485 OPTION_MASK_ISA_MOVDIRI_UNSET,
9486 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
9487 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
9488 * config.gcc (movdirintrin.h): New header.
9489 * config/i386/cpuid.h (bit_MOVDIRI,
9490 bit_MOVDIR64B): New bits.
9491 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
9493 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
9494 (VOID, PVOID, PCVOID)): New function types.
9495 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
9496 __builtin_ia32_directstoreu_u64,
9497 __builtin_ia32_movdir64b): New builtins.
9498 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
9499 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
9501 (ix86_valid_target_attribute_inner_p): Ditto.
9502 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
9503 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
9504 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
9505 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
9506 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
9507 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
9508 (movdiri<mode>, movdir64b_<mode>): New.
9509 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
9510 * config/i386/immintrin.h: Include movdirintrin.h.
9511 * config/i386/movdirintrin.h: New file.
9512 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
9514 2018-04-19 Richard Biener <rguenther@suse.de>
9517 * cfg.c (clear_bb_flags): When loop state says we have
9518 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
9520 2018-04-19 Richard Biener <rguenther@suse.de>
9522 PR tree-optimization/84737
9523 * tree-vect-data-refs.c (vect_copy_ref_info): New function
9524 copying restrict info.
9525 (vect_setup_realignment): Use it.
9526 * tree-vectorizer.h (vect_copy_ref_info): Declare.
9527 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
9528 the first DR to all generated stores.
9529 (vectorizable_load): Likewise for loads.
9531 2018-04-19 Jakub Jelinek <jakub@redhat.com>
9533 PR tree-optimization/85446
9534 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
9535 the integral and pointer types to have the same precision.
9537 * doc/install.texi: Document --disable-cet being the default and
9540 2018-04-18 Martin Liska <mliska@suse.cz>
9542 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
9545 2018-04-18 Martin Liska <mliska@suse.cz>
9548 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
9551 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9552 arguments if they are comparable.
9554 2018-04-18 Martin Liska <mliska@suse.cz>
9557 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
9560 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9563 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
9566 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
9567 ENDBR after calling __morestack.
9569 2018-04-18 David Malcolm <dmalcolm@redhat.com>
9572 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
9573 by using gcc_base_ver to generate a gcc_driver_version, and use
9574 it when generating GCC_DRIVER_NAME.
9575 * configure: Regenerate.
9577 2018-04-18 Jakub Jelinek <jakub@redhat.com>
9580 * config.gcc: Obsolete powerpc*-*-*spe*.
9582 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9585 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
9586 (stabstr_D): Change type of unum from unsigned int to
9587 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
9590 2018-04-17 Jim Wilson <jimw@sifive.com>
9593 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
9594 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
9595 Set arg_pointer_offset after using pretend_args_size.
9597 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9599 PR rtl-optimization/85431
9600 * dse.c (record_store): Ignore zero width stores.
9603 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
9604 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
9605 __builtin_stack_restore rather than after it.
9606 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
9607 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
9608 argument instead of virtual_dynamic_stack_rtx.
9610 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
9612 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
9614 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9615 Add note to error message to explain internal mapping of overloaded
9616 built-in function name to non-overloaded built-in function name.
9617 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
9620 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
9623 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
9624 where the inputs overlap with the output.
9626 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9628 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
9629 (=v, v) alternative and explicit "memory" attribute.
9630 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
9631 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9633 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
9634 "sselog1" type instead of "sselog".
9635 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
9636 "sselog". Remove explicit "memory" attribute.
9637 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
9638 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9640 (vec_extract_hi_v32hi): Merge all alternatives into one, use
9641 "sselog1" type instead of "sselog". Remove explicit "memory"
9643 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
9644 use "sselog1" type instead of "sselog". Remove explicit "memory"
9646 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
9647 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
9649 (vec_extract_hi_v64qi): Merge all alternatives into one, use
9650 "sselog1" type instead of "sselog". Remove explicit "memory"
9652 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
9653 use "sselog1" type instead of "sselog". Remove explicit "memory"
9657 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
9660 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
9663 2018-04-17 Martin Jambor <mjambor@suse.cz>
9666 * ipa-cp.c (create_specialized_node): Call
9667 expand_all_artificial_thunks if necessary.
9669 2018-04-17 Martin Liska <mliska@suse.cz>
9672 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
9673 in message, remote space in between '_G' and '('.
9675 2018-04-17 Jakub Jelinek <jakub@redhat.com>
9678 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
9679 avx512f_vmcmp<mode>3<round_saeonly_name>,
9680 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
9681 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
9682 avx512f_rndscale<mode><round_saeonly_name>,
9683 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
9684 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
9685 Use %<iptr>2 instead of %2 for -masm=intel.
9686 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
9687 avx512f_vcvttss2usi<round_saeonly_name>,
9688 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
9690 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
9691 avx512f_vcvttsd2usi<round_saeonly_name>,
9692 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
9693 Use %q1 instead of %1 for -masm=intel.
9694 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
9695 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
9696 of %3 for -masm=intel.
9697 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
9699 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
9701 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
9703 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
9704 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
9706 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
9708 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
9709 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
9710 %g1 and one with %0 and %1.
9711 (avx512er_vmrcp28<mode><round_saeonly_name>,
9712 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
9714 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
9715 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
9716 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
9717 of %0 and %{%4%} for -masm=intel.
9718 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
9719 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
9720 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
9721 order of %0 and %{%5%}%{z%} for -masm=intel.
9723 2018-04-17 Jan Hubicka <jh@suse.cz>
9726 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
9728 2018-04-17 Martin Liska <mliska@suse.cz>
9731 * multiple_target.c (create_dispatcher_calls): Set apostrophes
9732 for target_clone error message. Make default implementation
9733 clone to be a local declaration.
9734 (separate_attrs): Add new argument and check for an empty
9736 (expand_target_clones): Handle it.
9737 (ipa_target_clone): Make redirection just for target_clones
9740 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
9741 Tom de Vries <tom@codesourcery.com>
9744 * omp-expand.c (expand_oacc_for): Add dummy false branch for
9745 tiled basic blocks without omp continue statements.
9747 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
9750 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
9751 vec_extract expression as having side effects to make sure it gets
9754 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
9757 * config/i386/i386.c (get_builtin_code_for_version): Check
9760 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
9763 * gcc/config.gcc: Support "skylake".
9764 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
9766 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
9767 (processor_target_table): Add "skylake".
9768 (ix86_option_override_internal): Add "skylake".
9769 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
9770 PROCESSOR_CANNONLAKE.
9771 (get_builtin_code_for_version): Fix priority for
9772 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
9773 PROCESSOR_SKYLAKE-AVX512.
9774 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
9775 (processor_type): Add PROCESSOR_SKYLAKE.
9777 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
9778 Jason Merrill <jason@redhat.com>
9781 * convert.c (convert_to_integer_1): Use direct recursion for
9782 enumeral types and types with a precision less than the number
9783 of bits in their mode.
9785 2018-04-16 Julia Koval <julia.koval@intel.com>
9788 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
9789 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
9791 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
9794 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
9795 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
9796 and -mno-direct-move.
9798 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
9801 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
9802 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
9803 Ensure negative shifts result in {0}.
9805 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
9807 PR rtl-optimization/79916
9808 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
9809 regs (if any) to define how to gnerate SD moves when LRA is in
9812 2018-04-13 Jakub Jelinek <jakub@redhat.com>
9814 PR rtl-optimization/85393
9815 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
9816 * except.c (expand_dw2_landing_pad_for_region): Make static.
9817 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
9818 a label and unconditional jump to old_bb, rather than
9819 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
9822 PR rtl-optimization/85376
9823 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
9824 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
9825 instead of a specific value.
9827 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9828 Bin Cheng <bin.cheng@arm.com>
9830 PR tree-optimization/82965
9831 PR tree-optimization/83991
9832 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
9833 by_profile_only parameter.
9834 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
9835 information if the loop was predicted to iterate too many times.
9836 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
9838 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
9841 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
9844 2018-04-13 Martin Liska <mliska@suse.cz>
9845 Jakub Jelinek <jakub@redhat.com>
9848 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
9849 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
9850 * builtins.c (expand_builtin_memory_copy_args): Use
9851 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
9852 handle dest_addr == pc_rtx.
9854 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
9857 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
9858 asked to not generate direct moves.
9859 (fix_trunc<mode>si2_stfiwx): Similar.
9860 (fix_trunc<mode>si2_internal): Similar.
9862 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9865 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
9866 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
9867 lookup if dest in some wider mode is known to be const0_rtx and
9868 if so, record permanent equivalence for it to be ZERO_EXTEND of
9869 the narrower mode destination.
9871 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9873 * lto-streamer-out.c (output_function): Revert 259346.
9874 * omp-expand.c (expand_oacc_for): Likewise.
9876 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
9878 PR rtl-optimization/85354
9879 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
9880 * sel-sched.c (sel_global_init): ... here.
9882 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
9885 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
9886 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9887 mode for PE-COFF targets.
9888 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
9889 (i386_pe_asm_lto_end): Likewise.
9890 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
9891 (TARGET_ASM_LTO_END): Likewise.
9892 * config/i386/winnt.c (saved_debug_info_level): New static variable.
9893 (i386_pe_asm_lto_start): New function.
9894 (i386_pe_asm_lto_end): Likewise.
9896 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
9897 Richard Biener <rguenther@suse.de>
9900 * lto-streamer-out.c (output_function): Fix CFG loop state before
9902 * omp-expand.c (expand_oacc_for): Handle calls to internal
9903 functions like regular functions.
9905 2018-04-12 Richard Biener <rguenther@suse.de>
9908 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
9909 for the early LTO debug to properly generate references to it
9910 during DIE emission. Do not re-use that for the skeleton for
9912 (dwarf2out_early_finish): Likewise.
9914 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9917 * config/i386/sse.md
9918 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
9919 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
9920 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
9921 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
9922 and output is a reg, avoid creating invalid lowpart subreg, but
9923 instead split into a 512-bit move. Don't split if not AVX512VL,
9924 input is xmm16+ reg and output is a mem.
9925 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
9926 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
9927 xmm16+ reg and output is a mem.
9929 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9931 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
9932 also for flag_dwarf2_cfi_asm.
9934 2018-04-12 Jakub Jelinek <jakub@redhat.com>
9936 PR rtl-optimization/85342
9937 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
9938 a bool scalar var inside of the loop instead. Don't try to update
9939 recog_data.operand after failed apply_change_group.
9941 2018-04-12 Tom de Vries <tom@codesourcery.com>
9944 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
9945 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
9946 array with flexible array member as array without given dimension.
9947 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
9948 argument for undefined param to true.
9950 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
9953 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9954 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
9955 from PowerPC section.
9956 * config/rs6000/sysv4.opt (mcall-): Improve help text.
9957 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
9958 help text that is too long.
9959 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
9960 help text that is too long.
9961 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
9962 help text that is too long.
9964 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
9966 * config/alpha/alpha.md (stack_probe_internal): Rename
9967 from "probe_stack". Update all callers.
9969 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9971 PR rtl-optimization/84566
9972 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
9973 sched_macro_fuse_insns.
9975 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
9978 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
9979 (compute_block_dependences): ... from here.
9981 2018-04-11 Jakub Jelinek <jakub@redhat.com>
9983 PR tree-optimization/85331
9984 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
9985 from int to HOST_WIDE_INT.
9987 2018-04-11 Martin Jambor <mjambor@suse.cz>
9990 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
9991 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
9992 not the same as the source val.
9993 (cgraph_edge_brings_value_p): New parameter.
9994 (gather_edges_for_value): Pass destination value to
9995 cgraph_edge_brings_value_p.
9996 (perhaps_add_new_callers): Likewise.
9997 (get_info_about_necessary_edges): Likewise and exclude values brought
9998 only by self-recursive edges.
9999 (create_specialized_node): Redirect only clones of self-calling edges.
10000 (+self_recursive_pass_through_p): New function.
10001 (find_more_scalar_values_for_callers_subset): Use it.
10002 (find_aggregate_values_for_callers_subset): Likewise.
10003 (known_aggs_to_agg_replacement_list): Removed.
10004 (decide_whether_version_node): Re-calculate known constants for all
10005 remaining context clones.
10007 2018-04-11 Richard Biener <rguenther@suse.de>
10010 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
10011 from early DWARF output.
10012 (dwarf2out_early_finish): Output line info unconditionally into
10013 early DWARF and add reference to it.
10015 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10018 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
10019 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
10020 other than V2DFmode using iptr mode attribute.
10021 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
10023 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10025 PR rtl-optimization/84659
10026 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
10028 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10031 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
10033 (output_loc_list): Pass address of a dummy size variable even in the
10034 locview handling loop.
10035 (index_location_lists): Add comment on why skip_loc_list_entry can't
10038 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
10041 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
10044 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
10047 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10048 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
10049 and -mstring-compare-inline-limit.
10051 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10054 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
10055 for stack clash protection in a register whenever we need it to be in
10058 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10060 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
10061 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
10063 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10066 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
10068 (mlong-double-): Ditto.
10069 * config/rs6000/sysv4.opt (msdata=): Ditto.
10070 (mtls-size=): Ditto.
10072 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
10074 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10075 erroneous entries for
10076 "vector int vec_ldl (int, long int *)", and
10077 "vector unsigned int vec_ldl (int, unsigned long int *)".
10078 Add comments and entries for
10079 "vector bool char vec_ldl (int, bool char *)",
10080 "vector bool short vec_ldl (int, bool short *)",
10081 "vector bool int vec_ldl (int, bool int *)",
10082 "vector bool long long vec_ldl (int, bool long long *)",
10083 "vector pixel vec_ldl (int, pixel *)",
10084 "vector long long vec_ldl (int, long long *)",
10085 "vector unsigned long long vec_ldl (int, unsigned long long *)".
10086 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
10087 type tree bool_long_long_type_node and correct definition of
10088 bool_V2DI_type_node to make reference to this new type tree.
10089 (rs6000_mangle_type): Replace erroneous reference to
10090 bool_long_type_node with bool_long_long_type_node.
10091 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
10092 comments to emphasize sign distinctions for char and int types and
10093 replace RS6000_BTI_bool_long constant with
10094 RS6000_BTI_bool_long_long constant. Also add comment to restrict
10095 use of RS6000_BTI_pixel.
10096 (bool_long_type_node): Remove this macro definition.
10097 (bool_long_long_type_node): New macro definition
10099 2018-04-10 Jakub Jelinek <jakub@redhat.com>
10101 PR rtl-optimization/85300
10102 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
10103 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
10104 simplify_unary_operation fails.
10106 2018-04-10 Martin Liska <mliska@suse.cz>
10108 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
10109 cgraph_edge and ipa_ref.
10111 2018-04-10 Jakub Jelinek <jakub@redhat.com>
10115 * config/i386/sse.md
10116 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
10117 computation of the VEC_MERGE selector from mask.
10118 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
10119 Fix decoding of the VEC_MERGE selector into mask.
10121 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10123 PR tree-optimization/85286
10124 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
10126 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10128 * final.c (final_1): Set insn_last_address as well as
10129 insn_current_address.
10131 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10134 * explow.c (emit_stack_probe): Call validize_mem on memory location
10135 before passing it to gen_probe_stack. Create address operand and
10136 legitimize it for the probe_stack_address case.
10138 2018-04-09 Jan Hubicka <jh@suse.cz>
10141 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
10142 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
10143 * tree.c (free_lang_data_in_type): Fix handling of binfos;
10145 (free_lang_data): Rebuild type inheritance graph.
10147 2018-04-09 Martin Sebor <msebor@redhat.com>
10149 * invoke.texi (-finline-small-functions): Mention other optimization
10151 (-findirect-inlining, -fpartial-inlining): Same.
10152 (-finline-functions-called-once): Same.
10153 (-freorder-blocks-and-partition): Same.
10155 2018-04-09 Jan Hubicka <jh@suse.cz>
10158 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
10159 jumps; choose last target that matches the criteria (i.e.
10160 no partition changes for non-crossing jumps).
10161 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
10162 support for redirecting crossing jumps to non-crossing.
10164 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
10166 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
10167 also for naked functions.
10169 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
10171 * config/arc/arc.md (add_shift): New pattern.
10172 (add_shift2): Likewise.
10173 (sub_shift): Likewise.
10174 (sub_shift_cmp0_noout): Likewise.
10175 (compare_si_ashiftsi): Likewise.
10176 (xbfu_cmp0_noout): New combine pattern.
10177 (xbfu_cmp0"): Likewise.
10178 (movsi_set_cc_insn): Place the predicable variant first.
10179 (commutative_binary_cmp0_noout): Remove clobber.
10180 (commutative_binary_cmp0): New pattern.
10181 (noncommutative_binary_cmp0): Likewise.
10182 (noncommutative_binary_cmp0_noout): Likewise.
10183 (noncommutative_binary_comparison_result_used): Removed.
10184 (rsub_cmp0): New pattern.
10185 (rsub_cmp0_noout): Likewise.
10186 (extzvsi): Changed, keep only meaningful variants.
10187 (SQH, SEZ): New iterators.
10188 (SQH_postfix): New mode attribute.
10189 (SEZ_prefix): New code attribute.
10190 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
10191 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
10192 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
10193 of numerical value.
10194 (noncommutative_operator): Check the availability of barrel
10197 2018-04-09 Richard Biener <rguenther@suse.de>
10199 PR tree-optimization/85284
10200 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
10201 Only use the niter constraining form of simple_iv when the exit
10202 is always executed.
10204 2018-04-09 Tom de Vries <tom@codesourcery.com>
10207 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10208 (define_expand "*memory_barrier"): New define_expand.
10209 (define_insn "memory_barrier"): New insn.
10211 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10213 PR rtl-optimization/80463
10214 PR rtl-optimization/83972
10215 PR rtl-optimization/83480
10217 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
10218 correct producer for the insn.
10219 (tidy_control_flow): Fixup seqnos in case of debug insns.
10221 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10223 PR rtl-optimization/83913
10225 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
10226 different sched-times when merging exprs.
10228 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10230 PR rtl-optimization/83962
10232 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
10233 tidy_fallthru_edge and tidy_control_flow.
10235 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10237 PR rtl-optimization/83530
10239 * sel-sched.c (force_next_insn): New global variable.
10240 (remove_insn_for_debug): When force_next_insn is true, also leave only
10241 next insn in the ready list.
10242 (sel_sched_region): When the region wasn't scheduled, make another pass
10243 over it with force_next_insn set to 1.
10245 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10247 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
10249 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10250 for interrupt control.
10251 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10252 functions for interrupt control.
10253 * config/nds32/nds32-intrinsic.md: Likewise.
10254 * config/nds32/nds32_intrinsic.h: Likewise.
10255 * config/nds32/nds32.h (nds32_builtins): Likewise.
10257 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10259 * config/nds32/nds32.c (nds32_init_machine_status,
10260 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
10261 strict_aligned_p field.
10262 (nds32_expand_to_rtl_hook): New function.
10263 (TARGET_EXPAND_TO_RTL_HOOK): Define.
10264 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
10266 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10267 Chung-Ju Wu <jasonwucj@gmail.com>
10269 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
10270 * config/nds32/nds32-n7.md: New file.
10271 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
10272 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
10274 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
10275 * config/nds32/nds32.md (pipeline_model): Add n7.
10276 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
10277 * config/nds32/pipelines.md: Include n7 settings.
10279 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10280 Chung-Ju Wu <jasonwucj@gmail.com>
10282 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
10283 * config/nds32/nds32-e8.md: New file.
10284 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
10285 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
10287 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
10288 * config/nds32/nds32.md (pipeline_model): Add e8.
10289 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
10290 * config/nds32/pipelines.md: Include e8 settings.
10292 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10293 Chung-Ju Wu <jasonwucj@gmail.com>
10295 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
10296 * config/nds32/nds32-n8.md: New file.
10297 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
10298 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
10300 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
10301 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
10302 * config/nds32/nds32.md (pipeline_model): Add n8.
10303 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
10304 * config/nds32/pipelines.md: Include n8 settings.
10306 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
10307 Chung-Ju Wu <jasonwucj@gmail.com>
10309 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
10310 * config/nds32/nds32-n9-2r1w.md: New file.
10311 * config/nds32/nds32-n9-3r2w.md: New file.
10312 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
10313 nds32_register_ports): New or modify for cpu n9.
10314 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
10316 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
10317 * config/nds32/nds32-utils.c: New file.
10318 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
10319 TARGET_MUL_SLOW): Define.
10320 * config/nds32/nds32.md (pipeline_model): New attribute.
10321 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
10322 New options that support cpu n9.
10323 * config/nds32/pipelines.md: Include n9 settings.
10324 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
10326 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
10328 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
10329 information if necessary.
10330 (output_cond_branch_compare_zero): Likewise.
10331 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
10332 (nds32_target_alignment): Refine for alignment.
10333 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
10334 (FUNCTION_BOUNDARY): Modify.
10335 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
10337 * config/nds32/nds32.opt (malways-align, malign-functions): New.
10339 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
10341 * config/nds32/constants.md (unspec_volatile_element): Add values for
10342 TLB operation and data prefetch.
10343 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
10344 functions for TLB operation and data prefetch.
10345 * config/nds32/nds32-intrinsic.md: Likewise.
10346 * config/nds32/nds32_intrinsic.h: Likewise.
10347 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
10348 (nds32_print_operand): Likewise.
10349 * config/nds32/nds32.h (nds32_builtins): Likewise.
10351 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
10352 Andrew Pinski <pinsika@gcc.gnu.org>
10354 PR middle-end/82976
10355 * match.pd: Use constant_boolean_node of correct type instead of
10356 boolean_true_node or boolean_false_node for simplifying
10357 pointer comparisons to zero.
10359 2018-04-07 Jakub Jelinek <jakub@redhat.com>
10361 PR tree-optimization/80021
10362 * tree.c (verify_type_variant): Make error call in verify_variant_match
10363 translatable and remove final full stop.
10365 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10367 * config/nds32/constants.md (unspec_volatile_element): Add
10368 UNSPEC_VOLATILE_EH_RETURN.
10369 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
10370 nds32_output_stack_pop): Support dwarf exception handling process.
10371 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
10372 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
10373 exception handling process.
10374 (nds32_compute_stack_frame): Likewise.
10375 (nds32_return_addr_rtx): Likewise.
10376 (nds32_initial_elimination_offset): Likewise.
10377 (nds32_expand_prologue): Likewise.
10378 (nds32_expand_epilogue): Likewise.
10379 (nds32_dynamic_chain_address): New function.
10380 * config/nds32/nds32.h (machine_function): Add fields for dwarf
10381 exception handling.
10382 (DYNAMIC_CHAIN_ADDRESS): Define.
10383 (EH_RETURN_DATA_REGNO): Define.
10384 (EH_RETURN_STACKADJ_RTX): Define.
10385 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
10386 patterns for dwarf exception handling.
10388 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10390 * config/nds32/nds32.h: Clean up obsolete macros.
10392 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10394 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10395 Add enum values for particular instructions.
10396 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10397 particular intrinsic functions.
10398 * config/nds32/nds32-intrinsic.md: Likewise.
10399 * config/nds32/nds32_intrinsic.h: Likewise.
10400 * config/nds32/nds32.h (nds32_builtins): Likewise.
10401 * config/nds32/nds32.md (type): Add pbsad and pbsada.
10402 (btst, ave): New patterns for particular instructions.
10404 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10406 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10407 Add enum values for atomic load/store and memory sync.
10408 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
10410 * config/nds32/nds32-intrinsic.md: Likewise.
10411 * config/nds32/nds32_intrinsic.h: Likewise.
10412 * config/nds32/nds32.h (nds32_builtins): Likewise.
10414 2018-04-07 Jakub Jelinek <jakub@redhat.com>
10416 PR tree-optimization/85257
10417 * fold-const.c (native_encode_vector): If not all elts could fit
10418 and off is -1, return 0 rather than offset.
10419 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
10420 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
10421 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
10422 adjust buffer in native_interpret_expr call.
10424 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10426 * config/nds32/constants.md (unspec_volatile_element): Add cache
10427 control enum values.
10428 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
10429 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
10430 * config/nds32/nds32.c (nds32_cctl_names): New.
10431 (nds32_print_operand): Handle cache control register names.
10432 * config/nds32/nds32.h (nds32_builtins): New enum values.
10433 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
10435 * config/nds32/nds32.md (type): Add mmu.
10436 * config/nds32/pipelines.md (simple_insn): Add mmu.
10438 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10440 * config/nds32/nds32.md (type): Remove call.
10441 * config/nds32/pipelines.md (simple_insn): Likewise.
10443 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10445 * config/nds32/constants.md (unspec_volatile_element): Add
10446 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
10447 UNSPEC_VOLATILE_FMFCFG.
10448 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
10449 description for fmfcfg and fmfcsr.
10450 (bdesc_1arg): Add fmtcsr.
10451 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
10452 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
10453 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
10454 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
10455 unspec_fmfcfg): New patterns.
10456 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
10457 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
10458 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
10459 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
10460 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
10461 __nds32__fmfcfg): Define.
10463 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
10465 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
10466 intrinsic register names.
10467 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
10468 intrinsic register enum values and macros.
10470 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
10472 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
10473 for load/store addressing form.
10474 (nds32_print_operand_address): Likewise.
10476 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
10479 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
10480 based on LABEL_REF. Remove useless assertion.
10481 (pic_address_needs_scratch): Fix formatting.
10482 (sparc_legitimize_pic_address): Minor tweaks.
10483 (sparc_delegitimize_address): Adjust assertion accordingly.
10484 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
10485 into symbolic_operand.
10486 (movsi_high_pic_label_ref): Likewise.
10487 (movsi_lo_sum_pic_label_ref): Likewise.
10488 (movdi_pic_label_ref): Likewise.
10489 (movdi_high_pic_label_ref): Likewise.
10490 (movdi_lo_sum_pic_label_ref): Likewise.
10492 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
10494 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
10495 custom LIB_SPEC setup.
10497 2018-04-06 Ruslan Bukin <br@bsdpad.com>
10498 Kito Cheng <kito.cheng@gmail.com>
10500 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
10501 * config/riscv/freebsd.h: New.
10503 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10505 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
10506 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
10509 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10510 Kito Cheng <kito.cheng@gmail.com>
10512 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
10513 nds32_output_call, nds32_symbol_binds_local_p): New functions.
10514 * config/nds32/nds32-protos.h (nds32_output_call,
10515 nds32_output_return): Declare.
10516 * config/nds32/nds32.md: Refine all the call and return patterns.
10518 2018-04-06 Jakub Jelinek <jakub@redhat.com>
10521 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
10522 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
10524 PR rtl-optimization/84872
10525 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
10526 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
10527 EDGE_CROSSING edge.
10529 2018-04-06 Tamar Christina <tamar.christina@arm.com>
10531 * expr.c (copy_blkmode_to_reg): Revert 254862.
10532 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
10534 2018-04-06 Richard Biener <rguenther@suse.de>
10536 PR middle-end/85244
10537 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
10538 after seeing a component reference with an adjacent field. Treat
10539 refs to arrays at struct end of external decls similar to
10540 refs to unconstrained commons.
10542 2018-04-06 Jakub Jelinek <jakub@redhat.com>
10545 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
10546 look through SAVE_EXPRs with non-side-effects argument. Adjust
10548 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
10551 2018-04-06 Richard Biener <rguenther@suse.de>
10553 PR middle-end/85180
10554 * alias.c (find_base_term): New wrapper around find_base_term
10555 unwinding CSELIB_VAL_PTR changes.
10556 (find_base_term): Do not restore CSELIB_VAL_PTR during the
10559 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10561 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
10563 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
10564 constant definitions.
10565 ("nop"): lr 0,0 -> nopr r0
10566 ("nop_lr0", "nop_lr1"): New insn definitions.
10568 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
10570 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
10571 NDS32_V3PUSH_AVAILABLE_P macro.
10573 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
10574 Chung-Ju Wu <jasonwucj@gmail.com>
10576 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
10577 (nds32*-*-*): Add float and fpu_config into supported_defaults.
10578 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
10579 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
10580 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
10581 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
10582 * config/nds32/constraints.md: New constraints and checking for hard
10583 float configuration.
10584 * config/nds32/iterators.md: New mode iterator and attribute for hard
10585 float configuration.
10586 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
10588 * config/nds32/nds32-fpu.md: New file.
10589 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
10590 deal with hard float code generation.
10591 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
10593 (abi_type, float_reg_number): New enum type.
10594 * config/nds32/nds32-predicates.c: New predicates for hard float.
10595 * config/nds32/nds32-protos.h: Declare functions for hard float.
10596 * config/nds32/nds32.c: Implementation for hard float configuration.
10597 * config/nds32/nds32.h: Definitions for hard float configuration.
10598 * config/nds32/nds32.md: Include hard float machine description and
10599 modify patterns for hard float configuration.
10600 * config/nds32/nds32.opt: New options for hard float configuration.
10601 * config/nds32/predicates.md: New predicates for hard float
10604 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10606 * common/config/nds32/nds32-common.c
10607 (nds32_option_optimization_table): Enable -mreleax-hint by default.
10609 2018-04-05 Jakub Jelinek <jakub@redhat.com>
10611 PR middle-end/85195
10612 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
10613 CONSTRUCTOR_ELT (ctor, ...)->value.
10615 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
10618 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
10620 2018-04-05 Tom de Vries <tom@codesourcery.com>
10623 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
10626 2018-04-05 Shiva Chen <shiva0217@gmail.com>
10627 Kito Cheng <kito.cheng@gmail.com>
10629 * config/nds32/constraints.md (U33): Fine-tune checking condition.
10630 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
10631 * config/nds32/nds32.h (nds32_16bit_address_type): Add
10632 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
10634 2018-04-05 Shiva Chen <shiva0217@gmail.com>
10635 Kito Cheng <kito.cheng@gmail.com>
10637 * config/nds32/constraints.md (Ufe): New memory constraint.
10638 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
10639 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
10640 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
10642 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
10643 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
10645 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10647 * config/nds32/nds32.md: Use optimize_size in the condition for
10648 alu-shift instructions.
10650 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10652 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
10654 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10656 * config/nds32/nds32.md (negsi2): Refine pattern.
10658 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
10659 Chung-Ju Wu <jasonwucj@gmail.com>
10661 * config/nds32/iterators.md (shift_rotate): New code iterator.
10662 (shift): New code attribute.
10663 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
10664 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
10665 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
10666 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
10667 bit-wise operations.
10668 (andsi3, *andsi3): Ditto.
10669 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
10670 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
10671 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
10672 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
10673 nds32_ior_operand, nds32_xor_operand): New predicates.
10675 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10677 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
10678 (addsi3, subsi3): ... this.
10680 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10682 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
10684 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10686 * config/nds32/nds32.md: Adjust indention.
10688 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
10690 * config/nds32/nds32.md (feature): New attribute.
10692 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
10694 * config/nds32/nds32.md (subtype): New attribute.
10696 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
10699 * config/arm/arm-builtins.c (arm_expand_builtin): Change
10700 expansion to perform a bitwise AND of the argument followed by a
10701 boolean negation of the result.
10703 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
10705 PR rtl-optimization/84878
10706 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
10707 the basic block. Assert the use reference is not artificial and that
10708 it has an associated insn.
10710 2018-04-04 Michael Matz <matz@suse.de>
10712 * builtins.c (compute_objsize): Pass correct operand
10713 to array_at_struct_end_p.
10715 2018-04-04 Richard Biener <rguenther@suse.de>
10718 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
10719 from contexts for DINFO_LEVEL_TERSE and below.
10721 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10723 * config/nds32/nds32-doubleword.md (move_<mode>): Require
10724 resiter_operand condition.
10725 * config/nds32/nds32.md (*move<mode>): Ditto.
10727 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10728 Monk Chiang <sh.chiang04@gmail.com>
10730 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
10732 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10734 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
10736 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10737 Kito Cheng <kito.cheng@gmail.com>
10739 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
10740 nds32_cond_code_str, output_cond_branch,
10741 output_cond_branch_compare_zero, nds32_expand_cbranch,
10742 nds32_expand_cstore, nds32_expand_movcc,
10743 nds32_output_cbranchsi4_equality_zero,
10744 nds32_output_cbranchsi4_equality_reg,
10745 nds32_output_cbranchsi4_equality_reg_or_const_int,
10746 nds32_output_cbranchsi4_greater_less_zero: New functions.
10747 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
10748 nds32_expand_cstore, nds32_expand_movcc,
10749 nds32_output_cbranchsi4_equality_zero,
10750 nds32_output_cbranchsi4_equality_reg,
10751 nds32_output_cbranchsi4_equality_reg_or_const_int,
10752 nds32_output_cbranchsi4_greater_less_zero): Declare.
10753 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
10754 nds32_rimm11s_operand): New predicates.
10755 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
10756 * config/nds32/nds32.md: Rewrite all the branch and conditional move
10759 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
10761 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
10762 * config/nds32/nds32.md: Ditto.
10763 * config/nds32/pipelines.md: Ditto.
10765 2018-04-04 Richard Biener <rguenther@suse.de>
10767 PR tree-optimization/85168
10768 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
10769 propagating abnormals.
10771 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10773 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
10775 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
10776 Kito Cheng <kito.cheng@gmail.com>
10778 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
10779 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
10780 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
10781 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
10782 * config/nds32/nds32.md (sibcall_internal): New.
10783 (sibcall_register): Remove.
10784 (sibcall_immediate): Remove.
10785 (sibcall_value_internal): New.
10786 (sibcall_value_register): Remove.
10787 (sibcall_value_immediate): Remove.
10788 * config/nds32/predicates.md (nds32_general_register_operand): New.
10789 (nds32_call_address_operand): New.
10791 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10793 PR rtl-optimization/85167
10794 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
10795 bb_defs if *split_p, instead preinitialize it to NULL.
10797 PR tree-optimization/85156
10798 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
10799 evaluating the argument multiple times.
10801 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
10803 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
10805 (_mm_cvtpd_ps): Likewise.
10806 (_mm_cvttpd_epi32): Likewise.
10807 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
10808 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
10809 vector, pixel, and bool following altivec.h include.
10811 2018-04-03 Martin Sebor <msebor@redhat.com>
10813 * doc/extend.texi (Common Function Attributes): Clarify.
10814 (const attribute): Likewise.
10815 (pure attribute): Likewise.
10817 2018-04-03 Jakub Jelinek <jakub@redhat.com>
10820 * config/i386/i386.c (ix86_expand_vector_set): Use
10821 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
10823 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
10825 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
10826 instructions when changing rounding bits to preserve precision bits
10827 in the x87 control word.
10829 2018-04-03 Martin Liska <mliska@suse.cz>
10831 PR tree-optimization/82491
10832 * rtl.h (strip_offset_and_add): Replace += suboffset with
10833 poly_uint64 () + suboffset.
10835 2018-03-29 Martin Liska <mliska@suse.cz>
10836 Martin Jambor <mjambor@suse.cz>
10839 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
10840 param_type is not an integral or pointer type.
10842 2018-04-03 Richard Biener <rguenther@suse.de>
10844 * sese.h (recompute_all_dominators): Remove.
10846 2018-04-02 Martin Sebor <msebor@redhat.com>
10848 * doc/invoke.texi (-Wrestrict): Fix typos.
10850 2018-04-02 Jim Wilson <jimw@sifive.com>
10852 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
10853 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
10854 (<optab>di3, <optab>si3_extend): Likewise.
10855 (<optab>si3_mask, <optab>si3_mask_1): New.
10856 (<optab>di3_mask, <optab>di3_mask_1): New.
10857 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
10858 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
10859 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
10861 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
10863 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
10866 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
10868 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
10869 (nds32_canonicalize_comparison): New function.
10871 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10872 Kito Cheng <kito.cheng@gmail.com>
10873 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10875 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
10876 * config/nds32/constants.md (unspec_volatile_element): Add
10877 UNSPEC_VOLATILE_RELAX_GROUP.
10878 * config/nds32/nds32-relax-opt.c: New file.
10879 * config/nds32/nds32-predicates.c
10880 (nds32_symbol_load_store_p): New function.
10881 * config/nds32/nds32-protos.h
10882 (nds32_symbol_load_store_p): Declare function.
10883 (make_pass_nds32_relax_opt): Declare new rtl pass function.
10884 * config/nds32/nds32.c
10885 (nds32_register_pass): New function to register pass.
10886 (nds32_register_passes): New function to register passes.
10887 * config/nds32/nds32.md (relax_group): New pattern.
10888 * config/nds32/nds32.opt (mrelax-hint): New option.
10889 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
10891 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
10893 * config/nds32/t-nds32: Modify files dependency.
10895 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10897 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
10898 (PROFILE_HOOK): Define its implementation.
10900 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
10902 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
10903 type and 32-bit size.
10905 2018-04-01 Jakub Jelinek <jakub@redhat.com>
10907 PR middle-end/85090
10908 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
10909 (V_128_256): New mode iterator.
10910 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
10911 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
10912 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
10914 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
10915 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
10917 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
10920 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
10921 NaN inputs correctly.
10923 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
10926 * config/rs6000/vsx.md (??r): New mode attribute.
10927 (*vsx_mov<mode>_64bit): Use it.
10928 (*vsx_mov<mode>_32bit): Likewise.
10930 2018-03-30 Martin Sebor <msebor@redhat.com>
10932 PR tree-optimization/84818
10933 * builtins.c (check_access): Use warning_n.
10935 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10938 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
10940 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
10943 2018-03-30 Julia Koval <julia.koval@intel.com>
10946 * x86-tune.def (movx, partial_reg_dependency): Enable for
10949 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
10951 PR inline-asm/84985
10952 * lra-constraints.c (process_alt_operands): Move setting
10953 this_alternative_matches below.
10955 2018-03-29 Martin Liska <mliska@suse.cz>
10958 * doc/invoke.texi: Document how LTO works with debug info.
10959 Describe auto-load support of binutils. Mention 'x86-64'
10960 as valid option value of -march option.
10962 2018-03-29 Jakub Jelinek <jakub@redhat.com>
10964 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
10967 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
10968 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
10969 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
10972 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
10975 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
10976 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
10977 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
10978 for RS6000_BTM_POWERPC64.
10979 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
10980 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
10981 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
10984 (DIVDEU): Likewise.
10986 2018-03-28 Carl Love <cel@us.ibm.com>
10989 2017-09-27 Carl Love <cel@us.ibm.com>
10991 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
10992 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
10993 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
10996 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10998 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
10999 instead of __vector bool.
11000 (_mm_max_pu8): Likewise.
11001 (_mm_min_pi16): Likewise.
11003 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
11006 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
11007 (DIVWEUO): Likewise.
11008 (DIVDEO): Likewise.
11009 (DIVDEUO): Likewise.
11010 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
11011 DIVWEUO and DIVDEUO.
11012 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
11013 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
11014 (div_extend): Likewise.
11015 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
11017 (__builtin_divweuo): Likewise.
11018 (__builtin_divdeo): Likewise.
11019 (__builtin_divdeuo): Likewise.
11021 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11024 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
11025 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
11027 PR tree-optimization/82004
11028 * gimple-match-head.c (optimize_pow_to_exp): New function.
11029 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
11030 Don't fold to exp if optimize_pow_to_exp is false.
11032 2018-03-28 Martin Liska <mliska@suse.cz>
11035 * calls.c (initialize_argument_information): Fix trailing space.
11036 * common.opt: Fix typo and provide better explanation for
11037 -fsanitize-coverage option.
11038 * config/i386/i386.opt: Fix typo.
11040 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11041 Martin Liska <mliska@suse.cz>
11044 * gimplify.c (asan_poison_variable): Don't do the check for
11045 gimplify_omp_ctxp here.
11046 (gimplify_decl_expr): Do it here.
11047 (gimplify_target_expr): Likewise.
11049 2018-03-28 Martin Liska <mliska@suse.cz>
11052 * config/i386/i386.c (ix86_function_arg_advance): Do not call
11053 chkp_type_bounds_count if MPX is not enabled.
11055 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
11057 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
11059 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
11062 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
11063 function to create the function decl for complex long double
11064 multiply and divide for -mabi=ieeelongdouble.
11065 (init_float128_ieee): Call it.
11067 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
11070 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
11071 -fcf-protection=branch -mibt.
11072 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
11074 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11077 * config/arm/arm.c (arm_valid_symbolic_address): Handle
11078 arm_word_relocations.
11080 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
11083 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
11084 extern array declarations.
11086 2018-03-27 Richard Biener <rguenther@suse.de>
11088 PR middle-end/84067
11089 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
11090 explicit single_use checks.
11092 2018-03-27 Richard Biener <rguenther@suse.de>
11094 PR tree-optimization/85082
11095 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
11098 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11100 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
11101 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
11102 Turn on fasynchronous-unwind-tables and funwind-tables.
11104 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
11107 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
11108 (*bmi_blsr_<mode>_ccz): Ditto.
11110 2018-03-26 Tom de Vries <tom@codesourcery.com>
11112 PR tree-optimization/85063
11113 * omp-general.c (offloading_function_p): New function. Factor out
11115 * omp-offload.c (pass_omp_target_link::gate): ... here.
11116 * omp-general.h (offloading_function_p): Declare.
11117 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
11118 with attribute omp declare target for offloading functions.
11120 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
11122 PR tree-optimization/84005
11123 * tree-data-ref.h (get_base_for_alignment): Declare.
11124 * tree-data-ref.c (get_base_for_alignment_1): New function.
11125 (get_base_for_alignment): Likewise.
11126 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
11127 get_base_for_alignment to find a suitable base object, instead
11128 of always using drb->base_address.
11130 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11132 PR inline-asm/85022
11133 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
11134 known size by default.
11136 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
11138 PR inline-asm/85030
11139 * lra-constraints.c (process_alt_operands): Don't match BLKmode
11140 and non BLKmode operands.
11142 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11145 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
11146 Clean up attributes.
11148 2018-03-23 Richard Biener <rguenther@suse.de>
11151 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
11152 we are going to emit early debug for LTO.
11154 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11156 PR inline-asm/85034
11157 * function.c (match_asm_constraints_1): Don't optimize if input
11158 doesn't satisfy general_operand predicate for output's mode.
11160 PR inline-asm/85022
11161 * alias.c (write_dependence_p): Don't require for x_canonicalized
11162 non-VOIDmode if x has VOIDmode.
11165 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
11166 just don't try to optimize it rather than assert it never happens.
11168 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11170 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
11171 macro expansions for definition of ST_INTERNAL_<mode> and
11172 LD_INTERNAL_<mode> builtins.
11173 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
11175 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
11177 (altivec_expand_st_builtin): Likewise.
11178 (altivec_expand_builtin): Remove calls to deleted functions.
11179 (rs6000_address_for_altivec): Delete this function.
11180 * config/rs6000/vector.md: Remove expands for
11181 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
11183 2018-03-22 Sudakshina Das <sudi.das@arm.com>
11186 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
11187 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
11188 re-computing once computed.
11189 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
11190 (arm_init_machine_status): Initialize
11191 machine->static_chain_stack_bytes.
11193 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11196 * doc/extend.texi: Add four new prototypes for vec_ld.
11197 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
11198 definitions for more logical presentation.
11199 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
11200 entries for V1TI variants of __builtin_altivec_ld builtin.
11201 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
11202 handling of V1TI variant of LVX icode pattern.
11203 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
11204 (rs6000_gimple_fold_builtin): Likewise.
11205 (altivec_init_builtins): Add code to define
11206 __builtin_altivec_lvx_v1ti function.
11208 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11210 PR inline-asm/84941
11211 * function.c (match_asm_constraints_1): Don't do the optimization
11212 if input isn't a REG, SUBREG, MEM or constant.
11214 2018-03-22 Tom de Vries <tom@codesourcery.com>
11216 PR tree-optimization/84956
11217 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
11218 bb_has_abnormal_pred.
11220 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11223 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
11224 DECL_INITIAL (decl) to decl at the end.
11225 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
11226 adjust the comment.
11228 2018-03-21 Joseph Myers <joseph@codesourcery.com>
11230 * doc/extend.texi (__builtin_tgmath): Document when complex
11231 integer types are treated as _Complex _Float64.
11233 2018-03-21 Tom de Vries <tom@codesourcery.com>
11235 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
11237 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11239 PR tree-optimization/84960
11240 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
11241 if it is ENTRY block, move them into single succ of ENTRY in that case.
11243 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
11245 PR tree-optimization/84811
11246 * poly-int.h (poly_span_traits): Remove the T3 parameter and
11247 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
11248 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
11249 (known_subrange_p): Update accordingly. Cast each value involved
11250 in the size comparison, rather than casting the result of the
11253 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11255 PR tree-optimization/84982
11256 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
11257 by flipping the least significant bit rather than all bits from
11258 bitpos to bitpos + bitsize - 1.
11260 2018-03-21 Nathan Sidwell <nathan@acm.org>
11262 * doc/extend.texi (Deprecated Features): Remove mention of
11263 long-deleted deprecations.
11265 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11268 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
11269 * configure: Regenerate.
11271 2018-03-21 Tom de Vries <tom@codesourcery.com>
11273 PR tree-optimization/83126
11274 * tree-parloops.c (num_phis): New function.
11275 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
11277 2018-03-21 Nathan Sidwell <nathan@acm.org>
11279 * doc/extend.texi (Deprecated Features): Update deprecated flags,
11280 mention anon-struct/union members and trailing attributes.
11282 2018-03-21 Bin Cheng <bin.cheng@arm.com>
11284 PR tree-optimization/84969
11285 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
11286 builtin memset partitions if they set different rhs values.
11288 2018-03-21 Jakub Jelinek <jakub@redhat.com>
11290 PR rtl-optimization/84989
11291 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
11292 VEC_DUPLICATE with scalar result mode.
11294 2018-03-21 Martin Liska <mliska@suse.cz>
11297 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
11298 not intended return statement.
11300 2018-03-21 Martin Liska <mliska@suse.cz>
11303 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
11304 (chkp_find_bound_slots_1): Limit number of iterations.
11306 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
11309 * Minor grammar fixes for x86 options.
11311 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11314 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
11315 holding REG_CFA_RESTORE notes, instead turn them into a USE.
11317 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
11320 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
11321 (altivec_lvx_<mode>_1op): Likewise.
11322 (altivec_stvx_<mode>_2op): Likewise.
11323 (altivec_stvx_<mode>_1op): Likewise.
11324 (altivec_lvx_<VM2:mode>): New define_expand.
11325 (altivec_stvx_<VM2:mode>): Likewise.
11326 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
11327 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11328 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
11329 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
11330 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
11331 (rs6000_gen_lvx): Likewise.
11332 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
11333 (altivec_expand_stv_builtin): Likewise.
11334 (altivec_expand_builtin): Likewise.
11335 * config/rs6000/vector.md: Likewise.
11337 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11340 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
11343 2018-03-20 Richard Biener <rguenther@suse.de>
11346 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
11347 sign-conversions as zero, fall back to standard scalar_stmt
11350 2018-03-20 Martin Liska <mliska@suse.cz>
11353 * predict.c (rebuild_frequencies): Handle case when we have
11354 PROFILE_ABSENT, but flag_guess_branch_prob is false.
11356 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11359 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
11360 flag_section_anchors.
11361 * varasm.c (use_blocks_for_decl_p): Remove hack for
11362 dw2_force_const_mem.
11365 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
11367 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
11368 be created, use lowpart_subreg of operands[0] rather than operands[0]
11370 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
11371 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
11372 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
11373 and n constraint instead of aarch64_shift_imm_di and Usd.
11374 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
11375 (*aarch64_<optab>_reg_minus<mode>3): ... this.
11377 2018-03-20 Sudakshina Das <sudi.das@arm.com>
11380 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
11381 to favor GPR over NEON registers.
11382 (<shift>di3_neon): Likewise.
11384 2018-03-20 Tom de Vries <tom@codesourcery.com>
11387 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
11388 (nvptx_process_pars): Emit bar.sync asap and alap.
11390 2018-03-20 Tom de Vries <tom@codesourcery.com>
11393 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
11394 seen_label if seen_label is already set.
11396 2018-03-20 Jakub Jelinek <jakub@redhat.com>
11399 * config/i386/i386.c (fold_builtin_cpu): For features above 31
11400 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
11401 Use 1U instead of 1. Formatting fixes.
11404 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
11405 instead of TREE_TYPE (s1) for the return value.
11407 2018-03-19 Jakub Jelinek <jakub@redhat.com>
11409 PR tree-optimization/84946
11410 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
11411 bitsize + bitsize in poly_uint64 rather than poly_int64.
11414 * dwarf2asm.c: Include fold-const.c.
11415 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
11416 of decl rather than decl itself.
11418 PR rtl-optimization/84643
11419 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
11421 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
11424 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
11425 calling assemble_variable.
11427 2018-03-19 Sudakshina Das <sudi.das@arm.com>
11430 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
11431 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
11433 2018-03-19 Jim Wilson <jimw@sifive.com>
11436 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
11437 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
11438 (riscv_first_stack_step): Likewise.
11439 (riscv_option_override): Use STACK_BOUNDARY instead of
11440 MIN_STACK_BOUNDARY.
11441 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
11442 MIN_STACK_BOUNDARY.
11443 (BIGGEST_ALIGNMENT): Set to 128.
11444 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
11445 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
11448 2018-03-19 Richard Biener <rguenther@suse.de>
11450 PR tree-optimization/84933
11451 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
11452 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
11454 2018-03-19 Richard Biener <rguenther@suse.de>
11456 PR tree-optimization/84859
11457 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
11458 (cond_if_else_store_replacement): Perform sinking operation on
11459 single-store BBs regardless of MAX_STORES_TO_SINK setting.
11460 Generalize what a BB with a single eligible store is.
11462 2018-03-19 Richard Biener <rguenther@suse.de>
11464 PR tree-optimization/84929
11465 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
11466 chrec_is_positive against non-chrec arg.
11468 2018-03-19 Tamar Christina <tamar.christina@arm.com>
11471 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
11473 2018-03-18 Martin Liska <mliska@suse.cz>
11475 PR rtl-optimization/84635
11476 * regrename.c (build_def_use): Use matches_mode only when
11479 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
11481 PR tree-optimization/84913
11482 * tree-vect-loop.c (vectorizable_reduction): Don't try to
11483 vectorize chains of COND_EXPRs.
11485 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11487 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
11489 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11491 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
11493 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
11495 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
11497 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
11498 Kito Cheng <kito.cheng@gmail.com>
11500 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
11501 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
11502 (nds32_adjust_reg_alloc_order): New function.
11503 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
11505 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
11507 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
11508 nds32_print_operand, nds32_print_operand_address): Use
11509 HOST_WIDE_INT_PRINT_DEC instead.
11511 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
11513 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
11515 2018-03-17 Jakub Jelinek <jakub@redhat.com>
11518 * config/i386/i386.c (initial_ix86_tune_features,
11519 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
11520 unsigned long long.
11521 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
11522 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
11523 rather than 1u << ix86_tune. Formatting fix.
11524 (ix86_option_override_internal): Change ix86_arch_mask from
11525 unsigned int to unsigned HOST_WIDE_INT, initialize to
11526 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
11527 (ix86_function_specific_restore): Likewise.
11529 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11532 * postreload.c (reload_combine_recognize_pattern): Perform
11533 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
11534 truncate_int_for_mode the result for the destination's mode.
11537 * hsa-gen.c (mem_type_for_type): Fix comment typo.
11538 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
11540 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11543 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
11546 * lra-assigns.c (lra_split_hard_reg_for): Don't use
11547 regno_allocno_class_array and sorted_pseudos.
11548 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
11549 insns where regno is used.
11551 2018-03-16 Martin Liska <mliska@suse.cz>
11554 * multiple_target.c (create_dispatcher_calls): Redirect
11555 reference in the symbol table.
11557 2018-03-16 Martin Liska <mliska@suse.cz>
11560 * multiple_target.c (create_dispatcher_calls): Redirect also
11563 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11567 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
11568 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
11569 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
11571 2018-03-16 Julia Koval <julia.koval@intel.com>
11573 * doc/invoke.texi (Skylake Server): Add CLWB.
11574 Cannonlake): Remove CLWB.
11576 2018-03-16 Jakub Jelinek <jakub@redhat.com>
11578 PR tree-optimization/84841
11579 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
11581 (FLOAT_ONE_CONST_TYPE): Define.
11582 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
11583 (sort_by_operand_rank): Put entries with higher constant_type last
11584 rather than first to match comments.
11586 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
11588 * config/nios2/nios2.md (movsi_internal): Fix thinko in
11591 2018-03-15 Jakub Jelinek <jakub@redhat.com>
11594 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
11595 check and use address of target always.
11597 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
11600 * config/i386/i386.c (indirect_thunk_needed): Update comments.
11601 (indirect_thunk_bnd_needed): Likewise.
11602 (indirect_thunks_used): Likewise.
11603 (indirect_thunks_bnd_used): Likewise.
11604 (indirect_return_needed): New.
11605 (indirect_return_bnd_needed): Likewise.
11606 (output_indirect_thunk_function): Add a bool argument for
11608 (output_indirect_thunk_function): Don't generate alias for
11609 function return thunk.
11610 (ix86_code_end): Call output_indirect_thunk_function to generate
11611 function return thunks.
11612 (ix86_output_function_return): Set indirect_return_bnd_needed
11613 and indirect_return_needed instead of indirect_thunk_bnd_needed
11614 and indirect_thunk_needed.
11616 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
11618 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
11619 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
11620 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
11622 2018-03-15 David Malcolm <dmalcolm@redhat.com>
11623 Paul Hua <paul.hua.gm@gmail.com>
11626 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
11628 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
11630 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
11631 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
11632 resp. SFmode cases.
11634 2018-03-15 Tamar Christina <tamar.christina@arm.com>
11637 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11638 instead of GET_MODE_SIZE when comparing Units.
11640 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11643 * varasm.c (hash_section): Return an unchangeble hash value
11644 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
11645 Return !aarch64_can_use_per_function_literal_pools_p ().
11647 2018-03-15 Jakub Jelinek <jakub@redhat.com>
11650 * optabs.c (emit_conditional_move): Pass address of cmode's copy
11651 rather than address of cmode as last argument to prepare_cmp_insn.
11653 2018-03-15 Julia Koval <julia.koval@intel.com>
11655 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
11656 F_AVX512VNNI, F_AVX512BITALG): New.
11658 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
11661 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
11662 insn for floating-point loads and stores.
11664 2018-03-14 Carl Love <cel@us.ibm.com>
11666 * config/rs6000/rs6000-c.c: Add macro definitions for
11667 ALTIVEC_BUILTIN_VEC_PERMXOR.
11668 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
11669 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
11670 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
11671 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
11673 * config/doc/extend.texi: Add prototypes for vec_permxor.
11675 2018-03-14 David Malcolm <dmalcolm@redhat.com>
11678 * diagnostic-show-locus.c (class layout_point): Convert m_line
11679 from int to linenum_type.
11680 (line_span::comparator): Use linenum "compare" function when
11681 comparing line numbers.
11682 (test_line_span): New function.
11683 (layout_range::contains_point): Convert param "row" from int to
11685 (layout_range::intersects_line_p): Likewise.
11686 (layout::will_show_line_p): Likewise.
11687 (layout::print_source_line): Likewise.
11688 (layout::should_print_annotation_line_p): Likewise.
11689 (layout::print_annotation_line): Likewise.
11690 (layout::print_leading_fixits): Likewise.
11691 (layout::annotation_line_showed_range_p): Likewise.
11692 (struct line_corrections): Likewise for field m_row.
11693 (line_corrections::line_corrections): Likewise for param "row".
11694 (layout::print_trailing_fixits): Likewise.
11695 (layout::get_state_at_point): Likewise.
11696 (layout::get_x_bound_for_row): Likewise.
11697 (layout::print_line): Likewise.
11698 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
11699 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
11700 * input.c (selftest::test_linenum_comparisons): New function.
11701 (selftest::input_c_tests): Call it.
11702 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
11703 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
11704 * selftest.h (ASSERT_GT): New macro.
11705 (ASSERT_GT_AT): New macro.
11706 (ASSERT_LT): New macro.
11707 (ASSERT_LT_AT): New macro.
11709 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
11711 PR rtl-optimization/84780
11712 * combine.c (distribute_links): Don't make a link based on pc_rtx.
11714 2018-03-14 Martin Liska <mliska@suse.cz>
11716 * tree.c (record_node_allocation_statistics): Use
11717 get_stats_node_kind.
11718 (get_stats_node_kind): New function extracted from
11719 record_node_allocation_statistics.
11720 (free_node): Use get_stats_node_kind.
11722 2018-03-14 Richard Biener <rguenther@suse.de>
11724 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
11725 that the value-set of ANTIC_IN doesn't grow.
11728 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11730 (BB_VISITED_WITH_VISITED_SUCCS): New define.
11731 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11733 2018-03-14 Julia Koval <julia.koval@intel.com>
11735 * config.gcc (icelake-client, icelake-server): New.
11737 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
11738 (initial_ix86_arch_features): Ditto.
11739 (PTA_SKYLAKE): Add SGX.
11740 (PTA_ICELAKE): Remove.
11741 (PTA_ICELAKE_CLIENT): New.
11742 (PTA_ICELAKE_SERVER): New.
11743 (ix86_option_override_internal): Split up icelake on icelake client and
11745 (get_builtin_code_for_version): Ditto.
11746 (fold_builtin_cpu): Ditto.
11747 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
11748 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
11749 * config/i386/i386.h (processor_type): Ditto.
11750 * doc/invoke.texi: Ditto.
11752 2018-03-14 Jakub Jelinek <jakub@redhat.com>
11755 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
11756 INTEGER_CST offset, add it together with bitpos / 8 and
11757 sign extend based on POINTER_SIZE.
11761 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
11764 * config/i386/constraints.md (Yc): New register constraint.
11765 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
11766 Use Yc constraint for alternative 2 of operand 0. Remove
11767 preferred_for_speed attribute.
11769 2018-03-14 Richard Biener <rguenther@suse.de>
11771 PR tree-optimization/84830
11772 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
11773 with the old one to avoid oscillations.
11775 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
11778 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
11780 (assign_by_spills): Return a flag of reload assignment failure.
11781 Do not process the reload assignment failures. Do not spill other
11782 reload pseudos if they has the same reg class. Update n if
11784 (lra_assign): Add a return arg. Set up from the result of
11785 assign_by_spills call.
11786 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11787 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
11788 usage_insns if it is not NULL.
11789 (spill_hard_reg_in_range): New function.
11790 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11791 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11792 function prototypes.
11793 (lra_assign): Change prototype.
11794 * lra.c (lra): Add code to deal with fails by splitting hard reg
11797 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
11799 * config/riscv/riscv.opt (mrelax): New option.
11800 * config/riscv/riscv.c (riscv_file_start): Emit ".option
11801 "norelax" when riscv_mrelax is disabled.
11802 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
11804 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11807 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
11808 reassociation for int modes.
11810 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11812 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
11813 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
11815 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
11816 * config/aarch64/aarch64-sve.md
11817 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
11818 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
11819 (*extend<mode><Vwide>2): Rename to...
11820 (aarch64_sve_extend<mode><Vwide>2): ...this.
11821 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
11822 renaming the old pattern to...
11823 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
11825 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
11826 define_expand, renaming the old pattern to...
11827 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
11828 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
11829 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
11830 account when deciding which SVE instruction the optab should use.
11831 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
11833 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11835 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
11836 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
11837 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
11838 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
11839 (tlsdesc_small_<mode>): Turn a define_expand and use
11840 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
11841 (tlsdesc_small_advsimd_<mode>): ...this.
11842 (tlsdesc_small_sve_<mode>): New pattern.
11844 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
11846 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
11847 (UNSPEC_UMUL_HIGHPART): New constants.
11848 (MUL_HIGHPART): New int iteraor.
11849 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
11850 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
11852 (*<su>mul<mode>3_highpart): New define_insn.
11854 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
11857 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
11860 2018-03-13 Martin Liska <mliska@suse.cz>
11863 * (sem_item_optimizer::sem_item_optimizer): Initialize new
11865 (sem_item_optimizer::~sem_item_optimizer): Release it.
11866 (sem_item_optimizer::merge_classes): Register variable aliases.
11867 (sem_item_optimizer::fixup_pt_set): New function.
11868 (sem_item_optimizer::fixup_points_to_sets): Likewise.
11869 * ipa-icf.h: Declare new variables and functions.
11871 2018-03-13 Jakub Jelinek <jakub@redhat.com>
11873 PR middle-end/84834
11874 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
11875 integer_pow2p@2 and test integer_pow2p in condition.
11876 (A < 0 ? C : 0): Similarly for @1.
11878 PR middle-end/84831
11879 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
11880 characters starting at p contain '\0' character, don't look beyond
11884 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
11885 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
11888 * reg-stack.c (change_stack): Change update_end var from int to
11889 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
11890 also call set_block_for_insn on the newly added insns and rescan.
11893 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
11894 on the last operand.
11897 * tree.c (stabilize_reference_1): Return save_expr (e) for
11898 STATEMENT_LIST even if it doesn't have side-effects.
11900 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
11902 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
11904 2018-03-12 Renlin Li <renlin.li@arm.com>
11906 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
11907 aarch64_output_scalar_simd_mov_immediate.
11909 2018-03-12 Martin Sebor <msebor@redhat.com>
11911 PR tree-optimization/83456
11912 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
11913 for perfectly overlapping calls to memcpy.
11914 (gimple_fold_builtin_memory_chk): Same.
11915 (gimple_fold_builtin_strcpy): Handle no-warning.
11916 (gimple_fold_builtin_stxcpy_chk): Same.
11917 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
11919 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11921 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
11922 parameter. Use it for SFmode.
11923 (rs6000_function_arg_advance_1): Adjust.
11924 (rs6000_function_arg): Adjust.
11925 (rs6000_gimplify_va_arg): Pass false for that new parameter.
11927 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
11929 PR rtl-optimization/84169
11930 PR rtl-optimization/84780
11931 * combine.c (can_combine_p): Check for a 2-insn combination whether
11932 the destination register is used between the two insns, too.
11934 2018-03-12 Richard Biener <rguenther@suse.de>
11936 PR tree-optimization/84803
11937 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
11938 for refs DR analysis didn't process.
11940 2018-03-12 Richard Biener <rguenther@suse.de>
11942 PR tree-optimization/84777
11943 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
11944 force-vectorize loops ignore whether we are optimizing for size.
11946 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
11948 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
11949 (TARGET_MD_ASM_ADJUST): Define.
11951 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
11952 Kito Cheng <kito.cheng@gmail.com>
11953 Chung-Ju Wu <jasonwucj@gmail.com>
11955 * config/nds32/nds32.c (nds32_compute_stack_frame,
11956 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
11957 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
11958 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
11959 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
11960 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
11961 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
11962 * config/nds32/nds32.md (prologue, epilogue): Use macro
11963 NDS32_V3PUSH_AVAILABLE_P to do checking.
11965 2018-03-11 Jakub Jelinek <jakub@redhat.com>
11968 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
11969 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
11970 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
11971 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
11972 addition of most attributes on !orig_type_die or the attribute not
11973 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
11975 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11976 Chung-Ju Wu <jasonwucj@gmail.com>
11978 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
11979 __NDS32_VH__ macro.
11980 * config/nds32/nds32.opt (mvh): New option.
11982 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11983 Chung-Ju Wu <jasonwucj@gmail.com>
11985 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
11987 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
11988 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
11991 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
11992 Chung-Ju Wu <jasonwucj@gmail.com>
11994 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
11996 * config/nds32/nds32-multiple.md (strlensi): New pattern.
11997 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
11999 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
12000 Kito Cheng <kito.cheng@gmail.com>
12001 Chung-Ju Wu <jasonwucj@gmail.com>
12003 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
12004 UNSPEC_FFMISM and UNSPEC_FLMISM.
12005 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
12006 for ffb, ffmism and flmism.
12007 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
12008 (unspec_ffmism): Ditto.
12009 (unspec_flmism): Ditto.
12010 (nds32_expand_builtin_impl): Check if string extension is available.
12011 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
12012 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
12014 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
12017 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12020 * lra-assigns.c (assign_by_spills): Return a flag of reload
12021 assignment failure. Do not process the reload assignment
12022 failures. Do not spill other reload pseudos if they has the same
12024 (lra_assign): Add a return arg. Set up from the result of
12025 assign_by_spills call.
12026 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12027 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12028 usage_insns if it is not NULL.
12029 (spill_hard_reg_in_range): New function.
12030 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12031 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12032 function prototypes.
12033 (lra_assign): Change prototype.
12034 * lra.c (lra): Add code to deal with fails by splitting hard reg
12037 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
12040 * config/i386/i386.opt: Replace Enforcment with Enforcement.
12042 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
12045 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
12046 (dw_val_node): Add val_symbolic_view.
12047 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
12048 (symview_upper_bound): New.
12049 (new_line_info_table): Initialize symviews_since_reset.
12050 (dwarf2out_source_line): Count symviews_since_reset and set
12051 symview_upper_bound.
12052 (dw_val_equal_p): Handle symview.
12053 (add_AT_symview): New.
12054 (print_dw_val): Handle symview.
12055 (attr_checksum, attr_checksum_ordered): Likewise.
12056 (same_dw_val_p, size_of_die): Likewise.
12057 (value_format, output_die): Likewise.
12058 (add_high_low_attributes): Use add_AT_symview for entry_view.
12059 (dwarf2out_finish): Reset symview_upper_bound, clear
12062 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
12065 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
12066 Add strict argument and use it.
12067 (rs6000_split_multireg_move): Update for new strict argument.
12068 (mem_operand_gpr): Disallow all non-offsettable addresses.
12069 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
12071 2018-03-09 Jakub Jelinek <jakub@redhat.com>
12074 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
12075 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
12076 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
12079 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
12080 decl, use remap_type if we want to use the type.
12082 2018-03-09 Martin Sebor <msebor@redhat.com>
12084 PR tree-optimization/84526
12085 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12087 (builtin_access::generic_overlap): Be prepared to handle non-array
12090 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
12092 PR rtl-optimization/84682
12093 * lra-constraints.c (process_address_1): Check is_address flag
12094 for address constraints.
12095 (process_alt_operands): Likewise.
12096 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
12097 preprocess_constraints.
12098 * recog.h (preprocess_constraints): Add oploc parameter.
12100 * recog.c (preprocess_constraints): Test address_operand for
12101 CT_ADDRESS constraints.
12103 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12106 * lra-assigns.c (assign_by_spills): Return a flag of reload
12107 assignment failure. Do not process the reload assignment
12108 failures. Do not spill other reload pseudos if they has the same
12110 (lra_assign): Add a return arg. Set up from the result of
12111 assign_by_spills call.
12112 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12113 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12114 usage_insns if it is not NULL.
12115 (spill_hard_reg_in_range): New function.
12116 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12117 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12118 function prototypes.
12119 (lra_assign): Change prototype.
12120 * lra.c (lra): Add code to deal with fails by splitting hard reg
12123 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12126 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
12127 Accept complain bool parameter. Only emit errors if it is true.
12128 (arm_parse_cpu_option_name): Likewise.
12129 (arm_target_thumb_only): Adjust callers of the above.
12130 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
12131 prototype to take a default true bool parameter.
12132 (arm_parse_arch_option_name): Likewise.
12134 2018-03-09 David Malcolm <dmalcolm@redhat.com>
12135 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12139 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
12140 * configure: Regenerate.
12141 * configure.ac ("linker --version-script option"): New.
12142 ("linker soname option"): New.
12144 2018-03-09 Richard Biener <rguenther@suse.de>
12146 PR tree-optimization/84775
12147 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
12148 immediate uses of predicate stmts and mark them modified.
12151 PR tree-optimization/84178
12152 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12154 (version_loop_for_if_conversion): Delay update_ssa call.
12155 (tree_if_conversion): Delay update_ssa until after predicate
12158 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
12161 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
12162 when the function accesses prior frames.
12164 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12167 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
12168 gen_llsym, otherwise call maybe_gen_llsym.
12170 PR inline-asm/84742
12171 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
12172 has ',' character inside of it.
12174 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12177 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
12178 as clobbering CC_REGNUM.
12180 2018-03-08 Richard Biener <rguenther@suse.de>
12182 PR middle-end/84552
12183 * tree-scalar-evolution.c: Include tree-into-ssa.h.
12184 (follow_copies_to_constant): Do not follow SSA names registered
12187 2018-03-08 Richard Biener <rguenther@suse.de>
12189 PR tree-optimization/84178
12190 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12192 (version_loop_for_if_conversion): Delay update_ssa call.
12193 (tree_if_conversion): Delay update_ssa until after predicate
12196 2018-03-08 David Malcolm <dmalcolm@redhat.com>
12198 PR tree-optimization/84178
12199 * tree-if-conv.c (release_bb_predicate): Remove the
12200 the assertion that the stmts have NULL use_ops.
12201 Discard the statements, asserting that they haven't
12202 yet been added to a BB.
12204 2018-03-08 Richard Biener <rguenther@suse.de>
12206 PR tree-optimization/84746
12207 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
12208 (phi_translate): Pass in destination ANTIC_OUT set.
12209 (phi_translate_1): Likewise. For a simplified result lookup
12210 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
12211 (phi_translate_set): Adjust.
12212 (do_pre_regular_insertion): Likewise.
12213 (do_pre_partial_partial_insertion): Likewise.
12215 2018-03-08 Martin Liska <mliska@suse.cz>
12217 PR gcov-profile/84735
12218 * doc/gcov.texi: Document usage of profile files.
12219 * gcov-io.h: Document changes in the format.
12221 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
12225 * dwarf2out.c (struct dw_line_info_table): Update comments for
12227 (FORCE_RESET_NEXT_VIEW): New.
12228 (FORCE_RESETTING_VIEW_P): New.
12229 (RESETTING_VIEW_P): Check for -1 too.
12230 (ZERO_VIEW_P): Likewise.
12231 (new_line_info_table): Force-reset next view.
12232 (dwarf2out_begin_function): Likewise.
12233 (dwarf2out_source_line): Simplify zero_view_p initialization.
12234 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
12235 view directly. Omit view when omitting .loc at line 0.
12237 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12239 PR tree-optimization/84740
12240 * tree-switch-conversion.c (process_switch): Call build_constructors
12241 only if info.phi_count is non-zero.
12243 PR tree-optimization/84739
12244 * tree-tailcall.c (find_tail_calls): Check call arguments against
12245 DECL_ARGUMENTS (current_function_decl) rather than
12246 DECL_ARGUMENTS (func) when checking for tail recursion.
12248 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12250 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
12251 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
12252 Volker Reichelt's entry and add entries for people that perform
12253 GCC fuzzy testing and report numerous bugs.
12255 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
12258 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
12259 readonly data in sdata, if that is disabled.
12260 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
12261 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
12262 -mreadonly-in-sdata option.
12264 2018-03-07 Martin Sebor <msebor@redhat.com>
12266 PR tree-optimization/84468
12267 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
12268 basic block when looking for nul assignment.
12270 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
12273 * except.h (output_function_exception_table): Adjust prototype.
12274 * except.c (output_function_exception_table): Remove FNNAME parameter
12275 and add SECTION parameter. Ouput one part of the table at a time.
12276 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
12277 the first part of the exception table and emit unwind directives.
12278 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
12279 (i386_pe_seh_cold_init): Likewise.
12280 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
12281 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
12282 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
12283 (ix86_output_call_insn): Emit a nop in one more case for SEH.
12284 * config/i386/winnt.c: Include except.h.
12285 (struct seh_frame_state): Add reg_offset, after_prologue and
12286 in_cold_section fields.
12287 (i386_pe_seh_end_prologue): Set seh->after_prologue.
12288 (i386_pe_seh_cold_init): New function.
12289 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
12290 to seh->in_cold_section.
12291 (seh_emit_push): Record the offset of the push.
12292 (seh_emit_save): Record the offet of the save.
12293 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
12294 Test seh->after_prologue to disregard the epilogue.
12295 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
12296 (i386_pe_end_cold_function): New function.
12298 2018-03-07 Jakub Jelinek <jakub@redhat.com>
12301 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
12302 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
12305 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
12307 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
12308 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
12310 PR middle-end/84723
12311 * multiple_target.c: Include tree-inline.h and intl.h.
12312 (expand_target_clones): Diagnose and fail if node->definition and
12313 !tree_versionable_function_p (node->decl).
12315 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
12317 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
12319 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
12320 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
12321 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
12323 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12326 * combine.c (try_combine): Use reg_or_subregno instead of handling
12327 just paradoxical SUBREGs and REGs.
12329 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
12331 * config/arc/arc.c (arc_finalize_pic): Remove function.
12332 (arc_must_save_register): We use single base PIC register, remove
12333 checks to save/restore the PIC register.
12334 (arc_expand_prologue): Likewise.
12335 * config/arc/arc-protos.h (arc_set_default_type_attributes):
12337 (arc_verify_short): Likewise.
12338 (arc_attr_type): Likewise.
12339 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
12340 (walk_stores): Likewise.
12341 (arc_address_cost): Make it static.
12342 (arc_verify_short): Likewise.
12343 (branch_dest): Likewise.
12344 (arc_attr_type): Likewise.
12345 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
12346 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
12347 (arc_final_prescan_insn): Remove inserting the nops due to
12348 hardware hazards. It is done in reorg step.
12349 (insn_length_variant_t): Remove.
12350 (insn_length_parameters_t): Likewise.
12351 (arc_insn_length_parameters): Likewise.
12352 (arc_get_insn_variants): Likewise.
12353 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
12355 2018-03-06 Jakub Jelinek <jakub@redhat.com>
12357 PR inline-asm/84683
12358 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
12361 PR tree-optimization/84687
12362 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
12364 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
12366 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12368 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
12369 Rename to ppc_speculation_barrier.
12370 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
12371 __builtin_ppc_speculation_barrier.
12373 2018-03-05 Jakub Jelinek <jakub@redhat.com>
12376 * combine.c (combine_simplify_rtx): Don't try to simplify if
12377 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
12380 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
12382 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
12383 to 32 bytes when compiling for POWER9.
12385 2018-03-05 Jakub Jelinek <jakub@redhat.com>
12388 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
12389 regparm >= 3 with no arg reg available also for calls with
12390 flag_force_indirect_call. Pass decl to ix86_function_regparm.
12393 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
12395 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
12397 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
12400 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
12402 2018-03-05 Richard Biener <rguenther@suse.de>
12404 PR tree-optimization/84486
12405 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
12406 When inserting a __builtin_assume_aligned call set the LHS
12407 SSA name alignment info accordingly.
12409 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
12411 PR tree-optimization/84114
12412 * config/aarch64/aarch64.c (aarch64_reassociation_width)
12413 Avoid reassociation of FLOAT_MODE addition.
12415 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
12417 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
12418 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
12419 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
12420 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
12421 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
12422 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
12423 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
12425 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
12426 __builtin_ia32_wbinvd): New builtins.
12427 (SPECIAL_ARGS2): New.
12428 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
12429 (SPECIAL_ARGS2): New.
12430 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
12431 (ix86_valid_target_attribute_inner_p): Ditto.
12432 (ix86_init_mmx_sse_builtins): Add special_args2.
12433 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
12434 TARGET_WBNOINVD_P): New.
12435 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
12436 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
12437 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
12438 * config/i386/immintrin.h (_wbinvd): New intrinsic.
12439 * config/i386/pconfigintrin.h: New file.
12440 * config/i386/wbnoinvdintrin.h: Ditto.
12441 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
12443 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
12445 2018-03-05 Richard Biener <rguenther@suse.de>
12447 PR tree-optimization/84670
12448 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12450 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12451 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12452 (compute_antic_aux): Only assert the number of values in ANTIC_IN
12453 doesn't grow if all successors (recursively) were visited at least
12456 2018-03-05 Richard Biener <rguenther@suse.de>
12458 PR tree-optimization/84650
12459 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
12460 if executed in the loop pipeline.
12462 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
12464 * doc/configfiles.texi (Configuration Files): Move info about
12465 conditionalizing $target-protos.h to...
12466 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
12467 differs from $target-protos.h.
12469 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
12470 Chung-Ju Wu <jasonwucj@gmail.com>
12472 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
12473 * config/nds32/nds32-multiple.md (setmemsi): Define.
12474 * config/nds32/nds32-memory-manipulation.c
12475 (nds32_gen_dup_4_byte_to_word_value): New.
12476 (emit_setmem_word_loop): New.
12477 (emit_setmem_byte_loop): New.
12478 (nds32_expand_setmem_loop): New.
12479 (nds32_expand_setmem_loop_v3m): New.
12480 (nds32_expand_setmem_unroll): New.
12481 (nds32_expand_setmem): New.
12483 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12484 Chung-Ju Wu <jasonwucj@gmail.com>
12486 * config/nds32/nds32-memory-manipulation.c
12487 (nds32_emit_load_store): New.
12488 (nds32_emit_post_inc_load_store): New.
12489 (nds32_emit_mem_move): New.
12490 (nds32_emit_mem_move_block): New.
12491 (nds32_expand_movmemsi_loop_unknown_size): New.
12492 (nds32_expand_movmemsi_loop_known_size): New.
12493 (nds32_expand_movmemsi_loop): New.
12494 (nds32_expand_movmemsi_unroll): New.
12495 (nds32_expand_movmemqi): Rename ...
12496 (nds32_expand_movmemsi): ... to this.
12497 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
12498 (movmemsi): ... to this.
12499 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
12500 (nds32_expand_movmemsi): ... to this.
12502 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12503 Monk Chiang <sh.chiang04@gmail.com>
12504 Chung-Ju Wu <jasonwucj@gmail.com>
12506 * config/nds32/nds32-protos.h
12507 (nds32_expand_load_multiple): New arguments.
12508 (nds32_expand_store_multiple): Ditto.
12509 (nds32_valid_multiple_load_store): Rename ...
12510 (nds32_valid_multiple_load_store_p): ... to this.
12511 * config/nds32/nds32-memory-manipulation.c
12512 (nds32_expand_load_multiple): Refine implementation.
12513 (nds32_expand_store_multiple): Ditto.
12514 * config/nds32/nds32-multiple.md
12515 (load_multiple): Update nds32_expand_load_multiple interface.
12516 (store_multiple): Update nds32_expand_store_multiple interface.
12517 * config/nds32/nds32-predicates.c
12518 (nds32_valid_multiple_load_store): Rename ...
12519 (nds32_valid_multiple_load_store_p): ... to this and refine
12521 * config/nds32/predicates.md
12522 (nds32_load_multiple_and_update_address_operation): New predicate.
12523 (nds32_store_multiple_and_update_address_operation): New predicate.
12525 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
12526 Chung-Ju Wu <jasonwucj@gmail.com>
12528 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
12529 (combo): New attribute.
12530 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
12532 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
12534 * config/nds32/nds32.opt: Change -mcmodel= default value.
12536 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
12537 Monk Chiang <sh.chiang04@gmail.com>
12538 Chung-Ju Wu <jasonwucj@gmail.com>
12540 * config/nds32/constants.md (unspec_element): New enum.
12541 * config/nds32/constraints.md (Umw): New constraint.
12542 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
12543 * config/nds32/nds32-intrinsic.md: Likewise.
12544 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
12545 (nds32_valid_smw_lwm_base_p): New.
12546 (nds32_output_smw_single_word): New.
12547 (nds32_output_lmw_single_word): New.
12548 (nds32_expand_unaligned_load): New.
12549 (nds32_expand_unaligned_store): New.
12550 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
12551 (nds32_output_smw_single_word): Declare.
12552 (nds32_output_lmw_single_word): Declare.
12553 (nds32_expand_unaligned_load): Declare.
12554 (nds32_expand_unaligned_store): Declare.
12555 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
12556 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
12557 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
12558 NDS32_BUILTIN_UASTORE_DW.
12559 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
12562 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
12563 Kito Cheng <kito.cheng@gmail.com>
12564 Chung-Ju Wu <jasonwucj@gmail.com>
12566 * config/nds32/nds32-intrinsic.c
12567 (nds32_expand_builtin_null_ftype_reg): Delete.
12568 (nds32_expand_builtin_reg_ftype_imm): Ditto.
12569 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
12570 (nds32_read_argument): New.
12571 (nds32_legitimize_target): Ditto.
12572 (nds32_legitimize_argument): Ditto.
12573 (nds32_check_constant_argument): Ditto.
12574 (nds32_expand_unop_builtin): Ditto.
12575 (nds32_expand_unopimm_builtin): Ditto.
12576 (nds32_expand_binop_builtin): Ditto.
12577 (nds32_builtin_decl_impl): Ditto.
12578 (builtin_description): Ditto.
12579 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
12580 (nds32_init_builtins_impl): Ditto.
12581 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
12582 (nds32_builtin_decl): New.
12583 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
12584 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
12586 2018-03-02 Jeff Law <law@redhat.com>
12588 * reorg.c (stop_search_p): Handle DEBUG_INSN.
12589 (redundant_insn, fill_simple_delay_slots): Likewise.
12590 (fill_slots_from_thread): Likewise.
12591 * resource.c (mark_referenced_resources): Likewise.
12592 (mark_set_resources, find_dead_or_set_registers): Likewise.
12594 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12596 * substring-locations.h (format_warning_va): Formatting fix for
12597 ATTRIBUTE_GCC_DIAG.
12598 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
12600 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
12601 * substring-locations.c: Include intl.h.
12602 (format_warning_va): Turned into small wrapper around
12603 format_warning_n_va, renamed to ...
12604 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
12605 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
12607 (format_warning_at_substring_n): New function.
12608 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
12609 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
12610 format_warning_at_substring with just a shorter name instead of
12611 const function pointer.
12612 (fmtwarn_n): New function.
12613 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
12614 appropriate, get rid of all the fmtstr temporaries, move conditionals
12615 with G_() wrapped string literals directly into fmtwarn arguments,
12616 cast dir.len to (int), formatting fixes.
12618 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
12620 * doc/invoke.texi: Remove "Cilk Plus" references.
12622 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12623 Richard Biener <rguenther@suse.de>
12626 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
12627 for error or warning attributes if CALL_FROM_THUNK_P is set.
12630 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12633 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
12634 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
12637 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
12638 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
12640 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
12641 instead of -1U in last predictors element's probability member.
12643 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
12646 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12647 arguments if they are comparable.
12649 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
12651 PR tree-optimization/84634
12652 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
12653 masks and masked_loop_p with a single loop_masks, making sure it's
12654 null for bb vectorization.
12656 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
12658 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12659 (vect_analyze_data_ref_access): Use loop->safe_len rather than
12660 loop->force_vectorize to check whether there is no alias.
12662 2018-03-02 Jakub Jelinek <jakub@redhat.com>
12665 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
12667 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
12669 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
12670 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
12671 instead of a loop around prev_real_insn.
12672 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
12675 PR inline-asm/84625
12676 * config/i386/i386.c (ix86_print_operand): Use conditional
12677 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
12680 2018-03-02 Richard Biener <rguenther@suse.de>
12682 PR tree-optimization/84427
12683 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
12684 (bitmap_set_subtract_values): Rewrite to handle multiple
12687 (prune_clobbered_mems): Likewise.
12688 (phi_translate): Take edge instead of pred/phiblock.
12689 (phi_translate_1): Likewise.
12690 (phi_translate_set): Likewise. Insert all translated
12691 exprs for a value into the set, keeping possibly multiple
12692 expressions per value.
12693 (compute_antic_aux): Adjust for phi_translate changes.
12694 When intersecting union the expressions and prune those
12695 not in the final value set, keeping possibly multiple
12696 expressions per value. Do not use value-insertion
12697 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
12698 all expressions. Add verification that the value-sets
12699 only shrink during iteration.
12700 (compute_partial_antic_aux): Adjust for the phi_translate changes.
12701 (do_pre_regular_insertion): Likewise.
12702 (do_pre_partial_partial_insertion): Likewise.
12704 2018-03-02 Richard Biener <rguenther@suse.de>
12707 * config/darwin.c (saved_debug_info_level): New static global.
12708 (darwin_asm_lto_start): Disable debug info generation for LTO out.
12709 (darwin_asm_lto_end): Restore debug info generation settings.
12711 2018-03-01 Martin Liska <mliska@suse.cz>
12714 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
12715 volatile arguments.
12717 2018-03-01 Richard Biener <rguenther@suse.de>
12720 * dwarf2out.c (gen_variable_die): Properly handle late VLA
12721 type annotation with LTO when debug was disabled at compile-time.
12723 2018-03-01 Matthew Fortune <mfortune@gmail.com>
12725 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
12727 (mips_final_postscan_insn): Likewise.
12729 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
12731 PR rtl-optimization/84528
12732 * alias.c (init_alias_target): Add commentary.
12733 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
12734 a unique base value if the frame pointer is not eliminated
12735 to the stack pointer.
12737 2018-03-01 Tom de Vries <tom@codesourcery.com>
12739 PR rtl-optimization/83327
12740 * lra-int.h (hard_regs_spilled_into): Declare.
12741 * lra.c (hard_regs_spilled_into): Define.
12742 (init_reg_info): Init hard_regs_spilled_into.
12743 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
12744 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
12745 (process_bb_lives): Handle hard_regs_spilled_into.
12746 (lra_create_live_ranges_1): Before doing liveness propagation, clear
12747 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
12749 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
12751 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
12752 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
12753 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
12754 * config/rs6000/aix72.h: New file.
12756 2018-02-28 Jakub Jelinek <jakub@redhat.com>
12758 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
12759 instead of warning_at with conditional singular and plural messages
12763 * stor-layout.c (update_alignment_for_field): For
12764 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
12765 && !DECL_PACKED (field), do the alignment update, just use
12766 only desired_align instead of MAX (type_align, desired_align)
12768 (place_field): Don't do known_align < desired_align handling
12769 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
12770 is non-NULL, instead do it after rli->prev_field handling and
12771 only if not within a bitfield word. For DECL_PACKED (field)
12772 use type_align of BITS_PER_UNIT.
12774 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
12776 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
12777 superfluous parentheses and trailing spaces.
12779 2018-02-28 Richard Biener <rguenther@suse.de>
12781 PR tree-optimization/84584
12782 * graphite-scop-detection.c (scop_detection::add_scop): Discard
12783 SCoPs with fake exit edge.
12785 2018-02-28 Martin Liska <mliska@suse.cz>
12788 * timevar.c (timer::print): Fix format to properly print 100%
12791 2018-02-28 Richard Biener <rguenther@suse.de>
12793 PR middle-end/84607
12794 * genmatch.c (capture_info::walk_match): Do not mark
12795 captured expressions without operands as expr_p given
12796 they act more like predicates and should be subject to
12797 "lost tail" side-effect preserving.
12799 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
12801 PR rtl-optimization/81611
12802 * auto-inc-dec.c (attempt_change): Move dead note from
12803 mem_insn if it's the next use of regno
12804 (find_address): Take address use of reg holding
12805 non-incremented value. Add parm to limit search to the named
12807 (merge_in_block): Attempt to use a mem insn that is the next
12808 use of the original regno.
12810 2018-02-27 Martin Sebor <msebor@redhat.com>
12813 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
12814 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
12816 2018-02-27 Martin Sebor <msebor@redhat.com>
12818 PR translation/84207
12819 * diagnostic-core.h (warning_n, error_n, inform_n): Change
12820 n argument to unsigned HOST_WIDE_INT.
12821 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
12822 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
12823 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
12824 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
12826 2018-02-27 Richard Biener <rguenther@suse.de>
12828 PR tree-optimization/84512
12829 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
12830 Do not use the estimate returned from record_stmt_cost for
12831 the scalar iteration cost but sum properly using add_stmt_cost.
12833 2018-02-27 Richard Biener <rguenther@suse.de>
12835 PR tree-optimization/84466
12836 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12837 Adjust last change to less strictly validate use operands.
12839 2018-02-27 Martin Liska <mliska@suse.cz>
12841 PR gcov-profile/84548
12842 * gcov.c (process_file): Allow partial overlap and consider it
12843 also as group functions.
12844 (output_lines): Properly calculate range of lines for a group.
12846 2018-02-27 Martin Liska <mliska@suse.cz>
12848 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
12849 'ggc' suffixes. Change first column width.
12850 (timer::print): Fix formatting of the column.
12852 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
12854 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
12855 preserve inline entry blocks for the sake of debug inline
12856 entry point markers alone.
12857 (remove_unused_locals): Suggest in comments a better place to
12858 force the preservation of inline entry blocks that are
12859 otherwise unused, but do not preserve them.
12861 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12863 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
12865 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12868 * config/i386/constraints.md (Bs): Replace
12869 ix86_indirect_branch_register with
12870 TARGET_INDIRECT_BRANCH_REGISTER.
12872 * config/i386/i386.md (indirect_jump): Likewise.
12873 (tablejump): Likewise.
12874 (*sibcall_memory): Likewise.
12875 (*sibcall_value_memory): Likewise.
12876 Peepholes of indirect call and jump via memory: Likewise.
12877 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
12878 (*sibcall_value_GOT_32): Likewise.
12879 * config/i386/predicates.md (indirect_branch_operand): Likewise.
12880 (GOT_memory_operand): Likewise.
12881 (call_insn_operand): Likewise.
12882 (sibcall_insn_operand): Likewise.
12883 (GOT32_symbol_operand): Likewise.
12884 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
12886 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12888 PR rtl-optimization/83496
12889 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
12890 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
12891 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
12892 redundant insn, if any.
12893 (relax_delay_slots): Likewise.
12894 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
12896 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
12898 PR tree-optimization/83965
12899 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
12900 that grouped statements are part of a reduction chain. Return
12901 true if the statement is not marked as a reduction itself but
12902 is part of a group.
12903 (vect_recog_dot_prod_pattern): Don't check whether the statement
12904 is part of a group here.
12905 (vect_recog_sad_pattern): Likewise.
12906 (vect_recog_widen_sum_pattern): Likewise.
12908 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
12911 * final.c (rest_of_clean_state): Also look for calls inside sequences.
12913 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
12916 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
12918 (ix86_output_indirect_function_return): New prototype.
12919 (ix86_split_simple_return_pop_internal): Likewise.
12920 * config/i386/i386.c (indirect_return_via_cx): New.
12921 (indirect_return_via_cx_bnd): Likewise.
12922 (indirect_thunk_name): Handle return va CX_REG.
12923 (output_indirect_thunk_function): Create alias for
12924 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
12925 (ix86_output_indirect_jmp): Remove the bool argument.
12926 (ix86_output_indirect_function_return): New function.
12927 (ix86_split_simple_return_pop_internal): Likewise.
12928 * config/i386/i386.md (*indirect_jump): Don't pass false
12929 to ix86_output_indirect_jmp.
12930 (*tablejump_1): Likewise.
12931 (simple_return_pop_internal): Change it to define_insn_and_split.
12932 Call ix86_split_simple_return_pop_internal to split it for
12933 -mfunction-return=.
12934 (simple_return_indirect_internal): Call
12935 ix86_output_indirect_function_return instead of
12936 ix86_output_indirect_jmp.
12938 2018-02-26 Jakub Jelinek <jakub@redhat.com>
12941 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
12942 memset and value initialization afterwards.
12944 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
12946 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
12948 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12951 * common/config/aarch64/aarch64-common.c
12952 (aarch_option_optimization_table[]): Switch
12953 off fomit-frame-pointer
12955 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
12956 Chung-Ju Wu <jasonwucj@gmail.com>
12958 * config/nds32/nds32-multiple.md (load_multiple): Disallow
12960 (store_multiple): Ditto.
12962 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
12964 * config.gcc: Add --with-cpu support for nds32 target.
12965 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
12966 * config/nds32/nds32.opt: Add -mcpu= option.
12968 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
12970 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
12971 isel=yes): Warn for these deprecated options.
12973 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
12975 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
12976 ISA_2_5_MASKS_EMBEDDED.
12978 2018-02-23 Jakub Jelinek <jakub@redhat.com>
12980 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
12981 p->max as pointers rather than using iterative_hash_expr.
12983 2018-02-23 Carl Love <cel@us.ibm.com>
12985 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
12986 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
12988 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
12989 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
12990 P8V_BUILTIN_VEC_VUNSIGNED2.
12992 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
12995 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
12996 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
12998 * lra-constraints.c (curr_insn_transform): Set up
12999 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
13001 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
13002 * lra-eliminations.c (spill_pseudos): Ditto.
13003 (process_insn_for_elimination): Ditto.
13004 * lra-lives.c (reg_early_clobber_p): Use the new macros.
13005 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
13006 LRA_NON_CLOBBERED_ALT.
13008 2018-02-22 Martin Sebor <msebor@redhat.com>
13010 PR tree-optimization/84480
13011 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
13012 to maybe_diag_stxncpy_trunc. Call it.
13013 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
13014 from gimple_fold_builtin_strcpy. Print inlining stack.
13015 (handle_builtin_stxncpy): Print inlining stack.
13016 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
13018 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
13021 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
13022 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
13023 and -fcheck-pointer-bounds are used together.
13024 (indirect_thunk_prefix): New enum.
13025 (indirect_thunk_need_prefix): New function.
13026 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
13027 "_nt" instead of "_bnd" for NOTRACK prefix.
13028 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
13029 (output_indirect_thunk_function): Likewise.
13031 (ix86_code_end): Update output_indirect_thunk_function calls.
13032 (ix86_output_indirect_branch_via_reg): Replace
13033 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
13034 (ix86_output_indirect_branch_via_push): Likewise.
13035 (ix86_output_function_return): Likewise.
13036 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
13037 incompatible with -fcf-protection=branch and
13038 -fcheck-pointer-bounds.
13040 2018-02-22 Steve Ellcey <sellcey@cavium.com>
13043 * config/aarch64/aarch64.c (aarch64_print_address_internal):
13044 Change gcc_assert call to output_operand_lossage.
13046 2018-02-22 Steve Ellcey <sellcey@cavium.com>
13048 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
13050 2018-02-22 DJ Delorie <dj@redhat.com>
13051 Sebastian Perta <sebastian.perta@renesas.com>
13052 Oleg Endo <olegendo@gcc.gnu.org>
13054 * config/rx/rx.c (rx_rtx_costs): New function.
13055 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
13057 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
13059 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
13061 2018-02-22 Martin Liska <mliska@suse.cz>
13064 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
13065 Add "native" as a possible value.
13067 2018-02-22 Martin Liska <mliska@suse.cz>
13070 * config/i386/i386.c (ix86_option_override_internal):
13071 Add "native" as a possible value for -march and -mtune.
13073 2018-02-22 Jakub Jelinek <jakub@redhat.com>
13076 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
13077 to all type variants.
13079 PR tree-optimization/84503
13080 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
13081 width as info->bitpos + info->bitsize - start.
13082 (merged_store_group::merge_overlapping): Simplify width computation.
13083 (check_no_overlap): New function.
13084 (imm_store_chain_info::try_coalesce_bswap): Compute expected
13085 start + width and last_order of the group, fail if check_no_overlap
13087 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
13088 to group if check_no_overlap fails.
13090 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
13092 * config/rs6000/altivec.md: Delete contraint arguments to
13093 define_expand, define_split, and define_peephole2, and in
13094 define_insn_and_split if always unused.
13095 * config/rs6000/darwin.md: Ditto.
13096 * config/rs6000/dfp.md: Ditto.
13097 * config/rs6000/rs6000.md: Ditto.
13098 * config/rs6000/sync.md: Ditto.
13099 * config/rs6000/vector.md: Ditto.
13100 * config/rs6000/vsx.md: Ditto.
13102 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
13104 * config/rs6000/altivec.md: Write output control strings as braced
13105 blocks instead of double-quoted strings.
13106 * config/rs6000/darwin.md: Ditto.
13107 * config/rs6000/rs6000.md: Ditto.
13108 * config/rs6000/vector.md: Ditto.
13109 * config/rs6000/vsx.md: Ditto.
13111 2018-02-21 Jason Merrill <jason@redhat.com>
13113 PR c++/84314 - ICE with templates and fastcall attribute.
13114 * attribs.c (build_type_attribute_qual_variant): Remove assert.
13116 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
13118 * ipa-cp.c (determine_versionability): Fix comment typos.
13120 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
13123 * ipa-cp.c (determine_versionability): Do not version functions caling
13126 2018-02-21 Martin Liska <mliska@suse.cz>
13129 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
13130 Add "native" as a possible value.
13131 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
13132 the macro when native cpu detection is available.
13134 2018-02-21 Martin Liska <mliska@suse.cz>
13137 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
13138 Add "native" as a possible value.
13139 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
13140 when native cpu detection is available.
13142 2018-02-21 Jakub Jelinek <jakub@redhat.com>
13143 Martin Sebor <msebor@redhat.com>
13145 PR tree-optimization/84478
13146 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
13148 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
13149 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
13150 support which is conservatively correct, for 2 only stay conservative
13151 for maxlen. Formatting and comment capitalization fixes. Add STRICT
13152 argument to the 2 argument get_range_strlen, adjust 6 arg
13153 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
13155 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
13156 (gimple_fold_builtin_strlen): Pass true as last argument to
13159 2018-02-20 Martin Sebor <msebor@redhat.com>
13161 PR middle-end/84095
13162 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
13163 (builtin_memref::set_base_and_offset): Same. Handle inner references.
13164 (builtin_memref::builtin_memref): Factor out parts into
13165 set_base_and_offset and call it.
13167 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13169 PR middle-end/84406
13170 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
13171 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
13172 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
13173 search at the associated MODE_INT.
13175 2018-02-20 Jeff Law <law@redhat.com>
13177 PR middle-end/82123
13178 PR tree-optimization/81592
13179 PR middle-end/79257
13180 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
13181 for range data rather than using global data.
13182 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
13183 range data rather than using global data.
13184 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
13185 pass it to children as needed.
13186 (struct directive::fmtresult): Similarly.
13187 (struct directive::set_width): Similarly.
13188 (struct directive::set_precision): Similarly.
13189 (format_integer, format_directive, parse_directive): Similarly.
13190 (format_none): Accept unnamed vr_values parameter.
13191 (format_percent, format_floating, format_character): Similarly.
13192 (format_string, format_plain): Similarly.
13193 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
13194 the EVRP range analyzer for range data rather than using global data.
13195 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
13196 gimple-ssa-evrp-analyze.h
13197 (class sprintf_dom_walker): Add after_dom_children member function.
13198 Add evrp_range_analyzer member.
13199 (sprintf_dom_walker::before_dom_children): Call into the EVRP
13200 range analyzer as needed.
13201 (sprintf_dom_walker::after_dom_children): New member function.
13202 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
13204 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
13205 (evrp_range_analyzer::pop_to_marker): Likewise.
13207 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13209 PR tree-optimization/84419
13210 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
13211 with the required type if its current type is compatible but
13214 2018-02-20 Jakub Jelinek <jakub@redhat.com>
13216 PR middle-end/82004
13217 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
13218 after vectorization.
13220 2018-02-20 Martin Liska <mliska@suse.cz>
13223 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
13224 possible values if we don't have a hint.
13226 2018-02-20 Martin Liska <mliska@suse.cz>
13230 * final.c (shorten_branches): Build align_tab array with one
13232 * opts.c (finish_options): Add alignment option limit check.
13233 (MAX_CODE_ALIGN): Likewise.
13234 (MAX_CODE_ALIGN_VALUE): Likewise.
13235 * doc/invoke.texi: Document maximum allowed option value for
13236 all -falign-* options.
13238 2018-02-19 Jakub Jelinek <jakub@redhat.com>
13241 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
13242 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
13243 * var-tracking.c (emit_note_insn_var_location): Remove all references
13244 to NOTE_INSN_CALL_ARG_LOCATION.
13245 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
13246 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
13247 Use copy_rtx_if_shared.
13248 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
13249 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
13250 (dwarf2out_var_location): Remove handling of
13251 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
13253 * final.c (final_scan_insn): Remove all references to
13254 NOTE_INSN_CALL_ARG_LOCATION.
13255 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
13256 before dumping final insns.
13257 * except.c (emit_note_eh_region_end): Remove all references to
13258 NOTE_INSN_CALL_ARG_LOCATION.
13259 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
13260 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
13261 * config/arc/arc.c (hwloop_optimize): Likewise.
13262 * config/arm/arm.c (create_fix_barrier): Likewise.
13263 * config/s390/s390.c (s390_chunkify_start): Likewise.
13264 * config/sh/sh.c (find_barrier): Likewise.
13265 * config/i386/i386.c (rest_of_insert_endbranch,
13266 ix86_seh_fixup_eh_fallthru): Likewise.
13267 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
13268 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
13269 * config/frv/frv.c (frv_function_prologue): Likewise.
13270 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
13272 (note_outside_basic_block_p): Remove all references to
13273 NOTE_INSN_CALL_ARG_LOCATION.
13274 * gengtype.c (adjust_field_rtx_def): Likewise.
13275 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
13277 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
13278 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
13281 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
13284 PR tree-optimization/84452
13285 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
13286 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
13289 2018-02-19 Martin Liska <mliska@suse.cz>
13292 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
13294 2018-02-19 Martin Liska <mliska@suse.cz>
13295 Richard Sandiford <richard.sandiford@linaro.org>
13297 PR tree-optimization/82491
13298 * gimple-fold.c (get_base_constructor): Make earlier bail out
13301 2018-02-19 Carl Love <cel@us.ibm.com>
13303 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
13304 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
13306 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
13307 P8V_BUILTIN_VEC_NEG.
13309 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
13311 * config/rl78/rl78.md (movdf): New define expand.
13313 2018-02-19 Martin Liska <mliska@suse.cz>
13316 * doc/invoke.texi: Fix typo.
13317 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
13319 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
13321 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
13322 handle rs6000_single_float and rs6000_double_float specially for
13325 2018-02-16 Jeff Law <law@redhat.com>
13327 * config/rx/rx.c (add_pop_cfi_notes): New function.;
13328 (pop_regs): Use it.
13330 2018-02-16 Jakub Jelinek <jakub@redhat.com>
13333 * ipa-inline.c (inline_small_functions): Fix a typo.
13335 2018-02-16 Nathan Sidwell <nathan@acm.org>
13337 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
13339 2018-02-16 Carl Love <cel@us.ibm.com>
13341 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
13342 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
13343 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
13344 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
13345 expansion to P8V_BUILTIN_VEC_FLOAT2.
13347 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
13349 PR rtl-optimization/70023
13350 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
13351 src_regno into account.
13353 2018-02-16 Carl Love <cel@us.ibm.com>
13355 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
13356 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
13357 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
13358 * config/rs6000/rs6000.c: Remove case statements for
13359 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
13360 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
13361 and P9V_BUILTIN_VEC_VINSERT4B.
13362 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
13363 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
13364 * config/rs6000/vsx.md:
13365 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
13368 2018-02-16 Carl Love <cel@us.ibm.com>
13370 * config/rs6000/altivec.h: Add builtin names vec_extract4b
13372 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
13374 * config/rs6000/rs6000-c.c: Add the definitions for
13375 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
13376 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
13377 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
13378 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
13379 definition for insert4b and define insn *insert3b_internal.
13380 * doc/extend.texi: Add documentation for vec_extract4b.
13382 2018-02-16 Nathan Sidwell <nathan@acm.org>
13384 * doc/extend.texi (Backwards Compatibility): Mention friend
13385 injection. Note for-scope is deprecated.
13386 * doc/invoke.texi (-ffriend-injection): Deprecate.
13388 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
13390 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
13391 that moved to I2, also allow destinations that are a paradoxical
13392 subreg (instead of a normal reg).
13394 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
13397 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
13400 2018-02-16 Richard Biener <rguenther@suse.de>
13402 PR tree-optimization/84037
13403 PR tree-optimization/84016
13405 * config/i386/i386.c (ix86_builtin_vectorization_cost):
13406 Adjust vec_construct for the fact we need additional higher latency
13407 128bit inserts for AVX256 and AVX512 vector builds.
13408 (ix86_add_stmt_cost): Scale vector construction cost for
13411 2018-02-16 Richard Biener <rguenther@suse.de>
13413 PR tree-optimization/84417
13414 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
13415 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
13416 (non_rewritable_lvalue_p): Likewise, use poly-ints.
13418 2018-02-16 Martin Liska <mliska@suse.cz>
13421 * internal-fn.def (ASAN_CHECK): Set proper flags.
13422 (ASAN_MARK): Likewise.
13424 2018-02-16 Julia Koval <julia.koval@intel.com>
13426 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
13427 from PTA_CANNONLAKE.
13429 2018-02-16 Jakub Jelinek <jakub@redhat.com>
13432 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
13433 Use ++iter rather than iter++ for std::list iterators.
13434 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
13435 defer deleting them until all nodes in the forest are processed. Do
13436 free even leaf nodes. Change to_process into auto_vec.
13439 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
13440 * vec.h (vec_default_construct): Use memset instead of placement new
13441 if BROKEN_VALUE_INITIALIZATION is defined.
13442 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
13443 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
13446 PR rtl-optimization/83723
13447 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
13448 * lra.c (lra_substitute_pseudo): Likewise. If true, use
13449 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
13451 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
13453 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
13455 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
13457 PR rtl-optimization/81443
13458 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
13459 from inner REGs to paradoxical SUBREGs.
13461 2018-02-16 Richard Biener <rguenther@suse.de>
13463 PR tree-optimization/84399
13464 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13465 For operands we can analyze at their definition make sure we can
13466 analyze them at each use as well.
13468 2018-02-16 Richard Biener <rguenther@suse.de>
13470 PR tree-optimization/84190
13471 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
13472 volatile accesses if the decl isn't volatile.
13474 2018-02-15 Jason Merrill <jason@redhat.com>
13476 PR c++/84314 - ICE with templates and fastcall attribute.
13477 * attribs.c (build_type_attribute_qual_variant): Don't clobber
13478 TYPE_CANONICAL on an existing type.
13480 2018-02-15 Jakub Jelinek <jakub@redhat.com>
13482 PR tree-optimization/84383
13483 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
13484 dstoff nor call operand_equal_p if dstbase is NULL.
13486 PR tree-optimization/84334
13487 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
13488 also a CONSTANT_CLASS_P, punt.
13490 2018-02-14 Jim Wilson <jimw@sifive.com>
13492 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
13493 first SMALL_OPERAND check. New local min_second_step. Move assert
13494 to where locals are set. Add TARGET_RVC support.
13495 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
13497 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
13499 * doc/invoke.texi: Correct -Wformat-overflow code sample.
13501 2018-02-14 Martin Sebor <msebor@redhat.com>
13503 PR tree-optimization/83698
13504 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
13505 arrays constrain the offset range to their bounds.
13506 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
13507 (builtin_access::overlap): Avoid setting the size of overlap if it's
13509 (maybe_diag_overlap): Also consider arrays when deciding what values
13510 of offsets to include in diagnostics.
13512 2018-02-14 Martin Sebor <msebor@redhat.com>
13515 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
13516 that correspond to the kind of a declaration.
13518 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
13521 * config/pa/pa.md: Load address of PIC label using the linkage table
13522 if the label is nonlocal.
13524 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
13526 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
13527 warning message if user requests -maltivec=be.
13528 * doc/invoke.texi: Document deprecation of -maltivec=be.
13530 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
13533 * config/rs6000/rs6000-c.c: Update definitions for
13534 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
13535 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
13537 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13540 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
13541 add _get_ssp intrinsics. Remove argument from
13542 __builtin_ia32_rdssp[d|q].
13543 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
13544 * config/i386/i386-builtin.def: Remove argument from
13545 __builtin_ia32_rdssp[d|q].
13546 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
13547 ix86_expand_special_args_builtin for _rdssp[d|q].
13548 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
13549 Clear register before usage.
13550 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
13551 Add documentation for new _get_ssp and _inc_ssp intrinsics.
13553 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
13555 PR tree-optimization/84357
13556 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
13557 operand 1 of an ARRAY_REF too.
13559 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
13562 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
13563 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13565 (set_of_reg): New struct.
13566 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
13567 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
13568 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
13570 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
13571 Split into bitclr, bitset, bitinvert patterns if appropriate.
13572 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
13573 use rx_fuse_in_memory_bitop.
13574 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
13575 to named insn, correct maximum insn length.
13577 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
13580 * machmode.def: Define a complex mode for PARTIAL_INT.
13581 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
13583 * doc/rtl.texi: Document CSPImode.
13584 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
13586 (msp430_hard_regno_nregs_with_padding): Likewise.
13588 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
13591 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
13593 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
13595 PR rtl-optimization/84169
13596 * combine.c (try_combine): New variable split_i2i3. Set it to true if
13597 we generated a parallel as new i3 and we split that to new i2 and i3
13598 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
13599 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
13600 those to i2, not i1. Partially rewrite this scan code.
13602 2018-02-13 Jakub Jelinek <jakub@redhat.com>
13605 * stor-layout.c (place_field): For variable length fields, adjust
13606 offset_align afterwards not just based on the field's alignment,
13607 but also on the size.
13609 PR middle-end/84309
13610 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
13611 of exps and logs in the use_exp2 case.
13613 2018-02-13 Jeff Law <law@redhat.com>
13615 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
13616 entry for "vector".
13618 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
13621 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
13625 * common.opt (gas-loc-support, gas-locview-support): New.
13626 (ginline-points, ginternal-reset-location-views): New.
13627 * doc/invoke.texi: Document them. Use @itemx where intended.
13628 (gvariable-location-views): Adjust.
13629 * target.def (reset_location_view): New.
13630 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
13631 (TARGET_RESET_LOCATION_VIEW): New.
13632 * doc/tm.texi: Rebuilt.
13633 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
13634 (dwarf2out_default_as_locview_support): New.
13635 (output_asm_line_debug_info): Use option variables.
13636 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
13637 (output_loc_list): Likewise.
13638 (add_high_low_attributes): Check option variables.
13639 Don't output entry view attribute in strict mode.
13640 (gen_inlined_subroutine_die): Check option variables.
13641 (dwarf2out_inline_entry): Likewise.
13642 (init_sections_and_labels): Likewise.
13643 (dwarf2out_early_finish): Likewise.
13644 (maybe_reset_location_view): New, from...
13645 (dwarf2out_var_location): ... here. Call it.
13646 * debug.h (dwarf2out_default_as_loc_support): Declare.
13647 (dwarf2out_default_as_locview_support): Declare.
13648 * hooks.c (hook_int_rtx_insn_0): New.
13649 * hooks.h (hook_int_rtx_insn_0): Declare.
13650 * toplev.c (process_options): Take -gas-loc-support and
13651 -gas-locview-support from dwarf2out. Enable
13652 -gvariable-location-views by default only with locview
13653 assembler support. Enable -ginternal-reset-location-views by
13654 default only if the target defines the corresponding hook.
13655 Enable -ginline-points by default if location views are
13656 enabled; force it disabled if statement frontiers are
13658 * tree-inline.c (expand_call_inline): Check option variables.
13659 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
13661 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
13663 PR tree-optimization/84321
13664 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
13665 handling. Also check whether the anti-range contains any values
13666 that satisfy the mask; switch to a VR_RANGE if not.
13668 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
13671 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
13673 2018-02-13 Martin Jambor <mjambor@suse.cz>
13676 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
13677 of call statements, also set location of a load to a temporary.
13679 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
13681 * config/rl78/rl78.c (add_vector_labels): New function.
13682 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
13683 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
13684 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
13685 which checks that no arguments are passed.
13686 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
13687 * doc/extend.texi: Documentation for the new attribute.
13689 2018-02-13 Andreas Schwab <schwab@suse.de>
13691 * config/riscv/linux.h (CPP_SPEC): Define.
13693 2018-02-13 Jakub Jelinek <jakub@redhat.com>
13696 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
13697 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
13698 OPTION_MASK_ISA_AES as first argument to def_builtin_const
13699 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
13700 instead of OPTION_MASK_ISA_PCLMUL as first argument to
13701 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
13702 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
13703 temporarily for AES and PCLMUL builtins.
13705 PR tree-optimization/84339
13706 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
13707 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
13710 PR middle-end/84309
13711 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
13712 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
13713 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
13715 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
13717 * omp-simd-clone.h: New file.
13718 * omp-simd-clone.c: Include omp-simd-clone.h.
13719 (expand_simd_clones): No longer static.
13720 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
13721 cgraph.h and omp-simd-clone.h.
13722 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
13723 (vect_recog_widen_shift_pattern): Formatting fix.
13724 (vect_pattern_recog_1): Don't check optab for calls.
13727 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
13728 operands[2] into a REG before using gen_lowpart on it.
13730 2018-02-12 Jeff Law <law@redhat.com>
13733 * config/sh/sh.c (find_barrier): Consider a sibling call
13736 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
13737 successfully back substituting a reg.
13739 2018-02-12 Richard Biener <rguenther@suse.de>
13741 PR tree-optimization/84037
13742 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
13743 parameter, move visited init to caller.
13744 (vect_slp_analyze_operations): Separate cost from validity
13745 check, initialize visited once for all instances.
13746 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
13748 * tree-vect-stmts.c (vect_model_simple_cost): Make early
13750 (vect_model_promotion_demotion_cost): Likewise.
13751 (vectorizable_bswap): Guard cost modeling with !slp_node
13752 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
13754 (vectorizable_call): Likewise.
13755 (vectorizable_conversion): Likewise.
13756 (vectorizable_assignment): Likewise.
13757 (vectorizable_shift): Likewise.
13758 (vectorizable_operation): Likewise.
13759 (vectorizable_store): Likewise.
13760 (vectorizable_load): Likewise.
13761 (vectorizable_condition): Likewise.
13762 (vectorizable_comparison): Likewise.
13764 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
13767 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
13768 (ASAN_MARK): Fix fnspec to account for return value, change pointer
13769 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
13771 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
13773 PR middle-end/83665
13774 * params.def (inline-min-speedup): Increase from 8 to 15.
13775 (max-inline-insns-auto): Decrease from 40 to 30.
13776 * ipa-split.c (consider_split): Add some buffer for function to
13777 be considered inlining candidate.
13778 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
13781 2018-02-12 Richard Biener <rguenther@suse.de>
13783 PR tree-optimization/84037
13784 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
13785 matched stmts if we cannot swap the non-matched ones.
13787 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13789 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
13790 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
13791 _mm_maskz_scalef_round_ss): New intrinsics.
13792 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
13793 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
13794 __builtin_ia32_scalefss_round): Remove.
13795 (__builtin_ia32_scalefsd_mask_round,
13796 __builtin_ia32_scalefss_mask_round): New intrinsics.
13797 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
13798 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
13799 ((match_operand:VF_128 2 "<round_nimm_predicate>"
13800 "<round_constraint>")): Changed to ...
13801 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
13802 "<round_scalar_constraint>")): ... this.
13803 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
13804 %0, %1, %2<round_op3>}"): Changed to ...
13805 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
13806 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
13807 %2<round_scalar_mask_op3>}"): ... this.
13808 * config/i386/subst.md (round_scalar_nimm_predicate): New.
13810 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
13812 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
13813 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
13814 (_mm_maskz_sqrt_round_ss): New intrinsics.
13815 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
13816 (__builtin_ia32_sqrtsd_mask_round)
13817 (__builtin_ia32_sqrtss_mask_round): New builtins.
13818 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
13819 (__builtin_ia32_sqrtss_round): Remove.
13820 (__builtin_ia32_sqrtsd_mask_round)
13821 (__builtin_ia32_sqrtss_mask_round): New builtins.
13822 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
13823 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
13824 ((match_operand:VF_128 1 "vector_operand"
13825 "xBm,<round_constraint>")): Changed to ...
13826 ((match_operand:VF_128 1 "vector_operand"
13827 "xBm,<round_scalar_constraint>")): ... this.
13828 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
13829 %0, %2, %<iptr>1<round_op3>}): Changed to ...
13830 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
13831 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
13832 %<iptr>1<round_scalar_mask_op3>}): ... this.
13833 ((set_attr "prefix" "<round_prefix>")): Changed to ...
13834 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
13836 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
13839 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
13840 Cast vec_cmpeq result to correct type.
13841 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
13842 Cast vec_cmpgt result to correct type.
13844 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
13846 * final.c (final_scan_insn_1): Renamed from...
13847 (final_scan_insn): ... this. New wrapper, to recover
13848 seen from the outermost call in recursive ones.
13849 * config/sparc/sparc.c (output_return): Drop seen from call.
13850 (output_sibcall): Likewise.
13851 * config/visium/visium.c (output_branch): Likewise.
13853 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
13855 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
13858 2018-02-10 Alan Modra <amodra@gmail.com>
13861 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
13862 Specify LR as an input.
13864 2018-02-10 Jakub Jelinek <jakub@redhat.com>
13867 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
13868 remove_member_access_dummy_vars): New functions.
13869 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
13870 lower_omp_1, execute_lower_omp): Use them.
13872 PR rtl-optimization/84308
13873 * shrink-wrap.c (spread_components): Release todo vector.
13875 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
13877 PR rtl-optimization/57193
13878 * ira-color.c (struct allocno_color_data): Add member
13879 conflict_allocno_hard_prefs.
13880 (update_conflict_allocno_hard_prefs): New.
13881 (bucket_allocno_compare_func): Add a preference based on
13882 conflict_allocno_hard_prefs.
13883 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
13884 (color_allocnos): Remove a dead code. Initiate
13885 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
13887 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13890 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
13891 constraint from =wa to wa. Avoid a subreg on the output operand,
13892 instead use a pseudo and subreg it in a move.
13893 (p9_xxbrd_<mode>): Changed to ...
13894 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
13895 (p9_xxbrd_v2df): New expander.
13896 (p9_xxbrw_<mode>): Changed to ...
13897 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
13898 (p9_xxbrw_v4sf): New expander.
13900 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13902 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
13904 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
13907 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
13908 multiply in 32-bit mode.
13909 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
13910 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
13913 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
13915 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
13916 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
13917 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
13918 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
13920 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
13923 * dwarf2out.c (is_trivial_indirect_ref): New function.
13924 (dwarf2out_late_global_decl): Do not generate a location
13925 attribute for variables that have a non-trivial DECL_VALUE_EXPR
13926 and that are not defined in the current unit.
13928 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
13930 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
13931 instead of a libcall for UNORDERED.
13933 2018-02-09 Tamar Christina <tamar.christina@arm.com>
13936 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
13937 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
13939 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13942 * config/s390/s390.c (s390_set_current_function): Invoke
13943 s390_indirect_branch_settings also if fndecl didn't change.
13945 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
13947 * config/rs6000/rs6000.md (blockage): Set length to zero.
13949 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
13951 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
13953 2018-02-09 Jakub Jelinek <jakub@redhat.com>
13956 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
13957 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
13961 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
13962 PARALLEL incoming that failed vt_get_decl_and_offset check.
13964 PR middle-end/84237
13965 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
13966 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
13968 (get_variable_section): For decls in named .bss* sections pass true as
13969 second argument to bss_initializer_p.
13971 2018-02-09 Marek Polacek <polacek@redhat.com>
13972 Jakub Jelinek <jakub@redhat.com>
13975 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
13976 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
13977 Sync some changes from cxx_fold_indirect_ref.
13979 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
13981 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
13983 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
13984 (BLOCK_INLINE_ENTRY_LABEL): New.
13985 (dwarf2out_var_location): Disregard inline entry markers.
13986 (inline_entry_data): New struct.
13987 (inline_entry_data_hasher): New hashtable type.
13988 (inline_entry_data_hasher::hash): New.
13989 (inline_entry_data_hasher::equal): New.
13990 (inline_entry_data_table): New variable.
13991 (add_high_low_attributes): Add DW_AT_entry_pc and
13992 DW_AT_GNU_entry_view attributes if a pending entry is found
13993 in inline_entry_data_table. Add old entry_pc attribute only
13994 if debug nonbinding markers are disabled.
13995 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
13996 markers are enabled.
13997 (block_within_block_p, dwarf2out_inline_entry): New.
13998 (dwarf2out_finish): Check that no entries remained in
13999 inline_entry_data_table.
14000 * final.c (reemit_insn_block_notes): Handle inline entry notes.
14001 (final_scan_insn, notice_source_line): Likewise.
14002 (rest_of_clean_state): Skip inline entry markers.
14003 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
14005 * gimple.c (gimple_build_debug_inline_entry): New.
14006 * gimple.h (enum gimple_debug_subcode): Add
14007 GIMPLE_DEBUG_INLINE_ENTRY.
14008 (gimple_build_debug_inline_entry): Declare.
14009 (gimple_debug_inline_entry_p): New.
14010 (gimple_debug_nonbind_marker_p): Adjust.
14011 * insn-notes.def (INLINE_ENTRY): New.
14012 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
14013 inline entry marker notes.
14014 (print_insn): Likewise.
14015 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
14016 (INSN_DEBUG_MARKER_KIND): Likewise.
14017 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
14018 * tree-inline.c (expand_call_inline): Build and insert
14019 debug_inline_entry stmt.
14020 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
14021 inline entry blocks early, if nonbind markers are enabled.
14022 (dump_scope_block): Dump fragment info.
14023 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
14024 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
14025 (gimple_build_debug_inline_entry): New.
14026 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
14027 Enable/disable inline entry points too.
14028 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
14029 (DEBUG_INSN): Describe inline entry markers.
14031 * common.opt (gvariable-location-views): New.
14032 (gvariable-location-views=incompat5): New.
14033 * config.in: Rebuilt.
14034 * configure: Rebuilt.
14035 * configure.ac: Test assembler for view support.
14036 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
14037 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
14038 * dwarf2out.c (var_loc_view): New typedef.
14039 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
14040 (dwarf2out_locviews_in_attribute): New.
14041 (dwarf2out_locviews_in_loclist): New.
14042 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
14043 (enum dw_line_info_opcode): Add LI_adv_address.
14044 (struct dw_line_info_table): Add view.
14045 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
14046 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
14047 (zero_view_p): New variable.
14048 (ZERO_VIEW_P): New macro.
14049 (output_asm_line_debug_info): New.
14050 (struct var_loc_node): Add view.
14051 (add_AT_view_list, AT_loc_list): New.
14052 (add_var_loc_to_decl): Add view param. Test it against last.
14053 (new_loc_list): Add view params. Record them.
14054 (AT_loc_list_ptr): Handle loc and view lists.
14055 (view_list_to_loc_list_val_node): New.
14056 (print_dw_val): Handle dw_val_class_view_list.
14057 (size_of_die): Likewise.
14058 (value_format): Likewise.
14059 (loc_list_has_views): New.
14060 (gen_llsym): Set vl_symbol too.
14061 (maybe_gen_llsym, skip_loc_list_entry): New.
14062 (dwarf2out_maybe_output_loclist_view_pair): New.
14063 (output_loc_list): Output view list or entries too.
14064 (output_view_list_offset): New.
14065 (output_die): Handle dw_val_class_view_list.
14066 (output_dwarf_version): New.
14067 (output_compilation_unit_header): Use it.
14068 (output_skeleton_debug_sections): Likewise.
14069 (output_rnglists, output_line_info): Likewise.
14070 (output_pubnames, output_aranges): Update version comments.
14071 (output_one_line_info_table): Output view numbers in asm comments.
14072 (dw_loc_list): Determine current endview, pass it to new_loc_list.
14073 Call maybe_gen_llsym.
14074 (loc_list_from_tree_1): Adjust.
14075 (add_AT_location_description): Create view list attribute if
14076 needed, check it's absent otherwise.
14077 (convert_cfa_to_fb_loc_list): Adjust.
14078 (maybe_emit_file): Call output_asm_line_debug_info for test.
14079 (dwarf2out_var_location): Reset views as needed. Precompute
14080 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
14081 attribute. Set view.
14082 (new_line_info_table): Reset next view.
14083 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
14084 (dwarf2out_source_line): Likewise. Output view resets and labels to
14085 the assembler, or select appropriate line info opcodes.
14086 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
14087 (optimize_string_length): Catch it. Adjust.
14088 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
14089 dw_val_class_view_list, and remove it if no longer needed.
14090 (hash_loc_list): Hash view numbers.
14091 (loc_list_hasher::equal): Compare them.
14092 (optimize_location_lists): Check whether a view list symbol is
14093 needed, and whether the locview attribute is present, and
14094 whether they match. Remove the locview attribute if no longer
14096 (index_location_lists): Call skip_loc_list_entry for test.
14097 (dwarf2out_finish): Call output_asm_line_debug_info for test.
14098 Use output_dwarf_version.
14099 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
14100 (struct dw_val_node): Add val_view_list.
14101 * final.c (SEEN_NEXT_VIEW): New.
14102 (set_next_view_needed): New.
14103 (clear_next_view_needed): New.
14104 (maybe_output_next_view): New.
14105 (final_start_function): Rename to...
14106 (final_start_function_1): ... this. Take pointer to FIRST,
14107 add SEEN parameter. Emit param bindings in the initial view.
14108 (final_start_function): Reintroduce SEEN-less interface.
14109 (final): Rename to...
14110 (final_1): ... this. Take SEEN parameter. Output final pending
14111 next view at the end.
14112 (final): Reintroduce seen-less interface.
14113 (final_scan_insn): Output pending next view before switching
14114 sections or ending a block. Mark the next view as needed when
14115 outputting variable locations. Notify debug backend of section
14116 changes, and of location view changes.
14117 (rest_of_handle_final): Adjust.
14118 * toplev.c (process_options): Autodetect value for debug variable
14119 location views option. Warn on incompat5 without -gdwarf-5.
14120 * doc/invoke.texi (gvariable-location-views): New.
14121 (gvariable-location-views=incompat5): New.
14122 (gno-variable-location-views): New.
14124 2018-02-08 David Malcolm <dmalcolm@redhat.com>
14126 PR tree-optimization/84136
14127 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
14128 that the result of find_edge is non-NULL.
14130 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14133 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
14134 storing integer register in SImode. Fix cost of 256 and 512
14135 byte aligned SSE register store.
14137 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14139 * config/i386/i386.c (ix86_multiplication_cost): Fix
14140 multiplication cost for TARGET_AVX512DQ.
14142 2018-02-08 Marek Polacek <polacek@redhat.com>
14144 PR tree-optimization/84238
14145 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
14148 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14150 PR tree-optimization/84265
14151 * tree-vect-stmts.c (vectorizable_store): Don't treat
14152 VMAT_CONTIGUOUS accesses as grouped.
14153 (vectorizable_load): Likewise.
14155 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14157 PR tree-optimization/81635
14158 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
14159 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
14160 (test_round_for_mask): New functions.
14161 (wide_int_cc_tests): Call test_round_for_mask.
14162 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
14163 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
14164 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
14165 range returned by get_range_info.
14167 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
14170 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
14171 * symtab.c: Include builtins.h
14172 (symtab_node::output_to_lto_symbol_table_p): Move here
14173 from lto-streamer-out.c:output_symbol_p.
14174 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
14175 (output_symbol_p): Move all logic to symtab.c
14176 (produce_symtab): Update.
14178 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14180 * config/s390/s390-opts.h (enum indirect_branch): Define.
14181 * config/s390/s390-protos.h (s390_return_addr_from_memory)
14182 (s390_indirect_branch_via_thunk)
14183 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
14184 (enum s390_indirect_branch_type): Define.
14185 * config/s390/s390.c (struct s390_frame_layout, struct
14186 machine_function): Remove.
14187 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
14188 (indirect_branch_table_label_no, indirect_branch_table_name):
14190 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
14191 (enum s390_indirect_branch_option): Define.
14192 (s390_return_addr_from_memory): New function.
14193 (s390_handle_string_attribute): New function.
14194 (s390_attribute_table): Add new attribute handler.
14195 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
14196 (s390_indirect_branch_via_thunk): New function.
14197 (s390_indirect_branch_via_inline_thunk): New function.
14198 (s390_function_ok_for_sibcall): When jumping via thunk disallow
14199 sibling call optimization for non z10 compiles.
14200 (s390_emit_call): Force indirect branch target to be a single
14201 register. Add r1 clobber for non-z10 compiles.
14202 (s390_emit_epilogue): Emit return jump via return_use expander.
14203 (s390_reorg): Handle JUMP_INSNs as execute targets.
14204 (s390_option_override_internal): Perform validity checks for the
14205 new command line options.
14206 (s390_indirect_branch_attrvalue): New function.
14207 (s390_indirect_branch_settings): New function.
14208 (s390_set_current_function): Invoke s390_indirect_branch_settings.
14209 (s390_output_indirect_thunk_function): New function.
14210 (s390_code_end): Implement target hook.
14211 (s390_case_values_threshold): Implement target hook.
14212 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
14214 * config/s390/s390.h (struct s390_frame_layout)
14215 (struct machine_function): Move here from s390.c.
14216 (TARGET_INDIRECT_BRANCH_NOBP_RET)
14217 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
14218 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
14219 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
14220 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
14221 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
14222 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
14223 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
14224 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
14225 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
14226 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
14227 (mnemonic attribute): Add values which aren't recognized
14229 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
14230 pattern for branch conversion. Fix mnemonic attribute.
14231 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
14232 indirect branch via thunk if requested.
14233 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
14234 ("*indirect_jump"): Disable for branch conversion using out of
14236 ("indirect_jump_via_thunk<mode>_z10")
14237 ("indirect_jump_via_thunk<mode>")
14238 ("indirect_jump_via_inlinethunk<mode>_z10")
14239 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
14240 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
14241 ("casesi_jump_via_inlinethunk<mode>_z10")
14242 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
14243 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
14244 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
14245 ("*indirect2_jump"): Disable for branch conversion.
14246 ("casesi_jump"): Turn into expander and expand patterns for branch
14248 ("return_use"): New expander.
14249 ("*return"): Emit return via thunk and rename it to ...
14250 ("*return<mode>"): ... this one.
14251 * config/s390/s390.opt: Add new options and and enum for the
14254 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14256 * lra-constraints.c (match_reload): Unconditionally use
14257 gen_lowpart_SUBREG, rather than selecting between that
14258 and equivalent gen_rtx_SUBREG code.
14260 2018-02-08 Richard Biener <rguenther@suse.de>
14262 PR tree-optimization/84233
14263 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
14264 changed flag instead of boguously re-using phi_inserted.
14266 2018-02-08 Martin Jambor <mjambor@suse.cz>
14268 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
14269 static local variables.
14271 2018-02-08 Richard Biener <rguenther@suse.de>
14273 PR tree-optimization/84278
14274 * tree-vect-stmts.c (vectorizable_store): When looking for
14275 smaller vector types to perform grouped strided loads/stores
14276 make sure the mode is supported by the target.
14277 (vectorizable_load): Likewise.
14279 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14281 * config/aarch64/aarch64.c (aarch64_components_for_bb):
14282 Increase LDP/STP opportunities by adding adjacent callee-saves.
14284 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
14286 PR rtl-optimization/84068
14287 PR rtl-optimization/83459
14288 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
14290 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
14292 PR tree-optimization/84224
14293 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
14294 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
14295 non-zero arguments.
14297 2018-02-07 Iain Sandoe <iain@codesourcery.com>
14300 * config/rs6000/altivec.md (*restore_world): Remove LR use.
14301 * config/rs6000/predicates.md (restore_world_operation): Adjust op
14302 count, remove one USE.
14304 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
14306 * doc/install.texi (Configuration): Document the
14307 --with-long-double-format={ibm,ieee} PowerPC configuration
14311 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
14312 Convert from define_expand to be define_insn_and_split. Rework
14313 float/double/_Float128 conversions to QI/HI/SImode to work with
14314 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
14315 conversions to QI/HImode types did a store and then a load to
14316 truncate the value. For conversions to VSX registers, don't split
14317 the insn, instead emit the code directly. Use the code iterator
14318 any_fix to combine signed and unsigned conversions.
14319 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
14320 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
14321 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14322 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
14323 (fix_<mode>di2_hw): Likewise.
14324 (fixuns_<mode>di2_hw): Likewise.
14325 (fix_<mode>si2_hw): Likewise.
14326 (fixuns_<mode>si2_hw): Likewise.
14327 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
14328 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
14329 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
14330 fix<uns>_trunc<SFDF:mode>si2_p8.
14331 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
14332 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
14333 (fix<uns>_<mode>_mem): Likewise.
14334 (fctiw<u>z_<mode>_mem): Likewise.
14335 (fix<uns>_<mode>_mem): Likewise.
14336 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
14337 the register allocator from doing a direct move to the GPRs to do
14338 a store, and instead use the ISA 3.0 store byte/half-word from
14339 vector register instruction. For IEEE 128-bit floating point,
14340 also optimize stores of 32-bit ints.
14341 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
14343 2018-02-07 Alan Hayward <alan.hayward@arm.com>
14345 * genextract.c (push_pathstr_operand): New function to support
14347 (walk_rtx): Call push_pathstr_operand.
14348 (print_path): Support [a-zA-Z].
14350 2018-02-07 Richard Biener <rguenther@suse.de>
14352 PR tree-optimization/84037
14353 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
14354 (cse_and_gimplify_to_preheader): Declare.
14355 (vect_get_place_in_interleaving_chain): Likewise.
14356 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14358 (_loop_vec_info::~_loop_vec_info): Delete it.
14359 (cse_and_gimplify_to_preheader): New function.
14360 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
14361 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
14362 (vectorizable_load): Likewise. For grouped stores always base
14363 the IV on the first element.
14364 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
14365 condition before gimplifying.
14367 2018-02-07 Jakub Jelinek <jakub@redhat.com>
14369 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
14370 *DIV_EXPR and *MOD_EXPR.
14372 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
14375 * config/i386/i386.c (ix86_option_override_internal): Mask out
14376 the CF_SET bit when checking -fcf-protection.
14378 2018-02-07 Tom de Vries <tom@codesourcery.com>
14381 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
14384 2018-02-07 Richard Biener <rguenther@suse.de>
14386 PR tree-optimization/84204
14387 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
14390 PR tree-optimization/84205
14391 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
14392 special-case isl_ast_op_zdiv_r.
14394 PR tree-optimization/84223
14395 * graphite-scop-detection.c (gather_bbs::before_dom_children):
14396 Only add conditions from within the region.
14397 (gather_bbs::after_dom_children): Adjust.
14399 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
14402 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
14403 * config/avr/avr.md: Only post-reload split REG-REG moves if
14404 either register is GENERAL_REG_P.
14406 2018-02-07 Jakub Jelinek <jakub@redhat.com>
14408 PR tree-optimization/84235
14409 * tree-ssa-scopedtables.c
14410 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
14411 if the subtraction is performed in floating point type where NaNs are
14412 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
14413 build 1. Formatting fix.
14415 2018-02-06 Jakub Jelinek <jakub@redhat.com>
14418 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
14419 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
14420 and skip it regardless of bb boundaries. Use CALL_P macro,
14421 don't test INSN_P (insn) together with CALL_P or JUMP_P check
14422 unnecessarily, formatting fix.
14424 2018-02-06 Michael Collison <michael.collison@arm.com>
14426 * config/arm/thumb2.md:
14427 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
14428 (*thumb_mov_notscc): Ditto.
14430 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
14433 * config/rs6000/rs6000.md (su code attribute): Use "u" for
14434 unsigned_fix, not "s".
14436 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14438 * configure.ac (gcc_fn_eh_frame_ro): New function.
14439 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
14440 correct .eh_frame permissions.
14441 * configure: Regenerate.
14443 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
14445 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
14446 irrelevant options.
14448 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14450 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14451 Display warning message for -mno-speculate-indirect-jumps.
14453 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
14455 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
14457 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
14459 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
14461 PR tree-optimization/84225
14462 * tree-eh.c (find_trapping_overflow): Only call
14463 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
14465 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14468 * config/i386/i386.c: Reimplement the check of possible options
14469 -mibt/-mshstk conbination. Change error messages.
14470 * doc/invoke.texi: Fix a typo: remove extra '='.
14472 2018-02-06 Marek Polacek <polacek@redhat.com>
14474 PR tree-optimization/84228
14475 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
14477 2018-02-06 Tamar Christina <tamar.christina@arm.com>
14480 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
14481 emitted arch directives.
14482 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
14483 __ARM_FEATURE_COPROC before changing architectures.
14485 2018-02-06 Richard Biener <rguenther@suse.de>
14487 * config/i386/i386.c (print_reg): Fix typo.
14488 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
14490 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
14492 * configure: Regenerate.
14494 2018-02-05 Martin Sebor <msebor@redhat.com>
14496 PR tree-optimization/83369
14497 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
14500 2018-02-05 Martin Liska <mliska@suse.cz>
14502 * doc/invoke.texi: Cherry-pick upstream r323995.
14504 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
14506 * ira.c (ira_init_register_move_cost): Adjust comment.
14508 2018-02-05 Martin Liska <mliska@suse.cz>
14510 PR gcov-profile/84137
14511 * doc/gcov.texi: Fix typo in documentation.
14513 2018-02-05 Martin Liska <mliska@suse.cz>
14515 PR gcov-profile/83879
14516 * doc/gcov.texi: Document necessity of --dynamic-list-data when
14517 using dlopen functionality.
14519 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
14521 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
14522 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
14523 _mm_maskz_range_ss, _mm_mask_range_round_ss,
14524 _mm_maskz_range_round_ss): New intrinsics.
14525 (__builtin_ia32_rangesd128_round)
14526 (__builtin_ia32_rangess128_round): Remove.
14527 (__builtin_ia32_rangesd128_mask_round,
14528 __builtin_ia32_rangess128_mask_round): New builtins.
14529 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
14530 __builtin_ia32_rangess128_round): Remove.
14531 (__builtin_ia32_rangesd128_mask_round,
14532 __builtin_ia32_rangess128_mask_round): New builtins.
14533 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
14534 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
14535 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
14536 "<round_saeonly_constraint>")): Changed to ...
14537 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
14538 "<round_saeonly_scalar_constraint>")): ... this.
14539 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
14540 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
14541 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
14542 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
14543 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
14545 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
14547 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
14549 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
14550 Remove all values except native, 8540 and 8548.
14552 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
14554 * config/i386/i386.c (ix86_output_function_return): Pass
14555 INVALID_REGNUM, instead of -1, as invalid register number to
14556 indirect_thunk_name and output_indirect_thunk.
14558 2018-02-02 Julia Koval <julia.koval@intel.com>
14560 * config.gcc: Add -march=icelake.
14561 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
14562 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
14563 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
14564 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
14565 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
14566 (processor_target_table): Add icelake.
14567 (ix86_option_override_internal): Handle new PTAs.
14568 (get_builtin_code_for_version): Handle icelake.
14569 (M_INTEL_COREI7_ICELAKE): New.
14570 (fold_builtin_cpu): Handle icelake.
14571 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
14572 * doc/invoke.texi: Add -march=icelake.
14574 2018-02-02 Julia Koval <julia.koval@intel.com>
14576 * config/i386/i386.c (ix86_option_override_internal): Change flags type
14577 to wide_int_bitmask.
14578 * wide-int-bitmask.h: New.
14580 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14583 * config/i386/i386.md: Replace Pmode with word_mode in
14584 builtin_setjmp_setup and builtin_longjmp to support x32.
14586 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
14590 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
14592 (rs6000_supported_cpu_names): New static variable.
14593 (linux_cpu_translation_table): Likewise.
14594 (elf_platform) <cpu>: Define new static variable and use it.
14595 Translate kernel AT_PLATFORM name to canonical name if needed.
14596 Error if platform name is unknown.
14598 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
14601 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
14603 2018-02-01 Jeff Law <law@redhat.com>
14606 * config/i386/i386.c (release_scratch_register_on_entry): Add new
14607 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
14608 the scratch if RELEASE_VIA_POP is false.
14609 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
14610 If we have to save a temporary register, decrement SIZE appropriately.
14611 Pass new arguments to release_scratch_register_on_entry.
14612 (ix86_adjust_stack_and_probe): Likewise.
14613 (ix86_emit_probe_stack_range): Pass new arguments to
14614 release_scratch_register_on_entry.
14616 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
14618 PR rtl-optimization/84157
14619 * combine.c (change_zero_ext): Use REG_P predicate in
14620 front of HARD_REGISTER_P predicate.
14622 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
14624 * config/avr/avr.c (avr_option_override): Move disabling of
14625 -fdelete-null-pointer-checks to...
14626 * common/config/avr/avr-common.c (avr_option_optimization_table):
14629 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14631 PR tree-optimization/81635
14632 * tree-data-ref.c (split_constant_offset_1): For types that
14633 wrap on overflow, try to use range info to prove that wrapping
14636 2018-02-01 Renlin Li <renlin.li@arm.com>
14639 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
14640 TAILCALL_ADDR_REGS.
14641 (aarch64_register_move_cost): Likewise.
14642 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
14643 TAILCALL_ADDR_REGS.
14644 (REG_CLASS_NAMES): Likewise.
14645 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
14646 TAILCALL_ADDR_REGS. Remove IP registers.
14647 * config/aarch64/aarch64.md (Ucs): Update register constraint.
14649 2018-02-01 Richard Biener <rguenther@suse.de>
14651 * domwalk.h (dom_walker::dom_walker): Add additional constructor
14652 for specifying RPO order and allow NULL for that.
14653 * domwalk.c (dom_walker::dom_walker): Likewise.
14654 (dom_walker::walk): Handle NULL RPO order.
14655 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
14657 (rewrite_update_dom_walker): Likewise.
14658 (mark_def_dom_walker): Likewise.
14660 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14662 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
14663 (aarch64_maybe_expand_sve_subreg_move): Declare.
14664 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
14665 * config/aarch64/predicates.md (aarch64_any_register_operand): New
14667 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
14668 that are semantically a reverse operation.
14669 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
14670 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
14671 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
14673 (aarch64_can_change_mode_class): For big-endian, forbid changes
14674 between two SVE modes if they have different element sizes.
14676 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14678 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
14679 the TImode handling for big-endian targets.
14681 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14683 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
14684 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
14686 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
14687 Remove BSWAP handing for big-endian targets and use the form of
14688 LD1RQ appropariate for the mode.
14690 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14692 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
14693 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
14694 duplicated element.
14696 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
14699 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
14700 check for operands that need to go through aarch64_sve_reload_be.
14702 2018-02-01 Jakub Jelinek <jakub@redhat.com>
14704 PR tree-optimization/81661
14705 PR tree-optimization/84117
14706 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
14707 * tree-eh.c: Include gimplify.h.
14708 (find_trapping_overflow, replace_trapping_overflow,
14709 rewrite_to_non_trapping_overflow): New functions.
14710 * tree-vect-loop.c: Include tree-eh.h.
14711 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
14712 * tree-data-ref.c: Include tree-eh.h.
14713 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
14715 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
14717 PR rtl-optimization/84123
14718 * combine.c (change_zero_ext): Check if hard register satisfies
14719 can_change_dest_mode before calling gen_lowpart_SUBREG.
14721 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
14724 * ira.c (ira_init_register_move_cost): Remove assert.
14726 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14728 PR rtl-optimization/84071
14729 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
14730 * doc/tm.texi: Regenerate.
14732 2018-01-31 Richard Biener <rguenther@suse.de>
14734 PR tree-optimization/84132
14735 * tree-data-ref.c (analyze_miv_subscript): Properly
14736 check whether evolution_function_is_affine_multivariate_p
14737 before calling gcd_of_steps_may_divide_p.
14739 2018-01-31 Julia Koval <julia.koval@intel.com>
14742 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
14743 * config/i386/i386.md (rdpid_rex64) New.
14744 (rdpid): Make 32bit only.
14746 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
14749 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
14750 an IDENTIFIER_NODE for FUNCTION_TYPE's.
14752 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14755 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
14757 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14759 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
14761 PR rtl-optimization/84071
14762 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
14763 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
14765 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14767 * config/arc/arc.c (arc_handle_aux_attribute): New function.
14768 (arc_attribute_table): Add 'aux' attribute.
14769 (arc_in_small_data_p): Consider aux like variables.
14770 (arc_is_aux_reg_p): New function.
14771 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
14772 (arc_get_aux_arg): New function.
14773 (prepare_move_operands): Handle aux-register access.
14774 (arc_handle_aux_attribute): New function.
14775 * doc/extend.texi (ARC Variable attributes): Add subsection.
14777 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
14779 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
14780 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
14781 (arc_attribute_table): Add 'uncached' attribute.
14782 (arc_print_operand): Print '.di' flag for uncached memory
14784 (arc_in_small_data_p): Do not consider for small data the uncached
14786 (arc_is_uncached_mem_p): New function.
14787 * config/arc/predicates.md (compact_store_memory_operand): Check
14788 for uncached memory accesses.
14789 (nonvol_nonimm_operand): Likewise.
14790 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
14792 2018-01-31 Jakub Jelinek <jakub@redhat.com>
14795 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
14796 falign-loops=): Add Optimization flag.
14798 2018-01-30 Jeff Law <law@redhat.com>
14801 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
14802 INT_REGISTERS_SAVED. Check it prior to calling
14803 get_scratch_register_on_entry.
14804 (ix86_adjust_stack_and_probe): Similarly.
14805 (ix86_emit_probe_stack_range): Similarly.
14806 (ix86_expand_prologue): Corresponding changes.
14808 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14811 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
14812 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
14814 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
14817 * lra-constraints.c (curr_insn_transform): Process AND in the
14820 2018-01-30 Jakub Jelinek <jakub@redhat.com>
14822 PR rtl-optimization/83986
14823 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
14824 dependence against last_pending_memory_flush in addition to
14825 pending_jump_insns.
14827 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
14829 PR tree-optimization/81611
14830 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
14833 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14836 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
14839 2018-01-30 Richard Biener <rguenther@suse.de>
14840 Jakub Jelinek <jakub@redhat.com>
14842 PR tree-optimization/84111
14843 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
14844 inner loops added during recursion, as they don't have up-to-date
14847 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14850 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
14851 (can_inline_edge_by_limits_p): ... here.
14852 (can_early_inline_edge_p, check_callers,
14853 update_caller_keys, update_callee_keys, recursive_inlining,
14854 add_new_edges_to_heap, speculation_useful_p,
14855 inline_small_functions,
14856 inline_small_functions, flatten_function,
14857 inline_to_all_callers_1): Update.
14859 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
14861 * profile-count.c (profile_count::combine_with_ipa_count): Handle
14864 2018-01-30 Richard Biener <rguenther@suse.de>
14866 PR tree-optimization/83008
14867 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
14868 invariant and constant vector uses in stmts when they need
14869 more than one stmt.
14871 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14874 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
14875 * configure: Regenerate.
14877 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14879 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
14881 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
14882 Use gen_rtx_REG rather than gen_lowpart.
14884 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14886 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
14887 rather than 0 when creating partial subregs.
14889 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
14891 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
14894 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
14897 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
14898 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
14899 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
14900 flags. This restores the settings used before the 2017-07-24.
14901 Turning off pre increment/decrement/modify allows IVOPTS to
14902 optimize DF/SF loops where the index is an int.
14904 2018-01-29 Richard Biener <rguenther@suse.de>
14905 Kelvin Nilsen <kelvin@gcc.gnu.org>
14908 * tree-vect-stmts.c (vectorizable_call): Don't call
14909 targetm.vectorize_builtin_md_vectorized_function if callee is
14912 2018-01-22 Carl Love <cel@us.ibm.com>
14914 * doc/extend.tex: Fix typo in second arg in
14915 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
14917 2018-01-29 Richard Biener <rguenther@suse.de>
14919 PR tree-optimization/84086
14920 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
14921 (flush_ssaname_freelist): When SSA names were released reset
14922 the SCEV hash table.
14924 2018-01-29 Richard Biener <rguenther@suse.de>
14926 PR tree-optimization/84057
14927 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
14928 removed paths when removing edges.
14930 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
14932 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
14933 -mfunction-return=@var{choice}.
14935 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
14937 PR diagnostic/84034
14938 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
14939 Handle CR like TAB.
14940 (layout::print_source_line): Likewise.
14941 (test_get_line_width_without_trailing_whitespace): Add test cases.
14943 2018-01-27 Jakub Jelinek <jakub@redhat.com>
14945 PR middle-end/84040
14946 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
14949 2018-01-26 Jim Wilson <jimw@sifive.com>
14951 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
14953 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
14956 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14958 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
14959 and CMP + SUB-immediate -> SUBS.
14961 2018-01-26 Martin Sebor <msebor@redhat.com>
14963 PR tree-optimization/83896
14964 * tree-ssa-strlen.c (get_string_len): Rename...
14965 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
14966 Avoid assuming length is constant.
14967 (handle_char_store): Use HOST_WIDE_INT for string length.
14969 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
14972 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
14973 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
14975 2018-01-26 Richard Biener <rguenther@suse.de>
14977 PR rtl-optimization/84003
14978 * dse.c (record_store): Only record redundant stores when
14979 the earlier store aliases at least all accesses the later one does.
14981 2018-01-26 Jakub Jelinek <jakub@redhat.com>
14983 PR rtl-optimization/83985
14984 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
14985 REG_CFA_RESTORE insns.
14986 (delete_unmarked_insns): Don't ignore separate shrink wrapping
14987 REG_CFA_RESTORE insns here.
14990 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
14991 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
14993 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
14995 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
14996 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
14997 (arc_init): Likewise.
14998 (arc_override_options): Likewise.
14999 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
15001 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
15003 * config/arc/arc.h (TARGET_DBNZ): Define.
15004 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
15005 properly set the tune attribute.
15006 (dbnz): Use TARGET_DBNZ guard.
15007 * config/arc/arc.opt (mtune): Add core3 option.
15009 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15011 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
15012 recognize new pic like addresses.
15013 (arc_delegitimize_address): Clean up.
15015 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15017 * config/arc/arc-arches.def: Option mrf16 valid for all
15019 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
15020 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
15021 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
15022 * config/arc/arc-tables.opt: Regenerate.
15023 * config/arc/arc.c (arc_conditional_register_usage): Handle
15024 reduced register file case.
15025 (arc_file_start): Set must have build attributes.
15026 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
15027 mrf16 option value.
15028 * config/arc/arc.opt (mrf16): Add new option.
15029 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
15030 * config/arc/genmultilib.awk: Handle new mrf16 option.
15031 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
15032 * config/arc/t-multilib: Regenerate.
15033 * doc/invoke.texi (ARC Options): Document mrf16 option.
15035 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15037 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
15038 * config/arc/arc.c (arc_handle_secure_attribute): New function.
15039 (arc_attribute_table): Add 'secure_call' attribute.
15040 (arc_print_operand): Print secure call operand.
15041 (arc_function_ok_for_sibcall): Don't optimize tail calls when
15043 (arc_is_secure_call_p): New function. * config/arc/arc.md
15044 (call_i): Add support for sjli instruction.
15045 (call_value_i): Likewise.
15046 * config/arc/constraints.md (Csc): New constraint.
15048 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15049 John Eric Martin <John.Martin@emmicro-us.com>
15051 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
15052 * config/arc/arc.c (_arc_jli_section): New struct.
15053 (arc_jli_section): New type.
15054 (rc_jli_sections): New static variable.
15055 (arc_handle_jli_attribute): New function.
15056 (arc_attribute_table): Add jli_always and jli_fixed attribute.
15057 (arc_file_end): New function.
15058 (TARGET_ASM_FILE_END): Define.
15059 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
15060 (arc_add_jli_section): New function.
15061 (jli_call_scan): Likewise.
15062 (arc_reorg): Call jli_call_scan.
15063 (arc_output_addsi): Remove 'S' from printing asm operand.
15064 (arc_is_jli_call_p): New function.
15065 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
15067 (movhi_insn): Likewise.
15068 (movsi_insn): Likewise.
15069 (movsi_set_cc_insn): Likewise.
15070 (loadqi_update): Likewise.
15071 (load_zeroextendqisi_update): Likewise.
15072 (load_signextendqisi_update): Likewise.
15073 (loadhi_update): Likewise.
15074 (load_zeroextendhisi_update): Likewise.
15075 (load_signextendhisi_update): Likewise.
15076 (loadsi_update): Likewise.
15077 (loadsf_update): Likewise.
15078 (movsicc_insn): Likewise.
15079 (bset_insn): Likewise.
15080 (bxor_insn): Likewise.
15081 (bclr_insn): Likewise.
15082 (bmsk_insn): Likewise.
15083 (bicsi3_insn): Likewise.
15084 (cmpsi_cc_c_insn): Likewise.
15085 (movsi_ne): Likewise.
15086 (movsi_cond_exec): Likewise.
15087 (clrsbsi2): Likewise.
15088 (norm_f): Likewise.
15098 (call_i): Remove 'S' asm letter, add jli instruction.
15099 (call_value_i): Likewise.
15100 * config/arc/arc.op (mjli-always): New option.
15101 * config/arc/constraints.md (Cji): New constraint.
15102 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
15104 (subsf3_fpx): Likewise.
15105 (mulsf3_fpx): Likewise.
15106 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
15108 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
15109 function attrbutes.
15110 * doc/invoke.texi (ARC): Document mjli-always option.
15112 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
15114 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
15115 avoid addition with 0 and use incw and decw where possible.
15117 2018-01-26 Richard Biener <rguenther@suse.de>
15119 PR tree-optimization/81082
15120 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
15121 association if it requires casting to unsigned.
15122 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
15123 from fold_plusminus_mult_expr to catch important cases late when
15124 range info is available.
15126 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15128 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
15129 * configure.ac (hidden_linkonce): New test.
15130 * configure: Regenerate.
15131 * config.in: Regenerate.
15133 2018-01-26 Julia Koval <julia.koval@intel.com>
15135 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
15136 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
15137 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
15138 _mm_mask_bitshuffle_epi64_mask): Fix type.
15139 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
15140 USI_FTYPE_V4DI_V4DI_USI): Remove.
15141 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
15142 __builtin_ia32_vpshufbitqmb256_mask,
15143 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
15144 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
15145 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
15147 2018-01-26 Alan Modra <amodra@gmail.com>
15150 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
15151 UNSPEC_VBPERMQ. Sort other unspecs.
15153 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
15155 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
15157 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
15159 PR middle-end/83055
15160 * predict.c (drop_profile): Do not push/pop cfun; update also
15162 (handle_missing_profiles): Fix logic looking for zero profiles.
15164 2018-01-25 Jakub Jelinek <jakub@redhat.com>
15166 PR middle-end/83977
15167 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
15168 on functions with #pragma omp declare simd or functions with simd
15170 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
15171 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
15172 Remove trailing \n from warning_at calls.
15174 2018-01-25 Tom de Vries <tom@codesourcery.com>
15177 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15178 for neutered workers.
15180 2018-01-24 Joseph Myers <joseph@codesourcery.com>
15183 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
15184 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
15186 2018-01-24 Jeff Law <law@redhat.com>
15189 * i386.c (get_probe_interval): Move to earlier point.
15190 (ix86_compute_frame_layout): If -fstack-clash-protection and
15191 the frame is larger than the probe interval, then use pushes
15192 to save registers rather than reg->mem moves.
15193 (ix86_expand_prologue): Remove conditional for int_registers_saved
15196 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
15199 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
15200 min/max for never referenced object.
15202 2018-01-24 Jakub Jelinek <jakub@redhat.com>
15204 PR middle-end/83977
15205 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
15207 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
15208 attributes from DECL_ATTRIBUTES (decl) without affecting
15209 DECL_ATTRIBUTES (current_function_decl).
15210 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
15211 functions with non-NULL DECL_ABSTRACT_ORIGIN.
15213 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
15215 PR tree-optimization/83979
15216 * fold-const.c (fold_comparison): Use constant_boolean_node
15217 instead of boolean_{true,false}_node.
15219 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
15221 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
15224 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15226 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15227 Simplify the clause that sets the length attribute.
15228 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15229 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
15230 clause that sets the length attribute.
15231 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15233 2018-01-24 Tom de Vries <tom@codesourcery.com>
15236 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
15237 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
15238 Add strict parameter.
15239 (prevent_branch_around_nothing): Insert dummy insn between branch to
15240 label and label with no ptx insn inbetween.
15241 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
15243 2018-01-24 Tom de Vries <tom@codesourcery.com>
15246 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15247 for neutered threads in warp.
15248 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
15250 2018-01-24 Richard Biener <rguenther@suse.de>
15252 PR tree-optimization/83176
15253 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
15256 2018-01-24 Richard Biener <rguenther@suse.de>
15258 PR tree-optimization/82819
15259 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
15260 code generating pluses that are no-ops in the target precision.
15262 2018-01-24 Richard Biener <rguenther@suse.de>
15264 PR middle-end/84000
15265 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
15267 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15269 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
15270 to merge probabilities.
15271 * predict.c (probably_never_executed): Also mark as cold functions
15272 with global 0 profile and guessed local profile.
15273 * profile-count.c (profile_probability::combine_with_count): New
15275 * profile-count.h (profile_probability::operator*,
15276 profile_probability::operator*=, profile_probability::operator/,
15277 profile_probability::operator/=): Reduce precision to adjusted
15278 and set value to guessed on contradictory divisions.
15279 (profile_probability::combine_with_freq): Remove.
15280 (profile_probability::combine_wiht_count): Declare.
15281 (profile_count::force_nonzero):: Set to adjusted.
15282 (profile_count::probability_in):: Set quality to adjusted.
15283 * tree-ssa-tail-merge.c (replace_block_by): Use
15284 combine_with_count.
15286 2018-01-23 Andrew Waterman <andrew@sifive.com>
15287 Jim Wilson <jimw@sifive.com>
15289 * config/riscv/riscv.c (riscv_stack_boundary): New.
15290 (riscv_option_override): Set riscv_stack_boundary. Handle
15291 riscv_preferred_stack_boundary_arg.
15292 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
15293 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
15294 (STACK_BOUNDARY): Set to riscv_stack_boundary.
15295 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
15296 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
15297 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
15299 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
15302 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
15303 of struct ix86_frame.
15304 (ix86_expand_epilogue): Likewise. Add a local variable for
15305 the reg_save_offset field in struct ix86_frame.
15307 2018-01-23 Bin Cheng <bin.cheng@arm.com>
15309 PR tree-optimization/82604
15310 * tree-loop-distribution.c (enum partition_kind): New enum item
15311 PKIND_PARTIAL_MEMSET.
15312 (partition_builtin_p): Support above new enum item.
15313 (generate_code_for_partition): Ditto.
15314 (compute_access_range): Differentiate cases that equality can be
15315 proven at all loops, the innermost loops or no loops.
15316 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
15317 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
15318 (finalize_partitions, distribute_loop): Don't fuse partition of
15319 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
15320 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
15321 parloop is enabled.
15323 2018-01-23 Martin Liska <mliska@suse.cz>
15325 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
15326 order to ignore the predictor.
15327 (PRED_POLYMORPHIC_CALL): Likewise.
15328 (PRED_RECURSIVE_CALL): Likewise.
15330 2018-01-23 Martin Liska <mliska@suse.cz>
15332 * tree-profile.c (tree_profiling): Print function header to
15333 aware reader which function we are working on.
15334 * value-prof.c (gimple_find_values_to_profile): Do not print
15335 not interesting value histograms.
15337 2018-01-23 Martin Liska <mliska@suse.cz>
15339 * profile-count.h (enum profile_quality): Add
15340 profile_uninitialized as the first value. Do not number values
15341 as they are zero based.
15342 (profile_count::verify): Update sanity check.
15343 (profile_probability::verify): Likewise.
15345 2018-01-23 Nathan Sidwell <nathan@acm.org>
15347 * doc/invoke.texi (ffor-scope): Deprecate.
15349 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15351 PR tree-optimization/83510
15352 * domwalk.c (set_all_edges_as_executable): New function.
15353 (dom_walker::dom_walker): Convert bool param
15354 "skip_unreachable_blocks" to enum reachability. Move setup of
15355 edge flags to set_all_edges_as_executable and only do it when
15356 reachability is REACHABLE_BLOCKS.
15357 * domwalk.h (enum dom_walker::reachability): New enum.
15358 (dom_walker::dom_walker): Convert bool param
15359 "skip_unreachable_blocks" to enum reachability.
15360 (set_all_edges_as_executable): New decl.
15361 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
15362 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
15364 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
15365 but converting true to REACHABLE_BLOCKS.
15366 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
15368 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
15369 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
15370 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
15372 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
15373 if check_all_array_refs will be called.
15375 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15377 * tree.c (selftest::test_location_wrappers): Add more test
15380 2018-01-23 David Malcolm <dmalcolm@redhat.com>
15382 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
15383 (selftest::test_bit_in_range): Likewise.
15385 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
15388 * doc/sourcebuild.texi (vect_float): Say that the selector
15389 only describes the situation when -funsafe-math-optimizations is on.
15390 (vect_float_strict): Document.
15392 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
15394 PR tree-optimization/83965
15395 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15396 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
15397 instead of checking only for a reduction.
15398 (vect_recog_widen_sum_pattern): Likewise.
15400 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15402 * predict.c (probably_never_executed): Only use precise profile info.
15403 (compute_function_frequency): Skip after inlining hack since we now
15404 have quality checking.
15406 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
15408 * profile-count.h (profile_probability::very_unlikely,
15409 profile_probability::unlikely, profile_probability::even): Set
15410 precision to guessed.
15412 2018-01-23 Richard Biener <rguenther@suse.de>
15414 PR tree-optimization/83963
15415 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
15416 Properly terminate dominator walk when crossing the exit edge not
15417 when visiting its source block.
15419 2018-01-23 Jakub Jelinek <jakub@redhat.com>
15422 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
15423 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
15425 2018-01-22 Jakub Jelinek <jakub@redhat.com>
15427 PR tree-optimization/83957
15428 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
15429 semicolon after for body surrounded by braces.
15431 PR tree-optimization/83081
15432 * profile-count.h (profile_probability::split): New method.
15433 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
15434 Use profile_probability::split.
15435 (do_compare_rtx_and_jump): Fix adjustment of probabilities
15436 when splitting a single conditional jump into 2.
15438 2018-01-22 David Malcolm <dmalcolm@redhat.com>
15440 PR tree-optimization/69452
15441 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
15444 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15446 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
15447 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
15448 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
15450 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15452 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
15454 * config/rl78/rl78.md (movdi): New define_expand.
15455 * config/rl78/rl78.c (rl78_split_movdi): New function.
15457 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
15460 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
15462 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
15463 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
15464 128-bit to produce an UNSPEC move to get the double word with the
15465 signbit and then a shift directly to do signbit.
15466 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
15467 implementation with a new version that just does either a direct
15468 move or a regular move. Move memory interface to separate insns.
15469 Move insns so they are next to the expander.
15470 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
15471 with signbit move. Split big and little endian case.
15472 (signbit<mode>2_dm_mem_le): Likewise.
15473 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
15474 (signbit<mode>2_dm2): Likewise.
15476 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15478 * config/rl78/rl78.md (anddi3): New define_expand.
15480 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15482 * config/rl78/rl78.md (umindi3): New define_expand.
15484 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15486 * config/rl78/rl78.md (smindi3): New define_expand.
15488 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15490 * config/rl78/rl78.md (smaxdi3): New define_expand.
15492 2018-01-22 Carl Love <cel@us.ibm.com>
15494 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
15495 LVX_V1TI): Add macro expansion.
15496 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
15497 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
15498 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
15499 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
15500 Change check to determine if the instruction is a byte reversing
15501 entry. Fix typo in comment.
15502 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
15503 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
15504 Add def_builtin calls for new builtins.
15505 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
15506 Add define_insn expansion.
15508 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15510 * config/rl78/rl78.md (umaxdi3): New define_expand.
15512 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
15514 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
15515 for non-QImode registers.
15517 2018-01-22 Richard Biener <rguenther@suse.de>
15519 PR tree-optimization/83963
15520 * graphite-scop-detection.c (scop_detection::get_sese): Delay
15521 including the loop exit block.
15522 (scop_detection::merge_sese): Likewise.
15523 (scop_detection::add_scop): Do it here instead.
15525 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15527 * doc/sourcebuild.texi (arm_softfloat): Document.
15529 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
15532 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
15533 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
15534 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
15536 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15537 David Edelsohn <dje.gcc@gmail.com>
15540 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15541 Change "crset eq" to "crset 2".
15542 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15543 (*call_indirect_aix<mode>_nospec): Likewise.
15544 (*call_value_indirect_aix<mode>_nospec): Likewise.
15545 (*call_indirect_elfv2<mode>_nospec): Likewise.
15546 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
15547 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
15548 change assembly output from . to $.
15549 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15550 (indirect_jump<mode>_nospec): Change assembly output from . to $.
15551 (*tablejump<mode>_internal1_nospec): Likewise.
15553 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
15556 * config/sh/sh_optimize_sett_clrt.cc:
15557 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
15559 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
15561 PR tree-optimization/83940
15562 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
15563 offset_dt to vect_constant_def rather than vect_unknown_def_type.
15564 (vect_check_load_store_mask): Add a mask_dt_out parameter and
15565 use it to pass back the definition type.
15566 (vect_check_store_rhs): Likewise rhs_dt_out.
15567 (vect_build_gather_load_calls): Add a mask_dt argument and use
15568 it instead of a call to vect_is_simple_use.
15569 (vectorizable_store): Update calls to vect_check_load_store_mask
15570 and vect_check_store_rhs. Use the dt returned by the latter instead
15571 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
15572 instead of calls to vect_is_simple_use. Pass the scalar rather
15573 than the vector operand to vect_is_simple_use when handling
15574 second and subsequent copies of an rhs value.
15575 (vectorizable_load): Update calls to vect_check_load_store_mask
15576 and vect_build_gather_load_calls. Use the cached mask_dt and
15577 gs_info.offset_dt instead of calls to vect_is_simple_use.
15579 2018-01-20 Jakub Jelinek <jakub@redhat.com>
15581 PR middle-end/83945
15582 * tree-emutls.c: Include gimplify.h.
15583 (lower_emutls_2): New function.
15584 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
15585 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
15586 it before further processing.
15589 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
15590 UINTVAL (trueop1) instead of INTVAL (op1).
15592 2018-01-19 Jakub Jelinek <jakub@redhat.com>
15596 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
15597 INCOMING_FRAME_SP_OFFSET if not defined.
15598 (scan_trace): Add ENTRY argument. If true and
15599 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
15600 emit a note to adjust the CFA offset.
15601 (create_cfi_notes): Adjust scan_trace callers.
15602 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
15603 INCOMING_FRAME_SP_OFFSET in the CIE.
15604 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
15605 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
15607 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
15608 * doc/tm.texi: Regenerated.
15610 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15612 PR rtl-optimization/83147
15613 * lra-constraints.c (remove_inheritance_pseudos): Use
15614 lra_substitute_pseudo_within_insn.
15616 2018-01-19 Tom de Vries <tom@codesourcery.com>
15617 Cesar Philippidis <cesar@codesourcery.com>
15620 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
15622 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
15625 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
15626 spaces for function labels.
15628 2018-01-19 Martin Liska <mliska@suse.cz>
15630 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
15631 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
15632 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
15633 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
15634 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
15635 (PRED_CONST_RETURN): Change from 69 to 65.
15636 (PRED_NULL_RETURN): Change from 91 to 71.
15637 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
15638 (PRED_LOOP_GUARD): Change from 66 to 73.
15640 2018-01-19 Martin Liska <mliska@suse.cz>
15642 * predict.c (predict_insn_def): Add new assert.
15643 (struct branch_predictor): Change type to signed integer.
15644 (test_prediction_value_range): Amend test to cover
15645 PROB_UNINITIALIZED.
15646 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
15647 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
15648 (PRED_LOOP_ITERATIONS_MAX): Likewise.
15649 (PRED_LOOP_IV_COMPARE): Likewise.
15650 * predict.h (PROB_UNINITIALIZED): Define new constant.
15652 2018-01-19 Martin Liska <mliska@suse.cz>
15654 * predict.c (dump_prediction): Add new format for
15655 analyze_brprob.py script which is enabled with -details
15657 * profile-count.h (precise_p): New function.
15659 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
15661 PR tree-optimization/83922
15662 * tree-vect-loop.c (vect_verify_full_masking): Return false if
15663 there are no statements that need masking.
15664 (vect_active_double_reduction_p): New function.
15665 (vect_analyze_loop_operations): Use it when handling phis that
15666 are not in the loop header.
15668 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
15670 PR tree-optimization/83914
15671 * tree-vect-loop.c (vectorizable_induction): Don't convert
15672 init_expr or apply the peeling adjustment for inductions
15673 that are nested within the vectorized loop.
15675 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15677 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
15680 2018-01-18 Jakub Jelinek <jakub@redhat.com>
15684 * function.h (gimplify_parameters): Add gimple_seq * argument.
15685 * function.c: Include gimple.h and options.h.
15686 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
15687 for the added local temporaries if needed.
15688 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
15689 if there are any parameter cleanups, wrap whole body into a
15690 try/finally with the cleanups.
15692 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
15695 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
15696 Use GET_MODE_CLASS for scalar floating point.
15698 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
15702 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
15703 Fix call of call_cgraph_insertion_hooks.
15705 2018-01-18 Martin Sebor <msebor@redhat.com>
15707 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
15709 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
15712 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
15715 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
15718 * common.opt: (-ffile-prefix-map): New option.
15719 * opts.c (common_handle_option): Defer it.
15720 * opts-global.c (handle_common_deferred_options): Handle it.
15721 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
15722 * file-prefix-map.h: New file.
15723 (remap_debug_filename, add_debug_prefix_map): ...here.
15724 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
15725 * final.c (debug_prefix_map, add_debug_prefix_map
15726 remap_debug_filename): Move to...
15727 * file-prefix-map.c: New file.
15728 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
15729 generalize, get rid of alloca(), use strrchr() instead of strchr().
15730 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
15731 Implement in terms of add_prefix_map().
15732 (remap_macro_filename, remap_debug_filename): Implement in term of
15734 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
15735 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
15736 * dbxout.c: Include file-prefix-map.h.
15737 * varasm.c: Likewise.
15738 * vmsdbgout.c: Likewise.
15739 * xcoffout.c: Likewise.
15740 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
15741 * doc/cppopts.texi (-fmacro-prefix-map): Document.
15742 * doc/invoke.texi (-ffile-prefix-map): Document.
15743 (-fdebug-prefix-map): Update description.
15745 2018-01-18 Martin Liska <mliska@suse.cz>
15747 * config/i386/i386.c (indirect_thunk_name): Document that also
15749 (output_indirect_thunk): Document why both instructions
15750 (pause and lfence) are generated.
15752 2018-01-18 Richard Biener <rguenther@suse.de>
15754 PR tree-optimization/83887
15755 * graphite-scop-detection.c
15756 (scop_detection::get_nearest_dom_with_single_entry): Remove.
15757 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
15758 (scop_detection::merge_sese): Re-implement with a flood-fill
15759 algorithm that properly finds a SESE region if it exists.
15761 2018-01-18 Jakub Jelinek <jakub@redhat.com>
15764 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
15765 pointer_diff optimizations use view_convert instead of convert.
15767 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15769 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15770 Generate different code for -mno-speculate-indirect-jumps.
15771 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15772 (*call_indirect_aix<mode>): Disable for
15773 -mno-speculate-indirect-jumps.
15774 (*call_indirect_aix<mode>_nospec): New define_insn.
15775 (*call_value_indirect_aix<mode>): Disable for
15776 -mno-speculate-indirect-jumps.
15777 (*call_value_indirect_aix<mode>_nospec): New define_insn.
15778 (*sibcall_nonlocal_sysv<mode>): Generate different code for
15779 -mno-speculate-indirect-jumps.
15780 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15782 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
15784 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
15785 long double type, set the flags for noting the default long double
15786 type, even if we don't pass or return a long double type.
15788 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
15791 * ipa-inline.c (flatten_function): Do not overwrite final inlining
15794 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
15796 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
15797 support for merge[hl].
15798 (fold_mergehl_helper): New helper function.
15799 (tree-vector-builder.h): New #include for tree_vector_builder usage.
15800 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
15801 (altivec_vmrglw_direct): Add xxmrglw insn.
15803 2018-01-17 Andrew Waterman <andrew@sifive.com>
15805 * config/riscv/riscv.c (riscv_conditional_register_usage): If
15806 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
15808 2018-01-17 David Malcolm <dmalcolm@redhat.com>
15811 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
15812 call the lto_location_cache before reading the
15813 DECL_SOURCE_LOCATION of the types.
15815 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
15816 Richard Sandiford <richard.sandiford@linaro.org>
15818 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
15819 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
15820 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
15821 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
15822 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
15824 * config/aarch64/constraints.md (aarch64_movti_operand):
15826 * config/aarch64/predicates.md (Uti): Add new constraint.
15828 2018-01-17 Carl Love <cel@us.ibm.com>
15830 * config/rs6000/vsx.md (define_expand xl_len_r,
15831 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
15832 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
15834 (define_expand, define_insn): Move the shift left from the
15835 define_insn to the define_expand for lxvl and stxvl instructions.
15836 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
15837 and XL_LEN_R definitions to PURE.
15839 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
15841 * config/i386/i386.c (indirect_thunk_name): Declare regno
15842 as unsigned int. Compare regno with INVALID_REGNUM.
15843 (output_indirect_thunk): Ditto.
15844 (output_indirect_thunk_function): Ditto.
15845 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
15846 in the call to output_indirect_thunk_function.
15848 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
15850 PR middle-end/83884
15851 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
15852 rather than the size of inner_type to determine the stack slot size
15853 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
15855 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
15858 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
15861 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
15863 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
15864 endian Linux systems to optionally enable multilibs for selecting
15865 the long double type if the user configured an explicit type.
15866 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
15867 have no long double multilibs if not defined.
15868 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
15869 warn if the user used -mabi={ieee,ibm}longdouble and we built
15870 multilibs for long double.
15871 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
15872 appropriate multilib option.
15873 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
15875 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
15876 for building long double multilibs.
15877 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
15879 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
15881 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
15884 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
15886 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
15889 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
15892 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
15895 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15897 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
15898 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
15900 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
15902 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
15903 different rtl trees depending on TARGET_64BIT.
15904 (rs6000_gen_lvx): Likewise.
15906 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
15908 * config/visium/visium.md (nop): Tweak comment.
15909 (hazard_nop): Likewise.
15911 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15913 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
15914 -mspeculate-indirect-jumps.
15915 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
15916 for -mno-speculate-indirect-jumps.
15917 (*call_indirect_elfv2<mode>_nospec): New define_insn.
15918 (*call_value_indirect_elfv2<mode>): Disable for
15919 -mno-speculate-indirect-jumps.
15920 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
15921 (indirect_jump): Emit different RTL for
15922 -mno-speculate-indirect-jumps.
15923 (*indirect_jump<mode>): Disable for
15924 -mno-speculate-indirect-jumps.
15925 (*indirect_jump<mode>_nospec): New define_insn.
15926 (tablejump): Emit different RTL for
15927 -mno-speculate-indirect-jumps.
15928 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
15929 (tablejumpsi_nospec): New define_expand.
15930 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
15931 (tablejumpdi_nospec): New define_expand.
15932 (*tablejump<mode>_internal1): Disable for
15933 -mno-speculate-indirect-jumps.
15934 (*tablejump<mode>_internal1_nospec): New define_insn.
15935 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
15938 2018-01-16 Artyom Skrobov tyomitch@gmail.com
15940 * caller-save.c (insert_save): Drop unnecessary parameter. All
15943 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15944 Richard Biener <rguenth@suse.de>
15947 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
15948 return early, inline manually is_gimple_sizepos. Make sure if we
15949 call gimplify_expr we don't end up with a gimple constant.
15950 * tree.c (variably_modified_type_p): Don't return true for
15951 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
15952 * gimplify.h (is_gimple_sizepos): Remove.
15954 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15956 PR tree-optimization/83857
15957 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
15958 vectorizable_live_operation for pure SLP statements.
15959 (vectorizable_live_operation): Handle PHIs.
15961 2018-01-16 Richard Biener <rguenther@suse.de>
15963 PR tree-optimization/83867
15964 * tree-vect-stmts.c (vect_transform_stmt): Precompute
15965 nested_in_vect_loop_p since the scalar stmt may get invalidated.
15967 2018-01-16 Jakub Jelinek <jakub@redhat.com>
15970 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
15971 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
15972 If off is not INTEGER_CST, issue a may not be aligned warning
15973 rather than isn't aligned. Use isn%'t rather than isn't.
15974 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
15976 <case MULT_EXPR>: Improve the case when bottom and one of the
15977 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
15978 operand, in that case check if the other operand is multiple of
15979 bottom divided by the INTEGER_CST operand.
15981 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15984 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
15985 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
15986 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
15987 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
15988 * config/pa/pa.c (pa_function_arg_advance): Likewise.
15989 (pa_function_arg, pa_arg_partial_bytes): Likewise.
15990 (pa_function_arg_size): New function.
15992 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15994 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
15995 in a separate statement.
15997 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
15999 PR tree-optimization/83847
16000 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
16001 group gathers and scatters.
16003 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16005 PR rtl-optimization/86620
16006 * params.def (max-sched-ready-insns): Bump minimum value to 1.
16008 PR rtl-optimization/83213
16009 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
16010 to last if both are JUMP_INSNs.
16012 PR tree-optimization/83843
16013 * gimple-ssa-store-merging.c
16014 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
16015 store_immediate_info for bswap/nop orig_stores.
16017 2018-01-15 Andrew Waterman <andrew@sifive.com>
16019 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
16021 <UDIV>: Increase cost if !TARGET_DIV.
16023 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
16025 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
16026 (define_attr "cr_logical_3op"): New.
16027 (cceq_ior_compare): Adjust.
16028 (cceq_ior_compare_complement): Adjust.
16029 (*cceq_rev_compare): Adjust.
16030 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
16031 (is_cracked_insn): Adjust.
16032 (insn_must_be_first_in_group): Adjust.
16033 * config/rs6000/40x.md: Adjust.
16034 * config/rs6000/440.md: Adjust.
16035 * config/rs6000/476.md: Adjust.
16036 * config/rs6000/601.md: Adjust.
16037 * config/rs6000/603.md: Adjust.
16038 * config/rs6000/6xx.md: Adjust.
16039 * config/rs6000/7450.md: Adjust.
16040 * config/rs6000/7xx.md: Adjust.
16041 * config/rs6000/8540.md: Adjust.
16042 * config/rs6000/cell.md: Adjust.
16043 * config/rs6000/e300c2c3.md: Adjust.
16044 * config/rs6000/e500mc.md: Adjust.
16045 * config/rs6000/e500mc64.md: Adjust.
16046 * config/rs6000/e5500.md: Adjust.
16047 * config/rs6000/e6500.md: Adjust.
16048 * config/rs6000/mpc.md: Adjust.
16049 * config/rs6000/power4.md: Adjust.
16050 * config/rs6000/power5.md: Adjust.
16051 * config/rs6000/power6.md: Adjust.
16052 * config/rs6000/power7.md: Adjust.
16053 * config/rs6000/power8.md: Adjust.
16054 * config/rs6000/power9.md: Adjust.
16055 * config/rs6000/rs64.md: Adjust.
16056 * config/rs6000/titan.md: Adjust.
16058 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16060 * config/i386/predicates.md (indirect_branch_operand): Rewrite
16061 ix86_indirect_branch_register logic.
16063 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16065 * config/i386/constraints.md (Bs): Update
16066 ix86_indirect_branch_register check. Don't check
16067 ix86_indirect_branch_register with GOT_memory_operand.
16069 * config/i386/predicates.md (GOT_memory_operand): Don't check
16070 ix86_indirect_branch_register here.
16071 (GOT32_symbol_operand): Likewise.
16073 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16075 * config/i386/predicates.md (constant_call_address_operand):
16076 Rewrite ix86_indirect_branch_register logic.
16077 (sibcall_insn_operand): Likewise.
16079 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16081 * config/i386/constraints.md (Bs): Replace
16082 ix86_indirect_branch_thunk_register with
16083 ix86_indirect_branch_register.
16085 * config/i386/i386.md (indirect_jump): Likewise.
16086 (tablejump): Likewise.
16087 (*sibcall_memory): Likewise.
16088 (*sibcall_value_memory): Likewise.
16089 Peepholes of indirect call and jump via memory: Likewise.
16090 * config/i386/i386.opt: Likewise.
16091 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16092 (GOT_memory_operand): Likewise.
16093 (call_insn_operand): Likewise.
16094 (sibcall_insn_operand): Likewise.
16095 (GOT32_symbol_operand): Likewise.
16097 2018-01-15 Jakub Jelinek <jakub@redhat.com>
16099 PR middle-end/83837
16100 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
16101 type rather than type addr's type points to.
16102 (expand_omp_atomic_mutex): Likewise.
16103 (expand_omp_atomic): Likewise.
16105 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16108 * config/i386/i386.c (output_indirect_thunk_function): Use
16109 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
16110 for __x86_return_thunk.
16112 2018-01-15 Richard Biener <rguenther@suse.de>
16114 PR middle-end/83850
16115 * expmed.c (extract_bit_field_1): Fix typo.
16117 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16120 * config/arm/iterators.md (VF): New mode iterator.
16121 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
16122 Remove integer-related logic from pattern.
16123 (neon_vabd<mode>_3): Likewise.
16125 2018-01-15 Jakub Jelinek <jakub@redhat.com>
16127 PR middle-end/82694
16128 * common.opt (fstrict-overflow): No longer an alias.
16129 (fwrapv-pointer): New option.
16130 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
16131 also for pointer types based on flag_wrapv_pointer.
16132 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
16133 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
16134 opts->x_flag_wrapv got set.
16135 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
16136 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
16137 POINTER_TYPE_OVERFLOW_UNDEFINED.
16138 * match.pd: Likewise in address comparison pattern.
16139 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
16141 2018-01-15 Richard Biener <rguenther@suse.de>
16144 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
16145 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
16146 Reset type names to their identifier if their TYPE_DECL doesn't
16147 have linkage (and thus is used for ODR and devirt).
16148 (save_debug_info_for_decl): Remove.
16149 (save_debug_info_for_type): Likewise.
16150 (add_tree_to_fld_list): Adjust.
16151 * tree-pretty-print.c (dump_generic_node): Make dumping of
16152 type names more robust.
16154 2018-01-15 Richard Biener <rguenther@suse.de>
16156 * BASE-VER: Bump to 8.0.1.
16158 2018-01-14 Martin Sebor <msebor@redhat.com>
16161 * builtins.c (check_access): Avoid warning when the no-warning bit
16164 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
16166 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
16167 * ira-color (allocno_hard_regs_compare): Likewise.
16169 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
16172 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
16173 Use .pushsection/.popsection.
16175 2018-01-14 Martin Sebor <msebor@redhat.com>
16178 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
16180 2018-01-14 Jakub Jelinek <jakub@redhat.com>
16182 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
16183 entry from extra_headers.
16184 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
16185 extra_headers, make the list bitwise identical to the i?86-*-* one.
16187 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16189 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
16190 -mcmodel=large with -mindirect-branch=thunk,
16191 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
16192 -mfunction-return=thunk-extern.
16193 * doc/invoke.texi: Document -mcmodel=large is incompatible with
16194 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
16195 -mfunction-return=thunk and -mfunction-return=thunk-extern.
16197 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16199 * config/i386/i386.c (print_reg): Print the name of the full
16200 integer register without '%'.
16201 (ix86_print_operand): Handle 'V'.
16202 * doc/extend.texi: Document 'V' modifier.
16204 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16206 * config/i386/constraints.md (Bs): Disallow memory operand for
16207 -mindirect-branch-register.
16209 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16210 (GOT_memory_operand): Likewise.
16211 (call_insn_operand): Likewise.
16212 (sibcall_insn_operand): Likewise.
16213 (GOT32_symbol_operand): Likewise.
16214 * config/i386/i386.md (indirect_jump): Call convert_memory_address
16215 for -mindirect-branch-register.
16216 (tablejump): Likewise.
16217 (*sibcall_memory): Likewise.
16218 (*sibcall_value_memory): Likewise.
16219 Disallow peepholes of indirect call and jump via memory for
16220 -mindirect-branch-register.
16221 (*call_pop): Replace m with Bw.
16222 (*call_value_pop): Likewise.
16223 (*sibcall_pop_memory): Replace m with Bs.
16224 * config/i386/i386.opt (mindirect-branch-register): New option.
16225 * doc/invoke.texi: Document -mindirect-branch-register option.
16227 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16229 * config/i386/i386-protos.h (ix86_output_function_return): New.
16230 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
16231 set function_return_type.
16232 (indirect_thunk_name): Add ret_p to indicate thunk for function
16234 (output_indirect_thunk_function): Pass false to
16235 indirect_thunk_name.
16236 (ix86_output_indirect_branch_via_reg): Likewise.
16237 (ix86_output_indirect_branch_via_push): Likewise.
16238 (output_indirect_thunk_function): Create alias for function
16239 return thunk if regno < 0.
16240 (ix86_output_function_return): New function.
16241 (ix86_handle_fndecl_attribute): Handle function_return.
16242 (ix86_attribute_table): Add function_return.
16243 * config/i386/i386.h (machine_function): Add
16244 function_return_type.
16245 * config/i386/i386.md (simple_return_internal): Use
16246 ix86_output_function_return.
16247 (simple_return_internal_long): Likewise.
16248 * config/i386/i386.opt (mfunction-return=): New option.
16249 (indirect_branch): Mention -mfunction-return=.
16250 * doc/extend.texi: Document function_return function attribute.
16251 * doc/invoke.texi: Document -mfunction-return= option.
16253 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16255 * config/i386/i386-opts.h (indirect_branch): New.
16256 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
16257 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
16258 with local indirect jump when converting indirect call and jump.
16259 (ix86_set_indirect_branch_type): New.
16260 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
16261 (indirectlabelno): New.
16262 (indirect_thunk_needed): Likewise.
16263 (indirect_thunk_bnd_needed): Likewise.
16264 (indirect_thunks_used): Likewise.
16265 (indirect_thunks_bnd_used): Likewise.
16266 (INDIRECT_LABEL): Likewise.
16267 (indirect_thunk_name): Likewise.
16268 (output_indirect_thunk): Likewise.
16269 (output_indirect_thunk_function): Likewise.
16270 (ix86_output_indirect_branch_via_reg): Likewise.
16271 (ix86_output_indirect_branch_via_push): Likewise.
16272 (ix86_output_indirect_branch): Likewise.
16273 (ix86_output_indirect_jmp): Likewise.
16274 (ix86_code_end): Call output_indirect_thunk_function if needed.
16275 (ix86_output_call_insn): Call ix86_output_indirect_branch if
16277 (ix86_handle_fndecl_attribute): Handle indirect_branch.
16278 (ix86_attribute_table): Add indirect_branch.
16279 * config/i386/i386.h (machine_function): Add indirect_branch_type
16280 and has_local_indirect_jump.
16281 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
16283 (tablejump): Likewise.
16284 (*indirect_jump): Use ix86_output_indirect_jmp.
16285 (*tablejump_1): Likewise.
16286 (simple_return_indirect_internal): Likewise.
16287 * config/i386/i386.opt (mindirect-branch=): New option.
16288 (indirect_branch): New.
16291 (thunk-inline): Likewise.
16292 (thunk-extern): Likewise.
16293 * doc/extend.texi: Document indirect_branch function attribute.
16294 * doc/invoke.texi: Document -mindirect-branch= option.
16296 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
16299 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
16301 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
16303 * ipa-inline.c (want_inline_small_function_p): Return false if
16304 inlining has already failed with CIF_FINAL_ERROR.
16305 (update_caller_keys): Call want_inline_small_function_p before
16307 (update_callee_keys): Likewise.
16309 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
16311 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
16313 (rs6000_quadword_masked_address_p): Likewise.
16314 (quad_aligned_load_p): Likewise.
16315 (quad_aligned_store_p): Likewise.
16316 (const_load_sequence_p): Add comment to describe the outer-most loop.
16317 (mimic_memory_attributes_and_flags): New function.
16318 (rs6000_gen_stvx): Likewise.
16319 (replace_swapped_aligned_store): Likewise.
16320 (rs6000_gen_lvx): Likewise.
16321 (replace_swapped_aligned_load): Likewise.
16322 (replace_swapped_load_constant): Capitalize argument name in
16323 comment describing this function.
16324 (rs6000_analyze_swaps): Add a third pass to search for vector loads
16325 and stores that access quad-word aligned addresses and replace
16326 with stvx or lvx instructions when appropriate.
16327 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
16328 New function prototype.
16329 (rs6000_quadword_masked_address_p): Likewise.
16330 (rs6000_gen_lvx): Likewise.
16331 (rs6000_gen_stvx): Likewise.
16332 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
16333 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
16334 when memory address is aligned.
16335 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
16336 this split to select lvx instruction when memory address is aligned.
16337 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
16338 instruction when memory address is aligned.
16339 (*vsx_le_perm_load_v16qi): Likewise.
16340 (four unnamed splitters): Modify to select the stvx instruction
16341 when memory is aligned.
16343 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
16345 * predict.c (determine_unlikely_bbs): Handle correctly BBs
16346 which appears in the queue multiple times.
16348 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16349 Alan Hayward <alan.hayward@arm.com>
16350 David Sherwood <david.sherwood@arm.com>
16352 * tree-vectorizer.h (vec_lower_bound): New structure.
16353 (_loop_vec_info): Add check_nonzero and lower_bounds.
16354 (LOOP_VINFO_CHECK_NONZERO): New macro.
16355 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
16356 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
16357 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
16358 fields. Make seg_len the distance travelled, not including the
16360 (dr_direction_indicator): Declare.
16361 (dr_zero_step_indicator): Likewise.
16362 (dr_known_forward_stride_p): Likewise.
16363 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
16365 (runtime_alias_check_p): Allow runtime alias checks with
16367 (operator ==): Compare access_size and align.
16368 (prune_runtime_alias_test_list): Rework for new distinction between
16369 the access_size and seg_len.
16370 (create_intersect_range_checks_index): Likewise. Cope with polynomial
16372 (get_segment_min_max): New function.
16373 (create_intersect_range_checks): Use it.
16374 (dr_step_indicator): New function.
16375 (dr_direction_indicator): Likewise.
16376 (dr_zero_step_indicator): Likewise.
16377 (dr_known_forward_stride_p): Likewise.
16378 * tree-loop-distribution.c (data_ref_segment_size): Return
16379 DR_STEP * (niters - 1).
16380 (compute_alias_check_pairs): Update call to the dr_with_seg_len
16382 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
16383 (vect_preserves_scalar_order_p): New function, split out from...
16384 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
16385 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
16386 (vect_vfa_access_size): New function.
16387 (vect_vfa_align): Likewise.
16388 (vect_compile_time_alias): Take access_size_a and access_b arguments.
16389 (dump_lower_bound): New function.
16390 (vect_check_lower_bound): Likewise.
16391 (vect_small_gap_p): Likewise.
16392 (vectorizable_with_step_bound_p): Likewise.
16393 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
16394 depencies if the vectorization factor is 1. Convert the checks
16395 for nonzero steps into checks on the bounds of DR_STEP. Try using
16396 a bunds check for variable steps if the minimum required step is
16397 relatively small. Update calls to the dr_with_seg_len
16398 constructor and to vect_compile_time_alias.
16399 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
16401 (vect_loop_versioning): Call it.
16402 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
16404 (vect_estimate_min_profitable_iters): Account for any bounds checks.
16406 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16407 Alan Hayward <alan.hayward@arm.com>
16408 David Sherwood <david.sherwood@arm.com>
16410 * doc/sourcebuild.texi (vect_scatter_store): Document.
16411 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
16413 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
16415 * genopinit.c (main): Add supports_vec_scatter_store and
16416 supports_vec_scatter_store_cached to target_optabs.
16417 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
16418 IFN_MASK_SCATTER_STORE.
16419 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
16421 * internal-fn.h (internal_store_fn_p): Declare.
16422 (internal_fn_stored_value_index): Likewise.
16423 * internal-fn.c (scatter_store_direct): New macro.
16424 (expand_scatter_store_optab_fn): New function.
16425 (direct_scatter_store_optab_supported_p): New macro.
16426 (internal_store_fn_p): New function.
16427 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
16428 IFN_MASK_SCATTER_STORE.
16429 (internal_fn_mask_index): Likewise.
16430 (internal_fn_stored_value_index): New function.
16431 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
16432 for scatter stores.
16433 * optabs-query.h (supports_vec_scatter_store_p): Declare.
16434 * optabs-query.c (supports_vec_scatter_store_p): New function.
16435 * tree-vectorizer.h (vect_get_store_rhs): Declare.
16436 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
16437 true for scatter stores.
16438 (vect_gather_scatter_fn_p): Handle scatter stores too.
16439 (vect_check_gather_scatter): Consider using scatter stores if
16440 supports_vec_scatter_store_p.
16441 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
16442 scatter stores too.
16443 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16444 internal_fn_stored_value_index.
16445 (check_load_store_masking): Handle scatter stores too.
16446 (vect_get_store_rhs): Make public.
16447 (vectorizable_call): Use internal_store_fn_p.
16448 (vectorizable_store): Handle scatter store internal functions.
16449 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
16450 when deciding whether the end of the group has been reached.
16451 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
16452 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
16453 (mask_scatter_store<mode>): New insns.
16455 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16456 Alan Hayward <alan.hayward@arm.com>
16457 David Sherwood <david.sherwood@arm.com>
16459 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
16460 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
16461 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
16463 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
16464 Use vect_truncate_gather_scatter_offset if we can't treat the
16465 operation as a normal gather load or scatter store.
16466 (get_group_load_store_type): Take the gather_scatter_info
16467 as argument. Try using a gather load or scatter store for
16468 single-element groups.
16469 (get_load_store_type): Update calls to get_group_load_store_type
16470 and vect_use_strided_gather_scatters_p.
16472 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16473 Alan Hayward <alan.hayward@arm.com>
16474 David Sherwood <david.sherwood@arm.com>
16476 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
16477 optional tree argument.
16478 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
16480 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
16481 but continue to use the current value as a fallback.
16482 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
16483 to compare the updates.
16484 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
16485 (get_load_store_type): Use it when handling a strided access.
16486 (vect_get_strided_load_store_ops): New function.
16487 (vect_get_data_ptr_increment): Likewise.
16488 (vectorizable_load): Handle strided gather loads. Always pass
16489 a step to vect_create_data_ref_ptr and bump_vector_ptr.
16491 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16492 Alan Hayward <alan.hayward@arm.com>
16493 David Sherwood <david.sherwood@arm.com>
16495 * doc/md.texi (gather_load@var{m}): Document.
16496 (mask_gather_load@var{m}): Likewise.
16497 * genopinit.c (main): Add supports_vec_gather_load and
16498 supports_vec_gather_load_cached to target_optabs.
16499 * optabs-tree.c (init_tree_optimization_optabs): Use
16500 ggc_cleared_alloc to allocate target_optabs.
16501 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
16502 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
16504 * internal-fn.h (internal_load_fn_p): Declare.
16505 (internal_gather_scatter_fn_p): Likewise.
16506 (internal_fn_mask_index): Likewise.
16507 (internal_gather_scatter_fn_supported_p): Likewise.
16508 * internal-fn.c (gather_load_direct): New macro.
16509 (expand_gather_load_optab_fn): New function.
16510 (direct_gather_load_optab_supported_p): New macro.
16511 (direct_internal_fn_optab): New function.
16512 (internal_load_fn_p): Likewise.
16513 (internal_gather_scatter_fn_p): Likewise.
16514 (internal_fn_mask_index): Likewise.
16515 (internal_gather_scatter_fn_supported_p): Likewise.
16516 * optabs-query.c (supports_at_least_one_mode_p): New function.
16517 (supports_vec_gather_load_p): Likewise.
16518 * optabs-query.h (supports_vec_gather_load_p): Declare.
16519 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
16520 and memory_type field.
16521 (NUM_PATTERNS): Bump to 15.
16522 * tree-vect-data-refs.c: Include internal-fn.h.
16523 (vect_gather_scatter_fn_p): New function.
16524 (vect_describe_gather_scatter_call): Likewise.
16525 (vect_check_gather_scatter): Try using internal functions for
16526 gather loads. Recognize existing calls to a gather load function.
16527 (vect_analyze_data_refs): Consider using gather loads if
16528 supports_vec_gather_load_p.
16529 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
16530 (vect_get_gather_scatter_offset_type): Likewise.
16531 (vect_convert_mask_for_vectype): Likewise.
16532 (vect_add_conversion_to_patterm): Likewise.
16533 (vect_try_gather_scatter_pattern): Likewise.
16534 (vect_recog_gather_scatter_pattern): New pattern recognizer.
16535 (vect_vect_recog_func_ptrs): Add it.
16536 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
16537 internal_fn_mask_index and internal_gather_scatter_fn_p.
16538 (check_load_store_masking): Take the gather_scatter_info as an
16539 argument and handle gather loads.
16540 (vect_get_gather_scatter_ops): New function.
16541 (vectorizable_call): Check internal_load_fn_p.
16542 (vectorizable_load): Likewise. Handle gather load internal
16544 (vectorizable_store): Update call to check_load_store_masking.
16545 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
16546 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
16547 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
16548 (aarch64_gather_scale_operand_d): New predicates.
16549 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
16550 (mask_gather_load<mode>): New insns.
16552 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16553 Alan Hayward <alan.hayward@arm.com>
16554 David Sherwood <david.sherwood@arm.com>
16556 * optabs.def (fold_left_plus_optab): New optab.
16557 * doc/md.texi (fold_left_plus_@var{m}): Document.
16558 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
16559 * internal-fn.c (fold_left_direct): Define.
16560 (expand_fold_left_optab_fn): Likewise.
16561 (direct_fold_left_optab_supported_p): Likewise.
16562 * fold-const-call.c (fold_const_fold_left): New function.
16563 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
16564 * tree-parloops.c (valid_reduction_p): New function.
16565 (gather_scalar_reductions): Use it.
16566 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
16567 (vect_finish_replace_stmt): Declare.
16568 * tree-vect-loop.c (fold_left_reduction_fn): New function.
16569 (needs_fold_left_reduction_p): New function, split out from...
16570 (vect_is_simple_reduction): ...here. Accept reductions that
16571 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
16572 (vect_force_simple_reduction): Also store the reduction type in
16573 the assignment's STMT_VINFO_REDUC_TYPE.
16574 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
16575 (merge_with_identity): New function.
16576 (vect_expand_fold_left): Likewise.
16577 (vectorize_fold_left_reduction): Likewise.
16578 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
16579 scalar phi in place for it. Check for target support and reject
16580 cases that would reassociate the operation. Defer the transform
16581 phase to vectorize_fold_left_reduction.
16582 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
16583 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
16584 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
16586 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16588 * tree-if-conv.c (predicate_mem_writes): Remove redundant
16589 call to ifc_temp_var.
16591 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16592 Alan Hayward <alan.hayward@arm.com>
16593 David Sherwood <david.sherwood@arm.com>
16595 * target.def (legitimize_address_displacement): Take the original
16596 offset as a poly_int.
16597 * targhooks.h (default_legitimize_address_displacement): Update
16599 * targhooks.c (default_legitimize_address_displacement): Likewise.
16600 * doc/tm.texi: Regenerate.
16601 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
16602 as an argument, moving assert of ad->disp == ad->disp_term to...
16603 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
16604 Try calling targetm.legitimize_address_displacement before expanding
16605 the address rather than afterwards, and adjust for the new interface.
16606 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
16607 Match the new hook interface. Handle SVE addresses.
16608 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
16609 new hook interface.
16611 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16613 * Makefile.in (OBJS): Add early-remat.o.
16614 * target.def (select_early_remat_modes): New hook.
16615 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
16616 * doc/tm.texi: Regenerate.
16617 * targhooks.h (default_select_early_remat_modes): Declare.
16618 * targhooks.c (default_select_early_remat_modes): New function.
16619 * timevar.def (TV_EARLY_REMAT): New timevar.
16620 * passes.def (pass_early_remat): New pass.
16621 * tree-pass.h (make_pass_early_remat): Declare.
16622 * early-remat.c: New file.
16623 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
16625 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
16627 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16628 Alan Hayward <alan.hayward@arm.com>
16629 David Sherwood <david.sherwood@arm.com>
16631 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
16632 vfm1 with a bound_epilog parameter.
16633 (vect_do_peeling): Update calls accordingly, and move the prologue
16634 call earlier in the function. Treat the base bound_epilog as 0 for
16635 fully-masked loops and retain vf - 1 for other loops. Add 1 to
16636 this base when peeling for gaps.
16637 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
16638 with fully-masked loops.
16639 (vect_estimate_min_profitable_iters): Handle the single peeled
16640 iteration in that case.
16642 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16643 Alan Hayward <alan.hayward@arm.com>
16644 David Sherwood <david.sherwood@arm.com>
16646 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
16647 single-element interleaving even if the size is not a power of 2.
16648 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
16649 accesses for single-element interleaving if the group size is
16652 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16653 Alan Hayward <alan.hayward@arm.com>
16654 David Sherwood <david.sherwood@arm.com>
16656 * doc/md.texi (fold_extract_last_@var{m}): Document.
16657 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
16658 * optabs.def (fold_extract_last_optab): New optab.
16659 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
16660 * internal-fn.c (fold_extract_direct): New macro.
16661 (expand_fold_extract_optab_fn): Likewise.
16662 (direct_fold_extract_optab_supported_p): Likewise.
16663 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
16664 * tree-vect-loop.c (vect_model_reduction_cost): Handle
16665 EXTRACT_LAST_REDUCTION.
16666 (get_initial_def_for_reduction): Do not create an initial vector
16667 for EXTRACT_LAST_REDUCTION reductions.
16668 (vectorizable_reduction): Leave the scalar phi in place for
16669 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
16670 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
16671 epilogue code for EXTRACT_LAST_REDUCTION and defer the
16672 transform phase to vectorizable_condition.
16673 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
16675 (vect_finish_stmt_generation): ...here.
16676 (vect_finish_replace_stmt): New function.
16677 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
16678 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
16680 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
16682 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16683 Alan Hayward <alan.hayward@arm.com>
16684 David Sherwood <david.sherwood@arm.com>
16686 * doc/md.texi (extract_last_@var{m}): Document.
16687 * optabs.def (extract_last_optab): New optab.
16688 * internal-fn.def (EXTRACT_LAST): New internal function.
16689 * internal-fn.c (cond_unary_direct): New macro.
16690 (expand_cond_unary_optab_fn): Likewise.
16691 (direct_cond_unary_optab_supported_p): Likewise.
16692 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
16693 loops using EXTRACT_LAST.
16694 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
16695 (extract_last_<mode>): ...this optab.
16696 (vec_extract<mode><Vel>): Update accordingly.
16698 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16699 Alan Hayward <alan.hayward@arm.com>
16700 David Sherwood <david.sherwood@arm.com>
16702 * target.def (empty_mask_is_expensive): New hook.
16703 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
16704 * doc/tm.texi: Regenerate.
16705 * targhooks.h (default_empty_mask_is_expensive): Declare.
16706 * targhooks.c (default_empty_mask_is_expensive): New function.
16707 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
16708 if the target says that empty masks are expensive.
16709 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
16711 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
16713 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16714 Alan Hayward <alan.hayward@arm.com>
16715 David Sherwood <david.sherwood@arm.com>
16717 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
16718 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
16719 (vect_use_loop_mask_for_alignment_p): New function.
16720 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
16721 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
16722 niters_skip argument. Make sure that the first niters_skip elements
16723 of the first iteration are inactive.
16724 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
16725 Update call to vect_set_loop_masks_directly.
16726 (get_misalign_in_elems): New function, split out from...
16727 (vect_gen_prolog_loop_niters): ...here.
16728 (vect_update_init_of_dr): Take a code argument that specifies whether
16729 the adjustment should be added or subtracted.
16730 (vect_update_init_of_drs): Likewise.
16731 (vect_prepare_for_masked_peels): New function.
16732 (vect_do_peeling): Skip prologue peeling if we're using a mask
16733 instead. Update call to vect_update_inits_of_drs.
16734 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16736 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
16737 alignment. Do not include the number of peeled iterations in
16738 the minimum threshold in that case.
16739 (vectorizable_induction): Adjust the start value down by
16740 LOOP_VINFO_MASK_SKIP_NITERS iterations.
16741 (vect_transform_loop): Call vect_prepare_for_masked_peels.
16742 Take the number of skipped iterations into account when calculating
16744 * tree-vect-stmts.c (vect_gen_while_not): New function.
16746 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16747 Alan Hayward <alan.hayward@arm.com>
16748 David Sherwood <david.sherwood@arm.com>
16750 * doc/sourcebuild.texi (vect_fully_masked): Document.
16751 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
16752 default value to 0.
16753 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
16755 (vect_analyze_loop_2): ...here. Don't check the vectorization
16756 factor against the number of loop iterations if the loop is
16759 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16760 Alan Hayward <alan.hayward@arm.com>
16761 David Sherwood <david.sherwood@arm.com>
16763 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
16764 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
16765 (dump_groups): Update accordingly.
16766 (iv_use::mem_type): New member variable.
16767 (address_p): New function.
16768 (record_use): Add a mem_type argument and initialize the new
16770 (record_group_use): Add a mem_type argument. Use address_p.
16771 Remove obsolete null checks of base_object. Update call to record_use.
16772 (find_interesting_uses_op): Update call to record_group_use.
16773 (find_interesting_uses_cond): Likewise.
16774 (find_interesting_uses_address): Likewise.
16775 (get_mem_type_for_internal_fn): New function.
16776 (find_address_like_use): Likewise.
16777 (find_interesting_uses_stmt): Try find_address_like_use before
16778 calling find_interesting_uses_op.
16779 (addr_offset_valid_p): Use the iv mem_type field as the type
16780 of the addressed memory.
16781 (add_autoinc_candidates): Likewise.
16782 (get_address_cost): Likewise.
16783 (split_small_address_groups_p): Use address_p.
16784 (split_address_groups): Likewise.
16785 (add_iv_candidate_for_use): Likewise.
16786 (autoinc_possible_for_pair): Likewise.
16787 (rewrite_groups): Likewise.
16788 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
16789 (determine_group_iv_cost): Update after split of USE_ADDRESS.
16790 (get_alias_ptr_type_for_ptr_address): New function.
16791 (rewrite_use_address): Rewrite address uses in calls that were
16792 identified by find_address_like_use.
16794 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16795 Alan Hayward <alan.hayward@arm.com>
16796 David Sherwood <david.sherwood@arm.com>
16798 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
16800 * gimple-expr.h (is_gimple_addressable: Likewise.
16801 * gimple-expr.c (is_gimple_address): Likewise.
16802 * internal-fn.c (expand_call_mem_ref): New function.
16803 (expand_mask_load_optab_fn): Use it.
16804 (expand_mask_store_optab_fn): Likewise.
16806 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16807 Alan Hayward <alan.hayward@arm.com>
16808 David Sherwood <david.sherwood@arm.com>
16810 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
16811 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
16812 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
16813 (cond_umax@var{mode}): Document.
16814 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
16815 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
16816 (cond_umin_optab, cond_umax_optab): New optabs.
16817 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
16818 (COND_IOR, COND_XOR): New internal functions.
16819 * internal-fn.h (get_conditional_internal_fn): Declare.
16820 * internal-fn.c (cond_binary_direct): New macro.
16821 (expand_cond_binary_optab_fn): Likewise.
16822 (direct_cond_binary_optab_supported_p): Likewise.
16823 (get_conditional_internal_fn): New function.
16824 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
16825 Cope with reduction statements that are vectorized as calls rather
16827 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
16828 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
16829 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
16830 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16831 (UNSPEC_COND_EOR): New unspecs.
16832 (optab): Add mappings for them.
16833 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
16834 (sve_int_op, sve_fp_op): New int attributes.
16836 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16837 Alan Hayward <alan.hayward@arm.com>
16838 David Sherwood <david.sherwood@arm.com>
16840 * optabs.def (while_ult_optab): New optab.
16841 * doc/md.texi (while_ult@var{m}@var{n}): Document.
16842 * internal-fn.def (WHILE_ULT): New internal function.
16843 * internal-fn.h (direct_internal_fn_supported_p): New override
16844 that takes two types as argument.
16845 * internal-fn.c (while_direct): New macro.
16846 (expand_while_optab_fn): New function.
16847 (convert_optab_supported_p): Likewise.
16848 (direct_while_optab_supported_p): New macro.
16849 * wide-int.h (wi::udiv_ceil): New function.
16850 * tree-vectorizer.h (rgroup_masks): New structure.
16851 (vec_loop_masks): New typedef.
16852 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
16853 and fully_masked_p.
16854 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
16855 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
16856 (vect_max_vf): New function.
16857 (slpeel_make_loop_iterate_ntimes): Delete.
16858 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
16859 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
16860 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
16861 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
16862 internal-fn.h, stor-layout.h and optabs-query.h.
16863 (vect_set_loop_mask): New function.
16864 (add_preheader_seq): Likewise.
16865 (add_header_seq): Likewise.
16866 (interleave_supported_p): Likewise.
16867 (vect_maybe_permute_loop_masks): Likewise.
16868 (vect_set_loop_masks_directly): Likewise.
16869 (vect_set_loop_condition_masked): Likewise.
16870 (vect_set_loop_condition_unmasked): New function, split out from
16871 slpeel_make_loop_iterate_ntimes.
16872 (slpeel_make_loop_iterate_ntimes): Rename to..
16873 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
16874 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
16875 (vect_do_peeling): Update call accordingly.
16876 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
16878 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
16879 mask_compare_type, can_fully_mask_p and fully_masked_p.
16880 (release_vec_loop_masks): New function.
16881 (_loop_vec_info): Use it to free the loop masks.
16882 (can_produce_all_loop_masks_p): New function.
16883 (vect_get_max_nscalars_per_iter): Likewise.
16884 (vect_verify_full_masking): Likewise.
16885 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
16886 retries, and free the mask rgroups before retrying. Check loop-wide
16887 reasons for disallowing fully-masked loops. Make the final decision
16888 about whether use a fully-masked loop or not.
16889 (vect_estimate_min_profitable_iters): Do not assume that peeling
16890 for the number of iterations will be needed for fully-masked loops.
16891 (vectorizable_reduction): Disable fully-masked loops.
16892 (vectorizable_live_operation): Likewise.
16893 (vect_halve_mask_nunits): New function.
16894 (vect_double_mask_nunits): Likewise.
16895 (vect_record_loop_mask): Likewise.
16896 (vect_get_loop_mask): Likewise.
16897 (vect_transform_loop): Handle the case in which the final loop
16898 iteration might handle a partial vector. Call vect_set_loop_condition
16899 instead of slpeel_make_loop_iterate_ntimes.
16900 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
16901 (check_load_store_masking): New function.
16902 (prepare_load_store_mask): Likewise.
16903 (vectorizable_store): Handle fully-masked loops.
16904 (vectorizable_load): Likewise.
16905 (supportable_widening_operation): Use vect_halve_mask_nunits for
16907 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
16908 (vect_gen_while): New function.
16909 * config/aarch64/aarch64.md (umax<mode>3): New expander.
16910 (aarch64_uqdec<mode>): New insn.
16912 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16913 Alan Hayward <alan.hayward@arm.com>
16914 David Sherwood <david.sherwood@arm.com>
16916 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
16917 (reduc_xor_scal_optab): New optabs.
16918 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
16919 (reduc_xor_scal_@var{m}): Document.
16920 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
16921 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
16922 internal functions.
16923 * fold-const-call.c (fold_const_call): Handle them.
16924 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
16925 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
16926 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
16927 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
16928 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
16929 (UNSPEC_XORV): New unspecs.
16930 (optab): Add entries for them.
16931 (BITWISEV): New int iterator.
16932 (bit_reduc_op): New int attributes.
16934 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16935 Alan Hayward <alan.hayward@arm.com>
16936 David Sherwood <david.sherwood@arm.com>
16938 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
16939 * internal-fn.def (VEC_SHL_INSERT): New internal function.
16940 * optabs.def (vec_shl_insert_optab): New optab.
16941 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
16942 (duplicate_and_interleave): Likewise.
16943 * tree-vect-loop.c: Include internal-fn.h.
16944 (neutral_op_for_slp_reduction): New function, split out from
16945 get_initial_defs_for_reduction.
16946 (get_initial_def_for_reduction): Handle option 2 for variable-length
16947 vectors by loading the neutral value into a vector and then shifting
16948 the initial value into element 0.
16949 (get_initial_defs_for_reduction): Replace the code argument with
16950 the neutral value calculated by neutral_op_for_slp_reduction.
16951 Use gimple_build_vector for constant-length vectors.
16952 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
16953 but the first group_size elements have a neutral value.
16954 Use duplicate_and_interleave otherwise.
16955 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
16956 Update call to get_initial_defs_for_reduction. Handle SLP
16957 reductions for variable-length vectors by creating one vector
16958 result for each scalar result, with the elements associated
16959 with other scalar results stubbed out with the neutral value.
16960 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
16961 Require IFN_VEC_SHL_INSERT for double reductions on
16962 variable-length vectors, or SLP reductions that have
16963 a neutral value. Require can_duplicate_and_interleave_p
16964 support for variable-length unchained SLP reductions if there
16965 is no neutral value, such as for MIN/MAX reductions. Also require
16966 the number of vector elements to be a multiple of the number of
16967 SLP statements when doing variable-length unchained SLP reductions.
16968 Update call to vect_create_epilog_for_reduction.
16969 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
16970 and remove initial values.
16971 (duplicate_and_interleave): Make public.
16972 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
16973 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
16975 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16976 Alan Hayward <alan.hayward@arm.com>
16977 David Sherwood <david.sherwood@arm.com>
16979 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
16980 (can_duplicate_and_interleave_p): New function.
16981 (vect_get_and_check_slp_defs): Take the vector of statements
16982 rather than just the current one. Remove excess parentheses.
16983 Restriction rejectinon of vect_constant_def and vect_external_def
16984 for variable-length vectors to boolean types, or types for which
16985 can_duplicate_and_interleave_p is false.
16986 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
16987 (duplicate_and_interleave): New function.
16988 (vect_get_constant_vectors): Use gimple_build_vector for
16989 constant-length vectors and suitable variable-length constant
16990 vectors. Use duplicate_and_interleave for other variable-length
16991 vectors. Don't defer the update when inserting new statements.
16993 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16994 Alan Hayward <alan.hayward@arm.com>
16995 David Sherwood <david.sherwood@arm.com>
16997 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
16998 min_profitable_iters doesn't go negative.
17000 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17001 Alan Hayward <alan.hayward@arm.com>
17002 David Sherwood <david.sherwood@arm.com>
17004 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
17005 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
17006 * optabs.def (vec_mask_load_lanes_optab): New optab.
17007 (vec_mask_store_lanes_optab): Likewise.
17008 * internal-fn.def (MASK_LOAD_LANES): New internal function.
17009 (MASK_STORE_LANES): Likewise.
17010 * internal-fn.c (mask_load_lanes_direct): New macro.
17011 (mask_store_lanes_direct): Likewise.
17012 (expand_mask_load_optab_fn): Handle masked operations.
17013 (expand_mask_load_lanes_optab_fn): New macro.
17014 (expand_mask_store_optab_fn): Handle masked operations.
17015 (expand_mask_store_lanes_optab_fn): New macro.
17016 (direct_mask_load_lanes_optab_supported_p): Likewise.
17017 (direct_mask_store_lanes_optab_supported_p): Likewise.
17018 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
17020 (vect_load_lanes_supported): Likewise.
17021 * tree-vect-data-refs.c (strip_conversion): New function.
17022 (can_group_stmts_p): Likewise.
17023 (vect_analyze_data_ref_accesses): Use it instead of checking
17024 for a pair of assignments.
17025 (vect_store_lanes_supported): Take a masked_p parameter.
17026 (vect_load_lanes_supported): Likewise.
17027 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
17028 vect_store_lanes_supported and vect_load_lanes_supported.
17029 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
17030 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
17031 parameter. Don't allow gaps for masked accesses.
17032 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
17033 and vect_load_lanes_supported.
17034 (get_load_store_type): Take a masked_p parameter and update
17035 call to get_group_load_store_type.
17036 (vectorizable_store): Update call to get_load_store_type.
17037 Handle IFN_MASK_STORE_LANES.
17038 (vectorizable_load): Update call to get_load_store_type.
17039 Handle IFN_MASK_LOAD_LANES.
17041 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17042 Alan Hayward <alan.hayward@arm.com>
17043 David Sherwood <david.sherwood@arm.com>
17045 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
17047 * config/aarch64/aarch64-protos.h
17048 (aarch64_sve_struct_memory_operand_p): Declare.
17049 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
17050 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
17051 (VPRED, vpred): Handle SVE structure modes.
17052 * config/aarch64/constraints.md (Utx): New constraint.
17053 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
17054 (aarch64_sve_struct_nonimmediate_operand): New predicates.
17055 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
17056 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
17057 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
17058 structure modes. Split into pieces after RA.
17059 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
17060 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
17062 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
17063 SVE structure modes.
17064 (aarch64_classify_address): Likewise.
17065 (sizetochar): Move earlier in file.
17066 (aarch64_print_operand): Handle SVE register lists.
17067 (aarch64_array_mode): New function.
17068 (aarch64_sve_struct_memory_operand_p): Likewise.
17069 (TARGET_ARRAY_MODE): Redefine.
17071 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17072 Alan Hayward <alan.hayward@arm.com>
17073 David Sherwood <david.sherwood@arm.com>
17075 * target.def (array_mode): New target hook.
17076 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
17077 * doc/tm.texi: Regenerate.
17078 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
17079 * hooks.c (hook_optmode_mode_uhwi_none): New function.
17080 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
17081 targetm.array_mode.
17082 * stor-layout.c (mode_for_array): Likewise. Support polynomial
17085 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17086 Alan Hayward <alan.hayward@arm.com>
17087 David Sherwood <david.sherwood@arm.com>
17089 * fold-const.c (fold_binary_loc): Check the argument types
17090 rather than the result type when testing for a vector operation.
17092 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17094 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
17095 * doc/tm.texi: Regenerate.
17097 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17098 Alan Hayward <alan.hayward@arm.com>
17099 David Sherwood <david.sherwood@arm.com>
17101 * doc/invoke.texi (-msve-vector-bits=): Document new option.
17102 (sve): Document new AArch64 extension.
17103 * doc/md.texi (w): Extend the description of the AArch64
17104 constraint to include SVE vectors.
17105 (Upl, Upa): Document new AArch64 predicate constraints.
17106 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
17108 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
17109 (msve-vector-bits=): New option.
17110 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
17111 SVE when these are disabled.
17112 (sve): New extension.
17113 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
17114 modes. Adjust their number of units based on aarch64_sve_vg.
17115 (MAX_BITSIZE_MODE_ANY_MODE): Define.
17116 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
17117 aarch64_addr_query_type.
17118 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
17119 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
17120 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
17121 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
17122 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
17123 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
17124 (aarch64_simd_imm_zero_p): Delete.
17125 (aarch64_check_zero_based_sve_index_immediate): Declare.
17126 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17127 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17128 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17129 (aarch64_sve_float_mul_immediate_p): Likewise.
17130 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17131 rather than an rtx.
17132 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
17133 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
17134 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
17135 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
17136 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
17137 (aarch64_regmode_natural_size): Likewise.
17138 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
17139 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
17141 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
17142 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
17143 for VG and the SVE predicate registers.
17144 (V_ALIASES): Add a "z"-prefixed alias.
17145 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
17146 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
17147 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
17148 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
17149 (REG_CLASS_NAMES): Add entries for them.
17150 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
17151 and the predicate registers.
17152 (aarch64_sve_vg): Declare.
17153 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
17154 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
17155 (REGMODE_NATURAL_SIZE): Define.
17156 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
17158 * config/aarch64/aarch64.c: Include cfgrtl.h.
17159 (simd_immediate_info): Add a constructor for series vectors,
17160 and an associated step field.
17161 (aarch64_sve_vg): New variable.
17162 (aarch64_dbx_register_number): Handle VG and the predicate registers.
17163 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
17164 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
17165 (VEC_ANY_DATA, VEC_STRUCT): New constants.
17166 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
17167 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
17168 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
17169 (aarch64_get_mask_mode): New functions.
17170 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
17171 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
17172 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
17173 predicate modes and predicate registers. Explicitly restrict
17174 GPRs to modes of 16 bytes or smaller. Only allow FP registers
17175 to store a vector mode if it is recognized by
17176 aarch64_classify_vector_mode.
17177 (aarch64_regmode_natural_size): New function.
17178 (aarch64_hard_regno_caller_save_mode): Return the original mode
17180 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
17181 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
17182 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
17183 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
17185 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
17186 does not overlap dest if the function is frame-related. Handle
17188 (aarch64_split_add_offset): New function.
17189 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
17190 them aarch64_add_offset.
17191 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
17192 and update call to aarch64_sub_sp.
17193 (aarch64_add_cfa_expression): New function.
17194 (aarch64_expand_prologue): Pass extra temporary registers to the
17195 functions above. Handle the case in which we need to emit new
17196 DW_CFA_expressions for registers that were originally saved
17197 relative to the stack pointer, but now have to be expressed
17198 relative to the frame pointer.
17199 (aarch64_output_mi_thunk): Pass extra temporary registers to the
17201 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
17202 IP0 and IP1 values for SVE frames.
17203 (aarch64_expand_vec_series): New function.
17204 (aarch64_expand_sve_widened_duplicate): Likewise.
17205 (aarch64_expand_sve_const_vector): Likewise.
17206 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
17207 Handle SVE constants. Use emit_move_insn to move a force_const_mem
17208 into the register, rather than emitting a SET directly.
17209 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
17210 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
17211 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
17212 (offset_9bit_signed_scaled_p): New functions.
17213 (aarch64_replicate_bitmask_imm): New function.
17214 (aarch64_bitmask_imm): Use it.
17215 (aarch64_cannot_force_const_mem): Reject expressions involving
17216 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
17217 (aarch64_classify_index): Handle SVE indices, by requiring
17218 a plain register index with a scale that matches the element size.
17219 (aarch64_classify_address): Handle SVE addresses. Assert that
17220 the mode of the address is VOIDmode or an integer mode.
17221 Update call to aarch64_classify_symbol.
17222 (aarch64_classify_symbolic_expression): Update call to
17223 aarch64_classify_symbol.
17224 (aarch64_const_vec_all_in_range_p): New function.
17225 (aarch64_print_vector_float_operand): Likewise.
17226 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
17227 "vN" for FP registers with SVE modes. Handle (const ...) vectors
17228 and the FP immediates 1.0 and 0.5.
17229 (aarch64_print_address_internal): Handle SVE addresses.
17230 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
17231 (aarch64_regno_regclass): Handle predicate registers.
17232 (aarch64_secondary_reload): Handle big-endian reloads of SVE
17234 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
17235 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
17236 (aarch64_convert_sve_vector_bits): New function.
17237 (aarch64_override_options): Use it to handle -msve-vector-bits=.
17238 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17239 rather than an rtx.
17240 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
17241 Handle SVE vector and predicate modes. Accept VL-based constants
17242 that need only one temporary register, and VL offsets that require
17243 no temporary registers.
17244 (aarch64_conditional_register_usage): Mark the predicate registers
17245 as fixed if SVE isn't available.
17246 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
17247 Return true for SVE vector and predicate modes.
17248 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
17249 rather than an unsigned int. Handle SVE modes.
17250 (aarch64_preferred_simd_mode): Update call accordingly. Handle
17252 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
17254 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17255 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17256 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17257 (aarch64_sve_float_mul_immediate_p): New functions.
17258 (aarch64_sve_valid_immediate): New function.
17259 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
17260 Explicitly reject structure modes. Check for INDEX constants.
17261 Handle PTRUE and PFALSE constants.
17262 (aarch64_check_zero_based_sve_index_immediate): New function.
17263 (aarch64_simd_imm_zero_p): Delete.
17264 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
17265 vector modes. Accept constants in the range of CNT[BHWD].
17266 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
17267 ask for an Advanced SIMD mode.
17268 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
17269 (aarch64_simd_vector_alignment): Handle SVE predicates.
17270 (aarch64_vectorize_preferred_vector_alignment): New function.
17271 (aarch64_simd_vector_alignment_reachable): Use it instead of
17273 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
17274 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
17276 (MAX_VECT_LEN): Delete.
17277 (expand_vec_perm_d): Add a vec_flags field.
17278 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
17279 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
17280 (aarch64_evpc_ext): Don't apply a big-endian lane correction
17282 (aarch64_evpc_rev): Rename to...
17283 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
17284 (aarch64_evpc_rev_global): New function.
17285 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
17286 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
17288 (aarch64_evpc_sve_tbl): New function.
17289 (aarch64_expand_vec_perm_const_1): Update after rename of
17290 aarch64_evpc_rev. Handle SVE permutes too, trying
17291 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
17292 than aarch64_evpc_tbl.
17293 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
17294 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
17295 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
17296 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
17297 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
17298 (aarch64_expand_sve_vcond): New functions.
17299 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
17300 of aarch64_vector_mode_p.
17301 (aarch64_dwarf_poly_indeterminate_value): New function.
17302 (aarch64_compute_pressure_classes): Likewise.
17303 (aarch64_can_change_mode_class): Likewise.
17304 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
17305 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
17306 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
17307 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
17308 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
17309 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
17310 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
17311 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
17313 (Dn, Dl, Dr): Accept const as well as const_vector.
17314 (Dz): Likewise. Compare against CONST0_RTX.
17315 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
17316 of "vector" where appropriate.
17317 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
17318 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
17319 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
17320 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
17321 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
17322 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
17323 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
17324 (v_int_equiv): Extend to SVE modes.
17325 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
17327 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
17328 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
17329 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
17330 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
17331 (SVE_COND_FP_CMP): New int iterators.
17332 (perm_hilo): Handle the new unpack unspecs.
17333 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
17335 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
17336 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
17337 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
17338 (aarch64_equality_operator, aarch64_constant_vector_operand)
17339 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
17340 (aarch64_sve_nonimmediate_operand): Likewise.
17341 (aarch64_sve_general_operand): Likewise.
17342 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
17343 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
17344 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
17345 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
17346 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
17347 (aarch64_sve_float_arith_immediate): Likewise.
17348 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
17349 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
17350 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
17351 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
17352 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
17353 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
17354 (aarch64_sve_float_arith_operand): Likewise.
17355 (aarch64_sve_float_arith_with_sub_operand): Likewise.
17356 (aarch64_sve_float_mul_operand): Likewise.
17357 (aarch64_sve_vec_perm_operand): Likewise.
17358 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
17359 (aarch64_mov_operand): Accept const_poly_int and const_vector.
17360 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
17361 as well as const_vector.
17362 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
17363 in file. Use CONST0_RTX and CONSTM1_RTX.
17364 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
17365 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
17366 Use aarch64_simd_imm_zero.
17367 * config/aarch64/aarch64-sve.md: New file.
17368 * config/aarch64/aarch64.md: Include it.
17369 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
17370 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
17371 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
17372 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
17373 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
17374 (sve): New attribute.
17375 (enabled): Disable instructions with the sve attribute unless
17377 (movqi, movhi): Pass CONST_POLY_INT operaneds through
17378 aarch64_expand_mov_immediate.
17379 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
17380 CNT[BHSD] immediates.
17381 (movti): Split CONST_POLY_INT moves into two halves.
17382 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
17383 Split additions that need a temporary here if the destination
17384 is the stack pointer.
17385 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
17386 (*add<mode>3_poly_1): New instruction.
17387 (set_clobber_cc): New expander.
17389 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17391 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
17392 parameter and use it instead of GET_MODE_SIZE (innermode). Use
17393 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
17394 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
17395 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
17396 Change innermode from fixed_mode_size to machine_mode.
17397 (simplify_subreg): Update call accordingly. Handle a constant-sized
17398 subreg of a variable-length CONST_VECTOR.
17400 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17401 Alan Hayward <alan.hayward@arm.com>
17402 David Sherwood <david.sherwood@arm.com>
17404 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
17405 (add_offset_to_base): New function, split out from...
17406 (create_mem_ref): ...here. When handling a scale other than 1,
17407 check first whether the address is valid without the offset.
17408 Add it into the base if so, leaving the index and scale as-is.
17410 2018-01-12 Jakub Jelinek <jakub@redhat.com>
17413 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
17414 fold_for_warn before checking if arg2 is INTEGER_CST.
17416 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
17418 * config/rs6000/predicates.md (load_multiple_operation): Delete.
17419 (store_multiple_operation): Delete.
17420 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
17421 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
17422 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
17423 guarded by TARGET_STRING.
17424 (rs6000_output_load_multiple): Delete.
17425 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
17426 OPTION_MASK_STRING / TARGET_STRING handling.
17427 (print_operand) <'N', 'O'>: Add comment that these are unused now.
17428 (const rs6000_opt_masks) <"string">: Change mask to 0.
17429 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
17430 (MASK_STRING): Delete.
17431 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
17433 (load_multiple): Delete.
17440 (store_multiple): Delete.
17447 (movmemsi_8reg): Delete.
17448 (corresponding unnamed define_insn): Delete.
17449 (movmemsi_6reg): Delete.
17450 (corresponding unnamed define_insn): Delete.
17451 (movmemsi_4reg): Delete.
17452 (corresponding unnamed define_insn): Delete.
17453 (movmemsi_2reg): Delete.
17454 (corresponding unnamed define_insn): Delete.
17455 (movmemsi_1reg): Delete.
17456 (corresponding unnamed define_insn): Delete.
17457 * config/rs6000/rs6000.opt (mno-string): New.
17458 (mstring): Replace by deprecation warning stub.
17459 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
17461 2018-01-12 Jakub Jelinek <jakub@redhat.com>
17463 * regrename.c (regrename_do_replace): If replacing the same
17464 reg multiple times, try to reuse last created gen_raw_REG.
17467 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
17468 main to workaround a bug in GDB.
17470 2018-01-12 Tom de Vries <tom@codesourcery.com>
17473 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
17475 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
17477 PR rtl-optimization/80481
17478 * ira-color.c (get_cap_member): New function.
17479 (allocnos_conflict_by_live_ranges_p): Use it.
17480 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
17481 (setup_slot_coalesced_allocno_live_ranges): Ditto.
17483 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
17486 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
17487 (*saddl_se_1): Ditto.
17488 (*ssubsi_1): Ditto.
17489 (*ssubl_se_1): Ditto.
17491 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17493 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
17494 rather than wi::to_widest for DR_INITs.
17495 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
17496 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
17497 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
17499 (vect_analyze_group_access_1): Note that here.
17501 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17503 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
17504 polynomial type sizes.
17506 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
17508 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
17509 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
17510 (gimple_add_tmp_var): Likewise.
17512 2018-01-12 Martin Liska <mliska@suse.cz>
17514 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
17515 (gimple_alloc_sizes): Likewise.
17516 (dump_gimple_statistics): Use PRIu64 in printf format.
17517 * gimple.h: Change uint64_t to int.
17519 2018-01-12 Martin Liska <mliska@suse.cz>
17521 * tree-core.h: Use uint64_t instead of int.
17522 * tree.c (tree_node_counts): Likewise.
17523 (tree_node_sizes): Likewise.
17524 (dump_tree_statistics): Use PRIu64 in printf format.
17526 2018-01-12 Martin Liska <mliska@suse.cz>
17528 * Makefile.in: As qsort_chk is implemented in vec.c, add
17529 vec.o to linkage of gencfn-macros.
17530 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
17531 passing the info to record_node_allocation_statistics.
17532 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
17534 * ggc-common.c (struct ggc_usage): Add operator== and use
17535 it in operator< and compare function.
17536 * mem-stats.h (struct mem_usage): Likewise.
17537 * vec.c (struct vec_usage): Remove operator< and compare
17538 function. Can be simply inherited.
17540 2018-01-12 Martin Jambor <mjambor@suse.cz>
17543 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
17544 * tree-ssa-math-opts.c: Include domwalk.h.
17545 (convert_mult_to_fma_1): New function.
17546 (fma_transformation_info): New type.
17547 (fma_deferring_state): Likewise.
17548 (cancel_fma_deferring): New function.
17549 (result_of_phi): Likewise.
17550 (last_fma_candidate_feeds_initial_phi): Likewise.
17551 (convert_mult_to_fma): Added deferring logic, split actual
17552 transformation to convert_mult_to_fma_1.
17553 (math_opts_dom_walker): New type.
17554 (math_opts_dom_walker::after_dom_children): New method, body moved
17555 here from pass_optimize_widening_mul::execute, added deferring logic
17557 (pass_optimize_widening_mul::execute): Moved most of code to
17558 math_opts_dom_walker::after_dom_children.
17559 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
17560 * config/i386/i386.c (ix86_option_override_internal): Added
17561 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
17563 2018-01-12 Richard Biener <rguenther@suse.de>
17566 * dwarf2out.c (gen_variable_die): Do not reset old_die for
17567 inline instance vars.
17569 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
17572 * config/rx/rx.c (rx_is_restricted_memory_address):
17573 Handle SUBREG case.
17575 2018-01-12 Richard Biener <rguenther@suse.de>
17577 PR tree-optimization/80846
17578 * target.def (split_reduction): New target hook.
17579 * targhooks.c (default_split_reduction): New function.
17580 * targhooks.h (default_split_reduction): Declare.
17581 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
17582 target requests first reduce vectors by combining low and high
17584 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
17585 (get_vectype_for_scalar_type_and_size): Export.
17586 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
17587 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
17588 * doc/tm.texi: Regenerate.
17589 * config/i386/i386.c (ix86_split_reduction): Implement
17590 TARGET_VECTORIZE_SPLIT_REDUCTION.
17592 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17595 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
17596 in PIC mode except for TARGET_VXWORKS_RTP.
17597 * config/sparc/sparc.c: Include cfgrtl.h.
17598 (TARGET_INIT_PIC_REG): Define.
17599 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
17600 (sparc_pic_register_p): New predicate.
17601 (sparc_legitimate_address_p): Use it.
17602 (sparc_legitimize_pic_address): Likewise.
17603 (sparc_delegitimize_address): Likewise.
17604 (sparc_mode_dependent_address_p): Likewise.
17605 (gen_load_pcrel_sym): Remove 4th parameter.
17606 (load_got_register): Adjust call to above. Remove obsolete stuff.
17607 (sparc_expand_prologue): Do not call load_got_register here.
17608 (sparc_flat_expand_prologue): Likewise.
17609 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
17610 (sparc_use_pseudo_pic_reg): New function.
17611 (sparc_init_pic_reg): Likewise.
17612 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17613 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
17615 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
17617 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
17618 Add item for branch_cost.
17620 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
17622 PR rtl-optimization/83565
17623 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
17624 not extend the result to a larger mode for rotate operations.
17625 (num_sign_bit_copies1): Likewise.
17627 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17630 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
17632 Use values-Xc.o for -pedantic.
17633 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
17635 2018-01-12 Martin Liska <mliska@suse.cz>
17638 * ipa-devirt.c (final_warning_record::grow_type_warnings):
17640 (possible_polymorphic_call_targets): Use it.
17641 (ipa_devirt): Likewise.
17643 2018-01-12 Martin Liska <mliska@suse.cz>
17645 * profile-count.h (enum profile_quality): Use 0 as invalid
17646 enum value of profile_quality.
17648 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
17650 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
17651 -mext-string options.
17653 2018-01-12 Richard Biener <rguenther@suse.de>
17655 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
17656 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
17657 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
17659 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
17661 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17663 * configure.ac (--with-long-double-format): Add support for the
17664 configuration option to change the default long double format on
17666 * config.gcc (powerpc*-linux*-*): Likewise.
17667 * configure: Regenerate.
17668 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
17669 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
17670 used without modification.
17672 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17674 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
17675 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
17676 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
17677 MISC_BUILTIN_SPEC_BARRIER.
17678 (rs6000_init_builtins): Likewise.
17679 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
17681 (speculation_barrier): New define_insn.
17682 * doc/extend.texi: Document __builtin_speculation_barrier.
17684 2018-01-11 Jakub Jelinek <jakub@redhat.com>
17687 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
17688 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
17689 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
17691 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
17692 integral modes instead of "ss" and "sd".
17693 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
17694 vectors with 32-bit and 64-bit elements.
17695 (vecdupssescalarmodesuffix): New mode attribute.
17696 (vec_dup<mode>): Use it.
17698 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
17701 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
17702 frame if argument is passed on stack.
17704 2018-01-11 Jakub Jelinek <jakub@redhat.com>
17707 * ree.c (combine_reaching_defs): Optimize also
17708 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
17709 reg2=any_extend(exp); reg1=reg2;, formatting fix.
17711 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
17713 PR middle-end/83189
17714 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
17716 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
17718 PR middle-end/83718
17719 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
17720 after they are computed.
17722 2018-01-11 Bin Cheng <bin.cheng@arm.com>
17724 PR tree-optimization/83695
17725 * gimple-loop-linterchange.cc
17726 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
17727 reset cached scev information after interchange.
17728 (pass_linterchange::execute): Remove call to scev_reset_htab.
17730 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17732 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
17733 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
17734 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
17735 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
17736 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
17737 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
17738 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
17739 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
17740 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
17741 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
17742 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
17743 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
17744 (V_lane_reg): Likewise.
17745 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
17747 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
17748 (vfmal_lane_low<mode>_intrinsic,
17749 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
17750 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
17751 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
17752 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
17753 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
17754 vfmsl_lane_high<mode>_intrinsic): New define_insns.
17756 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17758 * config/arm/arm-cpus.in (fp16fml): New feature.
17759 (ALL_SIMD): Add fp16fml.
17760 (armv8.2-a): Add fp16fml as an option.
17761 (armv8.3-a): Likewise.
17762 (armv8.4-a): Add fp16fml as part of fp16.
17763 * config/arm/arm.h (TARGET_FP16FML): Define.
17764 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
17766 * config/arm/arm-modes.def (V2HF): Define.
17767 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
17768 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
17769 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
17770 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
17771 vfmsl_low, vfmsl_high): New set of builtins.
17772 * config/arm/iterators.md (PLUSMINUS): New code iterator.
17773 (vfml_op): New code attribute.
17774 (VFMLHALVES): New int iterator.
17775 (VFML, VFMLSEL): New mode attributes.
17776 (V_reg): Define mapping for V2HF.
17777 (V_hi, V_lo): New mode attributes.
17778 (VF_constraint): Likewise.
17779 (vfml_half, vfml_half_selector): New int attributes.
17780 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
17782 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
17783 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
17785 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
17786 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
17787 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
17788 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
17790 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
17791 Document new effective target and option set.
17793 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17795 * config/arm/arm-cpus.in (armv8_4): New feature.
17796 (ARMv8_4a): New fgroup.
17797 (armv8.4-a): New arch.
17798 * config/arm/arm-tables.opt: Regenerate.
17799 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
17800 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
17801 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
17802 Add matching rules for -march=armv8.4-a and extensions.
17803 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
17805 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
17808 * config/rx/rx.md (BW): New mode attribute.
17809 (sync_lock_test_and_setsi): Add mode suffix to insn output.
17811 2018-01-11 Richard Biener <rguenther@suse.de>
17813 PR tree-optimization/83435
17814 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
17815 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
17816 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
17818 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17819 Alan Hayward <alan.hayward@arm.com>
17820 David Sherwood <david.sherwood@arm.com>
17822 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
17824 (aarch64_classify_address): Initialize it. Track polynomial offsets.
17825 (aarch64_print_address_internal): Use it to check for a zero offset.
17827 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17828 Alan Hayward <alan.hayward@arm.com>
17829 David Sherwood <david.sherwood@arm.com>
17831 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
17832 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
17833 Return a poly_int64 rather than a HOST_WIDE_INT.
17834 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
17835 rather than a HOST_WIDE_INT.
17836 * config/aarch64/aarch64.h (aarch64_frame): Protect with
17837 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
17838 hard_fp_offset, frame_size, initial_adjust, callee_offset and
17839 final_offset from HOST_WIDE_INT to poly_int64.
17840 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
17841 to_constant when getting the number of units in an Advanced SIMD
17843 (aarch64_builtin_vectorized_function): Check for a constant number
17845 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
17847 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
17848 attribute instead of GET_MODE_NUNITS.
17849 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
17850 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
17851 GET_MODE_SIZE for fixed-size registers.
17852 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
17853 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
17854 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
17855 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
17856 (aarch64_print_operand, aarch64_print_address_internal)
17857 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
17858 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
17859 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
17860 Handle polynomial GET_MODE_SIZE.
17861 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
17862 wider than SImode without modification.
17863 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
17864 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
17865 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
17866 passing and returning SVE modes.
17867 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
17868 rather than GEN_INT.
17869 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
17870 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
17871 (aarch64_allocate_and_probe_stack_space): Likewise.
17872 (aarch64_layout_frame): Cope with polynomial offsets.
17873 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
17874 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
17875 polynomial offsets.
17876 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
17877 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
17878 poly_int64 rather than a HOST_WIDE_INT.
17879 (aarch64_get_separate_components, aarch64_process_components)
17880 (aarch64_expand_prologue, aarch64_expand_epilogue)
17881 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
17882 (aarch64_anchor_offset): New function, split out from...
17883 (aarch64_legitimize_address): ...here.
17884 (aarch64_builtin_vectorization_cost): Handle polynomial
17885 TYPE_VECTOR_SUBPARTS.
17886 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
17888 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
17889 number of elements from the PARALLEL rather than the mode.
17890 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
17891 rather than GET_MODE_BITSIZE.
17892 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
17893 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
17894 (aarch64_expand_vec_perm_const_1): Handle polynomial
17895 d->perm.length () and d->perm elements.
17896 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
17897 Apply to_constant to d->perm elements.
17898 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
17899 polynomial CONST_VECTOR_NUNITS.
17900 (aarch64_move_pointer): Take amount as a poly_int64 rather
17902 (aarch64_progress_pointer): Avoid temporary variable.
17903 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
17904 the mode attribute instead of GET_MODE.
17906 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17907 Alan Hayward <alan.hayward@arm.com>
17908 David Sherwood <david.sherwood@arm.com>
17910 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
17911 x exists before using it.
17912 (aarch64_add_constant_internal): Rename to...
17913 (aarch64_add_offset_1): ...this. Replace regnum with separate
17914 src and dest rtxes. Handle the case in which they're different,
17915 including when the offset is zero. Replace scratchreg with an rtx.
17916 Use 2 additions if there is no spare register into which we can
17917 move a 16-bit constant.
17918 (aarch64_add_constant): Delete.
17919 (aarch64_add_offset): Replace reg with separate src and dest
17920 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
17921 Use aarch64_add_offset_1.
17922 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
17923 an rtx rather than an int. Take the delta as a poly_int64
17924 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
17925 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
17926 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
17927 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
17928 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
17929 and aarch64_add_sp.
17930 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
17931 aarch64_add_constant.
17933 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17935 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
17936 Use scalar_float_mode.
17938 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17940 * config/aarch64/aarch64-simd.md
17941 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
17942 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
17943 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
17944 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
17945 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
17946 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
17947 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
17948 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
17949 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
17950 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
17952 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17955 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
17956 targ_options->x_arm_arch_string is non NULL.
17958 2018-01-11 Tamar Christina <tamar.christina@arm.com>
17960 * config/aarch64/aarch64.h
17961 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
17963 2018-01-11 Sudakshina Das <sudi.das@arm.com>
17966 * expmed.c (emit_store_flag_force): Swap if const op0
17967 and change VOIDmode to mode of op0.
17969 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
17971 PR rtl-optimization/83761
17972 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
17973 than bytes to mode_for_size.
17975 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17977 PR middle-end/83189
17978 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
17979 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
17982 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17984 PR middle-end/83575
17985 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
17986 when in layout mode.
17987 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
17988 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
17991 2018-01-10 Michael Collison <michael.collison@arm.com>
17993 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
17994 * config/aarch64/aarch64-option-extension.def: Add
17995 AARCH64_OPT_EXTENSION of 'fp16fml'.
17996 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17997 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
17998 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
17999 * config/aarch64/constraints.md (Ui7): New constraint.
18000 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
18001 (VFMLA_SEL_W): Ditto.
18004 (VFMLA16_LOW): New int iterator.
18005 (VFMLA16_HIGH): Ditto.
18006 (UNSPEC_FMLAL): New unspec.
18007 (UNSPEC_FMLSL): Ditto.
18008 (UNSPEC_FMLAL2): Ditto.
18009 (UNSPEC_FMLSL2): Ditto.
18010 (f16mac): New code attribute.
18011 * config/aarch64/aarch64-simd-builtins.def
18012 (aarch64_fmlal_lowv2sf): Ditto.
18013 (aarch64_fmlsl_lowv2sf): Ditto.
18014 (aarch64_fmlalq_lowv4sf): Ditto.
18015 (aarch64_fmlslq_lowv4sf): Ditto.
18016 (aarch64_fmlal_highv2sf): Ditto.
18017 (aarch64_fmlsl_highv2sf): Ditto.
18018 (aarch64_fmlalq_highv4sf): Ditto.
18019 (aarch64_fmlslq_highv4sf): Ditto.
18020 (aarch64_fmlal_lane_lowv2sf): Ditto.
18021 (aarch64_fmlsl_lane_lowv2sf): Ditto.
18022 (aarch64_fmlal_laneq_lowv2sf): Ditto.
18023 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
18024 (aarch64_fmlalq_lane_lowv4sf): Ditto.
18025 (aarch64_fmlsl_lane_lowv4sf): Ditto.
18026 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
18027 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
18028 (aarch64_fmlal_lane_highv2sf): Ditto.
18029 (aarch64_fmlsl_lane_highv2sf): Ditto.
18030 (aarch64_fmlal_laneq_highv2sf): Ditto.
18031 (aarch64_fmlsl_laneq_highv2sf): Ditto.
18032 (aarch64_fmlalq_lane_highv4sf): Ditto.
18033 (aarch64_fmlsl_lane_highv4sf): Ditto.
18034 (aarch64_fmlalq_laneq_highv4sf): Ditto.
18035 (aarch64_fmlsl_laneq_highv4sf): Ditto.
18036 * config/aarch64/aarch64-simd.md:
18037 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
18038 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18039 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
18040 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18041 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
18042 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
18043 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
18044 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
18045 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
18046 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
18047 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
18048 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
18049 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
18050 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
18051 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
18052 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
18053 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
18054 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
18055 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
18056 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
18057 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
18058 (vfmlsl_low_u32): Ditto.
18059 (vfmlalq_low_u32): Ditto.
18060 (vfmlslq_low_u32): Ditto.
18061 (vfmlal_high_u32): Ditto.
18062 (vfmlsl_high_u32): Ditto.
18063 (vfmlalq_high_u32): Ditto.
18064 (vfmlslq_high_u32): Ditto.
18065 (vfmlal_lane_low_u32): Ditto.
18066 (vfmlsl_lane_low_u32): Ditto.
18067 (vfmlal_laneq_low_u32): Ditto.
18068 (vfmlsl_laneq_low_u32): Ditto.
18069 (vfmlalq_lane_low_u32): Ditto.
18070 (vfmlslq_lane_low_u32): Ditto.
18071 (vfmlalq_laneq_low_u32): Ditto.
18072 (vfmlslq_laneq_low_u32): Ditto.
18073 (vfmlal_lane_high_u32): Ditto.
18074 (vfmlsl_lane_high_u32): Ditto.
18075 (vfmlal_laneq_high_u32): Ditto.
18076 (vfmlsl_laneq_high_u32): Ditto.
18077 (vfmlalq_lane_high_u32): Ditto.
18078 (vfmlslq_lane_high_u32): Ditto.
18079 (vfmlalq_laneq_high_u32): Ditto.
18080 (vfmlslq_laneq_high_u32): Ditto.
18081 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
18082 (AARCH64_FL_FOR_ARCH8_4): New.
18083 (AARCH64_ISA_F16FML): New ISA flag.
18084 (TARGET_F16FML): New feature flag for fp16fml.
18085 (doc/invoke.texi): Document new fp16fml option.
18087 2018-01-10 Michael Collison <michael.collison@arm.com>
18089 * config/aarch64/aarch64-builtins.c:
18090 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
18091 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18092 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
18093 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
18094 (AARCH64_ISA_SHA3): New ISA flag.
18095 (TARGET_SHA3): New feature flag for sha3.
18096 * config/aarch64/iterators.md (sha512_op): New int attribute.
18097 (CRYPTO_SHA512): New int iterator.
18098 (UNSPEC_SHA512H): New unspec.
18099 (UNSPEC_SHA512H2): Ditto.
18100 (UNSPEC_SHA512SU0): Ditto.
18101 (UNSPEC_SHA512SU1): Ditto.
18102 * config/aarch64/aarch64-simd-builtins.def
18103 (aarch64_crypto_sha512hqv2di): New builtin.
18104 (aarch64_crypto_sha512h2qv2di): Ditto.
18105 (aarch64_crypto_sha512su0qv2di): Ditto.
18106 (aarch64_crypto_sha512su1qv2di): Ditto.
18107 (aarch64_eor3qv8hi): Ditto.
18108 (aarch64_rax1qv2di): Ditto.
18109 (aarch64_xarqv2di): Ditto.
18110 (aarch64_bcaxqv8hi): Ditto.
18111 * config/aarch64/aarch64-simd.md:
18112 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
18113 (aarch64_crypto_sha512su0qv2di): Ditto.
18114 (aarch64_crypto_sha512su1qv2di): Ditto.
18115 (aarch64_eor3qv8hi): Ditto.
18116 (aarch64_rax1qv2di): Ditto.
18117 (aarch64_xarqv2di): Ditto.
18118 (aarch64_bcaxqv8hi): Ditto.
18119 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
18120 (vsha512h2q_u64): Ditto.
18121 (vsha512su0q_u64): Ditto.
18122 (vsha512su1q_u64): Ditto.
18123 (veor3q_u16): Ditto.
18124 (vrax1q_u64): Ditto.
18125 (vxarq_u64): Ditto.
18126 (vbcaxq_u16): Ditto.
18127 * config/arm/types.md (crypto_sha512): New type attribute.
18128 (crypto_sha3): Ditto.
18129 (doc/invoke.texi): Document new sha3 option.
18131 2018-01-10 Michael Collison <michael.collison@arm.com>
18133 * config/aarch64/aarch64-builtins.c:
18134 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
18135 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18136 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
18137 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
18138 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
18139 (AARCH64_ISA_SM4): New ISA flag.
18140 (TARGET_SM4): New feature flag for sm4.
18141 * config/aarch64/aarch64-simd-builtins.def
18142 (aarch64_sm3ss1qv4si): Ditto.
18143 (aarch64_sm3tt1aq4si): Ditto.
18144 (aarch64_sm3tt1bq4si): Ditto.
18145 (aarch64_sm3tt2aq4si): Ditto.
18146 (aarch64_sm3tt2bq4si): Ditto.
18147 (aarch64_sm3partw1qv4si): Ditto.
18148 (aarch64_sm3partw2qv4si): Ditto.
18149 (aarch64_sm4eqv4si): Ditto.
18150 (aarch64_sm4ekeyqv4si): Ditto.
18151 * config/aarch64/aarch64-simd.md:
18152 (aarch64_sm3ss1qv4si): Ditto.
18153 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
18154 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
18155 (aarch64_sm4eqv4si): Ditto.
18156 (aarch64_sm4ekeyqv4si): Ditto.
18157 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
18158 (sm3part_op): Ditto.
18159 (CRYPTO_SM3TT): Ditto.
18160 (CRYPTO_SM3PART): Ditto.
18161 (UNSPEC_SM3SS1): New unspec.
18162 (UNSPEC_SM3TT1A): Ditto.
18163 (UNSPEC_SM3TT1B): Ditto.
18164 (UNSPEC_SM3TT2A): Ditto.
18165 (UNSPEC_SM3TT2B): Ditto.
18166 (UNSPEC_SM3PARTW1): Ditto.
18167 (UNSPEC_SM3PARTW2): Ditto.
18168 (UNSPEC_SM4E): Ditto.
18169 (UNSPEC_SM4EKEY): Ditto.
18170 * config/aarch64/constraints.md (Ui2): New constraint.
18171 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
18172 * config/arm/types.md (crypto_sm3): New type attribute.
18173 (crypto_sm4): Ditto.
18174 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
18175 (vsm3tt1aq_u32): Ditto.
18176 (vsm3tt1bq_u32): Ditto.
18177 (vsm3tt2aq_u32): Ditto.
18178 (vsm3tt2bq_u32): Ditto.
18179 (vsm3partw1q_u32): Ditto.
18180 (vsm3partw2q_u32): Ditto.
18181 (vsm4eq_u32): Ditto.
18182 (vsm4ekeyq_u32): Ditto.
18183 (doc/invoke.texi): Document new sm4 option.
18185 2018-01-10 Michael Collison <michael.collison@arm.com>
18187 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
18188 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
18189 (AARCH64_FL_FOR_ARCH8_4): New.
18190 (AARCH64_FL_V8_4): New flag.
18191 (doc/invoke.texi): Document new armv8.4-a option.
18193 2018-01-10 Michael Collison <michael.collison@arm.com>
18195 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18196 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
18197 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
18198 * config/aarch64/aarch64-option-extension.def: Add
18199 AARCH64_OPT_EXTENSION of 'sha2'.
18200 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
18201 (crypto): Disable sha2 and aes if crypto disabled.
18202 (crypto): Enable aes and sha2 if enabled.
18203 (simd): Disable sha2 and aes if simd disabled.
18204 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
18206 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
18207 (TARGET_SHA2): New feature flag for sha2.
18208 (TARGET_AES): New feature flag for aes.
18209 * config/aarch64/aarch64-simd.md:
18210 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
18211 conditional on TARGET_AES.
18212 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
18213 (aarch64_crypto_sha1hsi): Make pattern conditional
18215 (aarch64_crypto_sha1hv4si): Ditto.
18216 (aarch64_be_crypto_sha1hv4si): Ditto.
18217 (aarch64_crypto_sha1su1v4si): Ditto.
18218 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
18219 (aarch64_crypto_sha1su0v4si): Ditto.
18220 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
18221 (aarch64_crypto_sha256su0v4si): Ditto.
18222 (aarch64_crypto_sha256su1v4si): Ditto.
18223 (doc/invoke.texi): Document new aes and sha2 options.
18225 2018-01-10 Martin Sebor <msebor@redhat.com>
18227 PR tree-optimization/83781
18228 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
18231 2018-01-11 Martin Sebor <msebor@gmail.com>
18232 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18234 PR tree-optimization/83501
18235 PR tree-optimization/81703
18237 * tree-ssa-strlen.c (get_string_cst): Rename...
18238 (get_string_len): ...to this. Handle global constants.
18239 (handle_char_store): Adjust.
18241 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
18242 Jim Wilson <jimw@sifive.com>
18244 * config/riscv/riscv-protos.h (riscv_output_return): New.
18245 * config/riscv/riscv.c (struct machine_function): New naked_p field.
18246 (riscv_attribute_table, riscv_output_return),
18247 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
18248 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
18249 (riscv_compute_frame_info): Only compute frame->mask if not a naked
18251 (riscv_expand_prologue): Add early return for naked function.
18252 (riscv_expand_epilogue): Likewise.
18253 (riscv_function_ok_for_sibcall): Return false for naked function.
18254 (riscv_set_current_function): New.
18255 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
18256 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
18257 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
18258 * doc/extend.texi (RISC-V Function Attributes): New.
18260 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
18262 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
18263 check for 128-bit long double before checking TCmode.
18264 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
18265 128-bit long doubles before checking TFmode or TCmode.
18266 (FLOAT128_IBM_P): Likewise.
18268 2018-01-10 Martin Sebor <msebor@redhat.com>
18270 PR tree-optimization/83671
18271 * builtins.c (c_strlen): Unconditionally return zero for the empty
18273 Use -Warray-bounds for warnings.
18274 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
18275 for non-constant array indices with COMPONENT_REF, arrays of
18276 arrays, and pointers to arrays.
18277 (gimple_fold_builtin_strlen): Determine and set length range for
18278 non-constant character arrays.
18280 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
18282 PR middle-end/81897
18283 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
18286 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
18288 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
18290 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18293 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
18294 VECTOR_MEM_ALTIVEC_OR_VSX_P.
18295 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
18296 indexed_or_indirect_operand predicate.
18297 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
18298 (*vsx_le_perm_load_v8hi): Likewise.
18299 (*vsx_le_perm_load_v16qi): Likewise.
18300 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
18301 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
18302 (*vsx_le_perm_store_v8hi): Likewise.
18303 (*vsx_le_perm_store_v16qi): Likewise.
18304 (eight unnamed splitters): Likewise.
18306 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
18308 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
18309 * config/rs6000/emmintrin.h: Likewise.
18310 * config/rs6000/mmintrin.h: Likewise.
18311 * config/rs6000/xmmintrin.h: Likewise.
18313 2018-01-10 David Malcolm <dmalcolm@redhat.com>
18316 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
18318 * tree.c (tree_nop_conversion): Return true for location wrapper
18320 (maybe_wrap_with_location): New function.
18321 (selftest::check_strip_nops): New function.
18322 (selftest::test_location_wrappers): New function.
18323 (selftest::tree_c_tests): Call it.
18324 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
18325 (maybe_wrap_with_location): New decl.
18326 (EXPR_LOCATION_WRAPPER_P): New macro.
18327 (location_wrapper_p): New inline function.
18328 (tree_strip_any_location_wrapper): New inline function.
18330 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
18333 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
18334 stack_realign_offset for the largest alignment of stack slot
18336 (ix86_find_max_used_stack_alignment): New function.
18337 (ix86_finalize_stack_frame_flags): Use it. Set
18338 max_used_stack_alignment if we don't realign stack.
18339 * config/i386/i386.h (machine_function): Add
18340 max_used_stack_alignment.
18342 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
18344 * config/arm/arm.opt (-mbranch-cost): New option.
18345 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
18348 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
18351 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
18352 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
18354 2018-01-10 Richard Biener <rguenther@suse.de>
18357 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
18358 early out so it also covers the case where we have a non-NULL
18361 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
18363 PR tree-optimization/83753
18364 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
18365 for non-strided grouped accesses if the number of elements is 1.
18367 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18370 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
18371 * i386.h (TARGET_USE_GATHER): Define.
18372 * x86-tune.def (X86_TUNE_USE_GATHER): New.
18374 2018-01-10 Martin Liska <mliska@suse.cz>
18377 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
18378 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
18380 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
18381 CLEANUP_NO_PARTITIONING is not set.
18383 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
18385 * doc/rtl.texi: Remove documentation of (const ...) wrappers
18386 for vectors, as a partial revert of r254296.
18387 * rtl.h (const_vec_p): Delete.
18388 (const_vec_duplicate_p): Don't test for vector CONSTs.
18389 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
18390 * expmed.c (make_tree): Likewise.
18393 * common.md (E, F): Use CONSTANT_P instead of checking for
18395 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
18396 checking for CONST_VECTOR.
18398 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18400 PR middle-end/83575
18401 * predict.c (force_edge_cold): Handle in more sane way edges
18402 with no prediction.
18404 2018-01-09 Carl Love <cel@us.ibm.com>
18406 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
18408 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
18409 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
18410 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
18411 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
18412 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
18413 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
18414 * config/rs6000/rs6000-protos.h: Add extern defition for
18415 rs6000_generate_float2_double_code.
18416 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
18418 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
18419 (float2_v2df): Add define_expand.
18421 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
18424 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
18425 op_mode in the force_to_mode call.
18427 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18429 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
18430 instead of checking each element individually.
18431 (aarch64_evpc_uzp): Likewise.
18432 (aarch64_evpc_zip): Likewise.
18433 (aarch64_evpc_ext): Likewise.
18434 (aarch64_evpc_rev): Likewise.
18435 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
18436 instead of checking each element individually. Return true without
18438 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
18439 whether all selected elements come from the same input, instead of
18440 checking each element individually. Remove calls to gen_rtx_REG,
18441 start_sequence and end_sequence and instead assert that no rtl is
18444 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18446 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
18447 order of HIGH and CONST checks.
18449 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
18451 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
18452 if the destination isn't an SSA_NAME.
18454 2018-01-09 Richard Biener <rguenther@suse.de>
18456 PR tree-optimization/83668
18457 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
18459 (canonicalize_loop_form): ... here, renamed from ...
18460 (canonicalize_loop_closed_ssa_form): ... this and amended to
18461 swap successor edges for loop exit blocks to make us use
18462 the RPO order we need for initial schedule generation.
18464 2018-01-09 Joseph Myers <joseph@codesourcery.com>
18466 PR tree-optimization/64811
18467 * match.pd: When optimizing comparisons with Inf, avoid
18468 introducing or losing exceptions from comparisons with NaN.
18470 2018-01-09 Martin Liska <mliska@suse.cz>
18473 * asan.c (shadow_mem_size): Add gcc_assert.
18475 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
18477 Don't save registers in main().
18480 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
18481 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
18482 * config/avr/avr.c (avr_set_current_function): Don't error if
18483 naked, OS_task or OS_main are specified at the same time.
18484 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
18486 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
18488 * common/config/avr/avr-common.c (avr_option_optimization_table):
18489 Switch on -mmain-is-OS_task for optimizing compilations.
18491 2018-01-09 Richard Biener <rguenther@suse.de>
18493 PR tree-optimization/83572
18494 * graphite.c: Include cfganal.h.
18495 (graphite_transform_loops): Connect infinite loops to exit
18496 and remove fake edges at the end.
18498 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18500 * ipa-inline.c (edge_badness): Revert accidental checkin.
18502 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
18505 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
18506 symbols; not inline clones.
18508 2018-01-09 Jakub Jelinek <jakub@redhat.com>
18511 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
18512 hard registers. Formatting fixes.
18514 PR preprocessor/83722
18515 * gcc.c (try_generate_repro): Pass
18516 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
18517 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
18520 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
18521 Kito Cheng <kito.cheng@gmail.com>
18523 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
18524 (riscv_leaf_function_p): Delete.
18525 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
18527 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18529 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
18531 (do_ifelse): New function.
18532 (do_isel): New function.
18533 (do_sub3): New function.
18534 (do_add3): New function.
18535 (do_load_mask_compare): New function.
18536 (do_overlap_load_compare): New function.
18537 (expand_compare_loop): New function.
18538 (expand_block_compare): Call expand_compare_loop() when appropriate.
18539 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
18540 option description.
18541 (-mblock-compare-inline-loop-limit): New option.
18543 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18546 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
18547 Reverse order of second and third operands in first alternative.
18548 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
18549 of first and second elements in UNSPEC_VPERMR vector.
18550 (altivec_expand_vec_perm_le): Likewise.
18552 2018-01-08 Jeff Law <law@redhat.com>
18554 PR rtl-optimizatin/81308
18555 * tree-switch-conversion.c (cfg_altered): New file scoped static.
18556 (process_switch): If group_case_labels makes a change, then set
18558 (pass_convert_switch::execute): If a switch is converted, then
18559 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
18561 PR rtl-optimization/81308
18562 * recog.c (split_all_insns): Conditionally cleanup the CFG after
18565 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
18567 PR target/83663 - Revert r255946
18568 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
18569 generation for cases where splatting a value is not useful.
18570 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
18571 across a vec_duplicate and a paradoxical subreg forming a vector
18572 mode to a vec_concat.
18574 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18576 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
18577 -march=armv8.3-a variants.
18578 * config/arm/t-multilib: Likewise.
18579 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
18581 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18583 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
18585 (cceq_ior_compare_complement): Give it a name so I can use it, and
18586 change boolean_or_operator predicate to boolean_operator so it can
18587 be used to generate a crand.
18588 (eqne): New code iterator.
18589 (bd/bd_neg): New code_attrs.
18590 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
18591 a single define_insn.
18592 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
18593 decrement (bdnzt/bdnzf/bdzt/bdzf).
18594 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
18595 with the new names of the branch decrement patterns, and added the
18596 names of the branch decrement conditional patterns.
18598 2018-01-08 Richard Biener <rguenther@suse.de>
18600 PR tree-optimization/83563
18601 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
18604 2018-01-08 Richard Biener <rguenther@suse.de>
18606 PR middle-end/83713
18607 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
18609 2018-01-08 Richard Biener <rguenther@suse.de>
18611 PR tree-optimization/83685
18612 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
18613 references to abnormals.
18615 2018-01-08 Richard Biener <rguenther@suse.de>
18618 * dwarf2out.c (output_indirect_strings): Handle empty
18619 skeleton_debug_str_hash.
18620 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
18622 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
18624 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
18625 (emit_store_direct): Likewise.
18626 (arc_trampoline_adjust_address): Likewise.
18627 (arc_asm_trampoline_template): New function.
18628 (arc_initialize_trampoline): Use asm_trampoline_template.
18629 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
18630 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
18631 * config/arc/arc.md (flush_icache): Delete pattern.
18633 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
18635 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
18636 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
18639 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
18642 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
18643 by not USED_FOR_TARGET.
18644 (make_pass_resolve_sw_modes): Likewise.
18646 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
18648 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
18651 2018-01-08 Richard Biener <rguenther@suse.de>
18653 PR middle-end/83580
18654 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
18656 2018-01-08 Richard Biener <rguenther@suse.de>
18658 PR middle-end/83517
18659 * match.pd ((t * 2) / 2) -> t): Add missing :c.
18661 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
18663 PR middle-end/81897
18664 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
18665 basic blocks with a small number of successors.
18666 (convert_control_dep_chain_into_preds): Improve handling of
18668 (dump_predicates): Split apart into...
18669 (dump_pred_chain): ...here...
18670 (dump_pred_info): ...and here.
18671 (can_one_predicate_be_invalidated_p): Add debugging printfs.
18672 (can_chain_union_be_invalidated_p): Improve check for invalidation
18674 (uninit_uses_cannot_happen): Avoid unnecessary if
18675 convert_control_dep_chain_into_preds yielded nothing.
18677 2018-01-06 Martin Sebor <msebor@redhat.com>
18679 PR tree-optimization/83640
18680 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
18681 subtracting negative offset from size.
18682 (builtin_access::overlap): Adjust offset bounds of the access to fall
18683 within the size of the object if possible.
18685 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
18687 PR rtl-optimization/83699
18688 * expmed.c (extract_bit_field_1): Restrict the vector usage of
18689 extract_bit_field_as_subreg to cases in which the extracted
18690 value is also a vector.
18692 * lra-constraints.c (process_alt_operands): Test for the equivalence
18693 substitutions when detecting a possible reload cycle.
18695 2018-01-06 Jakub Jelinek <jakub@redhat.com>
18698 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
18699 by default if flag_selective_schedling{,2}. Formatting fixes.
18701 PR rtl-optimization/83682
18702 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
18703 if it has non-VECTOR_MODE element mode.
18704 (vec_duplicate_p): Likewise.
18706 PR middle-end/83694
18707 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
18708 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
18710 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18713 * config/i386/i386-builtin.def
18714 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
18715 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
18716 Require also OPTION_MASK_ISA_AVX512F in addition to
18717 OPTION_MASK_ISA_GFNI.
18718 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
18719 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
18720 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
18721 to OPTION_MASK_ISA_GFNI.
18722 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
18723 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
18724 OPTION_MASK_ISA_AVX512BW.
18725 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
18726 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
18727 addition to OPTION_MASK_ISA_GFNI.
18728 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
18729 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
18730 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
18731 to OPTION_MASK_ISA_GFNI.
18732 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
18733 a requirement for all ISAs rather than any of them with a few
18735 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
18737 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
18738 bitmasks to be enabled with 3 exceptions, instead of requiring any
18739 enabled ISA with lots of exceptions.
18740 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
18741 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
18742 Change avx512bw in isa attribute to avx512f.
18743 * config/i386/sgxintrin.h: Add license boilerplate.
18744 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
18745 to __AVX512F__ and __AVX512VL to __AVX512VL__.
18746 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
18747 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
18749 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
18750 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
18751 temporarily sse2 rather than sse if not enabled already.
18754 * config/i386/sse.md (VI248_VLBW): Rename to ...
18755 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
18756 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
18757 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
18758 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
18759 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
18760 mode iterator instead of VI248_VLBW.
18762 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
18764 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
18765 (record_modified): Skip clobbers; add debug output.
18766 (param_change_prob): Use sreal frequencies.
18768 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18770 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
18771 punt for user-aligned variables.
18773 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
18775 * tree-chrec.c (chrec_contains_symbols): Return true for
18778 2018-01-05 Sudakshina Das <sudi.das@arm.com>
18781 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
18782 of (x|y) == x for BICS pattern.
18784 2018-01-05 Jakub Jelinek <jakub@redhat.com>
18786 PR tree-optimization/83605
18787 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
18788 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
18791 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
18793 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
18794 * config/epiphany/rtems.h: New file.
18796 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18797 Uros Bizjak <ubizjak@gmail.com>
18800 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
18801 QIreg_operand instead of register_operand predicate.
18802 * config/i386/i386.c (ix86_rop_should_change_byte_p,
18803 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
18804 comments instead of -fmitigate[-_]rop.
18806 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18809 * cgraphunit.c (symbol_table::compile): Switch to text_section
18810 before calling assembly_start debug hook.
18811 * run-rtl-passes.c (run_rtl_passes): Likewise.
18814 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18816 * tree-vrp.c (extract_range_from_binary_expr_1): Check
18817 range_int_cst_p rather than !symbolic_range_p before calling
18818 extract_range_from_multiplicative_op_1.
18820 2018-01-04 Jeff Law <law@redhat.com>
18822 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
18823 redundant test in assertion.
18825 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18827 * doc/rtl.texi: Document machine_mode wrapper classes.
18829 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18831 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
18832 using tree_to_uhwi.
18834 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18836 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
18837 the VEC_PERM_EXPR fold to fail.
18839 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18842 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
18843 to switched_sections.
18845 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18848 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
18849 test for d.testing.
18851 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
18854 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
18855 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
18857 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18860 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
18861 is BLKmode and bitpos not zero or mode change is needed.
18863 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
18866 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
18869 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
18872 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
18873 instead of MULT rtx. Update all corresponding splitters.
18874 (*saddl_se): Ditto.
18875 (*ssub<modesuffix>): Ditto.
18876 (*ssubl_se): Ditto.
18877 (*cmp_sadd_di): Update split patterns.
18878 (*cmp_sadd_si): Ditto.
18879 (*cmp_sadd_sidi): Ditto.
18880 (*cmp_ssub_di): Ditto.
18881 (*cmp_ssub_si): Ditto.
18882 (*cmp_ssub_sidi): Ditto.
18883 * config/alpha/predicates.md (const23_operand): New predicate.
18884 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
18885 Look for ASHIFT, not MULT inner operand.
18886 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
18888 2018-01-04 Martin Liska <mliska@suse.cz>
18890 PR gcov-profile/83669
18891 * gcov.c (output_intermediate_file): Add version to intermediate
18893 * doc/gcov.texi: Document new field 'version' in intermediate
18894 file format. Fix location of '-k' option of gcov command.
18896 2018-01-04 Martin Liska <mliska@suse.cz>
18899 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
18901 2018-01-04 Jakub Jelinek <jakub@redhat.com>
18903 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
18905 2018-01-03 Martin Sebor <msebor@redhat.com>
18907 PR tree-optimization/83655
18908 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
18909 checking calls with invalid arguments.
18911 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18913 * tree-vect-stmts.c (vect_get_store_rhs): New function.
18914 (vectorizable_mask_load_store): Delete.
18915 (vectorizable_call): Return false for masked loads and stores.
18916 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
18917 instead of gimple_assign_rhs1.
18918 (vectorizable_load): Handle IFN_MASK_LOAD.
18919 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
18921 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18923 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
18925 (vectorizable_mask_load_store): ...here.
18926 (vectorizable_load): ...and here.
18928 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18930 * tree-vect-stmts.c (vect_build_all_ones_mask)
18931 (vect_build_zero_merge_argument): New functions, split out from...
18932 (vectorizable_load): ...here.
18934 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18936 * tree-vect-stmts.c (vect_check_store_rhs): New function,
18938 (vectorizable_mask_load_store): ...here.
18939 (vectorizable_store): ...and here.
18941 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18943 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
18945 (vectorizable_mask_load_store): ...here.
18947 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18949 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
18950 (vect_model_store_cost): Take a vec_load_store_type instead of a
18952 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
18953 (vect_model_store_cost): Take a vec_load_store_type instead of a
18955 (vectorizable_mask_load_store): Update accordingly.
18956 (vectorizable_store): Likewise.
18957 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
18959 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18961 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
18962 IFN_MASK_LOAD calls here rather than...
18963 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
18965 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18966 Alan Hayward <alan.hayward@arm.com>
18967 David Sherwood <david.sherwood@arm.com>
18969 * expmed.c (extract_bit_field_1): For vector extracts,
18970 fall back to extract_bit_field_as_subreg if vec_extract
18973 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18974 Alan Hayward <alan.hayward@arm.com>
18975 David Sherwood <david.sherwood@arm.com>
18977 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
18978 they are variable or constant sized.
18979 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
18980 slots for constant-sized data.
18982 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18983 Alan Hayward <alan.hayward@arm.com>
18984 David Sherwood <david.sherwood@arm.com>
18986 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
18987 handling COND_EXPRs with boolean comparisons, try to find a better
18988 basis for the mask type than the boolean itself.
18990 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18992 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
18993 is calculated and how it can be overridden.
18994 * genmodes.c (max_bitsize_mode_any_mode): New variable.
18995 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
18997 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
19000 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19001 Alan Hayward <alan.hayward@arm.com>
19002 David Sherwood <david.sherwood@arm.com>
19004 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
19005 Remove the mode argument.
19006 (aarch64_simd_valid_immediate): Remove the mode and inverse
19008 * config/aarch64/iterators.md (bitsize): New iterator.
19009 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
19010 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
19011 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
19012 aarch64_simd_valid_immediate.
19013 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
19014 (aarch64_reg_or_bic_imm): Likewise.
19015 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
19016 with an insn_type enum and msl with a modifier_type enum.
19017 Replace element_width with a scalar_mode. Change the shift
19018 to unsigned int. Add constructors for scalar_float_mode and
19019 scalar_int_mode elements.
19020 (aarch64_vect_float_const_representable_p): Delete.
19021 (aarch64_can_const_movi_rtx_p)
19022 (aarch64_simd_scalar_immediate_valid_for_move)
19023 (aarch64_simd_make_constant): Update call to
19024 aarch64_simd_valid_immediate.
19025 (aarch64_advsimd_valid_immediate_hs): New function.
19026 (aarch64_advsimd_valid_immediate): Likewise.
19027 (aarch64_simd_valid_immediate): Remove mode and inverse
19028 arguments. Rewrite to use the above. Use const_vec_duplicate_p
19029 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
19030 and aarch64_float_const_representable_p on the result.
19031 (aarch64_output_simd_mov_immediate): Remove mode argument.
19032 Update call to aarch64_simd_valid_immediate and use of
19033 simd_immediate_info.
19034 (aarch64_output_scalar_simd_mov_immediate): Update call
19037 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19038 Alan Hayward <alan.hayward@arm.com>
19039 David Sherwood <david.sherwood@arm.com>
19041 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
19042 (mode_nunits): Likewise CONST_MODE_NUNITS.
19043 * machmode.def (ADJUST_NUNITS): Document.
19044 * genmodes.c (mode_data::need_nunits_adj): New field.
19045 (blank_mode): Update accordingly.
19046 (adj_nunits): New variable.
19047 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
19049 (emit_mode_size_inline): Set need_bytesize_adj for all modes
19050 listed in adj_nunits.
19051 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
19052 listed in adj_nunits. Don't emit case statements for such modes.
19053 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
19054 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
19055 nothing if adj_nunits is nonnull.
19056 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
19057 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
19058 (emit_mode_fbit): Update use of print_maybe_const_decl.
19059 (emit_move_size): Likewise. Treat the array as non-const
19061 (emit_mode_adjustments): Handle adj_nunits.
19063 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19065 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
19066 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
19067 (VECTOR_MODES): Use it.
19068 (make_vector_modes): Take the prefix as an argument.
19070 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19071 Alan Hayward <alan.hayward@arm.com>
19072 David Sherwood <david.sherwood@arm.com>
19074 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
19075 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
19076 for MODE_VECTOR_BOOL.
19077 * machmode.def (VECTOR_BOOL_MODE): Document.
19078 * genmodes.c (VECTOR_BOOL_MODE): New macro.
19079 (make_vector_bool_mode): New function.
19080 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
19082 * lto-streamer-in.c (lto_input_mode_table): Likewise.
19083 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
19085 * stor-layout.c (int_mode_for_mode): Likewise.
19086 * tree.c (build_vector_type_for_mode): Likewise.
19087 * varasm.c (output_constant_pool_2): Likewise.
19088 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
19089 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
19090 for MODE_VECTOR_BOOL.
19091 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
19092 of mode class checks.
19093 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
19094 instead of a list of mode class checks.
19095 (expand_vector_scalar_condition): Likewise.
19096 (type_for_widest_vector_mode): Handle BImode as an inner mode.
19098 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19099 Alan Hayward <alan.hayward@arm.com>
19100 David Sherwood <david.sherwood@arm.com>
19102 * machmode.h (mode_size): Change from unsigned short to
19104 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
19105 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19106 or if measurement_type is not polynomial.
19107 (fixed_size_mode::includes_p): Check for constant-sized modes.
19108 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
19109 return a poly_uint16 rather than an unsigned short.
19110 (emit_mode_size): Change the type of mode_size from unsigned short
19111 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
19112 (emit_mode_adjustments): Cope with polynomial vector sizes.
19113 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19115 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19117 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
19118 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
19119 * caller-save.c (setup_save_areas): Likewise.
19120 (replace_reg_with_saved_mem): Likewise.
19121 * calls.c (emit_library_call_value_1): Likewise.
19122 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
19123 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
19124 (gen_lowpart_for_combine): Likewise.
19125 * convert.c (convert_to_integer_1): Likewise.
19126 * cse.c (equiv_constant, cse_insn): Likewise.
19127 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
19128 (cselib_subst_to_values): Likewise.
19129 * dce.c (word_dce_process_block): Likewise.
19130 * df-problems.c (df_word_lr_mark_ref): Likewise.
19131 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
19132 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
19133 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
19134 (rtl_for_decl_location): Likewise.
19135 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
19136 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
19137 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
19138 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
19139 (expand_expr_real_1): Likewise.
19140 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
19141 (pad_below): Likewise.
19142 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19143 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
19144 * ira.c (get_subreg_tracking_sizes): Likewise.
19145 * ira-build.c (ira_create_allocno_objects): Likewise.
19146 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
19147 (ira_sort_regnos_for_alter_reg): Likewise.
19148 * ira-costs.c (record_operand_costs): Likewise.
19149 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
19150 (resolve_simple_move): Likewise.
19151 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
19152 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
19153 (lra_constraints): Likewise.
19154 (CONST_POOL_OK_P): Reject variable-sized modes.
19155 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
19156 (add_pseudo_to_slot, lra_spill): Likewise.
19157 * omp-low.c (omp_clause_aligned_alignment): Likewise.
19158 * optabs-query.c (get_best_extraction_insn): Likewise.
19159 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19160 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
19161 (expand_mult_highpart, valid_multiword_target_p): Likewise.
19162 * recog.c (offsettable_address_addr_space_p): Likewise.
19163 * regcprop.c (maybe_mode_change): Likewise.
19164 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
19165 * regrename.c (build_def_use): Likewise.
19166 * regstat.c (dump_reg_info): Likewise.
19167 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
19168 (find_reloads, find_reloads_subreg_address): Likewise.
19169 * reload1.c (eliminate_regs_1): Likewise.
19170 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
19171 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
19172 (simplify_binary_operation_1, simplify_subreg): Likewise.
19173 * targhooks.c (default_function_arg_padding): Likewise.
19174 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
19175 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
19176 (verify_gimple_assign_ternary): Likewise.
19177 * tree-inline.c (estimate_move_cost): Likewise.
19178 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19179 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
19180 (get_address_cost_ainc): Likewise.
19181 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
19182 (vect_supportable_dr_alignment): Likewise.
19183 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19184 (vectorizable_reduction): Likewise.
19185 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
19186 (vectorizable_operation, vectorizable_load): Likewise.
19187 * tree.c (build_same_sized_truth_vector_type): Likewise.
19188 * valtrack.c (cleanup_auto_inc_dec): Likewise.
19189 * var-tracking.c (emit_note_insn_var_location): Likewise.
19190 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
19191 (ADDR_VEC_ALIGN): Likewise.
19193 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19194 Alan Hayward <alan.hayward@arm.com>
19195 David Sherwood <david.sherwood@arm.com>
19197 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
19199 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19200 or if measurement_type is polynomial.
19201 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
19202 * combine.c (make_extraction): Likewise.
19203 * dse.c (find_shift_sequence): Likewise.
19204 * dwarf2out.c (mem_loc_descriptor): Likewise.
19205 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
19206 (extract_bit_field, extract_low_bits): Likewise.
19207 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
19208 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
19209 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
19210 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
19211 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19212 * reload.c (find_reloads): Likewise.
19213 * reload1.c (alter_reg): Likewise.
19214 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
19215 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
19216 * tree-if-conv.c (predicate_mem_writes): Likewise.
19217 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
19218 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
19219 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
19220 * valtrack.c (dead_debug_insert_temp): Likewise.
19221 * varasm.c (mergeable_constant_section): Likewise.
19222 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
19224 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19225 Alan Hayward <alan.hayward@arm.com>
19226 David Sherwood <david.sherwood@arm.com>
19228 * expr.c (expand_assignment): Cope with polynomial mode sizes
19229 when assigning to a CONCAT.
19231 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19232 Alan Hayward <alan.hayward@arm.com>
19233 David Sherwood <david.sherwood@arm.com>
19235 * machmode.h (mode_precision): Change from unsigned short to
19237 (mode_to_precision): Return a poly_uint16 rather than an unsigned
19239 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
19240 or if measurement_type is not polynomial.
19241 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
19242 in which the mode is already known to be a scalar_int_mode.
19243 * genmodes.c (emit_mode_precision): Change the type of mode_precision
19244 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
19246 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19247 for GET_MODE_PRECISION.
19248 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19249 for GET_MODE_PRECISION.
19250 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
19252 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
19253 (expand_field_assignment, make_extraction): Likewise.
19254 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
19255 (get_last_value): Likewise.
19256 * convert.c (convert_to_integer_1): Likewise.
19257 * cse.c (cse_insn): Likewise.
19258 * expr.c (expand_expr_real_1): Likewise.
19259 * lra-constraints.c (simplify_operand_subreg): Likewise.
19260 * optabs-query.c (can_atomic_load_p): Likewise.
19261 * optabs.c (expand_atomic_load): Likewise.
19262 (expand_atomic_store): Likewise.
19263 * ree.c (combine_reaching_defs): Likewise.
19264 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
19265 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
19266 * tree.h (type_has_mode_precision_p): Likewise.
19267 * ubsan.c (instrument_si_overflow): Likewise.
19269 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19270 Alan Hayward <alan.hayward@arm.com>
19271 David Sherwood <david.sherwood@arm.com>
19273 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
19274 polynomial numbers of units.
19275 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
19276 (valid_vector_subparts_p): New function.
19277 (build_vector_type): Remove temporary shim and take the number
19278 of units as a poly_uint64 rather than an int.
19279 (build_opaque_vector_type): Take the number of units as a
19280 poly_uint64 rather than an int.
19281 * tree.c (build_vector_from_ctor): Handle polynomial
19282 TYPE_VECTOR_SUBPARTS.
19283 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
19284 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
19285 (build_vector_from_val): If the number of units is variable,
19286 use build_vec_duplicate_cst for constant operands and
19287 VEC_DUPLICATE_EXPR otherwise.
19288 (make_vector_type): Remove temporary is_constant ().
19289 (build_vector_type, build_opaque_vector_type): Take the number of
19290 units as a poly_uint64 rather than an int.
19291 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
19293 * cfgexpand.c (expand_debug_expr): Likewise.
19294 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
19295 (store_constructor, expand_expr_real_1): Likewise.
19296 (const_scalar_mask_from_tree): Likewise.
19297 * fold-const-call.c (fold_const_reduction): Likewise.
19298 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
19299 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
19300 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
19301 (fold_relational_const): Likewise.
19302 (native_interpret_vector): Likewise. Change the size from an
19303 int to an unsigned int.
19304 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
19305 TYPE_VECTOR_SUBPARTS.
19306 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
19307 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
19308 duplicating a non-constant operand into a variable-length vector.
19309 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
19310 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
19311 * ipa-icf.c (sem_variable::equals): Likewise.
19312 * match.pd: Likewise.
19313 * omp-simd-clone.c (simd_clone_subparts): Likewise.
19314 * print-tree.c (print_node): Likewise.
19315 * stor-layout.c (layout_type): Likewise.
19316 * targhooks.c (default_builtin_vectorization_cost): Likewise.
19317 * tree-cfg.c (verify_gimple_comparison): Likewise.
19318 (verify_gimple_assign_binary): Likewise.
19319 (verify_gimple_assign_ternary): Likewise.
19320 (verify_gimple_assign_single): Likewise.
19321 * tree-pretty-print.c (dump_generic_node): Likewise.
19322 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19323 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
19324 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
19325 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
19326 (vect_shift_permute_load_chain): Likewise.
19327 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
19328 (expand_vector_condition, optimize_vector_constructor): Likewise.
19329 (lower_vec_perm, get_compute_type): Likewise.
19330 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19331 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
19332 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
19333 (vect_recog_mask_conversion_pattern): Likewise.
19334 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
19335 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
19336 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19337 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
19338 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
19339 (vectorizable_shift, vectorizable_operation, vectorizable_store)
19340 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
19341 (supportable_widening_operation): Likewise.
19342 (supportable_narrowing_operation): Likewise.
19343 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
19345 * varasm.c (output_constant): Likewise.
19347 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19348 Alan Hayward <alan.hayward@arm.com>
19349 David Sherwood <david.sherwood@arm.com>
19351 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
19352 so that both the length == 3 and length != 3 cases set up their
19353 own permute vectors. Add comments explaining why we know the
19354 number of elements is constant.
19355 (vect_permute_load_chain): Likewise.
19357 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19358 Alan Hayward <alan.hayward@arm.com>
19359 David Sherwood <david.sherwood@arm.com>
19361 * machmode.h (mode_nunits): Change from unsigned char to
19363 (ONLY_FIXED_SIZE_MODES): New macro.
19364 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
19365 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
19366 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
19368 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
19369 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
19370 or if measurement_type is not polynomial.
19371 * genmodes.c (ZERO_COEFFS): New macro.
19372 (emit_mode_nunits_inline): Make mode_nunits_inline return a
19374 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
19375 Use ZERO_COEFFS when emitting initializers.
19376 * data-streamer.h (bp_pack_poly_value): New function.
19377 (bp_unpack_poly_value): Likewise.
19378 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19379 for GET_MODE_NUNITS.
19380 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19381 for GET_MODE_NUNITS.
19382 * tree.c (make_vector_type): Remove temporary shim and make
19383 the real function take the number of units as a poly_uint64
19384 rather than an int.
19385 (build_vector_type_for_mode): Handle polynomial nunits.
19386 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
19387 * emit-rtl.c (const_vec_series_p_1): Likewise.
19388 (gen_rtx_CONST_VECTOR): Likewise.
19389 * fold-const.c (test_vec_duplicate_folding): Likewise.
19390 * genrecog.c (validate_pattern): Likewise.
19391 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
19392 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19393 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
19394 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
19395 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
19396 * rtlanal.c (subreg_get_info): Likewise.
19397 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19398 (vect_grouped_load_supported): Likewise.
19399 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
19400 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
19401 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
19402 (simplify_const_unary_operation, simplify_binary_operation_1)
19403 (simplify_const_binary_operation, simplify_ternary_operation)
19404 (test_vector_ops_duplicate, test_vector_ops): Likewise.
19405 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
19406 instead of CONST_VECTOR_NUNITS.
19407 * varasm.c (output_constant_pool_2): Likewise.
19408 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
19409 explicit-encoded elements in the XVEC for variable-length vectors.
19411 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19413 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
19415 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19416 Alan Hayward <alan.hayward@arm.com>
19417 David Sherwood <david.sherwood@arm.com>
19419 * coretypes.h (fixed_size_mode): Declare.
19420 (fixed_size_mode_pod): New typedef.
19421 * builtins.h (target_builtins::x_apply_args_mode)
19422 (target_builtins::x_apply_result_mode): Change type to
19423 fixed_size_mode_pod.
19424 * builtins.c (apply_args_size, apply_result_size, result_vector)
19425 (expand_builtin_apply_args_1, expand_builtin_apply)
19426 (expand_builtin_return): Update accordingly.
19428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19430 * cse.c (hash_rtx_cb): Hash only the encoded elements.
19431 * cselib.c (cselib_hash_rtx): Likewise.
19432 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
19433 CONST_VECTOR encoding.
19435 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19436 Jeff Law <law@redhat.com>
19439 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
19440 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
19441 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
19442 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
19445 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
19446 explicitly probe *sp in a noreturn function if there were any callee
19447 register saves or frame pointer is needed.
19449 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19452 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
19453 BLKmode for ternary, binary or unary expressions.
19456 * var-tracking.c (delete_vta_debug_insn): New inline function.
19457 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
19458 insns from get_insns () to NULL instead of each bb separately.
19459 Use delete_vta_debug_insn. No longer static.
19460 (vt_debug_insns_local, variable_tracking_main_1): Adjust
19461 delete_vta_debug_insns callers.
19462 * rtl.h (delete_vta_debug_insns): Declare.
19463 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
19464 instead of variable_tracking_main.
19466 2018-01-03 Martin Sebor <msebor@redhat.com>
19468 PR tree-optimization/83603
19469 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
19470 arguments past the endof the argument list in functions declared
19471 without a prototype.
19472 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
19473 Avoid checking when arguments are null.
19475 2018-01-03 Martin Sebor <msebor@redhat.com>
19478 * doc/extend.texi (attribute const): Fix a typo.
19479 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
19480 issuing -Wsuggest-attribute for void functions.
19482 2018-01-03 Martin Sebor <msebor@redhat.com>
19484 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
19485 offset_int::from instead of wide_int::to_shwi.
19486 (maybe_diag_overlap): Remove assertion.
19487 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
19488 * gimple-ssa-sprintf.c (format_directive): Same.
19489 (parse_directive): Same.
19490 (sprintf_dom_walker::compute_format_length): Same.
19491 (try_substitute_return_value): Same.
19493 2018-01-03 Jeff Law <law@redhat.com>
19495 PR middle-end/83654
19496 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
19497 non-constant residual for zero at runtime and avoid probing in
19498 that case. Reorganize code for trailing problem to mirror handling
19501 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19503 PR tree-optimization/83501
19504 * tree-ssa-strlen.c (get_string_cst): New.
19505 (handle_char_store): Call get_string_cst.
19507 2018-01-03 Martin Liska <mliska@suse.cz>
19509 PR tree-optimization/83593
19510 * tree-ssa-strlen.c: Include tree-cfg.h.
19511 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
19512 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
19513 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
19515 (strlen_dom_walker::before_dom_children): Call
19516 gimple_purge_dead_eh_edges. Dump tranformation with details
19518 (strlen_dom_walker::before_dom_children): Update call by adding
19519 new argument cleanup_eh.
19520 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
19522 2018-01-03 Martin Liska <mliska@suse.cz>
19525 * cif-code.def (VARIADIC_THUNK): New enum value.
19526 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
19529 2018-01-03 Jan Beulich <jbeulich@suse.com>
19531 * sse.md (mov<mode>_internal): Tighten condition for when to use
19532 vmovdqu<ssescalarsize> for TI and OI modes.
19534 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19536 Update copyright years.
19538 2018-01-03 Martin Liska <mliska@suse.cz>
19541 * ipa-visibility.c (function_and_variable_visibility): Skip
19542 functions with noipa attribure.
19544 2018-01-03 Jakub Jelinek <jakub@redhat.com>
19546 * gcc.c (process_command): Update copyright notice dates.
19547 * gcov-dump.c (print_version): Ditto.
19548 * gcov.c (print_version): Ditto.
19549 * gcov-tool.c (print_version): Ditto.
19550 * gengtype.c (create_file): Ditto.
19551 * doc/cpp.texi: Bump @copying's copyright year.
19552 * doc/cppinternals.texi: Ditto.
19553 * doc/gcc.texi: Ditto.
19554 * doc/gccint.texi: Ditto.
19555 * doc/gcov.texi: Ditto.
19556 * doc/install.texi: Ditto.
19557 * doc/invoke.texi: Ditto.
19559 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19561 * vector-builder.h (vector_builder::m_full_nelts): Change from
19562 unsigned int to poly_uint64.
19563 (vector_builder::full_nelts): Update prototype accordingly.
19564 (vector_builder::new_vector): Likewise.
19565 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
19566 (vector_builder::operator ==): Likewise.
19567 (vector_builder::finalize): Likewise.
19568 * int-vector-builder.h (int_vector_builder::int_vector_builder):
19569 Take the number of elements as a poly_uint64 rather than an
19571 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
19572 from unsigned int to poly_uint64.
19573 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
19574 (vec_perm_indices::new_vector): Likewise.
19575 (vec_perm_indices::length): Likewise.
19576 (vec_perm_indices::nelts_per_input): Likewise.
19577 (vec_perm_indices::input_nelts): Likewise.
19578 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
19579 number of elements per input as a poly_uint64 rather than an
19580 unsigned int. Use the original encoding for variable-length
19581 vectors, rather than clamping each individual element.
19582 For the second and subsequent elements in each pattern,
19583 clamp the step and base before clamping their sum.
19584 (vec_perm_indices::series_p): Handle polynomial element counts.
19585 (vec_perm_indices::all_in_range_p): Likewise.
19586 (vec_perm_indices_to_tree): Likewise.
19587 (vec_perm_indices_to_rtx): Likewise.
19588 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
19589 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
19590 (tree_vector_builder::new_binary_operation): Handle polynomial
19591 element counts. Return false if we need to know the number
19592 of elements at compile time.
19593 * fold-const.c (fold_vec_perm): Punt if the number of elements
19594 isn't known at compile time.
19596 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19598 * vec-perm-indices.h (vec_perm_builder): Change element type
19599 from HOST_WIDE_INT to poly_int64.
19600 (vec_perm_indices::element_type): Update accordingly.
19601 (vec_perm_indices::clamp): Handle polynomial element_types.
19602 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19603 (vec_perm_indices::all_in_range_p): Likewise.
19604 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
19606 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
19607 polynomial vec_perm_indices element types.
19608 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
19609 * fold-const.c (fold_vec_perm): Likewise.
19610 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
19611 * tree-vect-generic.c (lower_vec_perm): Likewise.
19612 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19613 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
19614 element type to HOST_WIDE_INT.
19616 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19617 Alan Hayward <alan.hayward@arm.com>
19618 David Sherwood <david.sherwood@arm.com>
19620 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
19621 rather than an int. Use plus_constant.
19622 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
19623 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
19625 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19626 Alan Hayward <alan.hayward@arm.com>
19627 David Sherwood <david.sherwood@arm.com>
19629 * calls.c (emit_call_1, expand_call): Change struct_value_size from
19630 a HOST_WIDE_INT to a poly_int64.
19632 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19633 Alan Hayward <alan.hayward@arm.com>
19634 David Sherwood <david.sherwood@arm.com>
19636 * calls.c (load_register_parameters): Cope with polynomial
19637 mode sizes. Require a constant size for BLKmode parameters
19638 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
19639 forces a parameter to be padded at the lsb end in order to
19640 fill a complete number of words, require the parameter size
19641 to be ordered wrt UNITS_PER_WORD.
19643 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19644 Alan Hayward <alan.hayward@arm.com>
19645 David Sherwood <david.sherwood@arm.com>
19647 * reload1.c (spill_stack_slot_width): Change element type
19648 from unsigned int to poly_uint64_pod.
19649 (alter_reg): Treat mode sizes as polynomial.
19651 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19652 Alan Hayward <alan.hayward@arm.com>
19653 David Sherwood <david.sherwood@arm.com>
19655 * reload.c (complex_word_subreg_p): New function.
19656 (reload_inner_reg_of_subreg, push_reload): Use it.
19658 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19659 Alan Hayward <alan.hayward@arm.com>
19660 David Sherwood <david.sherwood@arm.com>
19662 * lra-constraints.c (process_alt_operands): Reject matched
19663 operands whose sizes aren't ordered.
19664 (match_reload): Refer to this check here.
19666 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19667 Alan Hayward <alan.hayward@arm.com>
19668 David Sherwood <david.sherwood@arm.com>
19670 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
19671 that the mode size is in the set {1, 2, 4, 8, 16}.
19673 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19674 Alan Hayward <alan.hayward@arm.com>
19675 David Sherwood <david.sherwood@arm.com>
19677 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
19678 Use plus_constant instead of gen_rtx_PLUS.
19680 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19681 Alan Hayward <alan.hayward@arm.com>
19682 David Sherwood <david.sherwood@arm.com>
19684 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
19685 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
19686 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
19687 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
19688 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
19689 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
19690 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
19691 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
19692 * config/i386/i386.c (ix86_push_rounding): ...this new function.
19693 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
19695 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
19696 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
19697 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
19698 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
19699 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
19700 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
19701 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
19702 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
19703 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
19704 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
19706 * expr.c (emit_move_resolve_push): Treat the input and result
19707 of PUSH_ROUNDING as a poly_int64.
19708 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
19709 (emit_push_insn): Likewise.
19710 * lra-eliminations.c (mark_not_eliminable): Likewise.
19711 * recog.c (push_operand): Likewise.
19712 * reload1.c (elimination_effects): Likewise.
19713 * rtlanal.c (nonzero_bits1): Likewise.
19714 * calls.c (store_one_arg): Likewise. Require the padding to be
19715 known at compile time.
19717 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19718 Alan Hayward <alan.hayward@arm.com>
19719 David Sherwood <david.sherwood@arm.com>
19721 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
19722 Use plus_constant instead of gen_rtx_PLUS.
19724 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19725 Alan Hayward <alan.hayward@arm.com>
19726 David Sherwood <david.sherwood@arm.com>
19728 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
19729 rather than an int.
19731 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19732 Alan Hayward <alan.hayward@arm.com>
19733 David Sherwood <david.sherwood@arm.com>
19735 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
19736 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
19737 via stack temporaries. Treat the mode size as polynomial too.
19739 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19740 Alan Hayward <alan.hayward@arm.com>
19741 David Sherwood <david.sherwood@arm.com>
19743 * expr.c (expand_expr_real_2): When handling conversions involving
19744 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
19745 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
19746 as a poly_uint64 too.
19748 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19749 Alan Hayward <alan.hayward@arm.com>
19750 David Sherwood <david.sherwood@arm.com>
19752 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
19754 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19755 Alan Hayward <alan.hayward@arm.com>
19756 David Sherwood <david.sherwood@arm.com>
19758 * combine.c (can_change_dest_mode): Handle polynomial
19759 REGMODE_NATURAL_SIZE.
19760 * expmed.c (store_bit_field_1): Likewise.
19761 * expr.c (store_constructor): Likewise.
19762 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
19763 and polynomial REGMODE_NATURAL_SIZE.
19764 (gen_lowpart_common): Likewise.
19765 * reginfo.c (record_subregs_of_mode): Likewise.
19766 * rtlanal.c (read_modify_subreg_p): Likewise.
19768 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19769 Alan Hayward <alan.hayward@arm.com>
19770 David Sherwood <david.sherwood@arm.com>
19772 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
19773 numbers of elements.
19775 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19776 Alan Hayward <alan.hayward@arm.com>
19777 David Sherwood <david.sherwood@arm.com>
19779 * match.pd: Cope with polynomial numbers of vector elements.
19781 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19782 Alan Hayward <alan.hayward@arm.com>
19783 David Sherwood <david.sherwood@arm.com>
19785 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
19786 in a POINTER_PLUS_EXPR.
19788 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19789 Alan Hayward <alan.hayward@arm.com>
19790 David Sherwood <david.sherwood@arm.com>
19792 * omp-simd-clone.c (simd_clone_subparts): New function.
19793 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
19794 (ipa_simd_modify_function_body): Likewise.
19796 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19797 Alan Hayward <alan.hayward@arm.com>
19798 David Sherwood <david.sherwood@arm.com>
19800 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
19801 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
19802 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
19803 (expand_vector_condition, vector_element): Likewise.
19804 (subparts_gt): New function.
19805 (get_compute_type): Use subparts_gt.
19806 (count_type_subparts): Delete.
19807 (expand_vector_operations_1): Use subparts_gt instead of
19808 count_type_subparts.
19810 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19811 Alan Hayward <alan.hayward@arm.com>
19812 David Sherwood <david.sherwood@arm.com>
19814 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
19815 (vect_compile_time_alias): ...this new function. Do the calculation
19816 on poly_ints rather than trees.
19817 (vect_prune_runtime_alias_test_list): Update call accordingly.
19819 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19820 Alan Hayward <alan.hayward@arm.com>
19821 David Sherwood <david.sherwood@arm.com>
19823 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
19825 (vect_schedule_slp_instance): Likewise.
19827 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19828 Alan Hayward <alan.hayward@arm.com>
19829 David Sherwood <david.sherwood@arm.com>
19831 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
19832 constant and extern definitions for variable-length vectors.
19833 (vect_get_constant_vectors): Note that the number of units
19834 is known to be constant.
19836 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19837 Alan Hayward <alan.hayward@arm.com>
19838 David Sherwood <david.sherwood@arm.com>
19840 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
19841 of units as polynomial. Choose between WIDE and NARROW based
19844 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19845 Alan Hayward <alan.hayward@arm.com>
19846 David Sherwood <david.sherwood@arm.com>
19848 * tree-vect-stmts.c (simd_clone_subparts): New function.
19849 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
19851 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19852 Alan Hayward <alan.hayward@arm.com>
19853 David Sherwood <david.sherwood@arm.com>
19855 * tree-vect-stmts.c (vectorizable_call): Treat the number of
19856 vectors as polynomial. Use build_index_vector for
19857 IFN_GOMP_SIMD_LANE.
19859 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19860 Alan Hayward <alan.hayward@arm.com>
19861 David Sherwood <david.sherwood@arm.com>
19863 * tree-vect-stmts.c (get_load_store_type): Treat the number of
19864 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
19865 for variable-length vectors.
19866 (vectorizable_mask_load_store): Treat the number of units as
19867 polynomial, asserting that it is constant if the condition has
19868 already been enforced.
19869 (vectorizable_store, vectorizable_load): Likewise.
19871 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19872 Alan Hayward <alan.hayward@arm.com>
19873 David Sherwood <david.sherwood@arm.com>
19875 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
19876 of units as polynomial. Punt if we can't tell at compile time
19877 which vector contains the final result.
19879 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19880 Alan Hayward <alan.hayward@arm.com>
19881 David Sherwood <david.sherwood@arm.com>
19883 * tree-vect-loop.c (vectorizable_induction): Treat the number
19884 of units as polynomial. Punt on SLP inductions. Use an integer
19885 VEC_SERIES_EXPR for variable-length integer reductions. Use a
19886 cast of such a series for variable-length floating-point
19889 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19890 Alan Hayward <alan.hayward@arm.com>
19891 David Sherwood <david.sherwood@arm.com>
19893 * tree.h (build_index_vector): Declare.
19894 * tree.c (build_index_vector): New function.
19895 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
19896 of units as polynomial, forcibly converting it to a constant if
19897 vectorizable_reduction has already enforced the condition.
19898 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
19899 to create a {1,2,3,...} vector.
19900 (vectorizable_reduction): Treat the number of units as polynomial.
19901 Choose vectype_in based on the largest scalar element size rather
19902 than the smallest number of units. Enforce the restrictions
19905 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19906 Alan Hayward <alan.hayward@arm.com>
19907 David Sherwood <david.sherwood@arm.com>
19909 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
19910 number of units as polynomial.
19912 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19913 Alan Hayward <alan.hayward@arm.com>
19914 David Sherwood <david.sherwood@arm.com>
19916 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
19917 * target.def (autovectorize_vector_sizes): Return the vector sizes
19918 by pointer, using vector_sizes rather than a bitmask.
19919 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
19920 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
19921 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
19923 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
19924 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
19925 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
19926 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
19927 * omp-general.c (omp_max_vf): Likewise.
19928 * omp-low.c (omp_clause_aligned_alignment): Likewise.
19929 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
19930 * tree-vect-loop.c (vect_analyze_loop): Likewise.
19931 * tree-vect-slp.c (vect_slp_bb): Likewise.
19932 * doc/tm.texi: Regenerate.
19933 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
19935 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
19936 the vector size as a poly_uint64 rather than an unsigned int.
19937 (current_vector_size): Change from an unsigned int to a poly_uint64.
19938 (get_vectype_for_scalar_type): Update accordingly.
19939 * tree.h (build_truth_vector_type): Take the size and number of
19940 units as a poly_uint64 rather than an unsigned int.
19941 (build_vector_type): Add a temporary overload that takes
19942 the number of units as a poly_uint64 rather than an unsigned int.
19943 * tree.c (make_vector_type): Likewise.
19944 (build_truth_vector_type): Take the number of units as a poly_uint64
19945 rather than an unsigned int.
19947 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19948 Alan Hayward <alan.hayward@arm.com>
19949 David Sherwood <david.sherwood@arm.com>
19951 * target.def (get_mask_mode): Take the number of units and length
19952 as poly_uint64s rather than unsigned ints.
19953 * targhooks.h (default_get_mask_mode): Update accordingly.
19954 * targhooks.c (default_get_mask_mode): Likewise.
19955 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
19956 * doc/tm.texi: Regenerate.
19958 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19959 Alan Hayward <alan.hayward@arm.com>
19960 David Sherwood <david.sherwood@arm.com>
19962 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
19963 * omp-general.c (omp_max_vf): Likewise.
19964 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
19965 (expand_omp_simd): Handle polynomial safelen.
19966 * omp-low.c (omplow_simd_context): Add a default constructor.
19967 (omplow_simd_context::max_vf): Change from int to poly_uint64.
19968 (lower_rec_simd_input_clauses): Update accordingly.
19969 (lower_rec_input_clauses): Likewise.
19971 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19972 Alan Hayward <alan.hayward@arm.com>
19973 David Sherwood <david.sherwood@arm.com>
19975 * tree-vectorizer.h (vect_nunits_for_cost): New function.
19976 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
19977 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
19978 (vect_analyze_slp_cost): Likewise.
19979 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
19980 (vect_model_load_cost): Likewise.
19982 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19983 Alan Hayward <alan.hayward@arm.com>
19984 David Sherwood <david.sherwood@arm.com>
19986 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
19987 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
19988 from an unsigned int * to a poly_uint64_pod *.
19989 (calculate_unrolling_factor): New function.
19990 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
19992 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19993 Alan Hayward <alan.hayward@arm.com>
19994 David Sherwood <david.sherwood@arm.com>
19996 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
19997 from an unsigned int to a poly_uint64.
19998 (_loop_vec_info::slp_unrolling_factor): Likewise.
19999 (_loop_vec_info::vectorization_factor): Change from an int
20001 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
20002 (vect_get_num_vectors): New function.
20003 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
20004 (vect_get_num_copies): Use vect_get_num_vectors.
20005 (vect_analyze_data_ref_dependences): Change max_vf from an int *
20006 to an unsigned int *.
20007 (vect_analyze_data_refs): Change min_vf from an int * to a
20009 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20010 than an unsigned HOST_WIDE_INT.
20011 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
20012 (vect_analyze_data_ref_dependence): Change max_vf from an int *
20013 to an unsigned int *.
20014 (vect_analyze_data_ref_dependences): Likewise.
20015 (vect_compute_data_ref_alignment): Handle polynomial vf.
20016 (vect_enhance_data_refs_alignment): Likewise.
20017 (vect_prune_runtime_alias_test_list): Likewise.
20018 (vect_shift_permute_load_chain): Likewise.
20019 (vect_supportable_dr_alignment): Likewise.
20020 (dependence_distance_ge_vf): Take the vectorization factor as a
20021 poly_uint64 rather than an unsigned HOST_WIDE_INT.
20022 (vect_analyze_data_refs): Change min_vf from an int * to a
20024 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
20025 vfm1 as a poly_uint64 rather than an int. Make the same change
20026 for the returned bound_scalar.
20027 (vect_gen_vector_loop_niters): Handle polynomial vf.
20028 (vect_do_peeling): Likewise. Update call to
20029 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
20030 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
20032 * tree-vect-loop.c (vect_determine_vectorization_factor)
20033 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
20034 (vect_get_known_peeling_cost): Likewise.
20035 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
20036 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
20037 (vect_transform_loop): Likewise. Use the lowest possible VF when
20038 updating the upper bounds of the loop.
20039 (vect_min_worthwhile_factor): Make static. Return an unsigned int
20040 rather than an int.
20041 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
20042 polynomial unroll factors.
20043 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
20044 (vect_make_slp_decision): Likewise.
20045 (vect_supported_load_permutation_p): Likewise, and polynomial
20047 (vect_analyze_slp_cost): Handle polynomial vf.
20048 (vect_slp_analyze_node_operations): Likewise.
20049 (vect_slp_analyze_bb_1): Likewise.
20050 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20051 than an unsigned HOST_WIDE_INT.
20052 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
20053 (vectorizable_load): Handle polynomial vf.
20054 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
20056 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
20058 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20059 Alan Hayward <alan.hayward@arm.com>
20060 David Sherwood <david.sherwood@arm.com>
20062 * match.pd: Handle bit operations involving three constants
20063 and try to fold one pair.
20065 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20067 * tree-vect-loop-manip.c: Include gimple-fold.h.
20068 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
20069 niters_maybe_zero parameters. Handle other cases besides a step of 1.
20070 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
20071 Add a path that uses a step of VF instead of 1, but disable it
20073 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
20074 and niters_no_overflow parameters. Update calls to
20075 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
20076 Create a new SSA name if the latter choses to use a ste other
20077 than zero, and return it via niters_vector_mult_vf_var.
20078 * tree-vect-loop.c (vect_transform_loop): Update calls to
20079 vect_do_peeling, vect_gen_vector_loop_niters and
20080 slpeel_make_loop_iterate_ntimes.
20081 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
20082 (vect_gen_vector_loop_niters): Update declarations after above changes.
20084 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
20086 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
20087 128-bit round to integer instructions.
20088 (ceil<mode>2): Likewise.
20089 (btrunc<mode>2): Likewise.
20090 (round<mode>2): Likewise.
20092 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20094 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
20095 unaligned VSX load/store on P8/P9.
20096 (expand_block_clear): Allow the use of unaligned VSX
20097 load/store on P8/P9.
20099 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20101 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
20103 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
20104 swap associated with both a load and a store.
20106 2018-01-02 Andrew Waterman <andrew@sifive.com>
20108 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
20109 * config/riscv/riscv.md (clear_cache): Use it.
20111 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
20113 * web.c: Remove out-of-date comment.
20115 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20117 * expr.c (fixup_args_size_notes): Check that any existing
20118 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
20119 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
20120 (emit_single_push_insn): ...here.
20122 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20124 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
20125 (const_vector_encoded_nelts): New function.
20126 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
20127 (const_vector_int_elt, const_vector_elt): Declare.
20128 * emit-rtl.c (const_vector_int_elt_1): New function.
20129 (const_vector_elt): Likewise.
20130 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
20131 of CONST_VECTOR_ELT.
20133 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20135 * expr.c: Include rtx-vector-builder.h.
20136 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
20137 directly on the tree encoding.
20138 (const_vector_from_tree): Likewise.
20139 * optabs.c: Include rtx-vector-builder.h.
20140 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
20141 sequence of "u" values.
20142 * vec-perm-indices.c: Include rtx-vector-builder.h.
20143 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
20144 directly on the vec_perm_indices encoding.
20146 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20148 * doc/rtl.texi (const_vector): Describe new encoding scheme.
20149 * Makefile.in (OBJS): Add rtx-vector-builder.o.
20150 * rtx-vector-builder.h: New file.
20151 * rtx-vector-builder.c: Likewise.
20152 * rtl.h (rtx_def::u2): Add a const_vector field.
20153 (CONST_VECTOR_NPATTERNS): New macro.
20154 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
20155 (CONST_VECTOR_DUPLICATE_P): Likewise.
20156 (CONST_VECTOR_STEPPED_P): Likewise.
20157 (CONST_VECTOR_ENCODED_ELT): Likewise.
20158 (const_vec_duplicate_p): Check for a duplicated vector encoding.
20159 (unwrap_const_vec_duplicate): Likewise.
20160 (const_vec_series_p): Check for a non-duplicated vector encoding.
20161 Say that the function only returns true for integer vectors.
20162 * emit-rtl.c: Include rtx-vector-builder.h.
20163 (gen_const_vec_duplicate_1): Delete.
20164 (gen_const_vector): Call gen_const_vec_duplicate instead of
20165 gen_const_vec_duplicate_1.
20166 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
20167 (gen_const_vec_duplicate): Use rtx_vector_builder.
20168 (gen_const_vec_series): Likewise.
20169 (gen_rtx_CONST_VECTOR): Likewise.
20170 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
20171 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20172 Build a new vector rather than modifying a CONST_VECTOR in-place.
20173 (handle_special_swappables): Update call accordingly.
20174 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
20175 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20176 Build a new vector rather than modifying a CONST_VECTOR in-place.
20177 (handle_special_swappables): Update call accordingly.
20179 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20181 * simplify-rtx.c (simplify_const_binary_operation): Use
20182 CONST_VECTOR_ELT instead of XVECEXP.
20184 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20186 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
20187 the selector elements to be different from the data elements
20188 if the selector is a VECTOR_CST.
20189 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
20190 ssizetype for the selector.
20192 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20194 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
20195 before testing each element individually.
20196 * tree-vect-generic.c (lower_vec_perm): Likewise.
20198 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20200 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
20201 * selftest-run-tests.c (selftest::run_tests): Call it.
20202 * vector-builder.h (vector_builder::operator ==): New function.
20203 (vector_builder::operator !=): Likewise.
20204 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
20205 (vec_perm_indices::all_from_input_p): New function.
20206 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20207 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
20208 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
20209 instead of reading the VECTOR_CST directly. Detect whether both
20210 vector inputs are the same before constructing the vec_perm_indices,
20211 and update the number of inputs argument accordingly. Use the
20212 utility functions added above. Only construct sel2 if we need to.
20214 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20216 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
20217 the broadcast of the low byte.
20218 (expand_mult_highpart): Use an explicit encoding for the permutes.
20219 * optabs-query.c (can_mult_highpart_p): Likewise.
20220 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20221 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20222 (vectorizable_bswap): Likewise.
20223 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
20224 explicit encoding for the power-of-2 permutes.
20225 (vect_permute_store_chain): Likewise.
20226 (vect_grouped_load_supported): Likewise.
20227 (vect_permute_load_chain): Likewise.
20229 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20231 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
20232 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
20233 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
20234 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20235 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
20236 (vect_gen_perm_mask_any): Likewise.
20238 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20240 * int-vector-builder.h: New file.
20241 * vec-perm-indices.h: Include int-vector-builder.h.
20242 (vec_perm_indices): Redefine as an int_vector_builder.
20243 (auto_vec_perm_indices): Delete.
20244 (vec_perm_builder): Redefine as a stand-alone class.
20245 (vec_perm_indices::vec_perm_indices): New function.
20246 (vec_perm_indices::clamp): Likewise.
20247 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
20248 (vec_perm_indices::new_vector): New function.
20249 (vec_perm_indices::new_expanded_vector): Update for new
20250 vec_perm_indices class.
20251 (vec_perm_indices::rotate_inputs): New function.
20252 (vec_perm_indices::all_in_range_p): Operate directly on the
20253 encoded form, without computing elided elements.
20254 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
20255 encoding. Update for new vec_perm_indices class.
20256 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
20257 the given vec_perm_builder.
20258 (expand_vec_perm_var): Update vec_perm_builder constructor.
20259 (expand_mult_highpart): Use vec_perm_builder instead of
20260 auto_vec_perm_indices.
20261 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
20262 vec_perm_indices instead of auto_vec_perm_indices. Use a single
20263 or double series encoding as appropriate.
20264 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
20265 vec_perm_indices instead of auto_vec_perm_indices.
20266 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20267 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20268 (vect_permute_store_chain): Likewise.
20269 (vect_grouped_load_supported): Likewise.
20270 (vect_permute_load_chain): Likewise.
20271 (vect_shift_permute_load_chain): Likewise.
20272 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20273 (vect_transform_slp_perm_load): Likewise.
20274 (vect_schedule_slp_instance): Likewise.
20275 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20276 (vectorizable_mask_load_store): Likewise.
20277 (vectorizable_bswap): Likewise.
20278 (vectorizable_store): Likewise.
20279 (vectorizable_load): Likewise.
20280 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
20281 vec_perm_indices instead of auto_vec_perm_indices. Use
20282 tree_to_vec_perm_builder to read the vector from a tree.
20283 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
20284 vec_perm_builder instead of a vec_perm_indices.
20285 (have_whole_vector_shift): Use vec_perm_builder and
20286 vec_perm_indices instead of auto_vec_perm_indices. Leave the
20287 truncation to calc_vec_perm_mask_for_shift.
20288 (vect_create_epilog_for_reduction): Likewise.
20289 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
20290 from auto_vec_perm_indices to vec_perm_indices.
20291 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20292 instead of changing individual elements.
20293 (aarch64_vectorize_vec_perm_const): Use new_vector to install
20294 the vector in d.perm.
20295 * config/arm/arm.c (expand_vec_perm_d::perm): Change
20296 from auto_vec_perm_indices to vec_perm_indices.
20297 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
20298 instead of changing individual elements.
20299 (arm_vectorize_vec_perm_const): Use new_vector to install
20300 the vector in d.perm.
20301 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
20302 Update vec_perm_builder constructor.
20303 (rs6000_expand_interleave): Likewise.
20304 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
20305 (rs6000_expand_interleave): Likewise.
20307 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20309 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
20310 to qimode could truncate the indices.
20311 * optabs.c (expand_vec_perm_var): Likewise.
20313 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20315 * Makefile.in (OBJS): Add vec-perm-indices.o.
20316 * vec-perm-indices.h: New file.
20317 * vec-perm-indices.c: Likewise.
20318 * target.h (vec_perm_indices): Replace with a forward class
20320 (auto_vec_perm_indices): Move to vec-perm-indices.h.
20321 * optabs.h: Include vec-perm-indices.h.
20322 (expand_vec_perm): Delete.
20323 (selector_fits_mode_p, expand_vec_perm_var): Declare.
20324 (expand_vec_perm_const): Declare.
20325 * target.def (vec_perm_const_ok): Replace with...
20326 (vec_perm_const): ...this new hook.
20327 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
20328 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
20329 * doc/tm.texi: Regenerate.
20330 * optabs.def (vec_perm_const): Delete.
20331 * doc/md.texi (vec_perm_const): Likewise.
20332 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
20333 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
20334 expand_vec_perm for constant permutation vectors. Assert that
20335 the mode of variable permutation vectors is the integer equivalent
20336 of the mode that is being permuted.
20337 * optabs-query.h (selector_fits_mode_p): Declare.
20338 * optabs-query.c: Include vec-perm-indices.h.
20339 (selector_fits_mode_p): New function.
20340 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
20341 is defined, instead of checking whether the vec_perm_const_optab
20342 exists. Use targetm.vectorize.vec_perm_const instead of
20343 targetm.vectorize.vec_perm_const_ok. Check whether the indices
20344 fit in the vector mode before using a variable permute.
20345 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
20346 vec_perm_indices instead of an rtx.
20347 (expand_vec_perm): Replace with...
20348 (expand_vec_perm_const): ...this new function. Take the selector
20349 as a vec_perm_indices rather than an rtx. Also take the mode of
20350 the selector. Update call to shift_amt_for_vec_perm_mask.
20351 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
20352 Use vec_perm_indices::new_expanded_vector to expand the original
20353 selector into bytes. Check whether the indices fit in the vector
20354 mode before using a variable permute.
20355 (expand_vec_perm_var): Make global.
20356 (expand_mult_highpart): Use expand_vec_perm_const.
20357 * fold-const.c: Includes vec-perm-indices.h.
20358 * tree-ssa-forwprop.c: Likewise.
20359 * tree-vect-data-refs.c: Likewise.
20360 * tree-vect-generic.c: Likewise.
20361 * tree-vect-loop.c: Likewise.
20362 * tree-vect-slp.c: Likewise.
20363 * tree-vect-stmts.c: Likewise.
20364 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
20366 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
20367 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
20368 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
20369 (aarch64_vectorize_vec_perm_const): ...this new function.
20370 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20371 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20372 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
20373 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
20374 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20375 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20376 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
20378 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
20379 check for NEON modes.
20380 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
20381 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
20382 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
20383 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
20385 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
20386 the old VEC_PERM_CONST conditions.
20387 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
20388 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
20389 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
20390 (ia64_vectorize_vec_perm_const_ok): Merge into...
20391 (ia64_vectorize_vec_perm_const): ...this new function.
20392 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
20393 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
20394 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
20395 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
20396 * config/mips/mips.c (mips_expand_vec_perm_const)
20397 (mips_vectorize_vec_perm_const_ok): Merge into...
20398 (mips_vectorize_vec_perm_const): ...this new function.
20399 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
20400 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
20401 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
20402 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
20403 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
20404 (rs6000_expand_vec_perm_const): Delete.
20405 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
20407 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20408 (altivec_expand_vec_perm_const_le): Take each operand individually.
20409 Operate on constant selectors rather than rtxes.
20410 (altivec_expand_vec_perm_const): Likewise. Update call to
20411 altivec_expand_vec_perm_const_le.
20412 (rs6000_expand_vec_perm_const): Delete.
20413 (rs6000_vectorize_vec_perm_const_ok): Delete.
20414 (rs6000_vectorize_vec_perm_const): New function.
20415 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20416 an element count and rtx array.
20417 (rs6000_expand_extract_even): Update call accordingly.
20418 (rs6000_expand_interleave): Likewise.
20419 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
20420 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
20421 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
20422 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
20423 (rs6000_expand_vec_perm_const): Delete.
20424 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
20425 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20426 (altivec_expand_vec_perm_const_le): Take each operand individually.
20427 Operate on constant selectors rather than rtxes.
20428 (altivec_expand_vec_perm_const): Likewise. Update call to
20429 altivec_expand_vec_perm_const_le.
20430 (rs6000_expand_vec_perm_const): Delete.
20431 (rs6000_vectorize_vec_perm_const_ok): Delete.
20432 (rs6000_vectorize_vec_perm_const): New function. Remove stray
20433 reference to the SPE evmerge intructions.
20434 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
20435 an element count and rtx array.
20436 (rs6000_expand_extract_even): Update call accordingly.
20437 (rs6000_expand_interleave): Likewise.
20438 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
20439 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
20441 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
20443 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20445 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
20446 vector mode and that that mode matches the mode of the data
20448 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
20449 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
20450 directly using expand_vec_perm_1 when forcing selectors into
20452 (expand_vec_perm_var): New function, split out from expand_vec_perm.
20454 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20456 * optabs-query.h (can_vec_perm_p): Delete.
20457 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
20458 * optabs-query.c (can_vec_perm_p): Split into...
20459 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
20460 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
20461 particular selector is valid.
20462 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20463 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20464 (vect_grouped_load_supported): Likewise.
20465 (vect_shift_permute_load_chain): Likewise.
20466 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
20467 (vect_transform_slp_perm_load): Likewise.
20468 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20469 (vectorizable_bswap): Likewise.
20470 (vect_gen_perm_mask_checked): Likewise.
20471 * fold-const.c (fold_ternary_loc): Likewise. Don't take
20472 implementations of variable permutation vectors into account
20473 when deciding which selector to use.
20474 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
20475 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
20476 with a false third argument.
20477 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
20478 to test whether the constant selector is valid and can_vec_perm_var_p
20479 to test whether a variable selector is valid.
20481 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20483 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
20484 * optabs-query.c (can_vec_perm_p): Likewise.
20485 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
20486 instead of vec_perm_indices.
20487 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
20488 (vect_gen_perm_mask_checked): Likewise,
20489 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
20490 (vect_gen_perm_mask_checked): Likewise,
20492 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20494 * optabs-query.h (qimode_for_vec_perm): Declare.
20495 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
20496 (qimode_for_vec_perm): ...this new function.
20497 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
20499 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20501 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
20502 does not have a conditional at the top.
20504 2018-01-02 Richard Biener <rguenther@suse.de>
20506 * ipa-inline.c (big_speedup_p): Fix expression.
20508 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
20511 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
20514 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
20518 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
20519 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
20520 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
20521 cond_taken_branch_cost 3->4.
20523 2018-01-01 Jakub Jelinek <jakub@redhat.com>
20525 PR tree-optimization/83581
20526 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
20527 TODO_cleanup_cfg if any changes have been made.
20529 PR middle-end/83608
20530 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
20531 convert_modes if target mode has the right side, but different mode
20534 PR middle-end/83609
20535 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
20536 last argument when extracting from CONCAT. If either from_real or
20537 from_imag is NULL, use expansion through memory. If result is not
20538 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
20539 the parts directly to inner mode, if even that fails, use expansion
20542 PR middle-end/83623
20543 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
20544 check for bswap in mode rather than HImode and use that in expand_unop
20547 Copyright (C) 2018 Free Software Foundation, Inc.
20549 Copying and distribution of this file, with or without modification,
20550 are permitted in any medium without royalty provided the copyright
20551 notice and this notice are preserved.